purge: fix bug on 'wait_for' task

this task hangs because `{{ inventory_hostname }}` doesn't resolv to an
actual ip address.
Using `hostvars[inventory_hostname]['ansible_default_ipv4']['address']`
should fix this because it will reach the node with its actual IP
address.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/2221/head
Guillaume Abrioux 2017-11-29 11:10:56 +01:00
parent b449b16edd
commit aaaf980140
1 changed files with 1 additions and 1 deletions

View File

@ -213,7 +213,7 @@
- name: wait for server to boot
become: false
local_action: wait_for port=22 host={{ inventory_hostname }} state=started delay=10 timeout=500
local_action: wait_for port=22 host={{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }} state=started delay=10 timeout=500
- name: remove data
file: