O'Reilly logo

Creating Development Environments with Vagrant by Michael Peacock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Other built-in provisioners

In addition to the Puppet and Chef provisioning options within Vagrant, there are two other methods:

  • SSH: Simply invoking commands via the terminal of the VM automatically through Vagrant
  • Ansible: A tool similar in nature to Puppet and Chef, which is configured through a series of YAML files to define how a system should be provisioned

Provisioning with SSH – a recap

As we discussed in Chapter 2, Managing Vagrant Boxes and Projects, we can instruct Vagrant to run a series of SSH commands on the VM. This can be used to provision the server.

There are two ways to use SSH provisioning:

  • Path: a file to execute
  • Inline: providing specific commands to run

Both of these are shown as follows:

config.vm.provision :shell, :path => "provision/setup.sh" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required