summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
Diffstat (limited to 'files')
-rw-r--r--files/client/puppet.conf2
-rwxr-xr-xfiles/cluster/init.d/puppetmaster.CentOS108
-rw-r--r--files/master/fileserver.conf4
3 files changed, 111 insertions, 3 deletions
diff --git a/files/client/puppet.conf b/files/client/puppet.conf
index ba539cd..2981d8f 100644
--- a/files/client/puppet.conf
+++ b/files/client/puppet.conf
@@ -4,7 +4,7 @@
rundir=/var/run/puppet
#ssldir=/var/lib/puppet/ssl
- ssldir=/etc/puppet/ssl
+ ssldir=$vardir/ssl
# Where 3rd party plugins and modules are installed
libdir = /var/lib/puppet/lib
diff --git a/files/cluster/init.d/puppetmaster.CentOS b/files/cluster/init.d/puppetmaster.CentOS
new file mode 100755
index 0000000..0cb5ef9
--- /dev/null
+++ b/files/cluster/init.d/puppetmaster.CentOS
@@ -0,0 +1,108 @@
+#!/bin/bash
+# puppetmaster This shell script enables the puppetmaster server.
+#
+# Author: Duane Griffin <d.griffin@psenterprise.com>
+#
+# chkconfig: - 65 45
+#
+# description: Server for the puppet system management tool.
+# processname: puppetmaster
+
+PATH=/usr/bin:/sbin:/bin:/usr/sbin
+export PATH
+
+lockfile=/var/lock/subsys/puppetmaster
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+if [ -f /etc/sysconfig/puppetmaster ]; then
+ . /etc/sysconfig/puppetmaster
+fi
+
+PUPPETMASTER_OPTS=""
+[ -n "$PUPPETMASTER_MANIFEST" ] && PUPPETMASTER_OPTS="--manifest=${PUPPETMASTER_MANIFEST}"
+[ -n "$PUPPETMASTER_PORTS" ] && PUPPETMASTER_OPTS="$PUPPETMASTER_OPTS --servertype=mongrel"
+[ -n "$PUPPETMASTER_LOG" ] && PUPPETMASTER_OPTS="${PUPPETMASTER_OPTS} --logdest=${PUPPETMASTER_LOG}"
+PUPPETMASTER_OPTS="${PUPPETMASTER_OPTS} \
+ ${PUPPETMASTER_EXTRA_OPTS}"
+
+RETVAL=0
+
+prog=puppetmasterd
+PUPPETMASTER=/usr/sbin/$prog
+
+start() {
+ echo -n $"Starting puppetmaster: "
+
+ # Confirm the manifest exists
+ if [ -r $PUPPETMASTER_MANIFEST ]; then
+ if [ -n "$PUPPETMASTER_PORTS" ]; then
+ echo -n " (port "
+ for ((i=0; i<${#PUPPETMASTER_PORTS[@]}; i++)); do
+ echo -n "${PUPPETMASTER_PORTS[$i]}"
+ daemon $PUPPETMASTER $PUPPETMASTER_OPTS --masterport=${PUPPETMASTER_PORTS[$i]} --pidfile=puppetmaster.${PUPPETMASTER_PORTS[$i]}.pid
+ RETVAL=$? || $RETVAL
+ done
+ echo -n ")"
+ else
+ daemon $PUPPETMASTER $PUPPETMASTER_OPTS
+ RETVAL=$?
+ fi
+ else
+ failure $"Manifest does not exist: $PUPPETMASTER_MANIFEST"
+ echo
+ return 1
+ fi
+ [ $RETVAL -eq 0 ] && touch "$lockfile"
+ echo
+ return $RETVAL
+}
+
+stop() {
+ echo -n $"Stopping puppetmaster: "
+ if [ -n "$PUPPETMASTER_PORTS" ]; then
+ echo -n " (port "
+ for ((i=0; i<${#PUPPETMASTER_PORTS[@]}; i++)); do
+ echo -n "${PUPPETMASTER_PORTS[$i]}"
+ killproc -p puppetmaster.${PUPPETMASTER_PORTS[$i]}.pid $PUPPETMASTER
+ RETVAL=$? || $RETVAL
+ done
+ echo -n ")"
+ else
+ killproc $PUPPETMASTER
+ RETVAL=$?
+ fi
+ echo
+ [ $RETVAL -eq 0 ] && rm -f "$lockfile"
+ return $RETVAL
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload|force-reload)
+ restart
+ ;;
+ condrestart)
+ [ -f "$lockfile" ] && restart
+ ;;
+ status)
+ status $PUPPETMASTER
+ RETVAL=$?
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
+ exit 1
+esac
+
+exit $RETVAL
diff --git a/files/master/fileserver.conf b/files/master/fileserver.conf
index 3889e1b..3f1cf25 100644
--- a/files/master/fileserver.conf
+++ b/files/master/fileserver.conf
@@ -12,13 +12,13 @@
# allow 192.168.0.0/24
#
[files]
- path /var/lib/puppet/dist
+ path /srv/puppet/files
allow 127.0.0.1
allow *.euskal.internal
allow *.glei.ch
[secfiles]
- path /var/lib/puppet/secfiles
+ path /srv/puppet/secfiles
allow 127.0.0.1
allow *.euskal.internal
allow *.glei.ch