Skip to content


Repository files navigation

Puppet Control Repo


This is an all-in-one repo that is a skeleton to use in a production environment, but also can be used to share and test Puppet infrastructure.

The idea is that this environment controls all of your environments (dev, qa, production) but also holds the ability to spin up Vagrant VMs to test your code before committing.

NOTE: Internet access is required for this environment



Dictates basics of how Vagrant will spin up VM. Please do not edit this file unless you really know what you're doing.


r10k needs this file to figure out what component modules you want from the Forge. The result is a modules directory containing all the modules specified in this file, for each environment/branch. The modules directory is listed in environment.conf's modulepath.


Controls puppet's directory environment settings.

Config Files: environment.conf


Contains your hiera data files.


Contains site.pp


Contains your organization-specific roles and profiles (wrapper modules for Forge component modules)

This directory is specified as a modulepath in environment.conf

The origins of roles and profiles


Git hooks for checking your Puppet code. There is a pre-commit you can copy to your .git/hooks repo directory. There is also a pre-receive for your git server (you also need to copy the commit_hooks subdirectory to your git server). You must install puppet and puppet-lint (locally for pre-commit, on the git server for pre-receive) to use these hooks.

To use the pre-receive hook on your Git server, copy the hook and the commit_hooks directory to the puppet-control.git directory in your repositories directory.


Contains the scripts and files that are used to spin up the Vagrant VM. This is different from the Vagrantfile in that these are more specific to what you want to happen with the specific instance. The pe/ directory contains answer files, and, after you spin up PE for the first time, will contain PE installation media, which are in .gitignore.

If you want to avoid having to wait for PE to download during the provisioning process and you have the Puppet Enterprise tarball lying around, just copy it over to provision/pe and that step will be skipped.

The provision/ script contains the PE version that will be installed. You'll need to change it to downgrade/upgrade as needed.


Reference materials for Puppet workflow.


Contains configuration options to customize oscar.

How to use it

There are three vagrant nodes - PE master, PE agent, and a standalone masterless puppet agent.

The default credentials for the PE Master Console are:

Username: admin

Password: puppetlabs

Summary of procedure

vagrant up <node>

This will take some time to provision.

Ensure that the PE master is up and provisioned before attempting to start another system.

Stuff included:

  • Puppet Environments (control repository)
  • Roles and Profiles
  • Hiera
  • Git workflow

Once everything is provisioned as you need it, you can ssh into the instance:

vagrant ssh master

You will be logged in as user vagrant. Please sudo to root if you need to run puppet.

1. Install Virtualbox

Latest version works fine

2. Install Vagrant

Latest version is fine

3. Install oscar plugin

vagrant plugin install oscar


  • Use /vagrant mounted directory on PE master as an environment directory for better full-stack testing
  • Integrate control-spec-helper for testing
  • Develop spec/smoke tests