From c46fc9b5fd56e4203862a2dc36adf6a0d2ace838 Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Wed, 4 Nov 2015 10:24:13 +0100 Subject: [PATCH] Attach volumes defined on servers stanzas This change will attach the volumes to the servers defining them. Change-Id: Iea58103e3d640f70891a2a8fcc16af26d79407ca --- roles/provision_infra_servers/tasks/main.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/roles/provision_infra_servers/tasks/main.yml b/roles/provision_infra_servers/tasks/main.yml index 6604178..8dc38c2 100644 --- a/roles/provision_infra_servers/tasks/main.yml +++ b/roles/provision_infra_servers/tasks/main.yml @@ -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 }