summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2008-07-15 17:15:05 +1000
committerJames Turnbull <james@lovedthanlost.net>2008-07-15 17:15:05 +1000
commit65b9869362cd39f20609abb93729cb0c3977f0cf (patch)
tree2e13f202324da4be57d2a2a54191c42d2e53fb58 /examples
parent4ce7159baba4c637867c91519b5a3b16627dfca5 (diff)
downloadpuppet-65b9869362cd39f20609abb93729cb0c3977f0cf.tar.gz
puppet-65b9869362cd39f20609abb93729cb0c3977f0cf.tar.xz
puppet-65b9869362cd39f20609abb93729cb0c3977f0cf.zip
Further moves from the examples directory and ext directory
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/etc/init.d/sleeper72
-rw-r--r--examples/etc/otherfile0
-rw-r--r--examples/etc/puppet/fileserver.conf13
-rw-r--r--examples/etc/puppet/namespaceauth.conf20
-rw-r--r--examples/etc/puppet/puppet.conf10
-rw-r--r--examples/etc/puppet/tagmail.conf1
6 files changed, 116 insertions, 0 deletions
diff --git a/examples/etc/init.d/sleeper b/examples/etc/init.d/sleeper
new file mode 100755
index 000000000..6da5eae32
--- /dev/null
+++ b/examples/etc/init.d/sleeper
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+# $Id$
+
+script=$0
+path=`echo $script | sed 's/etc..*/bin/'`
+
+PATH=$PATH:$path
+
+ps=`facter ps`
+
+if [ -z "$ps" ]; then
+ ps="ps -ef"
+fi
+
+function start
+{
+ cd $path
+ ./sleeper
+}
+
+function stop
+{
+ #if [ -n `which pgrep` ]; then
+ # pid=`pgrep sleeper`
+ #else
+ pid=`$ps | grep -v grep | grep sleeper | grep ruby | awk '{print $2}'`
+ #fi
+ if [ -n "$pid" ]; then
+ kill $pid
+ fi
+}
+
+function restart
+{
+ stop
+ start
+}
+
+function status
+{
+ #if [ -n `which pgrep` ]; then
+ # cmd="pgrep sleeper"
+ #else
+ #cmd="$ps | grep -v grep | grep sleeper | grep ruby | awk '{print $2}'"
+ #fi
+ #$cmd
+ $ps | grep -v grep | grep sleeper | grep ruby
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop; start
+ ;;
+ status)
+ output=`status`
+ #status
+ exit $?
+ ;;
+ *)
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/examples/etc/otherfile b/examples/etc/otherfile
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/examples/etc/otherfile
diff --git a/examples/etc/puppet/fileserver.conf b/examples/etc/puppet/fileserver.conf
new file mode 100644
index 000000000..32dfcdd5c
--- /dev/null
+++ b/examples/etc/puppet/fileserver.conf
@@ -0,0 +1,13 @@
+# $Id$
+
+[dist]
+ path /dist
+ allow *.madstop.com
+
+[plugins]
+ path /var/puppet/plugins
+ allow *.madstop.com
+
+[facts]
+ path /var/puppet/facts
+ allow *.madstop.com
diff --git a/examples/etc/puppet/namespaceauth.conf b/examples/etc/puppet/namespaceauth.conf
new file mode 100644
index 000000000..fb08d428b
--- /dev/null
+++ b/examples/etc/puppet/namespaceauth.conf
@@ -0,0 +1,20 @@
+# This file is only necessary if your clients listen.
+# Note that it affects all puppet daemons, including puppetmasterd,
+# which is why puppetmaster is in there.
+[fileserver]
+ allow *.madstop.com
+
+[puppetmaster]
+ allow *.madstop.com
+
+[pelementserver]
+ allow puppet.madstop.com
+
+[puppetrunner]
+ allow culain.madstop.com
+
+[puppetbucket]
+ allow *.madstop.com
+
+[puppetreports]
+ allow *.madstop.com
diff --git a/examples/etc/puppet/puppet.conf b/examples/etc/puppet/puppet.conf
new file mode 100644
index 000000000..151364ebd
--- /dev/null
+++ b/examples/etc/puppet/puppet.conf
@@ -0,0 +1,10 @@
+[puppetd]
+report = true
+factsync = true
+pluginsync = true
+
+[puppetmasterd]
+reports = store,rrdgraph,tagmail,log
+node_terminus = ldap
+ldapserver = culain.madstop.com
+ldapbase = dc=madstop,dc=com
diff --git a/examples/etc/puppet/tagmail.conf b/examples/etc/puppet/tagmail.conf
new file mode 100644
index 000000000..31c77f4bc
--- /dev/null
+++ b/examples/etc/puppet/tagmail.conf
@@ -0,0 +1 @@
+all: user@domain.com