# AWX user permission to use dns.resolve?

**URL:** <https://forum.ansible.com/t/awx-user-permission-to-use-dns-resolve/28979>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [November 8, 2018, 3:33pm UTC](https://forum.ansible.com/t/awx-user-permission-to-use-dns-resolve/28979 "2018-11-08T15:33:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_Herren](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@Marc\_Herren](https://forum.ansible.com/u/Marc_Herren)\
**Post date:** [November 8, 2018, 3:33pm UTC](https://forum.ansible.com/t/awx-user-permission-to-use-dns-resolve/28979/1 "2018-11-08T15:33:36Z")

</div>

Hi there,

I have to following strange problem.

User A has the execute permission on a template, but it seems to fail during dns.resolv

`

{  
“msg”: “An unhandled exception occurred while running the lookup plugin ‘dig’. Error was a \<class ‘ansible.errors.AnsibleError’\>, original message: dns.resolver unhandled exception All nameservers failed to answer the query shop.blatter-papeterie.ch. IN A: Server 127.0.0.11 UDP port 53 answered SERVFAIL”,  
“\_ansible\_no\_log”: false  
}

`

When I run the exact same template with a system administrator user, i works fine

`

{  
“changed”: false,  
“ansible\_facts”: {  
“url”: “shop.blatter-papeterie.ch”,  
“url\_points\_to”: “194.88.197.40”  
},  
“\_ansible\_no\_log”: false  
}

`

The ansible code is rather simple

`

# # Check if DNS can be resolved (otherwise Let’s encrypt won’t work)

- set\_fact:  
url: “{{ url | default(‘www.search.ch’) }}”  
url\_points\_to: “{{ lookup(‘dig’, ‘{{ url }}’) }}”

`

Is there a permission setting somewhere which I was unable to find?

Best regards,

Marc
