Vagrant and Ansible with Windows Hosts

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Vagrant and Ansible with Windows Hosts

frantishrek
Hi,

I am running Vagrant on Windows (sorry). I am trying to use Ansible provisionner.

Vagrant returns this error :
"The "ansible-playbook" program could not be found! Please verify
that "ansible-playbook" is available on the PATH of your host
system, and try again.

If you haven't installed Ansible yet, please install Ansible
on your system. Vagrant can't do this for you in a safe, automated
way. Please see ansible.cc for more info."

First, I thought I have to installed Ansible on my guest (Ubuntu precise) but it did not resolve the problem.
I need to install Ansible on my host (sad).

I have tried to install Ansible following (http://ansible.cc/docs/gettingstarted.html) with pip and from sources with no success.
Can someone give me any clues ?
Do you plan to support Ansible like Puppet or chef (with execution directly on the guest) ? It will avoid to install Ansible on the host (but on the guest) ?

Thanks,

Fran'

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Vagrant and Ansible with Windows Hosts

Mike
I think a key difference here is that Ansible differs from Puppet and
Chef in its execution model.

Both Puppet and Chef rely on code living on the target machine to
execute. Ansible seems to work solely over SSH.
Puppet and Chef marshall the executable code (catalogs, cookbooks) and
ship them to the target, and tell the target to execute with these
parameters.

Ansible's model seems to need to have all assets stored locally (on
your host) and then ship & execute on the target via SSH sessions, vs
the Puppet/Chef model where you don't need them installed on the host
at all.

Admittedly, I have not read the Vagrant-Ansible integration yet, but I
can conceive how this would be more divergent from the current
provisioners.

-M


On Tue, Apr 23, 2013 at 9:19 AM, frantishrek <[hidden email]> wrote:

> Hi,
>
> I am running Vagrant on Windows (sorry). I am trying to use Ansible
> provisionner.
>
> Vagrant returns this error :
> "The "ansible-playbook" program could not be found! Please verify
> that "ansible-playbook" is available on the PATH of your host
> system, and try again.
>
> If you haven't installed Ansible yet, please install Ansible
> on your system. Vagrant can't do this for you in a safe, automated
> way. Please see ansible.cc for more info."
>
> First, I thought I have to installed Ansible on my guest (Ubuntu precise)
> but it did not resolve the problem.
> I need to install Ansible on my host (sad).
>
> I have tried to install Ansible following
> (http://ansible.cc/docs/gettingstarted.html) with pip and from sources with
> no success.
> Can someone give me any clues ?
> Do you plan to support Ansible like Puppet or chef (with execution directly
> on the guest) ? It will avoid to install Ansible on the host (but on the
> guest) ?
>
> Thanks,
>
> Fran'
>
> --
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Vagrant and Ansible with Windows Hosts

frantishrek

2013/4/23 Mike <[hidden email]>
I think a key difference here is that Ansible differs from Puppet and
Chef in its execution model.

Both Puppet and Chef rely on code living on the target machine to
execute. Ansible seems to work solely over SSH.
Puppet and Chef marshall the executable code (catalogs, cookbooks) and
ship them to the target, and tell the target to execute with these
parameters.

Ansible's model seems to need to have all assets stored locally (on
your host) and then ship & execute on the target via SSH sessions, vs
the Puppet/Chef model where you don't need them installed on the host
at all.

Admittedly, I have not read the Vagrant-Ansible integration yet, but I
can conceive how this would be more divergent from the current
provisioners.


Thanks for your answer.
Yes, you are right.
I have read Vagrant-Ansible integration (https://github.com/mitchellh/vagrant/blob/master/plugins/provisioners/ansible/provisioner.rb). Indeed, Ansible is executed over SSH.

Has someone succeeded in installing ansible on windows host to use with Ansible ?

Thanks,



--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Vagrant and Ansible with Windows Hosts

Johannes Madel
In reply to this post by frantishrek
Hey,

according to http://www.ansibleworks.com/docs/playbooks2.html it would be possible to start ansible-playbook with the option --connection=local .

I guess a patch for that bug would be very easy.

Best regards,
Johannes


Am Dienstag, 23. April 2013 15:19:07 UTC+2 schrieb fran:
Hi,

I am running Vagrant on Windows (sorry). I am trying to use Ansible provisionner.

Vagrant returns this error :
"The "ansible-playbook" program could not be found! Please verify
that "ansible-playbook" is available on the PATH of your host
system, and try again.

If you haven't installed Ansible yet, please install Ansible
on your system. Vagrant can't do this for you in a safe, automated
way. Please see ansible.cc for more info."

First, I thought I have to installed Ansible on my guest (Ubuntu precise) but it did not resolve the problem.
I need to install Ansible on my host (sad).

I have tried to install Ansible following (http://ansible.cc/docs/gettingstarted.html) with pip and from sources with no success.
Can someone give me any clues ?
Do you plan to support Ansible like Puppet or chef (with execution directly on the guest) ? It will avoid to install Ansible on the host (but on the guest) ?

Thanks,

Fran'

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Vagrant and Ansible with Windows Hosts

btekab
In reply to this post by frantishrek
t OS(which will make it a bit different than your production environment but should be ok for testing) then this can be done by using the shell provision module, here is what I did:

update 'Vagrantfile' to use the shell provision module to run a bootstrap script
   config.vm.provision :shell, :path => "bootstrap.sh"

 then create "bootstrap.sh" that that installs ansible and run the playbook locally:

#!/usr/bin/env bash
#
# Bootstrap the vagrant VM by installing Ansible and
# letting ansible do the provisioning in local connection mode
#
sudo apt-get update
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:rquillo/ansible
sudo apt-get update
sudo apt-get install -y ansible
cp /vagrant/hosts /home/vagrant/
chmod 666 /home/vagrant/hosts
sudo ansible-playbook /vagrant/site.yml -i /home/vagrant/hosts --connection=local

now doing "vagrant up" will enable you to have the machine setup similar to all the other machines that u use in stage and production. Hope that helps.
 

On Tuesday, April 23, 2013 7:19:07 AM UTC-6, fran wrote:
Hi,

I am running Vagrant on Windows (sorry). I am trying to use Ansible provisionner.

Vagrant returns this error :
"The "ansible-playbook" program could not be found! Please verify
that "ansible-playbook" is available on the PATH of your host
system, and try again.

If you haven't installed Ansible yet, please install Ansible
on your system. Vagrant can't do this for you in a safe, automated
way. Please see ansible.cc for more info."

First, I thought I have to installed Ansible on my guest (Ubuntu precise) but it did not resolve the problem.
I need to install Ansible on my host (sad).

I have tried to install Ansible following (http://ansible.cc/docs/gettingstarted.html) with pip and from sources with no success.
Can someone give me any clues ?
Do you plan to support Ansible like Puppet or chef (with execution directly on the guest) ? It will avoid to install Ansible on the host (but on the guest) ?

Thanks,

Fran'

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.