Anyone else wishing they could control Vagrant boxes from a Windows Host?

Using Vagrant to spin up dev environments promises to end many of our cross-platform server-side development issues once and for all. When deciding how to provision my vagrant boxes, I considered Chef, Puppet, and Ansible. I settled on Ansible for reasons that are obvious to this group’s readers. :slight_smile: After getting my Vagrant-based Postgres box provisioned with Ansible, I realized that I ironically painted us into another cross-platform corner once again! My Windows devs won’t be able to use the Ansible provisioner at all. At this point, I can either package my Vagrant .boxes and ship them to the Windows devs, or I can try to get them to install Cygwin and other dependencies and hope for the best.

So, I guess this post has two purposes:

  1. to throw another vote towards using Ansible from Windows hosts (specifically for Vagrant)
  2. To ask what other folks have done with my predicament? I’m guessing folks use Chef or Puppet for cross platform provisioning of Vagrant boxes?

Taylor

To avoid confusing the list, I’ll clarify.

So in this case you’re asking about running Ansible from Windows hosts against Linux hosts.

This is not talking about using Ansible to configure Windows hosts (future roadmap feature) and absolutely we are not going to ask anyone to install sshd on a Windows box if we do that.

Chef and Puppet discussions are totally off topic for this list – we don’t want to start flamewars and this is the Ansible list – but the easiest answer seems quite easiest.

Just install a Linux VM and run the automation from there.

You need not necessarily use Vagrant.

Also, Macs, they are a good thing! :slight_smile:

why not spin up the first vagrant box with ansible and control the rest from there?

I used the shell provisioner to launch a script that setup Ansible and then used Ansible in pull mode.

IIRC I was able to issue management commands via vagrant ssh (ie from Windows command prompt).

Thanks for the feedback guys. Michael, you’re right that I was talking about controlling Linux VMs FROM a Windows machine. (Sorry for the mention of the other tools - was just clarifying that I didn’t do what other Vagrant users seem to do in a similar situation.)

As Michael and Brian suggested, I could indeed install a Linux VM to provision the other VMs. It honestly didn’t occur to me, maybe because I am too new to all of this, and maybe because it felt like one too many turtles, but it is “clean”.

I ended up doing what Brian suggested (before I had the benefit of his reply). If I’m installing a provisioning a Linux box on a Windows host (or a Mac host that hasn’t installed Ansible), I run a script to install Ansible on the VM and then tell it to run ansible-playbook from within the VM in local mode. Worked like a champ.
If anyone else is interested, I posted my resultant scripts here: https://github.com/Taytay/vagrant-ansible-postgres

Thanks everyone.

Taylor

I know that controlling Linux machines from a Windows machine using Ansible is completely, totally and absolutely not supported and will not be.
And I know that we shouldn’t create issues in Github asking anything related.

Nevertheless, for anyone that wants to push the limits (maybe you and me) because doesn’t want to have another VM (consuming resources or having to set it up) and is still stuck in Windows, I created an automated installation script (forked from another one) to be used with Babun (a better Cygwin): https://github.com/tiangolo/ansible-babun-bootstrap

Hi,

Cool.

I know that controlling Linux machines from a Windows machine using Ansible is completely, totally and absolutely not supported and will not be.

As of late I began to ask myself why… I think that is great news. I’m usually with Linux but I have to deal with Windows more and more often. Given the directions that happen in the Windows world (Powershell supporting SSH) I think it might be worth revisiting.

We might as well find ourselves in a situation where Windows might have a configuration management system that can handle linux & windows natively in the not so distant … oh wait … http://blogs.technet.com/b/privatecloud/archive/2014/05/19/powershell-dsc-for-linux-step-by-step.aspx

And I know that we shouldn’t create issues in Github asking anything related.

I guess when there is enough demand issues will be OK. Here’s the problem: If the interested people won’t begin to (again and again and again) create these requests it looks like there’s no interest which will make everyone say: Stop asking we won’t do it.

On the other hand it’s often better to give people what they need rather than what they want :slight_smile:

/Martin