Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module defaults groups #1015

Closed
markgraf opened this issue Oct 6, 2020 · 4 comments · Fixed by #1344
Closed

Module defaults groups #1015

markgraf opened this issue Oct 6, 2020 · 4 comments · Fixed by #1344
Labels

Comments

@markgraf
Copy link

markgraf commented Oct 6, 2020

SUMMARY

As it is now, there are 54 modules that all want

  • user
  • password
  • server-url

Repeating those same informations over and over again with all the modules you use is lots of redundant work.
Creating "module defaults" for each of them is equally redundant.

FEATURE REQUEST

It would be nice to have Module defaults groups in order to define that block ONCE for an entire playbook like this:

# example_play.yml
- hosts: localhost
  module_defaults:
    group/foreman:
      name: myNameIs
      password: TopS3cr3t
      server_url: foreman.at.home

These already exist for aws, azure, gcp, etc..., so I guess most of the needed code should already exist?

@evgeni
Copy link
Member

evgeni commented Oct 6, 2020

This is currently not possible for collections: ansible/ansible#72006
But yes, we also really want to have that feature :)

@markgraf
Copy link
Author

markgraf commented Oct 6, 2020

Good to know. Thanks for the update! Waiting for ansible/ansible#72006 then...

@evgeni
Copy link
Member

evgeni commented May 5, 2021

Seems this is finally coming in core 2.12: ansible/community#546 (comment)

@markgraf
Copy link
Author

markgraf commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants