# Runs a local script on a remote node after transferring it

**URL:** <https://forum.ansible.com/t/runs-a-local-script-on-a-remote-node-after-transferring-it/21360>\
**Category:** Ansible Project\
**Created:** [May 5, 2016, 8:55am UTC](https://forum.ansible.com/t/runs-a-local-script-on-a-remote-node-after-transferring-it/21360 "2016-05-05T08:55:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![imed\_khaskhoussi](https://avatars.discourse-cdn.com/v4/letter/i/919ad9/32.png) [@imed\_khaskhoussi](https://forum.ansible.com/u/imed_khaskhoussi)\
**Post date:** [May 5, 2016, 8:55am UTC](https://forum.ansible.com/t/runs-a-local-script-on-a-remote-node-after-transferring-it/21360/1 "2016-05-05T08:55:19Z")

</div>

hello there ,

I want to execute a python script in the remote machine , haw to do that ?  
for the moment i execute the script which is located in the remote machine using this command :

-shell: python script

but i want to put this script in the machine in which i installed ansible and run it in the remote machine

any ideas please ?  
thank you in advance .

---

<div class="post-metadata">

**Author:** ![Dick\_Davies](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Dick\_Davies](https://forum.ansible.com/u/Dick_Davies)\
**Post date:** [May 5, 2016, 9:06am UTC](https://forum.ansible.com/t/runs-a-local-script-on-a-remote-node-after-transferring-it/21360/2 "2016-05-05T09:06:30Z")

</div>

[http://docs.ansible.com/ansible/copy\_module.html](http://docs.ansible.com/ansible/copy_module.html)

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [May 5, 2016, 6:37pm UTC](https://forum.ansible.com/t/runs-a-local-script-on-a-remote-node-after-transferring-it/21360/3 "2016-05-05T18:37:04Z")

</div>

The script module does this [http://docs.ansible.com/ansible/script\_module.html](http://docs.ansible.com/ansible/script_module.html)
