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

Feature: add module groups for module_defaults #195

Open
ebirn opened this issue Aug 30, 2023 · 0 comments
Open

Feature: add module groups for module_defaults #195

ebirn opened this issue Aug 30, 2023 · 0 comments

Comments

@ebirn
Copy link

ebirn commented Aug 30, 2023

see https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_module_defaults.html#module-defaults-groups

This would allow setting certain parameters (i.e. provider/credentials) on playbook level using module_defaults:

# collections/ansible_collections/infoblox/nios_modules/meta/runtime.yml
action_groups:
  api_calls:
    - nios_srv_record
    - nios_aaaa_record
    - other_module
    - [...]

would allow setting defaults in the playbook

- hosts: localhost
  module_defaults:
    group/infoblox.nios_modules.api_calls:
      provider:
        host: my.host
        username: some_user
        password: secret
  tasks:
    # default credentials will be applied
    - infoblox.nios_modules.nios_srv_record:
        name: "my-srv"
        domain: "example.com"
        target: "{{ inventory_hostname }}"
        port: 1234
        state: present
        comment: "some SRV record"
  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant