diff options
-rw-r--r-- | files/cron.d/puppetmaster | 2 | ||||
-rw-r--r-- | manifests/linux.pp | 19 | ||||
-rw-r--r-- | manifests/puppetmaster.pp | 2 | ||||
-rw-r--r-- | manifests/puppetmaster/debian.pp | 11 |
4 files changed, 30 insertions, 4 deletions
diff --git a/files/cron.d/puppetmaster b/files/cron.d/puppetmaster index e56aa35..4ea0b66 100644 --- a/files/cron.d/puppetmaster +++ b/files/cron.d/puppetmaster @@ -1,3 +1,3 @@ # we restart puppetmaster twice a day to avoid memory problems -59 11,23 * * * root /etc/init.d/puppetmaster restart > /dev/null +58 11 * * * root /etc/init.d/puppetmaster restart > /dev/null diff --git a/manifests/linux.pp b/manifests/linux.pp index 09d0824..4190b85 100644 --- a/manifests/linux.pp +++ b/manifests/linux.pp @@ -1,6 +1,21 @@ class puppet::linux inherits puppet::base { - package{ [ 'puppet', 'facter' ]: - ensure => present, + + $real_puppet_version = $puppet_version ? { + '' => 'present', + default => $puppet_version, + } + + $real_facter_version = $facter_version ? { + '' => 'present', + default => $facter_version, + } + + package{ 'puppet': + ensure => $real_puppet_version, + } + + package{ 'facter': + ensure => $real_facter_version, } # package bc needed for cron diff --git a/manifests/puppetmaster.pp b/manifests/puppetmaster.pp index 37d59b5..1b1094c 100644 --- a/manifests/puppetmaster.pp +++ b/manifests/puppetmaster.pp @@ -1,7 +1,7 @@ # manifests/puppetmaster.pp class puppet::puppetmaster inherits puppet { case $operatingsystem { - debian: { include puppet::puppetmaster::package } + debian: { include puppet::puppetmaster::debian } centos: { include puppet::puppetmaster::centos } default: { case $kernel { diff --git a/manifests/puppetmaster/debian.pp b/manifests/puppetmaster/debian.pp new file mode 100644 index 0000000..20ac997 --- /dev/null +++ b/manifests/puppetmaster/debian.pp @@ -0,0 +1,11 @@ +# manifests/puppetmaster/debian.pp + +class puppet::puppetmaster::debian inherits puppet::puppetmaster::package { + + Package['puppet-server'] { + name => 'puppetmaster', + alias => 'puppet-server', + } + +} + |