Puppet: System Administration Automated

Support

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 PluginsInModules)

Available modules

A number of stand-alone modules are available:

Module Collections

There are also several collections of modules available: