6

I know Ansible supports Windows clients/nodes. What I really enjoy about Ansible is that I can create a Linux VM, pull a git repo that contains Ansible playbooks for and without any configuration or setup of a control server, I am able to run the playbook on the local machine.

Since you can execute Python on Windows, would it be possible to run roles/playbooks on localhost on Windows?

This would be the first step for running Ansible in a datacenter with only Windows where it is not possible to even run Linux in VirtualBox.

techraf
  • 64,883
  • 27
  • 193
  • 198
ajgreyling
  • 1,406
  • 2
  • 13
  • 10
  • Agreed with Shawn yes it's possible to use Windows as a control node : - using cygwin - or using windows subsystem for linux about cygwin you have too a good article wrote by Jeff Geerling: https://www.jeffgeerling.com/blog/running-ansible-within-windows – stormalf Nov 22 '20 at 16:51

1 Answers1

5

Ansible won't run on a windows control machine, as stated in the documentation:

Reminder: You Must Have a Linux Control Machine

Note running Ansible from a Windows control machine is NOT a goal of the project. Refrain from asking for this feature, as it limits what technologies, features, and code we can use in the main project in the future. A Linux control machine will be required to manage Windows hosts.

Cygwin is not supported, so please do not ask questions about Ansible running from Cygwin.

Community
  • 1
  • 1
techraf
  • 64,883
  • 27
  • 193
  • 198
  • 1
    I know that Ansible won't run as I have read all the documentation. However since having an Linux Control Machine in this situation is not an option, and it is an open source product and since Python can execute on Windows, in theory, I should be able to do it albeit by setting some environment variables or making some top level changes. I'm looking into this but thought to check here if someone has already gone through the trouble so I don't have to reinvent the wheel. – ajgreyling Jan 19 '17 at 15:02
  • 1
    I know this is an old thread. But for anyone out there who might encounter this challenge. Ansible can be made to run on Windows using the Cygwin64. "Officially" the control machines is Linux (but unofficial can be made to work on Windows using Cygwin64). I am currently running the full automation for Windows Servers using Windows Laptops as my Control Machine. For a windows based installation, follow the instruction from here. http://www.oznetnerd.com/installing-ansible-windows/ – Shawn Feb 08 '19 at 14:11