running a python script through Ansible

27 views
Skip to first unread message

shreya mittal

unread,
Jun 2, 2016, 10:04:23 AM6/2/16
to Ansible Project
Hello Friends, 
I am a bit stuck in proceeding with ansible. I would like to be guided for how Can I run a python script using Ansible.
As far as i understood we are supposed to make an ansible module and then use it in playbook. But i dnt understand how to begin writing a module.

It will be really kind if anyone could guide me with that.

Thanking you 

Brian Coca

unread,
Jun 2, 2016, 10:06:21 AM6/2/16
to ansible...@googlegroups.com
You CAN modify the script to be a module, but you don't NEED to, you can also use the `script` module.


​Adapting an existing script into a module is simple, mostly you just need to allow for inputs and outputs to be JSON.​

----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages