summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2008-07-10 19:52:26 +1000
committerJames Turnbull <james@lovedthanlost.net>2008-07-10 19:52:26 +1000
commit605d760dd72b7b6bd3fd54e9f6c3ffacb1b9ee52 (patch)
treebfab41f07b972f61585ef2fcf454ad9fdef6c832 /ext
parentd25c2b282cc4cd703bba3d2457f93431098ddc85 (diff)
downloadpuppet-605d760dd72b7b6bd3fd54e9f6c3ffacb1b9ee52.tar.gz
puppet-605d760dd72b7b6bd3fd54e9f6c3ffacb1b9ee52.tar.xz
puppet-605d760dd72b7b6bd3fd54e9f6c3ffacb1b9ee52.zip
Moved debian to conf and updated examples directory
Diffstat (limited to 'ext')
-rwxr-xr-xext/root/bin/sleeper67
-rw-r--r--ext/root/etc/configfile0
-rw-r--r--ext/root/etc/debian-passwd29
-rw-r--r--ext/root/etc/debian-syslog.conf71
-rwxr-xr-xext/root/etc/init.d/sleeper72
-rw-r--r--ext/root/etc/otherfile0
-rw-r--r--ext/root/etc/puppet/fileserver.conf13
-rw-r--r--ext/root/etc/puppet/namespaceauth.conf20
-rw-r--r--ext/root/etc/puppet/puppet.conf10
-rw-r--r--ext/root/etc/puppet/tagmail.conf1
10 files changed, 283 insertions, 0 deletions
diff --git a/ext/root/bin/sleeper b/ext/root/bin/sleeper
new file mode 100755
index 000000000..980d66ac1
--- /dev/null
+++ b/ext/root/bin/sleeper
@@ -0,0 +1,67 @@
+#!/usr/bin/env ruby -w
+
+###
+# sleep indefinitely as a debug
+
+require 'getoptlong'
+
+#-----------------------------------------------------------------
+def daemonize
+ outfile = "/tmp/sleeperout"
+ if pid = fork()
+ Process.detach(pid)
+ sleep 1
+ # verify that we didn't have any problems starting the daemon
+ if FileTest.exists?(outfile)
+ $stderr.puts "Sleeper failed: %s" % File.read(outfile)
+ File.unlink(outfile)
+ exit(14)
+ else
+ exit(0)
+ end
+ end
+ Process.setsid
+ Dir.chdir("/")
+ begin
+ $stdin.reopen "/dev/null"
+ $stdout.reopen "/dev/null", "a"
+ $stderr.reopen $stdin
+ rescue => detail
+ File.open(outfile, "w") { |f|
+ f.puts detail
+ }
+ exit(12)
+ end
+end
+#-----------------------------------------------------------------
+
+debug = false
+
+result = GetoptLong.new(
+ [ "--debug", "-d", GetoptLong::NO_ARGUMENT ],
+ [ "--help", "-h", GetoptLong::NO_ARGUMENT ]
+)
+
+result.each { |opt,arg|
+ case opt
+ when "--help"
+ puts "There is no help yet"
+ exit
+ when "--debug"
+ debug = true
+ else
+ raise "Invalid option '#{opt}'"
+ end
+}
+
+trap(:INT) {
+ exit
+}
+
+unless debug
+ daemonize()
+end
+
+# Sleep for no more than two minutes
+sleep 120
+exit
diff --git a/ext/root/etc/configfile b/ext/root/etc/configfile
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/ext/root/etc/configfile
diff --git a/ext/root/etc/debian-passwd b/ext/root/etc/debian-passwd
new file mode 100644
index 000000000..59cdf4acf
--- /dev/null
+++ b/ext/root/etc/debian-passwd
@@ -0,0 +1,29 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+postgres:x:31:32:postgres:/var/lib/postgres:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+operator:x:37:37:Operator:/var:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+sshd:x:102:65534::/var/run/sshd:/bin/false
+gdm:x:101:101:Gnome Display Manager:/var/lib/gdm:/bin/false
+telnetd:x:103:103::/usr/lib/telnetd:/bin/false
+nagios:x:1000:1001::/home/nagios:
+messagebus:x:104:107::/var/run/dbus:/bin/false
+saned:x:109:109::/home/saned:/bin/false
+ganglia:x:105:110:Ganglia Monitor:/var/lib/ganglia:/bin/false
+zope:x:106:111::/var/lib/zope2.7/var:/bin/false
+fbgetty:x:112:112::/home/fbgetty:/bin/false
diff --git a/ext/root/etc/debian-syslog.conf b/ext/root/etc/debian-syslog.conf
new file mode 100644
index 000000000..8f2925960
--- /dev/null
+++ b/ext/root/etc/debian-syslog.conf
@@ -0,0 +1,71 @@
+# /etc/syslog.conf Configuration file for syslogd.
+#
+# For more information see syslog.conf(5)
+# manpage.
+
+#
+# First some standard logfiles. Log by facility.
+#
+
+auth,authpriv.* /var/log/auth.log
+*.*;auth,authpriv.none -/var/log/syslog
+#cron.* /var/log/cron.log
+daemon.* -/var/log/daemon.log
+kern.* -/var/log/kern.log
+lpr.* -/var/log/lpr.log
+mail.* -/var/log/mail.log
+user.* -/var/log/user.log
+uucp.* /var/log/uucp.log
+
+#
+# Logging for the mail system. Split it up so that
+# it is easy to write scripts to parse these files.
+#
+mail.info -/var/log/mail.info
+mail.warn -/var/log/mail.warn
+mail.err /var/log/mail.err
+
+# Logging for INN news system
+#
+news.crit /var/log/news/news.crit
+news.err /var/log/news/news.err
+news.notice -/var/log/news/news.notice
+
+#
+# Some `catch-all' logfiles.
+#
+*.=debug;\
+ auth,authpriv.none;\
+ news.none;mail.none -/var/log/debug
+*.=info;*.=notice;*.=warn;\
+ auth,authpriv.none;\
+ cron,daemon.none;\
+ mail,news.none -/var/log/messages
+
+#
+# Emergencies are sent to everybody logged in.
+#
+*.emerg *
+
+#
+# I like to have messages displayed on the console, but only on a virtual
+# console I usually leave idle.
+#
+#daemon,mail.*;\
+# news.=crit;news.=err;news.=notice;\
+# *.=debug;*.=info;\
+# *.=notice;*.=warn /dev/tty8
+
+# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
+# you must invoke `xconsole' with the `-file' option:
+#
+# $ xconsole -file /dev/xconsole [...]
+#
+# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
+# busy site..
+#
+daemon.*;mail.*;\
+ news.crit;news.err;news.notice;\
+ *.=debug;*.=info;\
+ *.=notice;*.=warn |/dev/xconsole
+
diff --git a/ext/root/etc/init.d/sleeper b/ext/root/etc/init.d/sleeper
new file mode 100755
index 000000000..6da5eae32
--- /dev/null
+++ b/ext/root/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/ext/root/etc/otherfile b/ext/root/etc/otherfile
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/ext/root/etc/otherfile
diff --git a/ext/root/etc/puppet/fileserver.conf b/ext/root/etc/puppet/fileserver.conf
new file mode 100644
index 000000000..32dfcdd5c
--- /dev/null
+++ b/ext/root/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/ext/root/etc/puppet/namespaceauth.conf b/ext/root/etc/puppet/namespaceauth.conf
new file mode 100644
index 000000000..fb08d428b
--- /dev/null
+++ b/ext/root/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/ext/root/etc/puppet/puppet.conf b/ext/root/etc/puppet/puppet.conf
new file mode 100644
index 000000000..151364ebd
--- /dev/null
+++ b/ext/root/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/ext/root/etc/puppet/tagmail.conf b/ext/root/etc/puppet/tagmail.conf
new file mode 100644
index 000000000..31c77f4bc
--- /dev/null
+++ b/ext/root/etc/puppet/tagmail.conf
@@ -0,0 +1 @@
+all: user@domain.com