Provisioning a Vagrant box: are provisioners installed on the guest or the host machine?

StackOverflow https://stackoverflow.com/questions/22143578

  •  19-10-2022
  •  | 
  •  

Question

I have a basic interrogation about Vagrant (and the Ansible provisioner).

Is Ansible (or any other provisioner for that matter) installed on the guest machine or on the host machine?

In other words, is there a requirement for Ansible to be installed on the host machine?

Was it helpful?

Solution

Ansible runs on the host and sends ssh commands to the guest. (See @leucos answer)

Puppet-agent runs on the guest and parses a catalog (manifest) that is provided.

Ansible can also run on the guest and do pulls.

Only Ansible up to now can run only on the host.

The rest of the provisioners like PUPPET, CHEF, CRFENGINE etc need an agent on the guest mostly.

OTHER TIPS

The provisionner runs on the hypervisor (the host machine). The vagrant ansible provisionner will generate an inventory file if you don't provide one.

Thus, you don't need to install ansible on your vagrant guests.

However, there might be some requirements on your vagrant guest with certain modules (e.g. python-apt, python-mysqldb, etc...).

The requirements are listed in each module documentation.

Good luck

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top