Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to automatically install or include puppet modules in your puppet config? I'm having to manually run puppet module install before running puppet apply.

share|improve this question
What's in your configuration? And why are you running the commands yourself? Are you not using a puppet master server? – mkzero Jun 28 '13 at 23:43
No master server. I'm running a vagrant development server. It seems like I'm forced to run puppet module install before including a module in my config file. Can't you just use puppet config to install modules? – Mike Jun 28 '13 at 23:46
up vote 3 down vote accepted

I'm downloading modules and storing them in a directory above my Vagrantfile in which I've specified the path to find modules using config.vm.provision :puppet, :module_path => "modules" and then including them in my puppet manifest.

share|improve this answer
That's more like it. Thanks! – Mike Aug 11 '13 at 18:23

AFAIK it's not possible with 'vanilla' Puppet, but with librarian-puppet it's possible:

Librarian-puppet is a bundler for your puppet infrastructure. You can use librarian-puppet to manage the puppet modules your infrastructure depends on. It is based on Librarian, a framework for writing bundlers, which are tools that resolve, fetch, install, and isolate a project's dependencies.

Librarian-puppet manages your modules/ directory for you based on your Puppetfile. Your Puppetfile becomes the authoritative source for what modules you require and at what version, tag or branch.

Once using Librarian-puppet you should not modify the contents of your modules directory. The individual modules' repos should be updated, tagged with a new release and the version bumped in your Puppetfile.

share|improve this answer

As for now, Vagrant has vagrant-librarian-puppet module.


vagrant plugin install vagrant-librarian-puppet

From readme:

Vagrant will automatically run Librarian-Puppet before any provisioning step, so simply set up your Puppetfile as you normally would.

You may specify the subdirectory within which to run librarian-puppet using the librarian_puppet.puppetfile_dir config key. Please keep in mind that you will need to explicitly set the modules path in the :puppet provisioner and this path must exist before running vagrant commands.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.