- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with puppet
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
This module installs, configures and manages the Puppet service.
This module handles installing, configuring and running Puppet across a range of operating systems and distributions.
- puppet package.
- puppet configuration file.
- puppet service.
- Puppet >= 3.0
- Facter >= 1.6
- Extlib module
- Stdlib module
Install puppet with the default parameters (No configuration files will be changed).
class { 'puppet': }Install puppet with the recommended parameters.
class { 'puppet':
config_file_template => 'puppet/common/etc/puppet/puppet.conf.erb',
config_file_hash => {
'puppet' => {
config_file_path => '/etc/default/puppet',
config_file_template => 'puppet/common/etc/default/puppet.erb',
},
},
} class { 'puppet':
config_file_template => 'puppet/common/etc/puppet/puppetmaster.conf.erb',
config_file_hash => {
'puppet' => {
config_file_path => '/etc/default/puppet',
config_file_template => 'puppet/common/etc/default/puppet.erb',
},
'puppetmaster' => {
config_file_path => '/etc/default/puppetmaster',
config_file_template => 'puppet/common/etc/default/puppetmaster.erb',
config_file_notify => 'Service[puppetmaster]',
config_file_require => 'Package[puppetmaster]',
},
'auth.conf' => {
config_file_path => '/etc/puppet/auth.conf',
config_file_template => 'puppet/common/etc/puppet/auth.conf.erb',
config_file_notify => 'Service[puppetmaster]',
config_file_require => 'Package[puppetmaster]',
},
'hiera.yaml' => {
config_file_path => '/etc/puppet/hiera.yaml',
config_file_source => 'puppet:///modules/puppet/common/etc/puppet/hiera.yaml',
config_file_notify => 'Service[puppetmaster]',
config_file_require => 'Package[puppetmaster]',
},
'fileserver.conf' => {
config_file_path => '/etc/puppet/fileserver.conf',
config_file_template => 'puppet/common/etc/puppet/fileserver.conf.erb',
config_file_notify => 'Service[puppetmaster]',
config_file_require => 'Package[puppetmaster]',
},
},
master_storeconfigs => 'puppetdb',
server_mode => 'webrick',
}Update the puppet package.
class { 'puppet':
package_ensure => 'latest',
}Remove the puppet package.
class { 'puppet':
package_ensure => 'absent',
}Purge the puppet package (All configuration files will be removed).
class { 'puppet':
package_ensure => 'purged',
}Deploy the configuration files from source directory.
class { 'puppet':
config_dir_source => 'puppet:///modules/puppet/common/etc/puppet',
}Deploy the configuration files from source directory (Unmanaged configuration files will be removed).
class { 'puppet':
config_dir_purge => true,
config_dir_source => 'puppet:///modules/puppet/common/etc/puppet',
}Deploy the configuration file from source.
class { 'puppet':
config_file_source => 'puppet:///modules/puppet/common/etc/puppet/puppet.conf',
}Deploy the configuration file from string.
class { 'puppet':
config_file_string => '# THIS FILE IS MANAGED BY PUPPET',
}Deploy the configuration file from template.
class { 'puppet':
config_file_template => 'puppet/common/etc/puppet/puppet.conf.erb',
}Deploy the configuration file from custom template (Additional parameters can be defined).
class { 'puppet':
config_file_template => 'puppet/common/etc/puppet/puppet.conf.erb',
config_file_options_hash => {
'key' => 'value',
},
}Deploy additional configuration files from source, string or template.
class { 'puppet':
config_file_hash => {
'puppet.2nd.conf' => {
config_file_path => '/etc/puppet/puppet.2nd.conf',
config_file_source => 'puppet:///modules/puppet/common/etc/puppet/puppet.2nd.conf',
},
'puppet.3rd.conf' => {
config_file_path => '/etc/puppet/puppet.3rd.conf',
config_file_string => '# THIS FILE IS MANAGED BY PUPPET',
},
'puppet.4th.conf' => {
config_file_path => '/etc/puppet/puppet.4th.conf',
config_file_template => 'puppet/common/etc/puppet/puppet.4th.conf.erb',
},
},
}Disable the puppet service.
class { 'puppet':
service_ensure => 'stopped',
}- puppet: Main class, includes all other classes.
- puppet::install: Handles the packages.
- puppet::config: Handles the configuration file.
- puppet::service: Handles the service.
Determines if the package should be installed. Valid values are 'present', 'latest', 'absent' and 'purged'. Defaults to 'present'.
Determines the name of package to manage. Defaults to 'puppet'.
Determines if additional packages should be managed. Defaults to 'undef'.
Determines if the configuration directory should be present. Valid values are 'absent' and 'directory'. Defaults to 'directory'.
Determines if the configuration directory should be managed. Defaults to '/etc/puppet'
Determines if unmanaged configuration files should be removed. Valid values are 'true' and 'false'. Defaults to 'false'.
Determines if the configuration directory should be recursively managed. Valid values are 'true' and 'false'. Defaults to 'true'.
Determines the source of a configuration directory. Defaults to 'undef'.
Determines if the configuration file should be present. Valid values are 'absent' and 'present'. Defaults to 'present'.
Determines if the configuration file should be managed. Defaults to '/etc/puppet/puppet.conf'
Determines which user should own the configuration file. Defaults to 'root'.
Determines which group should own the configuration file. Defaults to 'root'.
Determines the desired permissions mode of the configuration file. Defaults to '0644'.
Determines the source of a configuration file. Defaults to 'undef'.
Determines the content of a configuration file. Defaults to 'undef'.
Determines the content of a configuration file. Defaults to 'undef'.
Determines if the service should be restarted after configuration changes. Defaults to 'Service[puppet]'.
Determines which package a configuration file depends on. Defaults to 'Package[puppet]'.
Determines which configuration files should be managed via puppet::define.
Defaults to '{}'.
Determines which parameters should be passed to an ERB template. Defaults to '{}'.
Determines if the service should be running or not. Valid values are 'running' and 'stopped'. Defaults to 'running'.
Determines the name of service to manage. Defaults to 'puppet'.
Determines if the service should be enabled at boot. Valid values are 'true' and 'false'. Defaults to 'true'.
Determines if the etckeeper hooks should be enabled. Valid values are 'true' and 'false'. Defaults to 'false'.
Determines which environment should be used. Defaults to 'production'.
Determines if puppet agent should listen for connections. Valid values are 'true' and 'false'. Defaults to 'false'.
Determines if pluginsync should be enabled. Valid values are 'true' and 'false'. Defaults to 'true'.
Determines if puppet agent should write a log to '/var/log/puppet/puppet.log'. Valid values are 'true' and 'false'. Defaults to 'true'.
Determines if puppet agent should send reports after every transaction. Valid values are 'true' and 'false'. Defaults to 'true'.
Determines which puppet master should be used. Defaults to "puppet.${::domain}".
Determines if puppet master should autosign any key request. Defaults to 'false'.
Determines environmentpath to enable directory environments. Defaults to '$confdir/environments'.
Determines if puppet master should write a log to '/var/log/puppet/puppetmaster.log'. Valid values are 'true' and 'false'. Defaults to 'true'.
Determines wich kind of reports puppet master should generate. Valid values are 'http', 'log', 'rrdgraph', 'store' and 'tagmail'. Defaults to '['store']'.
Determines if the catalog, facts and related data of each client should be stored. This also enables the import and export of resources. Valid values are 'puppetdb'. Defaults to 'undef'.
This module does not install and manage PuppetDB.
Please use this PuppetDB module and the following code for that purpose.
class { 'puppetdb': }
class { 'puppetdb::master::config':
manage_storeconfigs => false,
}Determines if the parser should raise errors when referencing unknown variables. Valid values are 'true' and 'false'. Defaults to 'false'.
Determines if fact values should be flatten to string. Valid values are 'true' and 'false'. Defaults to 'true'.
Determines if puppet master should be installed and how HTTPS requests are served. Valid values are 'webrick'. Defaults to 'undef'.
This module has been tested on:
- Debian 6/7/8
- Ubuntu 12.04/14.04
If you find a bug, have trouble following the documentation or have a question about this module - please create an issue.
If you are able to patch the bug or add the feature yourself - please make a pull request.
The list of contributors can be found at: https://github.com/dhoppe/puppet-puppet/graphs/contributors
