Add server specific cloud configuration
A user may not just want to deploy all servers under the same os_client_config cloud, this change adds a default at the role level defaulting to envvars, and the creation loop checks first per-server occ cloud, then default to role default if not defined.
This commit is contained in:
parent
105ff969bc
commit
f357563ea2
2
roles/provision_infra_servers/defaults/main.yml
Normal file
2
roles/provision_infra_servers/defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
os_client_config_cloud: envvars
|
@ -2,7 +2,7 @@
|
|||||||
- name: Create OpenStack instances
|
- name: Create OpenStack instances
|
||||||
os_server:
|
os_server:
|
||||||
state: present
|
state: present
|
||||||
cloud: "{{os_client_config_cloud}}"
|
cloud: "{{item.os_client_config_cloud | default(os_client_config_cloud) }}"
|
||||||
name: "{{ item.name }}.{{ domainname }}"
|
name: "{{ item.name }}.{{ domainname }}"
|
||||||
image: "{{ item.image }}"
|
image: "{{ item.image }}"
|
||||||
key_name: "{{ key_name }}"
|
key_name: "{{ key_name }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user