From 09c8eaf304d1075980d8d9143545f2f16a1db34d Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 5 Jun 2012 18:59:39 -0300 Subject: new style for 2.7 --- manifests/base.pp | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'manifests/base.pp') diff --git a/manifests/base.pp b/manifests/base.pp index 695241c..9e597a8 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -1,36 +1,33 @@ 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: { + '',undef,false: {} + default: { tidy { "/var/lib/puppet/clientbucket": backup => false, recurse => true, rmdirs => true, type => mtime, - age => "$puppet_cleanup_clientbucket"; + 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", + 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.${::operatingsystem}", "puppet:///modules/puppet/client/puppet.conf" ], notify => Service[puppet], - # if puppetmasterd is deployed by apache2/passenger it needs to read puppet.conf + # 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; + owner => puppet, group => 0, mode => 600; } service { 'puppet': -- cgit v1.2.3