infra-ansible/roles/provision_infra_servers/tasks/main.yml
Ricardo Carrillo Cruz f357563ea2 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.
2015-08-19 21:06:06 +02:00

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