Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Using puppet, you can install 'packages' on your system using a variety of 'providers'. There are built in providers for yum, apt, gems, etc.

Is there a 'puppet-module' package provider or similar? In order to re-use puppet modules from http://forge.puppetlabs.com/, I am downloading the release, unzipping it into my own source repository, and adding it to my sources. This isn't ideal - I'd like to be able to re-use a module without copying it.

Is there a better way? I'd like to be able to install and use puppet-modules on the puppetmaster using puppet itself. That would make using/upgrading modules easier, and allow for working at a higher level of abstraction.

I guess there might be a chicken-egg problem - puppet might struggle to validate my manifests if they contain resources it doesn't yet have installed, but maybe this could be worked around using stages?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Issue #11209 covers creating it, but it looks like Puppet Labs are unsure about it at the moment. Perhaps your input there would be useful?

Regarding installing modules before needing to use them, I wouldn't have thought that's possible. 2.7.8 added support for picking up providers later in the run, but I don't think it extends to types. You also wouldn't be able to include the module or manifests in the catalog as it's already been compiled. I think you'd need to run Puppet twice on the master - once for bootstrapping and to install modules, then again for its real/full Puppet run.

share|improve this answer
    
Thanks, I will! –  Barry Pitman May 18 '12 at 8:39

There's no way of doing it 100% in puppet I know of, but there is the Puppet Module Too (PMT) which might be a start. It allows you to search and install modules from puppetforge on the command line.

Puppet labs just had a two part blog post on it (part 1, part 2) that covers how to use it. If you're running puppet >= 2.7.14 it is already in puppet. If you're not, you can get it from their github account.

share|improve this answer
    
Thanks, the module tool is certainly a better alternative to checking the module sources into my own tree. –  Barry Pitman May 18 '12 at 8:41

As an update I'm posting some new options here:

  1. You can use librarian-puppet to install modules on the puppet master
  2. Very promisingly, this issue was mentioned at PuppetConf 2013 by one of the product owners for puppet forge. Here is the revelant section of the talk on youtube. He mentioned (towards the end of his response) that puppetlabs was experimenting with a resource type to install modules on the master.
share|improve this answer

Your Answer

 
discard

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.