diff options
author | Micah <micah@riseup.net> | 2015-03-01 00:34:37 +0000 |
---|---|---|
committer | Micah <micah@riseup.net> | 2015-03-01 00:34:37 +0000 |
commit | 70d2dd696696b14c5011580f994c6520b028f32a (patch) | |
tree | acd91c59fea86768f81d98e262ed1677f646fa47 /manifests/base.pp | |
parent | beae5a608dd1b1d370917896d853a6b53ad73a45 (diff) | |
parent | 0bb70b28a7c7679d0e07fd75230d40203c0d53b5 (diff) |
Merge branch 'merge_immerda' into 'master'
Merge immerda's changes
GENERAL CHANGES
* Now uses parameterized classes
* Deprecates all top-scope "$puppet_*" variables
* File source path changed from "site-puppet" to "site_puppet"
master/puppet.conf
* [main] default vardir changed /srv/puppet to /var/lib/puppet
* [main] plugindest removed
* [agent] logdest removed
* [environments] removed
base.pp
* new $puppet::config, $puppet::config_content
cron/base.pp
* new $puppet::cron::cron_time, $puppet::http_compression, $puppet::cron::stop_service
cron.pp
* new puppet::cron parameterized class
debian.pp
* $puppet_ensure_version now $puppet::ensure_version
init.pp
* new puppet parameteried class
* $use_shorewall deprecated
linux.pp
* $facter_ensure_version now $puppet::facter_ensure_version
master/linux.pp
* $puppetmaster_mode changed to $puppet::master::mode
* does not require apache::base
master
* class puppet:puppetmaster::* renamed puppet::master::*
* $puppet_fileserverconfig changed to $puppet::master::fileserver
* added $puppet::master::config_content
* $puppetmaster_storeconfigs changed to $puppet::master::storeconfigs
master/lastruncheck.pp
* $::puppet_lastruncheck_ignorehosts changed to $puppet::master::lastruncheck_ignorehosts
* $::puppet_lastruncheck_ignorehosts_str changed to $puppet::master::lastruncheck_ignorehosts_str
* $::puppet_lastruncheck_timeout_str changed to $puppet::master::lastruncheck_timeout_str
* does not include cron
* /etc/cron.d/puppetlast command changed
master/cleanupreports
* $puppetmaster_cleanup_reports[_dir] changed to $puppet::master::reports[_dir]
* cron filename changed
master/passenger
* does not install puppetmaster-passenger package on Debian anymore
* restart mechanism by creating /etc/puppet/rack/tmp/restart.txt
* does not manage /usr/share/puppet/rack/puppetmasterd/config.ru anymore, config.ru expected at /etc/puppet/rack (check your Apache configs)
See merge request !1
Diffstat (limited to 'manifests/base.pp')
-rw-r--r-- | manifests/base.pp | 64 |
1 files changed, 36 insertions, 28 deletions
diff --git a/manifests/base.pp b/manifests/base.pp index 6ff8fa5..5cb4c5d 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -1,42 +1,50 @@ +# configure general things of puppet class puppet::base { - if !$puppet_config { $puppet_config = '/etc/puppet/puppet.conf' } - - $puppet_majorversion = regsubst($puppetversion,'^(\d+\.\d+).*$','\1') - - case $puppet_cleanup_clientbucket { + $puppet_majorversion = regsubst($::puppetversion,'^(\d+\.\d+).*$','\1') + case $puppet::cleanup_clientbucket { # if not set, don't do anything - '',undef: {} - default: { - tidy { "/var/lib/puppet/clientbucket": - backup => false, + '',undef,false: {} + default: { + tidy { '/var/lib/puppet/clientbucket': + backup => false, recurse => true, - rmdirs => true, - type => mtime, - age => "$puppet_cleanup_clientbucket"; + rmdirs => true, + type => mtime, + age => $puppet::cleanup_clientbucket; } } } file { 'puppet_config': - path => "$puppet_config", - source => [ "puppet:///modules/site_puppet/client/${fqdn}/puppet.conf", - "puppet:///modules/site_puppet/client/puppet.conf.$operatingsystem", - "puppet:///modules/site_puppet/client/puppet.conf", - "puppet:///modules/puppet/client/${puppet_majorversion}/puppet.conf.$operatingsystem", - "puppet:///modules/puppet/client/${puppet_majorversion}/puppet.conf", - "puppet:///modules/puppet/client/puppet.conf.$operatingsystem", - "puppet:///modules/puppet/client/puppet.conf" ], - notify => Service[puppet], - # if puppetmasterd is deployed by apache2/passenger it needs to read puppet.conf - # therefore it must be readable by puppet - owner => puppet, group => 0, mode => 600; + path => $puppet::config, + notify => Service[puppet], + # if puppetmasterd is deployed by apache2/passenger it needs + # to read puppet.conf. therefore it must be readable by puppet + owner => puppet, + group => 0, + mode => '0600'; + } + if $puppet::config_content { + File['puppet_config'] { + content => $puppet::config_content + } + } else { + File['puppet_config'] { + source => [ "puppet:///modules/site_puppet/client/${::fqdn}/puppet.conf", + "puppet:///modules/site_puppet/client/puppet.conf.${::operatingsystem}", + 'puppet:///modules/site_puppet/client/puppet.conf', + "puppet:///modules/puppet/client/${puppet_majorversion}/puppet.conf.${::operatingsystem}", + "puppet:///modules/puppet/client/${puppet_majorversion}/puppet.conf", + "puppet:///modules/puppet/client/puppet.conf.${::operatingsystem}", + 'puppet:///modules/puppet/client/puppet.conf' ] + } } service { 'puppet': - ensure => running, - enable => true, - hasstatus => true, - hasrestart => true, + ensure => running, + enable => true, + hasstatus => true, + hasrestart => true, } } |