summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
diff options
context:
space:
mode:
authorLénaïc Huard <lhuard@amadeus.com>2015-08-25 17:04:02 +0200
committerLénaïc Huard <lhuard@amadeus.com>2015-08-25 17:04:02 +0200
commitced2ad4551632d93d6a17391913effefe67607b4 (patch)
tree5ddf0b9369d79626d265a2f17d60b5ef538a989b /playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
parent922b87ede66f6b7e376d1f46e13327077cd41719 (diff)
downloadopenshift-ced2ad4551632d93d6a17391913effefe67607b4.tar.gz
openshift-ced2ad4551632d93d6a17391913effefe67607b4.tar.bz2
openshift-ced2ad4551632d93d6a17391913effefe67607b4.tar.xz
openshift-ced2ad4551632d93d6a17391913effefe67607b4.zip
Add etcd nodes management in libvirt
Diffstat (limited to 'playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml')
-rw-r--r--playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml5
1 files changed, 3 insertions, 2 deletions
diff --git a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
index 4cb494056..2a0c90b46 100644
--- a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
@@ -63,8 +63,9 @@
shell: 'virsh -c {{ libvirt_uri }} net-dhcp-leases openshift-ansible | egrep -c ''{{ instances | join("|") }}'''
register: nb_allocated_ips
until: nb_allocated_ips.stdout == '{{ instances | length }}'
- retries: 30
+ retries: 60
delay: 1
+ when: instances | length != 0
- name: Collect IP addresses of the VMs
shell: 'virsh -c {{ libvirt_uri }} net-dhcp-leases openshift-ansible | awk ''$6 == "{{ item }}" {gsub(/\/.*/, "", $5); print $5}'''
@@ -72,7 +73,7 @@
with_items: instances
- set_fact:
- ips: "{{ scratch_ip.results | oo_collect('stdout') }}"
+ ips: "{{ scratch_ip.results | default([]) | oo_collect('stdout') }}"
- name: Add new instances
add_host: