diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-02-24 14:34:39 -0500 |
---|---|---|
committer | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-02-24 14:38:39 -0500 |
commit | 0bb70b28a7c7679d0e07fd75230d40203c0d53b5 (patch) | |
tree | acd91c59fea86768f81d98e262ed1677f646fa47 /manifests/master.pp | |
parent | beae5a608dd1b1d370917896d853a6b53ad73a45 (diff) | |
parent | 8584340c2aeac7d97a78b8303ab377b5049b80c2 (diff) |
Merge branch 'master' of git://git.puppet.immerda.ch/module-puppet
Conflicts:
files/master/config.ru
files/master/puppet.conf
manifests/base.pp
manifests/centos.pp
manifests/cron.pp
manifests/cron/base.pp
manifests/cron/linux.pp
manifests/debian.pp
manifests/init.pp
manifests/linux.pp
manifests/master/linux.pp
manifests/master/package/debian.pp
manifests/puppetmaster/base.pp
manifests/puppetmaster/centos.pp
manifests/puppetmaster/checklastrun.pp
manifests/puppetmaster/checklastrun/disable.pp
manifests/puppetmaster/cleanup_reports.pp
manifests/puppetmaster/cleanup_reports/disable.pp
manifests/puppetmaster/debian.pp
manifests/puppetmaster/package.pp
manifests/puppetmaster/package/base.pp
manifests/puppetmaster/passenger.pp
Diffstat (limited to 'manifests/master.pp')
-rw-r--r-- | manifests/master.pp | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/manifests/master.pp b/manifests/master.pp new file mode 100644 index 0000000..efff8e9 --- /dev/null +++ b/manifests/master.pp @@ -0,0 +1,83 @@ +# manifests/puppetmaster.pp +class puppet::master( + $config = '/etc/puppet/puppet.conf', + $config_content = false, + $fileserver = '/etc/puppet/fileserver.conf', + $http_compression = false, + $cleanup_clientbucket = false, + $cron_time = false, + $ensure_version = 'installed', + $ensure_facter_version = 'installed', + $lastruncheck_cron = '40 10 * * *', + $lastruncheck_ignorehosts = '', + $lastruncheck_timeout = '', + $lastruncheck_additionaloptions = '', + $mode = 'webrick', + $cleanup_reports = '30', + $reports_dir = '/var/lib/puppet/reports', + $shorewall_puppetmaster = "domain.${::domain}", + $shorewall_puppetmaster_port = 8140, + $shorewall_puppetmaster_signport = 8141, + $manage_munin = false +) { + if $cron_time { + class{'puppet::cron': + config => $config, + config_content => $config_content, + http_compression => $http_compression, + cleanup_clientbucket => $cleanup_clientbucket, + cron_time => $cron_time, + ensure_version => $ensure_version, + ensure_facter_version => $ensure_facter_version, + shorewall_puppetmaster => $shorewall_puppetmaster, + shorewall_puppetmaster_port => $shorewall_puppetmaster_port, + shorewall_puppetmaster_signport => $shorewall_puppetmaster_signport, + } + } else { + class{'puppet': + config => $config, + http_compression => $http_compression, + cleanup_clientbucket => $cleanup_clientbucket, + ensure_version => $ensure_version, + ensure_facter_version => $ensure_facter_version, + } + } + case $::operatingsystem { + debian: { include puppet::master::debian } + centos: { include puppet::master::centos } + default: { + case $::kernel { + linux: { include puppet::master::linux } + } + } + } + + include puppet::master::base + + + if $puppet::master::lastruncheck_cron { + include puppet::master::checklastrun + } else { + include puppet::master::checklastrun::disable + } + + if $puppet::master::mode == 'passenger' { + include puppet::master::passenger + } elsif $puppet::master::mode == 'cluster' { + include puppet::master::cluster + } + + if $puppet::master::cleanup_reports { + include puppet::master::cleanup_reports + } else { + include puppet::master::cleanup_reports::disable + } + + if $shorewall_puppetmaster { + include shorewall::rules::puppet::master + } + + if $manage_munin { + include puppet::master::munin + } +} |