[xen-tools-discuss] rule.d file for puppet
Simon Hürlimann
simon.huerlimann at huerlisi.ch
Fri Jan 2 00:42:49 CET 2009
Hi again
There's a role.d script for cfengine, but none for Puppet (And I like
Puppet more).
For this simple reason: Here's my take on a puppet role script. More or
less a straight copy of the cfengine;-)
Maybe, just maybe... include?
Happy Hacking
Simon
diff -r bd96370cbfc3 roles/puppet
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/puppet Fri Jan 02 00:14:03 2009 +0100
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# This role installs Puppet upon the new guest system.
+#
+# It must make sure that the server is not running before it exits
+# otherwise the temporary mounted directory will not be unmountable.
+#
+
+prefix=$1
+
+#
+# Source our common functions - this will let us install a Debian package.
+#
+if [ -e /usr/lib/xen-tools/common.sh ]; then
+ . /usr/lib/xen-tools/common.sh
+else
+ echo "Installation problem"
+fi
+
+
+
+#
+# Log our start
+#
+logMessage Script $0 starting
+
+
+#
+# Install ssh
+#
+installDebianPackage ${prefix} puppet
+
+
+#
+# Make sure sshd isn't running, this will cause our unmounting of the
+# disk image to fail..
+#
+chroot ${prefix} /etc/init.d/puppet stop
+
+#
+# Log our finish
+#
+logMessage Script $0 finished
More information about the xen-tools-discuss
mailing list