summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt
diff options
context:
space:
mode:
authorDiego Castro <spinolacastro@gmail.com>2015-08-27 13:41:16 -0300
committerDiego Castro <spinolacastro@gmail.com>2015-08-27 13:41:16 -0300
commitd54665d0c0c1f7a3cec572c04f3ce769277c05e4 (patch)
tree043628b7a804ad66019129129cc0186289d80a28 /playbooks/libvirt
parent055921cd545c12733949f37c1af2c0a1296216ec (diff)
parent5c7e1366ad8ae67ef23117d296a65a6ee81ccd29 (diff)
downloadopenshift-d54665d0c0c1f7a3cec572c04f3ce769277c05e4.tar.gz
openshift-d54665d0c0c1f7a3cec572c04f3ce769277c05e4.tar.bz2
openshift-d54665d0c0c1f7a3cec572c04f3ce769277c05e4.tar.xz
openshift-d54665d0c0c1f7a3cec572c04f3ce769277c05e4.zip
Merge remote-tracking branch 'openshift/master'
Diffstat (limited to 'playbooks/libvirt')
-rw-r--r--playbooks/libvirt/openshift-cluster/launch.yml8
-rw-r--r--playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml5
2 files changed, 11 insertions, 2 deletions
diff --git a/playbooks/libvirt/openshift-cluster/launch.yml b/playbooks/libvirt/openshift-cluster/launch.yml
index 830f9d216..d3e768de5 100644
--- a/playbooks/libvirt/openshift-cluster/launch.yml
+++ b/playbooks/libvirt/openshift-cluster/launch.yml
@@ -17,6 +17,14 @@
- include: tasks/configure_libvirt.yml
+ - include: ../../common/openshift-cluster/set_etcd_launch_facts_tasks.yml
+ - include: tasks/launch_instances.yml
+ vars:
+ instances: "{{ etcd_names }}"
+ cluster: "{{ cluster_id }}"
+ type: "{{ k8s_type }}"
+ g_sub_host_type: "default"
+
- include: ../../common/openshift-cluster/set_master_launch_facts_tasks.yml
- include: tasks/launch_instances.yml
vars:
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: