f357563ea2
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.
19 lines
532 B
YAML
19 lines
532 B
YAML
---
|
|
- name: Create OpenStack instances
|
|
os_server:
|
|
state: present
|
|
cloud: "{{item.os_client_config_cloud | default(os_client_config_cloud) }}"
|
|
name: "{{ item.name }}.{{ domainname }}"
|
|
image: "{{ item.image }}"
|
|
key_name: "{{ key_name }}"
|
|
timeout: 200
|
|
flavor: "{{ item.flavor }}"
|
|
nics:
|
|
- net-name: "{{ item.net_name }}"
|
|
security_groups: "{{ item.security_groups }}"
|
|
auto_floating_ip: yes
|
|
meta:
|
|
group: infra
|
|
infra_type: "{{ item.infra_type }}"
|
|
with_items: infra_servers
|