===
This module handles the various parts of puppet on a given machine.
Dependencies for this module are: apache, common, mysql and passenger
- Manages the puppet agent on a client
- Setup of configuration files
- Setup of service or crontask to run the agent periodically
- Ensure puppet agent is run at boottime
- Manages apache with passenger
- Setup of config files needed to run master
- Calls the
puppet::lint
class - Calls the
puppet::master::maintenance
class - Manages firewall rule for puppet if needed
- Maintenance to purge filebucket and reports
- Manages Puppet Dashboard
- This installation is used by puppet systems, that need access to the dashboard
- Manages Puppet Dashboard
- This is the actual server running the Dashboard
- Configures the Dashboard MySQL settings
- Creates database for puppet with mysql module
- Calls the
puppet::dashboard::maintenance
class - Maintenance to clean up old reports, optimize database and dump database
- For the maintenance cron jobs, you should have the following line in your
/etc/sudoers
which is not managed with this module.
Defaults:root !requiretty
- Manages puppet-lint
Ruby versions 1.8.7, 1.9.3, 2.0.0 and 2.1.0 on Puppet v3.
- Debian 6
- Debian 7
- EL 6
- Ubuntu 12.04 LTS
- Debian 6
- Debian 7
- EL 6
- EL 7
- Solaris
- Suse 11
- Ubuntu 12.04 LTS
===
The certificate name for the client.
- Default: $::fqdn
The location of the puppet config file.
- Default: /etc/puppet/puppet.conf
The owner of the config file.
- Default: root
The group for the config file.
- Default: root
The mode for the config file.
- Default: 0644
The selected environment for the client.
- Default: $::env
The puppet server the client should connect to.
- Default: puppet
The masterport setting in puppet.conf. By default this line is not set.
- Default: UNSET
The puppet CA server the client should use
- Default: UNSET
The http-proxy the client should use
- Default: UNSET
The http-proxy port the client should use
- Default: UNSET
Whether the machine is a puppet master or not.
- Default: false
Whether to run as a service or in cron mode. Valid values are disable
, cron
, and service
. The value disable
disables automatic puppet runs and assumes you are running as a service.
- Default: service
The interval, in minutes, with which the client should run. If greater than 30, the agent will only run once per hour.
- Default: 30
Whether the client should run in noop mode or not.
- Default: false
The command that should be added to the crontab (in cron mode)
- Default: /usr/bin/puppet agent --onetime --ignorecache --no-daemonize --no-usecacheonfailure --detailed-exitcodes --no-splay
Whether the client should run right after boot
- Default: true
Path to puppet binary to create symlink from
- Default: '/usr/bin/puppet'
Path to where the symlink should be created
- Default: '/usr/local/bin/puppet'
Boolean for ensuring a symlink for puppet_binary to symlink_puppet_binary_target. This is useful if you install puppet in a non-standard location that is not in your $PATH.
- Default: false
The location of puppet agent sysconfig file.
- Default: use defaults based on osfamily
String for 'file' or 'present'. Allows you to not manage the sysconfig file.
- Default: use defaults based on osfamily
The name the puppet agent daemon should run as.
- Default: puppet
String with absolute path for ssldir in puppet agent's config. Using the default will set it to: '$vardir/ssl'
- Default: 'USE_DEFAULTS'
Boolean to set the value of stringify_facts main section of the puppet agent's config. This must be set to true to use structured facts.
- Default: true
Boolean to include pre- and postrun hooks for etckeeper in the main section of the puppet agent's config.
- Default: false
===
String or Array of the dashboard package(s) name.
- Default: 'puppet-dashboard'
The user for dashboard installation.
- Default: use defaults based on osfamily
The group for dashboard installation.
- Default: use defaults based on osfamily
The location of puppet dashboard sysconfig file.
- Default: use defaults based on osfamily
The script to call from puppet to get manifests from dashboard.
- Default: /usr/share/puppet-dashboard/bin/external_node
The dashboard server FQDN.
- Default: puppet.${::domain}
The port the web server will respond to.
- Default: 3000
Boolean to use modules default mysql::server settings (mysql_max_packet_size). For specific mysql::server settings you can use hiera now:
puppet::dashboard::server::manage_mysql_options: false mysql::server::override_options: mysqld: max_allowed_packet: '32M' innodb_buffer_pool_size: '64M'
- Default: true
===
You can optionally specify a hash of htpasswd entries in Hiera.
--- puppet::dashboard::htpasswd: admin: cryptpasswd: $apr1$kVPL28B8$1LggacK2dvrOf4SkOCxyO0 puppet: cryptpasswd: $apr1$F2redFE9$FCyxK2cJuHXphfeQugXBi1
Number of dashboard workers to start. Only used on osfamily Debian.
- Default: $::processorcount
The path to the database config file.
- Default: /usr/share/puppet-dashboard/config/database.yml
The owner of the database config file.
- Default: puppet-dashboard
The database config file group.
- Default: puppet-dashboard
The database config file mode.
- Default: 0640
Hash of htpasswd entries. See leinaddm/htpasswd module for more information. Only used if security is set to 'htpasswd'.
- Default: undef
String of path to htpasswd file to be used by Dashboard. Only used if security is set to 'htpasswd'.
- Default:
/etc/puppet/dashboard.htpasswd
Owner of htpasswd file.
- Default: root
Group of htpasswd file.
- Default: use defaults based on osfamily
Mode of htpasswd file.
- Default: 0640
The location for the puppet log files.
- Default: /var/log/puppet
The user for the mysql connection.
- Default: dashboard
The password for the mysql connection.
- Default: puppet
The mysql max packet size.
- Default: 32M
String to indicate security type used. Valid values are 'none' and 'htpasswd'. Using 'htpasswd' will use Apache basic auth with a htpasswd file. See htpasswd and htpasswd_path parameters.
- Default: 'none'
The location of puppet dashboard vhost file for apache.
- Default: use defaults based on osfamily
===
The command to run to optimize the db.
- Default: /usr/bin/rake -f /usr/share/puppet-dashboard/Rakefile RAILS_ENV=production db:raw:optimize >> /var/log/puppet/dashboard_maintenance.log
The user to run db optimization.
- Default: root
The hour on which to run db optimization.
- Default: 0
The minute at which to run db optimization.
- Default: 0
The day of the month on which to run db optimization.
- Default: 1
How many days to keep the reports.
- Default: 30
Which command to run to purge old reports. Defaults to: '/usr/bin/rake -f /usr/share/puppet-dashboard/Rakefile RAILS_ENV=production reports:prune upto=${reports_days_to_keep} unit=day >> /var/log/puppet/dashboard_maintenance.log' If using a specific command here, please keep in mind you need to align it with $reports_days_to_keep yourself.
- Default: 'USE_DEFAULTS'
User to purge reports as.
- Default: root
On which hour to purge old reports.
- Default: 0
At which minute to purge old reports.
- Default: 30
Whether we should remove old dashboard reports that have not been imported
- Default: 'True'
Path to reports in dashboard spool
- Default: '/usr/share/puppet-dashboard/spool'
How many days to keep the unimported reports.
User to remove unimported reports.
- Default: root
On which hour to remove unimported reports.
- Default: 0
At which minute to remove unimported reports
- Default: 45
The directory to use for dumps.
- Default: /var/local
The command to run to dump the database.
Defaults to: 'cd ~puppet-dashboard && sudo -u ${puppet::dashboard::dashboard_user_real} /usr/bin/rake -f /usr/share/puppet-dashboard/Rakefile RAILS_ENV=production FILE=${dump_dir}/dashboard-date -I
.sql db:raw:dump >> /var/log/puppet/dashboard_maintenance.log 2>&1 && bzip2 -v9 ${dump_dir}/dashboard-date -I
.sql >> /var/log/puppet/dashboard_maintenance.log 2>&1'
If using a specific command here, please keep in mind you need to align it with $puppet::dashboard::dashboard_user & $dump_dir yourself.
- Default: 'USE_DEFAULTS'
User to dump database as.
- Default: root
On which hour to dump database.
- Default: 1
At which minute to purge old reports.
- Default: 0
Number of days to keep database backups.
- Default: 7
User to purge old database dumps as.
- Default: root
On which hour to purge old database dumps.
- Default: 2
At which minute to purge old database dumps.
- Default: 0
===
Whether to install lint.
- Default: present
Which provider should supply lint.
- Default: gem
If you do not want to use the default version of lint, specify which version you want to use here.
- Default: undef
Which args should be added to the .puppet-lint.rc file
- Default: --no-80chars-check
The full path to the lint config file.
- Default: ${::root_home}/.puppet-lint.rc
The owner of the lint config file.
- Default: root
The group of the lint config file.
- Default: root
The mode of the lint config file.
- Default: 0644
===
In Hiera you will need to specify the following.
puppet::agent::is_puppet_master: 'true'
The location of puppet master sysconfig file.
- Default: use defaults based on osfamily
The location of puppet master vhost file for apache.
- Default: use defaults based on osfamily
The rack directory path.
- Default: /usr/share/puppet/rack/puppetmasterd
The user the puppet master should run as.
- Default: puppet
Whether to manage the firewall settings on the client
- Default: undef
===
If you have a cluster of puppet masters mounting the same data, you should disable these cronjobs on all systems except for one to ensure they are not all cleaning up the same data.
puppet::master::maintenance::clientbucket_cleanup_ensure: 'absent'
puppet::master::maintenance::reportdir_purge_ensure: 'absent'
String for ensure parameter for filebucket_cleanup cron job.
- Default: 'present'
Path to where the clientbucket files are stored.
- Default: /var/lib/puppet/clientbucket
The number of days to keep clientbuckets
- Default: 30
Command used to cleanup the clientbuckets.
- Default: /usr/bin/find ${clientbucket_path} -type f -mtime +30 -exec /bin/rm -fr {} ;
User to run the clientbucket cleanup as.
- Default: root
Hour on which to run the filebucket cleanup.
- Default: 0
Minute at which to run the filebucket cleanup.
- Default: 0
String for ensure parameter for purge_old_puppet_reports cron job.
- Default: 'present'
Directory that holds the reports. $::puppet_reportdir
is a custom fact that reads the reportdir
setting from Puppet's configuration. This is likely /var/lib/puppet/reports/
.
- Default: $::puppet_reportdir
String for number of days of reports to keep. Must be a positive integer > 0.
- Default: '30'
Command ran by cron to purge old reports.
- Default: /usr/bin/find -L /var/lib/puppet/reports -type f -mtime +30 -exec /bin/rm -fr {} ;'
User for the crontab entry to run the reportdir_purge_command.
- Default: root
Hour at which to run the reportdir_purge_command.
- Default: 0
Minute past the hour in which to run the reportdir_purge_command.
- Default: 15