From a282af81ac9cbe5bd0081c1a2461f897ac6c934d Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 27 Mar 2018 14:23:57 +1100 Subject: [PATCH] Use hostvars to get ansible_default_ipv6 I think this is missing picking this up from hostvars, so always assumes ipv4. Change-Id: I65929a87f864701ac07966a6b0d9ca9225da5145 --- roles/configure-unbound/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/configure-unbound/tasks/main.yaml b/roles/configure-unbound/tasks/main.yaml index d8f6ef7e..6b66745b 100644 --- a/roles/configure-unbound/tasks/main.yaml +++ b/roles/configure-unbound/tasks/main.yaml @@ -14,8 +14,8 @@ # routable; combine these checks into this fact. - name: Check for IPv6 when: - - ansible_default_ipv6 is defined - - ansible_default_ipv6.address is defined + - hostvars[inventory_hostname]['ansible_default_ipv6'] is defined + - hostvars[inventory_hostname]['ansible_default_ipv6']['address'] is defined set_fact: unbound_use_ipv6: True