ansible-aci
ansible-aci copied to clipboard
add action_groups for module_defaults
add action_groups in meta/runtime.yml
.
This allows module_defaults group feature. https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html#module-defaults-groups
It becomes able to specify common options such as host username and password without specifying per tasks or using environment variables.
---
- hosts: apic
gather_facts: no
module_defaults:
group/cisco.aci.aci:
host: "{{ ansible_host }}"
username: "{{ username }}"
password: "{{ password }}"
tasks:
- name: create tenant
cisco.aci.aci_tenant:
tenant: test_tenant01
state: present
- name: create ap
cisco.aci.aci_ap:
tenant: test_tenant01
ap: test_ap01
state: present
Thank you for your approval!
One thing I noticed is that in this PR you have a non-standard module on the list aci_bulk_static_binding_to_epg. Probably needs cleanup before merge.
@rafmuller The following modules including aci_bulk_static_binding_to_epg
have been merged into the main branch since the version 2.2.0 release.
-
aci_bulk_static_binding_to_epg
#228 -
aci_ntp_policy
#229 -
aci_ntp_server
#229
Therefore, these modules should be included in the list in the next release.
Added the following modules that were added after submitting this PR.
- aci_aaa_ssh_auth
- aci_aaa_user_domain
- aci_aaa_user_role
- aci_l3out_logical_interface_profile_ospf_policy
@akira6592 is there a way to just have a wildcard? This looks like it will be a pain to manage this list.
@akira6592 Have you seen my question above?
@lhercot Sorry for the delay in replying.
Unfortunately there does not seem to be a way to specify a module with wildcards.
Other collections (e.g., amazon.aws
) also maintain listings.
If there is a workaround, it would be to add an explanation in the Contributing to this collection
section of the README.md, something like "When adding a module, also add it to meta/runtime.yml
".