How To Implement Module Defaults Groups For Custom Group Or Collection

171 views
Skip to first unread message

Dhiwakar Ravikumar

unread,
Aug 7, 2021, 9:53:41 PM8/7/21
to Ansible Project
This link 
mentions a way to define a default for a group of modules such as aws, azure etc.

I have a namespace.collection of modules that I've written, these are custom modules and I'm wondering how to achieve this for my collection of modules.

For example. I'd like to always specify VAR1:SOME_VALUE to any task in the playbook using a module from my namespace.collection without writing it for every single task separately.
 
  module_defaults: 
      group/MYNAMESPACE.MYCOLLECTION: 
         VAR1: SOME_VALUE

or some equivalent but I haven't been successful so far.

Thanks
Dhiwakar

Erik Godding Boye

unread,
Aug 8, 2021, 1:31:13 AM8/8/21
to ansible...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/336d2333-b70b-4327-b095-057f440db8b5n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages