diff options
author | mh <mh@immerda.ch> | 2008-02-02 17:32:43 +0000 |
---|---|---|
committer | mh <mh@immerda.ch> | 2008-02-02 17:32:43 +0000 |
commit | 1203ef6485806abf773bb8919629a759df09a799 (patch) | |
tree | 6442feb593cac0873ed626f81355d5b7e2ed4a3b /manifests | |
parent | edc6309117904784a684cde2297f582c019daadf (diff) |
refactored puppet module to run as well under openbsd
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index f255653..b8f0941 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,7 +5,13 @@ # modules_dir { "puppet": } class puppet { + case $kernel { + linux: { include puppet::linux} + openbsd: { include puppet::openbsd} + } +} +class puppet::linux { package{'puppet': name => 'puppet', category => $operatingsystem ? { @@ -24,12 +30,18 @@ class puppet { ensure => present, } - service{'puppet': ensure => running, require => Package[puppet], } } +class puppet::openbsd { + service{'puppet': + provider => base, + pattern => puppetd, + ensure => running, + } +} class puppetmaster inherits puppet { service{'puppetmaster': @@ -41,8 +53,9 @@ class puppetmaster inherits puppet { define puppet::config($source = ''){ $real_source = $source ? { - '' => 'puppet/client/puppet.conf', - default => $source, + '' => [ "puppet://$server/puppet/client/puppet.conf.$operatingsystem", + "puppet://$server/puppet/client/puppet.conf" ], + default => "puppet://$server/$source", } file { 'pupet_config': @@ -50,7 +63,7 @@ define puppet::config($source = ''){ owner => root, group => 0, mode => 600, - source => "puppet://$server/$real_source", + source => $real_source, notify => Service[puppet], } } |