pycontribs / python-vagrant

Python bindings for interacting with Vagrant virtual machines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WinRM Support

jimbo8098 opened this issue · comments

Following ansible-community/molecule-plugins#62 I'm opening this to see if there are any issues with me looking into supporting Windows on this repo. A collaborator of ansible-community/molecule-vagrant suggests there would be no issues on their end and pointed me in this direction. I wanted to ensure I wasn't stepping on anyone's toes prior to continuing any work.

I will close this a wontfix only because I am realistic about what we can do. Adding Windows support would require efforts and even extra costs for testing because GHA does not allow virtualization on Windows.

Also molecule will not get Windows support because ansible does not run on Windows. Running under WSL is considered linux from our point of view.

While the Ansible CLI itself isn't supported on Windows - it is very much possible to connect via WinRM to instances created via Vagrant. I was able to create a Linux VM with Vagrant and Virtualbox installed and was then able to create a running Windows instance. While it took some finnegaling - since I had to create an image using https://github.com/jborean93/packer-windoze - it was possible to do. I think the main problem I seemed to experience was that updates oftentimes would require a Windows reboot and, following the reboot, sometimes the WinRM session would not be connected.

I do, however, agree on the testing methods. It's hard to test any kind of virtualized platform on CI, especially Windows. That said, it worked, just not well. And I think it's helpful to tell people if it did work so they can use the same build themselves.

There were some reactions to my OP so presumably there are people out there who would benefit from it.