From: Guillaume Abrioux Date: Wed, 29 Nov 2017 10:10:56 +0000 (+0100) Subject: purge: fix bug on 'wait_for' task X-Git-Tag: v3.0.16~21^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2222%2Fhead;p=ceph-ansible.git 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 (cherry picked from commit aaaf980140832de694ef0ffe3282dabbf0b90081) Signed-off-by: Sébastien Han --- diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index 0d4db1149..a5bcc9cbd 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: