Scaffold your Puppet modules !


I’ve recently worked with a project scaffolding tool called Yeoman (see Yeoman homepage).

My first experiments where with an AngularJS generator used to bootstrap an AngularJS web application and I must say that the tool is doing it’s job fine.

Right after that, I’ve began to think about how could I use this bootstrapping tool in my company and the thing is that we are writing a lot of Puppet modules (we’ve wrote more than 80 at the time of writing).

Time to ease the module creation pain and introduce standardisation directly at the beginning, I’ve created a Puppet module generator.

You’ll need Node.js and npm in order to use it and I recommend you to use Node Version Manager (nvm).
For example, here is how to install nvm and a recent version of Node.js:

$ curl -o- | bash
$ nvm install 0.12.7

That’s it, you’ve installed Node.js v0.12.7, now let’s use it and install the Puppet module generator !

$ nvm use 0.12.7
$ npm install -g generator-puppet-module

The generator is now installed. All you need to do is to use it:

$ yo puppet-module myModuleName

Note: You’ll need to redo the nvm use step again if you’ve left your previous shell session.

It will prompt you for an author name and a company name (these parameters will be remembered at the next execution) and then will setup all the requirements for a proper Puppet module in your current directory !

Have fun with it, and do no hesitate to open issues/pull requests on the project:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s