I am planning to execute a python script on a remote server using ansible playbook.
src.py -
I am planning to execute a python script on a remote server using ansible playbook.
src.py -
You are using local_action to run the command module, which will attempt to run the python script on localhost.
Additionally, if you are using the python binary to invoke the script, you won’t need to make it executable.
You might try using the ‘script’ module (http://docs.ansible.com/script_module.html). I think it’ll do what you want in a single task.