Snow and Ansible integration

jitesh_zende1
Tera Contributor

Hi,

I am working on SNOW-Ansible integration. I want to run the ansible playbook from servicenow. I am not getting any help on this, is someone has any suggestion?. 

Any help is appreciated. 

Many thanks,

Jitesh Zende

5 REPLIES 5

Roger Poore
Tera Guru

Install ansible on your MID server.  Create a bash script that runs your playbook.  Create a record in the ecc queue to execute the script.

Refer to:  http://www.john-james-andersen.com/blog/service-now/command-line-execution-with-servicenow-mid-servers.html

That's exactly what I do but with PowerShell to execute the tasks.  The tricky part is the time of execution.  Depending on your use case, you don't want the client waiting around to find out if the task is complete.  For those cases, I have my PowerShell script use REST and update the request with the outcome.  

Does that make sense?

jitesh_zende1
Tera Contributor

Thanks Roger, I will try this solution. 

BR,

Jitesh Zende

Gaurav Verma2
Kilo Explorer

Why dont you create your own Python API. Give it to your SNOW Team and ask them to trigger this API everytime request is made and let that API hit to your server which has Ansible playbook. This API can also carry SNOW request data which you can pass in Playbook variables. 

redth
Giga Expert

Hi,

I'm working on ServiceNow-Ansible integration. Can you please provide the steps on how you have achieved that requirement?