From b20035b18385c306494a715e5c75a58213bb9463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Mon, 30 Nov 2015 09:56:57 +0100 Subject: [PATCH] use correct function to lookup ip addr --- tasks/persistent_cloud_new.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/persistent_cloud_new.yml b/tasks/persistent_cloud_new.yml index a69fe5f4c8..bdebb420cd 100644 --- a/tasks/persistent_cloud_new.yml +++ b/tasks/persistent_cloud_new.yml @@ -14,7 +14,7 @@ when: host_is_up|failed - name: clean out old known_hosts (IP based entries) - local_action: known_hosts path={{item}} host={{inventory_hostname | ipaddr}} state=absent + local_action: known_hosts path={{item}} host={{ lookup('dig', inventory_hostname, wantlist=False) }} state=absent ignore_errors: True with_items: - /root/.ssh/known_hosts