|
@@ -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
|
|
|
|