community.rabbitmq
community.rabbitmq copied to clipboard
Define Default Action Group
SUMMARY
This PR defines an action group for all collection modules.
When same module is frequently called with same arguments, we can use module_defaults
to avoid duplications. Since Ansible 2.7, we can group modules that share common sets of parameters. And since ansible-core 2.12, collections can define its own groups via action_groups
on runtime.yml
.
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_module_defaults.html
ISSUE TYPE
- Feature Pull Request
COMPONENT NAME
-
rabbitmq
action group
ADDITIONAL INFORMATION
Before:
# playbook.yaml
- name: rabbitmq
hosts: all
module_defaults:
community.rabbitmq.rabbitmq_exchanges:
login_user: "admin"
login_password: "admin"
community.rabbitmq.rabbitmq_queues:
login_user: "admin"
login_password: "admin"
# ...
roles:
- "exchanges"
- "queues"
After:
# playbook.yaml
- name: rabbitmq
hosts: all
module_defaults:
group/rabbitmq:
login_user: "admin"
login_password: "admin"
roles:
- "exchanges"
- "queues"
hi @wandersonwhcr thanks for this contribution! I'm wondering whether the group can be set to rabbitmq
rather than the FQDN? If so, this might make it a little more clean?
Hi @csmart! Of course!
Changed as requested.
But I think these pipeline errors are not caused because of my changes.