summaryrefslogtreecommitdiffstats
path: root/ansible/roles/infra_create_vms/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/infra_create_vms/tasks/main.yml')
-rw-r--r--ansible/roles/infra_create_vms/tasks/main.yml11
1 files changed, 11 insertions, 0 deletions
diff --git a/ansible/roles/infra_create_vms/tasks/main.yml b/ansible/roles/infra_create_vms/tasks/main.yml
index 4d47f44ff..b422a9205 100644
--- a/ansible/roles/infra_create_vms/tasks/main.yml
+++ b/ansible/roles/infra_create_vms/tasks/main.yml
@@ -32,3 +32,14 @@
loop_control:
loop_var: node_item
with_items: "{{ infra_deploy_vars.nodes }}"
+
+- name: Create list of dictionaries with vm name, ip address
+ set_fact:
+ vm_name_ip: "{{ vm_name_ip|default([]) + [{item.hostname: item.interfaces[1].ip}] }}"
+ with_items: "{{ infra_deploy_vars.nodes }}"
+
+- name: Make sure VM is reachable
+ include_tasks: validate_vms.yml
+ loop_control:
+ loop_var: name_ip
+ with_items: "{{ vm_name_ip }}"