summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Filion <lelutin@gmail.com>2011-01-19 20:09:16 -0500
committerGabriel Filion <lelutin@gmail.com>2011-07-16 20:57:44 -0400
commit618384cf08340b34a4eaf1022d200c1acb8161f4 (patch)
treebfb41b5062b1f250ffb5c26ca00cbb77197fcd9f
parent3bcfd81f64f504cb9be05ccdb8b81652ff872d0f (diff)
Support puppet client for FreeBSD
Some pieces of the puzzle are missing for being able to manage puppet in FreeBSD. * Add a default puppet client config template for FreeBSD * In FreeBSD, puppet.conf is not in /etc/puppet/ so let's provide a value for this variable in init.pp. * The rc script for starting and stopping puppet is not located in /etc/rc.d so let's signify this to Service[puppet] Signed-off-by: Gabriel Filion <lelutin@gmail.com>
-rw-r--r--files/client/puppet.conf.FreeBSD26
-rw-r--r--manifests/freebsd.pp7
-rw-r--r--manifests/init.pp7
3 files changed, 40 insertions, 0 deletions
diff --git a/files/client/puppet.conf.FreeBSD b/files/client/puppet.conf.FreeBSD
new file mode 100644
index 0000000..cd8bd2a
--- /dev/null
+++ b/files/client/puppet.conf.FreeBSD
@@ -0,0 +1,26 @@
+[main]
+ logdir=/var/log/puppet
+ vardir=/var/puppet
+ rundir=/var/run/puppet
+
+ ssldir=/usr/local/etc/puppet/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]
+ report=true
+ server=server.example.com
+
+ # different run-interval, default= 30min
+ # e.g. run puppetd every 4 hours = 14400
+ # runinterval = 14400
+
+ logdest=$logdir/puppet.log
diff --git a/manifests/freebsd.pp b/manifests/freebsd.pp
new file mode 100644
index 0000000..1fe28d0
--- /dev/null
+++ b/manifests/freebsd.pp
@@ -0,0 +1,7 @@
+class puppet::freebsd inherits puppet::base {
+
+ Service['puppet'] {
+ path => '/usr/local/etc/rc.d',
+ }
+
+}
diff --git a/manifests/init.pp b/manifests/init.pp
index e9d9748..69d9b18 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -19,6 +19,13 @@
#
class puppet {
+ $puppet_default_config = $kernel ? {
+ freebsd => '/usr/local/etc/puppet/puppet.conf',
+ default => '/etc/puppet/puppet.conf',
+ }
+
+ if $puppet_config == '' { $puppet_config = $puppet_default_config }
+
case $kernel {
linux: {
case $operatingsystem {