From bd35069495fa5c8450c632472f63df4870ff07f3 Mon Sep 17 00:00:00 2001 From: spike77453 Date: Thu, 29 Nov 2018 15:58:16 +0100 Subject: [PATCH] Non-existent RR returns empty string (#40680) --- lib/ansible/plugins/lookup/dnstxt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/plugins/lookup/dnstxt.py b/lib/ansible/plugins/lookup/dnstxt.py index b12b4221f3..24f35d70e9 100644 --- a/lib/ansible/plugins/lookup/dnstxt.py +++ b/lib/ansible/plugins/lookup/dnstxt.py @@ -84,6 +84,8 @@ class LookupModule(LookupBase): string = 'NXDOMAIN' except dns.resolver.Timeout: string = '' + except dns.resolver.NoAnswer: + string = '' except DNSException as e: raise AnsibleError("dns.resolver unhandled exception %s" % to_native(e))