summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLénaïc Huard <lhuard@amadeus.com>2015-06-07 23:35:24 +0200
committerLénaïc Huard <lhuard@amadeus.com>2015-06-07 23:35:24 +0200
commit5bd864d11b08370581b9cba219862ff4f578eca3 (patch)
treea0f882809cd8bdc0897129b4a5fe920397ff5379
parentd7e8272e6e027f2ecc34781f011ea731051565fd (diff)
downloadopenshift-5bd864d11b08370581b9cba219862ff4f578eca3.tar.gz
openshift-5bd864d11b08370581b9cba219862ff4f578eca3.tar.bz2
openshift-5bd864d11b08370581b9cba219862ff4f578eca3.tar.xz
openshift-5bd864d11b08370581b9cba219862ff4f578eca3.zip
Fix libvirt playbook
If we don’t explicitly specify the libvirt URI to use for virsh, it will use the LIBVIRT_DEFAULT_URI environment variable. For a consistent behavior, all `virsh` invocation must be done with the `-c <libvirt_uri>` parameter.
-rw-r--r--playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml4
1 files changed, 2 insertions, 2 deletions
diff --git a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
index 8bf1e84ee..8291192ab 100644
--- a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
@@ -59,14 +59,14 @@
with_items: instances
- name: Wait for the VMs to get an IP
- shell: 'virsh net-dhcp-leases openshift-ansible | egrep -c ''{{ instances | join("|") }}'''
+ 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
delay: 1
- name: Collect IP addresses of the VMs
- shell: 'virsh net-dhcp-leases openshift-ansible | awk ''$6 == "{{ item }}" {gsub(/\/.*/, "", $5); print $5}'''
+ shell: 'virsh -c {{ libvirt_uri }} net-dhcp-leases openshift-ansible | awk ''$6 == "{{ item }}" {gsub(/\/.*/, "", $5); print $5}'''
register: scratch_ip
with_items: instances