summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/client/puppet.conf.OpenBSD36
-rw-r--r--manifests/init.pp21
2 files changed, 53 insertions, 4 deletions
diff --git a/files/client/puppet.conf.OpenBSD b/files/client/puppet.conf.OpenBSD
new file mode 100644
index 0000000..a20b98b
--- /dev/null
+++ b/files/client/puppet.conf.OpenBSD
@@ -0,0 +1,36 @@
+[main]
+ logdir=/var/log/puppet
+ vardir=/var/lib/puppet
+ rundir=/var/run/puppet
+
+ #ssldir=/var/lib/puppet/ssl
+ ssldir=$vardir/ssl
+
+ # Where 3rd party plugins and modules are installed
+ libdir = $vardir/lib
+
+ templatedir=$vardir/templates
+
+ # Turn plug-in synchronization on.
+ pluginsync = true
+ pluginsource = puppet://$server/plugins
+ factpath = $vardir/lib/facter
+
+[puppetd]
+ # The file in which puppetd stores a list of the classes
+ # associated with the retrieved configuratiion. Can be loaded in
+ # the separate ``puppet`` executable using the ``--loadclasses``
+ # option.
+ # The default value is '$confdir/classes.txt'.
+ classfile = $vardir/classes.txt
+
+ # Where puppetd caches the local configuration. An
+ # extension indicating the cache format is added automatically.
+ # The default value is '$confdir/localconfig'.
+ localconfig = $vardir/localconfig
+
+ user=_puppet
+
+ report=true
+ server=puppet.glei.ch
+
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],
}
}