Add option for modules_default groups

It's possible in Ansible to set options for modules with
modules_default keyword[1]. For some of modules it's possible
to do with module_default groups, like cloud modules[2]
Add this option to OS modules.

[1]
https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html#module-defaults

[2]
https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html#module-defaults-groups

Change-Id: I31e36f3a6d600815152a116afb37f8e3e21bc282
This commit is contained in:
Sagi Shnaidman
2020-03-10 13:54:22 +02:00
parent a451edcb5c
commit 67466513da
2 changed files with 59 additions and 0 deletions

View File

@@ -62,6 +62,9 @@ Libraries
* All OpenStack API interactions should happen via the openstacksdk and not via * All OpenStack API interactions should happen via the openstacksdk and not via
OpenStack Client libraries. The OpenStack Client libraries do no have end OpenStack Client libraries. The OpenStack Client libraries do no have end
users as a primary audience, they are for intra-server communication. users as a primary audience, they are for intra-server communication.
* All modules should be registered in ``meta/action_groups.yml`` for enabling the
variables to be set in `group level
<https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html>`.
Testing Testing
------- -------

56
meta/action_groups.yml Normal file
View File

@@ -0,0 +1,56 @@
os:
- os_auth
- os_client_config
- os_coe_cluster
- os_coe_cluster_template
- os_flavor_info
- os_floating_ip
- os_group
- os_group_info
- os_image
- os_image_info
- os_ironic
- os_ironic_inspect
- os_ironic_node
- os_keypair
- os_keystone_domain
- os_keystone_domain_info
- os_keystone_endpoint
- os_keystone_role
- os_keystone_service
- os_listener
- os_loadbalancer
- os_member
- os_network
- os_networks_info
- os_nova_flavor
- os_nova_host_aggregate
- os_object
- os_pool
- os_port
- os_port_info
- os_project
- os_project_access
- os_project_info
- os_quota
- os_recordset
- os_router
- os_routers_info
- os_security_group
- os_security_group_rule
- os_server
- os_server_action
- os_server_group
- os_server_info
- os_server_metadata
- os_server_volume
- os_stack
- os_subnet
- os_subnets_info
- os_user
- os_user_group
- os_user_info
- os_user_role
- os_volume
- os_volume_snapshot
- os_zone