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

Provisioning with Puppet on Vagrant

Vagrant supports two methods of using Puppet:

  • Puppet in a standalone mode, by using the Puppet apply command on the VM
  • Puppet in client/server mode, whereby the VM (by using the Puppet agent) will be configured from a central server

Let's look at how to configure Vagrant with Puppet using these two different methods.

Using Puppet in a standalone mode

Puppet standalone is the simplest way to use Puppet with Vagrant, we simply tell Vagrant where we have put our Puppet manifests and modules, and what manifest should be run. The smallest amount of configuration we need within our Vagrant file in order to use Puppet is this:

config.vm.provision :puppet

This should go within the Vagrant.configure("2") do |config| … end

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