Browse Source

Merge pull request #270 from lhuard1A/fix_libvirt

Fix libvirt playbook
Thomas Wiest 9 years ago
parent
commit
9872c03145
1 changed files with 2 additions and 2 deletions
  1. 2 2
      playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml

+ 2 - 2
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