diff --git a/manifests/agent.pp b/manifests/agent.pp index 699effc..ed20d0f 100644 --- a/manifests/agent.pp +++ b/manifests/agent.pp @@ -10,6 +10,8 @@ class puppet::agent ( $splay = true, $cron = true, $environment = gsub($::domain, '.(maketank.net|bitwig.com|lan)$', '')) { + include puppet::common + case $::kernel { 'Linux' : { $puppetpkgs = ['puppet', 'puppet-common'] diff --git a/manifests/common.pp b/manifests/common.pp new file mode 100644 index 0000000..6888154 --- /dev/null +++ b/manifests/common.pp @@ -0,0 +1,9 @@ +class puppet::common { + ini_setting { 'puppet-templatedir': + path => '/etc/puppet/puppet.conf', + section => 'main', + setting => 'templatedir', + value => '$confidr/templates', + ensure => 'absent'; + } +} \ No newline at end of file diff --git a/manifests/init.pp b/manifests/init.pp index 453701f..6d8025c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -34,14 +34,6 @@ class puppet ( ensure => $facter_version, } - ini_setting { 'puppet-templatedir': - path => '/etc/puppet/puppet.conf', - section => 'main', - setting => 'templatedir', - value => '$confidr/templates', - ensure => 'absent'; - } - if $agent { class { 'puppet::agent': ensure => $ensure, diff --git a/manifests/server.pp b/manifests/server.pp index 791071e..022bcaf 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -6,14 +6,16 @@ class puppet::server ( $reports = undef, $basemodulepath = undef, $passenger = true) { + include puppet::common + if $passenger == true { $pkg = 'puppetmaster-passenger' } else { $pkg = 'puppetmaster' } - package { ['puppetmaster-common', $pkg]: - #ensure => $ensure, - } + + package { ['puppetmaster-common', $pkg]: # ensure => $ensure, + } # ## remove disk reports from time to time tidy { "${::puppet_vardir}/reports":