Puppet Modules
When you have multiple files related to a single application, it often makes sense to turn them into a module. This allows you to distribute all of the files in one chunk, and Puppet will automatically look through its module path for the files when you go to use them.
Modules can contain three types of files, each of which must be stored in a separate subdirectory:
- Manifests – must be stored in manifests/, and if you create manifests/init.pp then that file will be loaded if you import the module name directly, e.g. import “mymodule”. All other manifests must have the module name included in the import statement, e.g., import “mymod/mymanifest”.
- Templates – must be stored in templates/, and the module name must be added to the template name: template(“mymodule/mytemplate.erb”)
- Files – stored in files/, these are available from the file server under modules/<module name>/<file name>.
These three file types cover all of the content you would provide to puppetmasterd. For a more detailed description of how modules should be organised, see Module Organisation .
(For info on how you can put types and facts into your modules, see the wiki page Plugins In Modules )
Module Documentation
From Puppet version 0.24.7 you can generate automated documentation from resources, classes and modules using the puppetdoc tool. You can find more detail at the Puppet Manifest Documentation page.
Available modules
Puppet Labs Module Forge
Please check the Module Forge first to see if a specific module you’re looking for is available there.
Alternative Module Locations
A number of stand-alone modules are available:
- Tahoe-LAFS module
- A module for managing Tahoe-LAFS
- Trac module
- A module for managing Trac
- Mercurial module
- A module for managing Mercurial
- Mongrel module
- A module for managing the Mongrel web server
- nginx module
- A module for managing the nginx web server
- Subversion module
- A module for managing Subversion
- SQLite3 module
- A module for managing the SQLite3 DBMS
- RubyGems module
- A module for managing RubyGems
- Ruby module
- A module for managing Ruby
- Rails module
- A module for managing the Rails framework
- Puppet module
- A recursive module for managing Puppet
- PostgreSQL module
- A module for managing the PostgreSQL DBMS
- git module
- Ubuntu/Debian specific at the moment (only available with the git:// protocol atm)
- xen module
- easily create xen domU’s (only tested on Ubuntu feisty for now; only available with the git:// protocol atm)
- pbuilder
- create, update and purge Debian pbuilders
- sysctl type
- A native type for managing /etc/sysctl.conf – A Module which integrates this type and give a nice define, to set the sysctl, as well immediately sysctl module
- puppet-module-denyhosts
- A module for managing Denyhosts (http://denyhosts.sf.net)
- ssh::auth
- centrally create, distribute, and revoke ssh keys for users.
Module Collections
There are also several collections of modules available:
- Complete Configuration – David Schmitt’s complete configuration modules
- Example42 – Lab42’s configuration module collection
- eshao’s complete configuration — another complete set of modules/configuration/documentation for Puppet on FreeBSD (documents any changes from production set). Heavily focuses on demonstrating best practices and techniques to reduce code size. Author won’t bite: willing to entertain emails to explain/document any confusing aspects.
- Puppet Managed – Puppetmanaged.org module collection
- Puppet Common Modules and see also Module Standards
- Reductive Labs – ReductiveLabs repository
- Koumbit modules – Koumbit.org managed modules
- Immerda modules – Immerda.ch managed modules
- p@rdalys – A set of puppet modules and extensions for the Kolab groupware server
- Camptocamp – Camptocamp repository
- Tryphon – Tryphon build scripts for Puppet includes rake tasks, cucumber tests and generate tasks
- Puzzle – Puzzle repository
- Riseup – Riseup Labs modules
- Sans (ETH Zurich) – General usage and ETH specific puppet-modules