# Failed to easy\_install dnspython to use dig

**URL:** <https://forum.ansible.com/t/failed-to-easy-install-dnspython-to-use-dig/31466>\
**Category:** Ansible Project\
**Tags:** kubernetes\
**Created:** [October 11, 2019, 11:34pm UTC](https://forum.ansible.com/t/failed-to-easy-install-dnspython-to-use-dig/31466 "2019-10-11T23:34:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boa\_Ah](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@Boa\_Ah](https://forum.ansible.com/u/Boa_Ah)\
**Post date:** [October 11, 2019, 11:34pm UTC](https://forum.ansible.com/t/failed-to-easy-install-dnspython-to-use-dig/31466/1 "2019-10-11T23:34:18Z")

</div>

Team, my playbook works fine on my MacBook but now am running it with Jenkins on Linux instance and it’s throwing me this error. Any hint please?

have my playbook as below and i tried with become: yes as well but no luck. how to get around this ?

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- easy\_install:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: dnspython  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state: present  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#become: yes

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- name: Validate DNS record lookup for {{ kubeapi\_server }}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;debug: msg="{{ lookup('dig', '{{ kubeapi\_server }}' )}}"  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vars:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;variable: "{{ lookup('dig', '{{ kubeapi\_server }}' )}}"  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;failed\_when: not variable  
Output:

16:18:07 TASK [team-deploy-validation : easy\_install] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
16:18:07 [1;30mtask path: /home/testuser/jenkins/workspace/run\_ansible\_playbook/k8s/baremetal/roles/team-deploy-validation/tasks/main.yml:9[0m  
16:18:07 Friday 11 October 2019 23:18:07 +0000 (0:00:00.029) 0:00:02.902 \*\*\*\*\*\*\*\*  
16:18:07 [0;34mUsing module file /usr/local/lib/python2.7/dist-packages/ansible/modules/packaging/language/easy\_install.py[0m  
16:18:07 [0;34mPipelining is enabled.[0m  
16:18:07 [0;34m\<127.0.0.1\> ESTABLISH LOCAL CONNECTION FOR USER: testuser[0m  
16:18:07 [0;34m\<127.0.0.1\> EXEC /bin/sh -c '/usr/bin/python && sleep 0'[0m  
16:18:07 [0;31mThe full traceback is:[0m  
16:18:07 [0;31mWARNING: The below traceback may

---

<div class="post-metadata">

**Author:** ![Boa\_Ah](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@Boa\_Ah](https://forum.ansible.com/u/Boa_Ah)\
**Post date:** [October 12, 2019, 1:01am UTC](https://forum.ansible.com/t/failed-to-easy-install-dnspython-to-use-dig/31466/2 "2019-10-12T01:01:07Z")

</div>

```fatal: [localhost]: FAILED! =\> {  
16:10:06 "changed": false,  
16:10:06 "module\_stderr": "/bin/sh: 1: sudo: not found\n",  
16:10:06 "module\_stdout": "",  
16:10:06 "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",  
16:10:06 "rc": 127  
16:10:06 }  
16:10:06 ```

---

<div class="post-metadata">

**Author:** ![Owen\_Corcoran](https://avatars.discourse-cdn.com/v4/letter/o/977dab/32.png) [@Owen\_Corcoran](https://forum.ansible.com/u/Owen_Corcoran)\
**Post date:** [October 12, 2019, 9:41pm UTC](https://forum.ansible.com/t/failed-to-easy-install-dnspython-to-use-dig/31466/3 "2019-10-12T21:41:54Z")

</div>

What version of linux ? Sudo not found implies that comment is being ignored. Can you delete the become line ans re run. Im assuming the target has pip installed and can reach the internet
