# Can ansible work without Python2.7 on target (remote) machine? We cannot install python in remote machine as there might not be internet connection available.

**URL:** <https://forum.ansible.com/t/can-ansible-work-without-python2-7-on-target-remote-machine-we-cannot-install-python-in-remote-machine-as-there-might-not-be-internet-connection-available/22686>\
**Category:** Ansible Project\
**Created:** [September 30, 2016, 8:49am UTC](https://forum.ansible.com/t/can-ansible-work-without-python2-7-on-target-remote-machine-we-cannot-install-python-in-remote-machine-as-there-might-not-be-internet-connection-available/22686 "2016-09-30T08:49:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sourav\_Chatterjee](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Sourav\_Chatterjee](https://forum.ansible.com/u/Sourav_Chatterjee)\
**Post date:** [September 30, 2016, 8:49am UTC](https://forum.ansible.com/t/can-ansible-work-without-python2-7-on-target-remote-machine-we-cannot-install-python-in-remote-machine-as-there-might-not-be-internet-connection-available/22686/1 "2016-09-30T08:49:39Z")

</div>

Hi,

I would like to confirm if ansible can be used without python2.7 on target machine, if there is any way …? We will not be able to able to install python on target machine using ansible raw module as there may not be internet access. Any other alternatives?

We want to run just shell command in background in the remote machine (using nohup or &). I could not run it using "raw"module. Any other way to achieve this without python2.7 on target machine?

Thanks

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [September 30, 2016, 4:52pm UTC](https://forum.ansible.com/t/can-ansible-work-without-python2-7-on-target-remote-machine-we-cannot-install-python-in-remote-machine-as-there-might-not-be-internet-connection-available/22686/2 "2016-09-30T16:52:15Z")

</div>

> I would like to confirm if ansible can be used without python2.7 on target  
> machine, if there is any way ..? We will not be able to able to install  
> python on target machine using ansible raw module as there may not be  
> internet access. Any other alternatives?

Copy over the OS packages you need to install Python, if that is not an alternative, you are left with the raw module.

> We want to run just shell command in background in the remote machine  
> (using nohup or &). I could not run it using "raw"module. Any other way to  
> achieve this without python2.7 on target machine?

nohup and & won't work with the shell module either.  
Create init script and start them with the raw module.

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [September 30, 2016, 5:31pm UTC](https://forum.ansible.com/t/can-ansible-work-without-python2-7-on-target-remote-machine-we-cannot-install-python-in-remote-machine-as-there-might-not-be-internet-connection-available/22686/3 "2016-09-30T17:31:44Z")

</div>

I have to withdraw my statement, it was based on some people having problem getting nohup and & to work with shell.

I did a test my self and nohup with & work with the shell module.
