# How to Avoid Python dependency on Target servers for Ansible file module

**URL:** <https://forum.ansible.com/t/how-to-avoid-python-dependency-on-target-servers-for-ansible-file-module/31312>\
**Category:** Ansible Project\
**Created:** [September 19, 2019, 7:03am UTC](https://forum.ansible.com/t/how-to-avoid-python-dependency-on-target-servers-for-ansible-file-module/31312 "2019-09-19T07:03:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Easy\_King](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@Easy\_King](https://forum.ansible.com/u/Easy_King)\
**Post date:** [September 19, 2019, 7:03am UTC](https://forum.ansible.com/t/how-to-avoid-python-dependency-on-target-servers-for-ansible-file-module/31312/1 "2019-09-19T07:03:24Z")

</div>

I have the below file module that helps copy files or create directory on the target.

`- file:`  
`path: "{{ vars[inventory_hostname] }}/{{ Relative_Path }}/backup"`  
`state: directory`  
`recurse: yes`  
`mode: "u=rwx,g=rw,o=r"`

Unfortunately this has python dependency on the target as seen in the error below:

> TASK [file] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> [WARNING]: No python interpreters found for host 10.7.23.92 (tried  
> [‘/usr/bin/python’, ‘python3.7’, ‘python3.6’, ‘python3.5’, ‘python2.7’,  
> ‘python2.6’, ‘/usr/libexec/platform-python’, ‘/usr/bin/python3’, ‘python’])  
> fatal: [10.7.23.92]: FAILED! =\> {“ansible\_facts”: {“discovered\_interpreter\_python”: “/usr/bin/python”}, “changed”: false, “module\_stderr”: “Shared connection to 10.7.23.92 closed.\r\n”, “module\_stdout”: “/bin/sh: /usr/bin/python: not found.\r\n”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 127}

```auto

```

```auto
I do not have python on the target servers. 

```

```auto

```

```auto
Ideally i would think that a simple ssh or other tools are capable of doing this without the need for python. 

```

```auto

```

```auto
Is there a way to get ansible do this task without the need of python ?

```
