From aaaf980140832de694ef0ffe3282dabbf0b90081 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 29 Nov 2017 11:10:56 +0100 Subject: [PATCH] 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 --- infrastructure-playbooks/purge-cluster.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index b97916f82..c35e4d6ce 100644 --- a/infrastructure-playbooks/purge-cluster.yml +++ b/infrastructure-playbooks/purge-cluster.yml @@ -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: