diff options
author | mh <mh@immerda.ch> | 2008-07-22 21:33:56 +0000 |
---|---|---|
committer | mh <mh@immerda.ch> | 2008-07-22 21:33:56 +0000 |
commit | 11168ee6885e6908c7c738dfa53ffabf59d9d660 (patch) | |
tree | 1db39c7c9b3c907593c4364849be1ef2696cf755 /manifests | |
parent | 89c06549397d6d52a16b25a0cf3b8d37a303dc77 (diff) |
merged with puzzle
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 2 | ||||
-rw-r--r-- | manifests/puppetmaster.pp | 24 | ||||
-rw-r--r-- | manifests/puppetmaster/centos.pp | 12 | ||||
-rw-r--r-- | manifests/puppetmaster/linux.pp | 14 | ||||
-rw-r--r-- | manifests/puppetmaster/package.pp | 9 |
5 files changed, 39 insertions, 22 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 3454856..efa263a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -88,9 +88,11 @@ class puppet::debian inherits puppet::linux { hasstatus => false, } } + 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], diff --git a/manifests/puppetmaster.pp b/manifests/puppetmaster.pp index dd0f800..4470a84 100644 --- a/manifests/puppetmaster.pp +++ b/manifests/puppetmaster.pp @@ -4,7 +4,8 @@ import "storeconfigs.pp" class puppet::puppetmaster inherits puppet { case $operatingsystem { - centos,debian, redhat: { include puppet::puppetmaster::package } + debian: { include puppet::puppetmaster::package } + centos: { include puppet::puppetmaster::centos } default: { case $kernel { linux: { include puppet::puppetmaster::linux } @@ -43,27 +44,6 @@ class puppet::puppetmaster inherits puppet { } } -class puppet::puppetmaster::linux inherits puppet::linux { - - service{'puppetmaster': - ensure => running, - enable => true, - require => [ Package[puppet] ], - } - - Service[puppet]{ - require +> Service[puppetmaster], - } -} - -class puppet::puppetmaster::package inherits puppet::puppetmaster::linux { - package { puppet-server: ensure => present } - - Service[puppetmaster]{ - require +> Package[puppet-server], - } -} - define puppet::puppetmaster::hasdb( $dbtype = 'mysql', $dbname = 'puppet', diff --git a/manifests/puppetmaster/centos.pp b/manifests/puppetmaster/centos.pp new file mode 100644 index 0000000..eab652b --- /dev/null +++ b/manifests/puppetmaster/centos.pp @@ -0,0 +1,12 @@ +# manifests/puppetmaster/centos.pp + +class puppet::puppetmaster::centos inherits puppet::puppetmaster::package { + file{'/etc/sysconfig/puppetmaster': + source => [ "puppet://$server/files/puppet/sysconfig/${fqdn}/puppetmaster", + "puppet://$server/files/puppet/sysconfig/${domain}/puppetmaster", + "puppet://$server/files/puppet/sysconfig/puppetmaster", + "puppet://$server/puppet/sysconfig/puppetmaster" ], + notify => Service[puppetmaster], + owner => root, group => 0, mode => 0644; + } +} diff --git a/manifests/puppetmaster/linux.pp b/manifests/puppetmaster/linux.pp new file mode 100644 index 0000000..43cd841 --- /dev/null +++ b/manifests/puppetmaster/linux.pp @@ -0,0 +1,14 @@ +# manifests/puppetmaster/linux.pp + +class puppet::puppetmaster::linux inherits puppet::linux { + + service{'puppetmaster': + ensure => running, + enable => true, + require => [ Package[puppet] ], + } + + Service[puppet]{ + require +> Service[puppetmaster], + } +} diff --git a/manifests/puppetmaster/package.pp b/manifests/puppetmaster/package.pp new file mode 100644 index 0000000..d7c477d --- /dev/null +++ b/manifests/puppetmaster/package.pp @@ -0,0 +1,9 @@ +# manifests/puppetmaster/package.pp + +class puppet::puppetmaster::package inherits puppet::puppetmaster::linux { + package { puppet-server: ensure => present } + + Service[puppetmaster]{ + require +> Package[puppet-server], + } +} |