# ansilbe delegate\_to can not run

**URL:** <https://forum.ansible.com/t/ansilbe-delegate-to-can-not-run/31706>\
**Category:** Ansible Project\
**Tags:** kubernetes\
**Created:** [November 22, 2019, 3:14am UTC](https://forum.ansible.com/t/ansilbe-delegate-to-can-not-run/31706 "2019-11-22T03:14:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhengqisong](https://avatars.discourse-cdn.com/v4/letter/z/3bc359/32.png) [@zhengqisong](https://forum.ansible.com/u/zhengqisong)\
**Post date:** [November 22, 2019, 3:14am UTC](https://forum.ansible.com/t/ansilbe-delegate-to-can-not-run/31706/1 "2019-11-22T03:14:24Z")

</div>

# The task definition:

```auto
- name: add flannel network config in etcd
  shell: config_flannel_network.sh
  when: flannel_config_shell.changed
  delegate_to: "10.122.12.177"

```

# software environment

> - ansible client  
> host: 127.0.0.1  
> system os: centos 7  
> ansible version: 2.9.1  
> python: python

> - target host  
> host: 10.122.17.201  
> system os: centos 8  
> python: python3

> - delegate\_to host  
> host: 10.122.12.177  
> system os: centos 7  
> python: python

# exec ansible task, error message:

```auto
TASK [flannel : add flannel network config in etcd] *************************************************************************************************
task path: /home/earthgod/workspaces/ansible-k8s-tst/ansible-roles-k8s/roles/flannel/tasks/main.yml:24                                               
fatal: [10.122.17.201 -> 10.122.12.177]: FAILED! => {"changed": false, "module_stderr": "BECOME-SUCCESS-uwkbocxpjaabqexywadrpcglwjsndvfs\r\n", "modul
e_stdout": "/bin/sh: /usr/bin/python3.6: No such file or directory\r\n", "msg": "The module failed to execute correctly, you probably need to set the
 interpreter.\nSee stdout/stderr for the exact error", "rc": 127}

```

---

<div class="post-metadata">

**Author:** ![vbotka](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/vbotka/32/359_2.png) [@vbotka](https://forum.ansible.com/u/vbotka)\
**Post date:** [November 22, 2019, 3:56am UTC](https://forum.ansible.com/t/ansilbe-delegate-to-can-not-run/31706/2 "2019-11-22T03:56:49Z")

</div>

There is no "/usr/bin/python3.6" installed at remote "10.122.12.177". Either  
install it, or set "ansible\_python\_interpreter" to the version  
already installed. For example in the inventory

&nbsp;&nbsp;10.122.12.177 ansible\_python\_interpreter=/usr/bin/python2.7

Cheers,

&nbsp;&nbsp;-vlado
