I want to copy my python script which depends on my other python packages to remote node and run this scripts, is it possible?

Hi all,
I’m new user for ansible, I want to it’s possible?
Or it’s only possible for module, but it not possible for normal script under files folder?

Thanks,
Justin

yes, you can copy your script and other packages to remote nodes and run this script.

I want to copy my python script which depends on my other python packages to remote node and run this scripts

I want to copy my python script which depends on my other python packages to remote node
You can perform this task by using copy module

  • name: copy python script

copy:

src: <script.sh>

dest: </usr/local/sbin/script.sh>

owner: root

group: root

mode: 0755

And then you can also transfer your packages or you can install them if you don have any.
After this you can run your script by using command or shell module.