Attach volumes defined on servers stanzas

This change will attach the volumes to the servers defining them.

Change-Id: Iea58103e3d640f70891a2a8fcc16af26d79407ca
This commit is contained in:
Ricardo Carrillo Cruz 2015-11-04 10:24:13 +01:00
parent 76a9301314
commit c46fc9b5fd
1 changed files with 11 additions and 0 deletions

View File

@ -27,3 +27,14 @@
- infra_servers
- volumes
- { skip_missing: yes }
- name: Attach OpenStack volumes
os_server_volume:
state: present
cloud: "{{item.os_client_config_cloud | default(os_client_config_cloud) }}"
server: "{{ item.0.name }}.{{ domainname }}"
volume: "{{ item.1.name }}"
with_subelements:
- infra_servers
- volumes
- { skip_missing: yes }