Skip to content

Commit

Permalink
Merge pull request CentOS-PaaS-SIG#442 from p3ck/release1.5
Browse files Browse the repository at this point in the history
Fix libvirt to not wait forever for ip address
  • Loading branch information
herlo committed Jan 9, 2018
2 parents 7766613 + 9621ad6 commit da8c870
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,28 +295,28 @@

- name: "mac_and_ip | wait for dhcp ip address"
shell: |
until arp -an | grep -q -F {{ extract_mac_address_result.results[mac].stdout }}; do
sleep 1
done
arp -an | grep -F {{ extract_mac_address_result.results[mac].stdout }} | cut -f 2 -d "(" | cut -f 1 -d ")"
with_items:
- "{{ res_count.stdout }}"
loop_control:
loop_var: mac
register: extract_ip_address_result
until: extract_ip_address_result.stdout != ""
retries: 30
delay: 10
when: uri_hostname == 'localhost'

- name: "mac_and_ip | wait for dhcp ip address"
shell: |
until arp -an | grep -q -F {{ extract_mac_address_result.results[mac].stdout }}; do
sleep 1
done
arp -an | grep -F {{ extract_mac_address_result.results[mac].stdout }} | cut -f 2 -d "(" | cut -f 1 -d ")"
with_items:
- "{{ res_count.stdout }}"
loop_control:
loop_var: mac
register: extract_ip_address_result_remote
until: extract_ip_address_result.stdout != ""
retries: 30
delay: 10
remote_user: "{{ res_def['remote_user'] | default(ansible_user_id) }}"
delegate_to: "{{ uri_hostname }}"
when: uri_hostname != 'localhost'
Expand Down

0 comments on commit da8c870

Please sign in to comment.