Trigger ansible through powershell

690 views
Skip to first unread message

Amitha K T

unread,
Aug 18, 2017, 7:02:54 AM8/18/17
to Ansible Project
Hello,

I'm trying to find a way to trigger an ansible playbook for a windows machine using an external system or script, for example, powershell or python. Is this possible?
Can anyone tell me the list of ways to trigger ansible externally. Kindly help.

Regards
Amitha K T

J Hawkesworth

unread,
Aug 18, 2017, 9:09:05 AM8/18/17
to Ansible Project
Probably lots of ways, anything that can run a command line can do it.

Depending on your needs you could do any of the following

Install Tower and make use of the rest api, perhaps using powershell's Invoke-RestMethod cmdlet


Alternatives to Tower exist, such as flansible, or even jenkins (both offer rest apis so you could interact in the same way.  Likely to need more setup as their integration with ansible playbooks is probably not going to be quite as slick).

You can of course run ansible inside Windows Subsystem for Linux on recent Windows 10 builds although nobody (not even microsoft I believe) is recommending doing so for production use.

Hope this helps,

Jon

Amitha K T

unread,
Aug 18, 2017, 2:53:26 PM8/18/17
to ansible...@googlegroups.com
Thank you for a quick reply! 
We don't have access to tower as of now. So we will have to choose between flansible and Jenkins. Is there anyway we can receive support in this front?? 

Sent from my iPhone
--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/R6EgsKQr9gs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7ddecbbd-872c-4f65-acb3-6712b85d03cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

J Hawkesworth

unread,
Aug 21, 2017, 4:49:25 AM8/21/17
to Ansible Project
As far as I know flansible is open source project, so its best endeavors of those who use and make it.
I think it might be possible to get support on Jenkins, although I've found it to be straightforward to use myself and haven't ever had the need for support.
If support is important for you/your organisation then maybe it is worth considering paying for it.
Reply all
Reply to author
Forward
0 new messages