Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Generic puppet module pattern - to be used as a starting point for building other modules
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
files
manifests
templates/general
README

README

Sample puppet module pattern to be used as the base for other modules

Shows various techniques I have found useful.

A key pattern I have developed is to use the 'concat' module to generate config files from several different fragments

This makes it easy to extend the configuration from other modules.

For example, consider an snmpd module. The basic config will have a few elements that are defined in the snmpd module itself. However, we may want to add additional monitoring if mysql is installed. This requires an extra line or two in the snmpd config file. We can add this as follows:

class mysqld::snmpd{

    include
        ::snmpd
        ::snmpd::config::general

    snmpd::config::general::fragment{'mysql':
        order = 20,
        content => 'puppet:///modules/mysqld/snmpd.conf.mysql'
    }

}
Something went wrong with that request. Please try again.