summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2008-12-27 15:54:45 +0000
committermh <mh@immerda.ch>2008-12-27 15:54:45 +0000
commit26fb5d12d5da80a8057aeaecaa65e266964d8478 (patch)
treec952686107449f61d5905f3f1c934b829c45c66c /manifests/init.pp
parent81d2c0ba518dca2861e685edd7af657a0726340d (diff)
factored classes out in their own files
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp107
1 files changed, 0 insertions, 107 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index b16eac3..3136c8a 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -35,110 +35,3 @@ class puppet {
}
}
-
-class puppet::base {
- $real_puppet_config = $puppet_config ? {
- '' => "/etc/puppet/puppet.conf",
- default => $puppet_config,
- }
-
- file { 'puppet_config':
- path => "$real_puppet_config",
- source => [ "puppet://$server/files/puppet/client/${fqdn}/puppet.conf",
- "puppet://$server/files/puppet/client/puppet.conf.$operatingsystem",
- "puppet://$server/files/puppet/client/puppet.conf",
- "puppet://$server/puppet/client/puppet.conf.$operatingsystem",
- "puppet://$server/puppet/client/puppet.conf" ],
- notify => Service[puppet],
- owner => root, group => 0, mode => 600;
- }
- service{'puppet':
- ensure => running,
- enable => true,
- hasstatus => true,
- hasrestart => true,
- pattern => puppetd,
- }
-
-}
-
-class puppet::linux inherits puppet::base {
- package{ [ 'puppet', 'facter' ]:
- ensure => present,
- }
-
- # package bc needed for cron
- include bc
- Service['puppet']{
- require => Package[puppet],
- }
-
-
- file{'/etc/cron.d/puppetd.cron':
- source => [ "puppet://$server/puppet/cron.d/puppetd.${operatingsystem}",
- "puppet://$server/puppet/cron.d/puppetd" ],
- owner => root, group => 0, mode => 0644;
- }
-}
-class puppet::gentoo inherits puppet::linux {
- Package[puppet]{
- category => 'app-admin',
- }
- Package[facter]{
- category => 'dev-ruby',
- }
- # as we use sometimes the init script to test
- Service[puppet]{
- hasstatus => false,
- }
-}
-class puppet::debian inherits puppet::linux {
- file{'/etc/default/puppet':
- source => [ "puppet://$server/files/puppet/client/debian/${fqdn}/puppet",
- "puppet://$server/files/puppet/client/debian/${domain}/puppet",
- "puppet://$server/files/puppet/client/debian/puppet",
- "puppet://$server/puppet/client/debian/puppet" ],
- notify => Service[puppet],
- owner => root, group => 0, mode => 0644;
- } # there is really no status cmd for it
- Service[puppet]{
- hasstatus => false,
- }
- File['/etc/cron.d/puppetd.cron']{
- path => '/etc/cron.d/puppetd',
- }
-}
-
-class puppet::centos inherits puppet::linux {
- file{'/etc/sysconfig/puppet':
- source => [ "puppet://$server/files/puppet/sysconfig/${fqdn}/puppet",
- "puppet://$server/files/puppet/sysconfig/${domain}/puppet",
- "puppet://$server/files/puppet/sysconfig/puppet",
- "puppet://$server/puppet/sysconfig/puppet" ],
- notify => Service[puppet],
- owner => root, group => 0, mode => 0644;
- }
-}
-class puppet::openbsd inherits puppet::base {
- Service['puppet']{
- restart => '/bin/kill -HUP `/bin/cat /var/run/puppet/puppetd.pid`',
- stop => '/bin/kill `/bin/cat /var/run/puppet/puppetd.pid`',
- start => '/usr/local/bin/puppetd',
- hasstatus => false,
- hasrestart => false,
- }
- openbsd::add_to_rc_local{'puppetd':
- binary => '/usr/local/bin/puppetd',
- }
- cron { 'puppetd_check':
- command => '/bin/ps ax | /usr/bin/grep -v grep | /usr/bin/grep -q puppetd || (sleep `echo $RANDOM/2000*60 | bc` && /usr/local/bin/puppetd)',
- user => root,
- minute => 0,
- }
- cron { 'puppetd_restart':
- command => 'sleep `echo $RANDOM/2000*60 | bc` && /bin/kill `/bin/cat /var/run/puppet/puppetd.pid`; /usr/local/bin/puppetd',
- minute => 0,
- hour => 22,
- monthday => '*/2',
- }
-}