From 605d760dd72b7b6bd3fd54e9f6c3ffacb1b9ee52 Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Thu, 10 Jul 2008 19:52:26 +1000 Subject: Moved debian to conf and updated examples directory --- CHANGELOG | 2 + conf/debian/README.source | 2 + conf/debian/TODO.Debian | 1 + conf/debian/changelog | 257 +++++++++++++++++++++ conf/debian/compat | 1 + conf/debian/control | 45 ++++ conf/debian/copyright | 17 ++ conf/debian/docs | 1 + conf/debian/fileserver.conf | 12 + conf/debian/puppet.NEWS | 63 +++++ conf/debian/puppet.conf | 8 + conf/debian/puppet.dirs | 7 + conf/debian/puppet.files | 6 + conf/debian/puppet.init | 64 +++++ conf/debian/puppet.logrotate | 11 + conf/debian/puppet.postinst | 9 + conf/debian/puppet.postrm | 21 ++ conf/debian/puppet.preinst | 25 ++ conf/debian/puppetmaster.files | 4 + conf/debian/puppetmaster.init | 58 +++++ conf/debian/rules | 115 +++++++++ conf/debian/watch | 2 + debian/README.source | 2 - debian/TODO.Debian | 1 - debian/changelog | 257 --------------------- debian/compat | 1 - debian/control | 45 ---- debian/copyright | 17 -- debian/docs | 1 - debian/fileserver.conf | 12 - debian/puppet.NEWS | 63 ----- debian/puppet.conf | 8 - debian/puppet.dirs | 7 - debian/puppet.files | 6 - debian/puppet.init | 64 ----- debian/puppet.logrotate | 11 - debian/puppet.postinst | 9 - debian/puppet.postrm | 21 -- debian/puppet.preinst | 25 -- debian/puppetmaster.files | 4 - debian/puppetmaster.init | 58 ----- debian/rules | 115 --------- debian/watch | 2 - examples/allatonce | 13 ++ examples/assignments | 11 + examples/code/allatonce | 13 -- examples/code/assignments | 11 - examples/code/components | 73 ------ examples/code/execs | 16 -- examples/code/file.bl | 11 - examples/code/filedefaults | 10 - examples/code/fileparsing | 116 ---------- examples/code/filerecursion | 15 -- examples/code/functions | 3 - examples/code/groups | 7 - examples/code/head | 30 --- examples/code/importing | 8 - examples/code/mac_automount.pp | 16 -- examples/code/mac_dscl.pp | 28 --- examples/code/mac_dscl_revert.pp | 26 --- examples/code/mac_netinfo.pp | 5 - examples/code/mac_pkgdmg.pp | 7 - examples/code/modules/sample-module.pp | 10 - examples/code/modules/sample-module/README.txt | 17 -- .../lib/puppet/parser/functions/hostname_to_dn.rb | 36 --- .../code/modules/sample-module/manifests/init.pp | 12 - .../modules/sample-module/templates/sample.erb | 5 - examples/code/nodes | 20 -- examples/code/one | 8 - examples/code/relationships | 34 --- examples/code/selectors | 28 --- examples/code/simpletests | 11 - examples/code/svncommit | 13 -- examples/components | 73 ++++++ examples/execs | 16 ++ examples/file.bl | 11 + examples/filedefaults | 10 + examples/fileparsing | 116 ++++++++++ examples/filerecursion | 15 ++ examples/functions | 3 + examples/groups | 7 + examples/head | 30 +++ examples/importing | 8 + examples/mac_automount.pp | 16 ++ examples/mac_dscl.pp | 28 +++ examples/mac_dscl_revert.pp | 26 +++ examples/mac_netinfo.pp | 5 + examples/mac_pkgdmg.pp | 7 + examples/modules/sample-module.pp | 10 + examples/modules/sample-module/README.txt | 17 ++ .../lib/puppet/parser/functions/hostname_to_dn.rb | 36 +++ examples/modules/sample-module/manifests/init.pp | 12 + .../modules/sample-module/templates/sample.erb | 5 + examples/nodes | 20 ++ examples/one | 8 + examples/relationships | 34 +++ examples/root/bin/sleeper | 67 ------ examples/root/etc/configfile | 0 examples/root/etc/debian-passwd | 29 --- examples/root/etc/debian-syslog.conf | 71 ------ examples/root/etc/init.d/sleeper | 72 ------ examples/root/etc/otherfile | 0 examples/root/etc/puppet/fileserver.conf | 13 -- examples/root/etc/puppet/namespaceauth.conf | 20 -- examples/root/etc/puppet/puppet.conf | 10 - examples/root/etc/puppet/tagmail.conf | 1 - examples/selectors | 28 +++ examples/simpletests | 11 + examples/svncommit | 13 ++ ext/root/bin/sleeper | 67 ++++++ ext/root/etc/configfile | 0 ext/root/etc/debian-passwd | 29 +++ ext/root/etc/debian-syslog.conf | 71 ++++++ ext/root/etc/init.d/sleeper | 72 ++++++ ext/root/etc/otherfile | 0 ext/root/etc/puppet/fileserver.conf | 13 ++ ext/root/etc/puppet/namespaceauth.conf | 20 ++ ext/root/etc/puppet/puppet.conf | 10 + ext/root/etc/puppet/tagmail.conf | 1 + 119 files changed, 1603 insertions(+), 1601 deletions(-) create mode 100644 conf/debian/README.source create mode 100644 conf/debian/TODO.Debian create mode 100644 conf/debian/changelog create mode 100644 conf/debian/compat create mode 100644 conf/debian/control create mode 100644 conf/debian/copyright create mode 100644 conf/debian/docs create mode 100644 conf/debian/fileserver.conf create mode 100644 conf/debian/puppet.NEWS create mode 100644 conf/debian/puppet.conf create mode 100644 conf/debian/puppet.dirs create mode 100644 conf/debian/puppet.files create mode 100644 conf/debian/puppet.init create mode 100644 conf/debian/puppet.logrotate create mode 100644 conf/debian/puppet.postinst create mode 100644 conf/debian/puppet.postrm create mode 100644 conf/debian/puppet.preinst create mode 100644 conf/debian/puppetmaster.files create mode 100644 conf/debian/puppetmaster.init create mode 100755 conf/debian/rules create mode 100644 conf/debian/watch delete mode 100644 debian/README.source delete mode 100644 debian/TODO.Debian delete mode 100644 debian/changelog delete mode 100644 debian/compat delete mode 100644 debian/control delete mode 100644 debian/copyright delete mode 100644 debian/docs delete mode 100644 debian/fileserver.conf delete mode 100644 debian/puppet.NEWS delete mode 100644 debian/puppet.conf delete mode 100644 debian/puppet.dirs delete mode 100644 debian/puppet.files delete mode 100644 debian/puppet.init delete mode 100644 debian/puppet.logrotate delete mode 100644 debian/puppet.postinst delete mode 100644 debian/puppet.postrm delete mode 100644 debian/puppet.preinst delete mode 100644 debian/puppetmaster.files delete mode 100644 debian/puppetmaster.init delete mode 100755 debian/rules delete mode 100644 debian/watch create mode 100644 examples/allatonce create mode 100644 examples/assignments delete mode 100644 examples/code/allatonce delete mode 100644 examples/code/assignments delete mode 100644 examples/code/components delete mode 100644 examples/code/execs delete mode 100644 examples/code/file.bl delete mode 100644 examples/code/filedefaults delete mode 100644 examples/code/fileparsing delete mode 100644 examples/code/filerecursion delete mode 100644 examples/code/functions delete mode 100644 examples/code/groups delete mode 100644 examples/code/head delete mode 100644 examples/code/importing delete mode 100644 examples/code/mac_automount.pp delete mode 100755 examples/code/mac_dscl.pp delete mode 100755 examples/code/mac_dscl_revert.pp delete mode 100755 examples/code/mac_netinfo.pp delete mode 100755 examples/code/mac_pkgdmg.pp delete mode 100644 examples/code/modules/sample-module.pp delete mode 100644 examples/code/modules/sample-module/README.txt delete mode 100644 examples/code/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb delete mode 100644 examples/code/modules/sample-module/manifests/init.pp delete mode 100644 examples/code/modules/sample-module/templates/sample.erb delete mode 100644 examples/code/nodes delete mode 100644 examples/code/one delete mode 100644 examples/code/relationships delete mode 100644 examples/code/selectors delete mode 100644 examples/code/simpletests delete mode 100644 examples/code/svncommit create mode 100644 examples/components create mode 100644 examples/execs create mode 100644 examples/file.bl create mode 100644 examples/filedefaults create mode 100644 examples/fileparsing create mode 100644 examples/filerecursion create mode 100644 examples/functions create mode 100644 examples/groups create mode 100644 examples/head create mode 100644 examples/importing create mode 100644 examples/mac_automount.pp create mode 100755 examples/mac_dscl.pp create mode 100755 examples/mac_dscl_revert.pp create mode 100755 examples/mac_netinfo.pp create mode 100755 examples/mac_pkgdmg.pp create mode 100644 examples/modules/sample-module.pp create mode 100644 examples/modules/sample-module/README.txt create mode 100644 examples/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb create mode 100644 examples/modules/sample-module/manifests/init.pp create mode 100644 examples/modules/sample-module/templates/sample.erb create mode 100644 examples/nodes create mode 100644 examples/one create mode 100644 examples/relationships delete mode 100755 examples/root/bin/sleeper delete mode 100644 examples/root/etc/configfile delete mode 100644 examples/root/etc/debian-passwd delete mode 100644 examples/root/etc/debian-syslog.conf delete mode 100755 examples/root/etc/init.d/sleeper delete mode 100644 examples/root/etc/otherfile delete mode 100644 examples/root/etc/puppet/fileserver.conf delete mode 100644 examples/root/etc/puppet/namespaceauth.conf delete mode 100644 examples/root/etc/puppet/puppet.conf delete mode 100644 examples/root/etc/puppet/tagmail.conf create mode 100644 examples/selectors create mode 100644 examples/simpletests create mode 100644 examples/svncommit create mode 100755 ext/root/bin/sleeper create mode 100644 ext/root/etc/configfile create mode 100644 ext/root/etc/debian-passwd create mode 100644 ext/root/etc/debian-syslog.conf create mode 100755 ext/root/etc/init.d/sleeper create mode 100644 ext/root/etc/otherfile create mode 100644 ext/root/etc/puppet/fileserver.conf create mode 100644 ext/root/etc/puppet/namespaceauth.conf create mode 100644 ext/root/etc/puppet/puppet.conf create mode 100644 ext/root/etc/puppet/tagmail.conf diff --git a/CHANGELOG b/CHANGELOG index 5214d6462..e85f9f249 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,6 @@ 0.24.5 + Moved debian to conf and updated examples directory + Fixed #1368 - updated Red Hat init scripts Added message referencing ReductiveLabs build library diff --git a/conf/debian/README.source b/conf/debian/README.source new file mode 100644 index 000000000..fd9155241 --- /dev/null +++ b/conf/debian/README.source @@ -0,0 +1,2 @@ +The debian directory is now maintained on Alioth in git. +See http://pkg-puppet.alioth.debian.org/ for more information. diff --git a/conf/debian/TODO.Debian b/conf/debian/TODO.Debian new file mode 100644 index 000000000..ac70b97be --- /dev/null +++ b/conf/debian/TODO.Debian @@ -0,0 +1 @@ +* clean up initscripts per http://mail.madstop.com/pipermail/puppet-dev/2006-June/001069.html diff --git a/conf/debian/changelog b/conf/debian/changelog new file mode 100644 index 000000000..69984d622 --- /dev/null +++ b/conf/debian/changelog @@ -0,0 +1,257 @@ +puppet (0.24.1-2) unstable; urgency=low + + * Set rundir correctly (Closes: #460203, #459579) + * Apply patch for puppet#1003 to enable collection of tagged resources + + -- Thom May Wed, 16 Jan 2008 11:08:55 +0100 + +puppet (0.24.1-1) unstable; urgency=low + + * New upstream release (Closes: #445626) + * Set maintainer to pkg-puppet-devel + + -- Thom May Sun, 30 Dec 2007 19:13:47 +0100 + +puppet (0.24.0-1) unstable; urgency=low + + * New upstream release + + -- Thom May Wed, 19 Dec 2007 16:00:34 +0100 + +puppet (0.23.2-15) unstable; urgency=low + + * No change upload setting maintainer to me whilst waiting for an alioth + project. + + -- Thom May Thu, 29 Nov 2007 10:44:50 +0100 + +puppet (0.23.2-14) unstable; urgency=low + + * Orphaning. + * Create /var/lib/puppet in the puppet package. Closes: #452506. + * Start the puppet init script after puppetmaster, to silence whiny bug + reports. Closes: #452064. + * Add a reload command to the Puppet init script. Closes: #452060. + + -- Matthew Palmer Thu, 29 Nov 2007 10:48:21 +1100 + +puppet (0.23.2-13) unstable; urgency=low + + * Drop quotes from an already-quoted value in a query. Closes: #448179. + * Remove excessive quoting from puppet/network/handler/master.rb. + Closes: #448221. + * Force removal of directories during pluginsync. Closes: #448180. + + -- Matthew Palmer Tue, 30 Oct 2007 14:55:19 +1100 + +puppet (0.23.2-12) unstable; urgency=low + + * Create /var/run/puppet and set the perms in the various initscripts, as + well as hardcoding the rundir better in configuration.rb and removing + the explicit rundir setting from puppet.conf. Closes: #447314. + * Apply additional patch given (backwards) to fix export/collect on some + database backends. Closes: #445591 (again!) + + -- Matthew Palmer Sat, 20 Oct 2007 11:28:50 +1000 + +puppet (0.23.2-11) unstable; urgency=low + + * Apply patch from puppet#786 to fix a problem with exported resources not + being properly detected as needing a rerun. Closes: #445591. + * Fix ignore handling for the plugins mount. Closes: #446390. + + -- Matthew Palmer Mon, 15 Oct 2007 09:11:25 +1000 + +puppet (0.23.2-10) unstable; urgency=low + + * Recycle connections when we change (or get) certs. + * Catch and retry more transient errors in the XMLRPC wrapper. + + -- Matthew Palmer Thu, 27 Sep 2007 15:06:11 +1000 + +puppet (0.23.2-9) unstable; urgency=low + + * Recycle the HTTP connection if we get an EPIPE during a request. + Closes: #444177. Thanks to Jos Backus for helping with testing. + + -- Matthew Palmer Thu, 27 Sep 2007 09:55:34 +1000 + +puppet (0.23.2-8) unstable; urgency=low + + * Remove extraneous debugging output accidentally left behind in the last + release. + * Fix spelling mistakes in debian/control and debian/puppet.preinst. + Closes: #444158. + + -- Matthew Palmer Thu, 27 Sep 2007 07:45:07 +1000 + +puppet (0.23.2-7) unstable; urgency=low + + * Ignore ENOENT errors in the module plugin syncing code, since they're + innocuous and expected. + * Allow facts that are downloaded through pluginsync to be used like any + other fact. + * Allow users to still have an old-style plugins mount if they want, by + specifying a path for the mount. Also track down a fault in old-style + fileserving which did strange slash-stripping. Closes: #443932. + + -- Matthew Palmer Tue, 25 Sep 2007 16:41:32 +1000 + +puppet (0.23.2-6) unstable; urgency=low + + * Patch rails/param_name.rb to stop query failures, as per puppet#784. + * Actually honour namevar. + * Only set dbuser if explicitly asked for. + * Fix annoying database deletion error for ParamValue objects. + * Add an accessor for ca_file, since older openssl-ruby only had a writer. + * Fix the fileserver to honour ignore. Thanks to Nathan Ward for the + bug report on IRC. + + -- Matthew Palmer Thu, 20 Sep 2007 16:10:41 +1000 + +puppet (0.23.2-5) unstable; urgency=low + + * Add some NEWS for the ssldir transition. Should have done that earlier. + * Remove the explicit mode change for vardir, and fix up the mode on + statedir, as well. Closes: #425496. + * Only set some database parameters if they're explicitly set; this makes + life easier for PgSQL ident auth. + * Allow empty config options. + + -- Matthew Palmer Thu, 13 Sep 2007 11:09:59 +1000 + +puppet (0.23.2-4) unstable; urgency=low + + * Fix puppet#776 in a slightly better way by only flushing the cache when + a value is changed, rather than whenever a value is read. + * Apply patch from puppet#755 to cache connections to the Puppetmaster, + which improves performance by more than a little. + * Modify the fileserver so that it provides a 'plugins' mount which + exports the union of the plugins directory of all modules. + + -- Matthew Palmer Fri, 31 Aug 2007 15:32:04 +1000 + +puppet (0.23.2-3) unstable; urgency=low + + * Clear the config value cache every time. This is a titchy little + performance hit, but it works around puppet#776 rather nicely. + + -- Matthew Palmer Fri, 24 Aug 2007 16:08:04 +1000 + +puppet (0.23.2-2) unstable; urgency=low + + * Move the SSL state directory to a more policy-friendly location, + /var/lib/puppet/ssl. + + -- Matthew Palmer Tue, 21 Aug 2007 12:54:40 +1000 + +puppet (0.23.2-1) unstable; urgency=low + + * New upstream release. + + -- Matthew Palmer Tue, 7 Aug 2007 12:47:49 +1000 + +puppet (0.23.1-1) unstable; urgency=low + + * New upstream release. + * Switch primary maintainer to me. Thanks jaq. + * Make the recommendation for rails >= 1.2.3-2, to avoid + incompatibilities. This breaks compatibility with stable, but the rails + package from unstable should install cleanly in stable. Closes: #433999 + + -- Matthew Palmer Sat, 21 Jul 2007 16:34:36 +1000 + +puppet (0.23.0-1) unstable; urgency=low + + * New upstream release. + - Includes a new configuration file handling system; see NEWS.Debian. + + -- Matthew Palmer Mon, 25 Jun 2007 09:55:12 +1000 + +puppet (0.22.4-2) unstable; urgency=low + + * Depend on libshadow-ruby1.8, for new password modification functionality + added to upstream 0.22.4. + * Several improvements from Micah Anderson: + - Better vim syntax installation process. + - Install Emacs syntax highlighting. + - Install logcheck rules. Closes: #421851. + + -- Matthew Palmer Thu, 3 May 2007 15:04:15 +1000 + +puppet (0.22.4-1) unstable; urgency=low + + * New upstream release. + + -- Matthew Palmer Wed, 2 May 2007 12:20:15 +1000 + +puppet (0.22.3-1) unstable; urgency=low + + * New upstream release. Closes: #415773. + * Switch to using our own logrotate config, and enhance it as per + David Schmitt's suggestions. Closes: #414282. + * Add puppetrun to the puppetmaster package, and actually put puppetdoc + into the puppet package. Closes: #419273. + * Copy vim syntax highlighting file into the puppet package, and add a + stanza to have Vim automatically highlight .pp files. Closes: #412868. + Thanks to David Schmitt for researching how to do all of that. + * Add a templatedir setting to the default puppetmasterd.conf to make it + obvious that it can be changed. Closes: #407506. + + -- Matthew Palmer Wed, 18 Apr 2007 14:03:33 +1000 + +puppet (0.22.1-1) unstable; urgency=low + + * New upstream release. + + -- Matthew Palmer Fri, 2 Feb 2007 09:06:46 +1100 + +puppet (0.22.0-1) unstable; urgency=low + + * New upstream release. + * Use --startas instead of --init in init scripts, which (according to + Paul Hampson) makes checking for already-running instances work. + Closes: #405912. + + -- Matthew Palmer Mon, 8 Jan 2007 08:41:35 +1100 + +puppet (0.20.1-1) unstable; urgency=low + + * New upstream release. (Closes: #387674) + * Rationalise the puppetmasterd init script. + * Add inclusion of /etc/default files for init scripts. (Closes: #388178) + * Add puppet.conf to match puppetd.conf. (Closes: #385646) + + -- Matthew Palmer Thu, 30 Nov 2006 10:54:19 +1100 + +puppet (0.18.4-1) unstable; urgency=low + + * New upstream release. + - Properly detect all services, including those in rcS.d. + (Closes: #378351) + * Add Homepage: to the long description. (Closes: #377896) + + -- Matthew Palmer Mon, 24 Jul 2006 19:46:06 +1000 + +puppet (0.18.3-1) unstable; urgency=low + + * New upstream version. + - Set DEBIAN_FRONTEND=noninteractive when installing Debian packages. + (Closes: #378338) + + -- Matthew Palmer Sun, 16 Jul 2006 10:58:50 +1000 + +puppet (0.18.1-1) unstable; urgency=low + + * Make Puppet not wait for a cert at all (to prevent startup hangs). + * Cleanup the init scripts to not have NO_START detritus. + * Apply puppet.debian-frontend, to set DEBIAN_FRONTEND=noninteractive on + package installation. + + -- Matthew Palmer Tue, 27 Jun 2006 15:05:32 +1000 + +puppet (0.18.0-1) unstable; urgency=low + + * Initial release. (Closes: #348625) + + -- Matthew Palmer Wed, 24 May 2006 13:10:01 +1000 diff --git a/conf/debian/compat b/conf/debian/compat new file mode 100644 index 000000000..b8626c4cf --- /dev/null +++ b/conf/debian/compat @@ -0,0 +1 @@ +4 diff --git a/conf/debian/control b/conf/debian/control new file mode 100644 index 000000000..8b0e92e7e --- /dev/null +++ b/conf/debian/control @@ -0,0 +1,45 @@ +Source: puppet +Section: admin +Priority: optional +Maintainer: Puppet Package Maintainers +Uploaders: Thom May +Build-Depends-Indep: debhelper (>= 4.0.0), ruby (>= 1.8.1) +Standards-Version: 3.6.2 + +Package: puppet +Architecture: all +Depends: ruby (>= 1.8.1), libxmlrpc-ruby, libopenssl-ruby, libshadow-ruby1.8, adduser, facter, lsb-base +Recommends: rdoc +Description: centralised configuration management for networks + Puppet lets you centrally manage every important aspect of your system + using a cross-platform specification language that manages all the + separate elements normally aggregated in different files, like users, + cron jobs, and hosts, along with obviously discrete elements like + packages, services, and files. + . + Puppet's simple declarative specification language provides powerful + classing abilities for drawing out the similarities between hosts while + allowing them to be as specific as necessary, and it handles dependency + and prerequisite relationships between objects clearly and explicitly. + . + Homepage: http://reductivelabs.com/projects/puppet + +Package: puppetmaster +Architecture: all +Depends: ruby (>= 1.8.1), puppet (= ${Source-Version}), facter, lsb-base +Recommends: rails (>= 1.2.3-2), rdoc +Description: centralised configuration management control daemon + Puppet lets you centrally manage every important aspect of your system + using a cross-platform specification language that manages all the + separate elements normally aggregated in different files, like users, + cron jobs, and hosts, along with obviously discrete elements like + packages, services, and files. + . + Puppet's simple declarative specification language provides powerful + classing abilities for drawing out the similarities between hosts while + allowing them to be as specific as necessary, and it handles dependency + and prerequisite relationships between objects clearly and explicitly. + . + This package contains the manifest server, 'puppetmaster'. + . + Homepage: http://reductivelabs.com/projects/puppet diff --git a/conf/debian/copyright b/conf/debian/copyright new file mode 100644 index 000000000..06bdcab30 --- /dev/null +++ b/conf/debian/copyright @@ -0,0 +1,17 @@ +This package was debianized by Jamie Wilkinson on +Thu, 27 Apr 2006 10:18:04 +1000. + +It was downloaded from http://reductivelabs.com/downloads/puppet + +Copyright Holder: Luke Kanies + +License: + +From +http://reductivelabs.com/documents/faq#what-license-is-puppet-released-under: + +Puppet is open source and is released under the GNU Public License. + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + diff --git a/conf/debian/docs b/conf/debian/docs new file mode 100644 index 000000000..e845566c0 --- /dev/null +++ b/conf/debian/docs @@ -0,0 +1 @@ +README diff --git a/conf/debian/fileserver.conf b/conf/debian/fileserver.conf new file mode 100644 index 000000000..04a51c080 --- /dev/null +++ b/conf/debian/fileserver.conf @@ -0,0 +1,12 @@ +# This file consists of arbitrarily named sections/modules +# defining where files are served from and to whom + +# Define a section 'files' +# Adapt the allow/deny settings to your needs. Order +# for allow/deny does not matter, allow always takes precedence +# over deny +[files] + path /etc/puppet/files +# allow *.example.com +# deny *.evil.example.com +# allow 192.168.0.0/24 diff --git a/conf/debian/puppet.NEWS b/conf/debian/puppet.NEWS new file mode 100644 index 000000000..a712aafd4 --- /dev/null +++ b/conf/debian/puppet.NEWS @@ -0,0 +1,63 @@ +puppet (0.23.2-12) unstable; urgency=low + + * Handling of the rundir setting has been changed; we now store PID files + in /var/run/puppet, and the initscripts have been modified to ensure + that this directory exists on startup. It is no longer necessary to set + rundir explicitly in /etc/puppet/puppet.conf, and you should ensure that + you have no explicit rundir setting in your puppet.conf unless you want + to use a custom rundir setting for your own local purposes. + + -- Matthew Palmer Sat, 20 Oct 2007 11:58:58 +1000 + +puppet (0.23.2-3) unstable; urgency=low + + * This version of Puppet makes a fairly major change to the location of + the CA and certificates, from /etc/puppet/ssl to the more FHS-compliant + location /var/lib/puppet/ssl. This is to be both policy-compliant and + to match the location of the ssldir in other distributions. + + If you have transitioned to using the consolidated puppet.conf config + file, there should be no problems. If you are using a stock + puppet.conf, the change should be made for you automatically, while if + you've customised puppet.conf the ssldir will be left where it is and + you should transition to the new location manually. + + The only source of problems is if you're still using per-program config + files (puppetd.conf, puppetmasterd.conf, etc). I haven't been able to + work out a damage-free way of transitioning to the new location, so + things will likely break for you -- ssldir will have been moved to + /var/lib/puppet/ssl, but your puppet programs will use the + old config file (with the default ssldir of /etc/puppet/ssl. In this + case, you'll likely get all sorts of certificate-related problems. + + The solution is to either switch to using puppet.conf (which is + necessary anyway because support for the deprecated per-program config + files will be going away sometime) with the new ssldir setting, or add + the ssldir setting to all your per-program config files (this includes + creating them for programs that don't already have a config file, like + puppetca.conf). Then delete /etc/puppet/ssl (since it's not needed) and + use the existing SSL data that was moved to /var/lib/puppet/ssl. + + -- Matthew Palmer Fri, 24 Aug 2007 16:08:04 +1000 + +puppet (0.23.0-1) unstable; urgency=low + + * As of upstream 0.23.0, the configuration file layout has been largely + revamped. Now, instead of having one file per program, there is now + a single file, /etc/puppet/puppet.conf, which contains sections for + each program, as well as a "main" section that sets global config + options relevant for all programs. + + See http://reductivelabs.com/trac/puppet/wiki/ConfigurationReference for + more info. + + For backwards compatibility, all programs still read the per-program + configuration files, and will ignore the generic puppet.conf file if the + per-program file still exists. To prevent accidents, you will need to + do the configuration change manually, by rewriting puppet.conf to match + your local configuration parameters and then deleting the old files. If + you haven't changed any config parameters, then it should be as simple + as deleting puppetd.conf and puppetmasterd.conf and restarting the + daemons, as the configuration itself hasn't changed between versions. + + -- Matthew Palmer Mon, 25 Jun 2007 10:43:53 +1000 diff --git a/conf/debian/puppet.conf b/conf/debian/puppet.conf new file mode 100644 index 000000000..c541c748a --- /dev/null +++ b/conf/debian/puppet.conf @@ -0,0 +1,8 @@ +[main] +logdir=/var/log/puppet +vardir=/var/lib/puppet +ssldir=/var/lib/puppet/ssl +rundir=/var/run/puppet + +[puppetmasterd] +templatedir=/var/lib/puppet/templates diff --git a/conf/debian/puppet.dirs b/conf/debian/puppet.dirs new file mode 100644 index 000000000..9ce18f88e --- /dev/null +++ b/conf/debian/puppet.dirs @@ -0,0 +1,7 @@ +usr/sbin +usr/lib/ruby/1.8 +var/log/puppet +etc/puppet/files +usr/share/vim/addons/ftdetect +usr/share/vim/vim71/syntax +var/lib/puppet diff --git a/conf/debian/puppet.files b/conf/debian/puppet.files new file mode 100644 index 000000000..d92ac32e9 --- /dev/null +++ b/conf/debian/puppet.files @@ -0,0 +1,6 @@ +usr/bin/puppet +usr/bin/puppetdoc +usr/sbin/puppetd +usr/lib/ruby/1.8/ +var/log/puppet +etc/puppet/puppet.conf diff --git a/conf/debian/puppet.init b/conf/debian/puppet.init new file mode 100644 index 000000000..063f9273f --- /dev/null +++ b/conf/debian/puppet.init @@ -0,0 +1,64 @@ +#! /bin/sh + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/puppetd +DAEMON_OPTS="-w 0" +NAME=puppetd +DESC="puppet configuration management tool" + +test -x $DAEMON || exit 0 + +[ -r /etc/default/puppet ] && . /etc/default/puppet + +. /lib/lsb/init-functions + +reload_puppet() { + start-stop-daemon --stop --quiet --signal HUP --pidfile /var/run/puppet/$NAME.pid +} + +start_puppet() { + start-stop-daemon --start --quiet --pidfile /var/run/puppet/$NAME.pid \ + --startas $DAEMON -- $DAEMON_OPTS +} + +stop_puppet() { + start-stop-daemon --stop --quiet --pidfile /var/run/puppet/$NAME.pid +} + +if [ ! -d /var/run/puppet ]; then + rm -rf /var/run/puppet + mkdir -p /var/run/puppet +fi + +chown puppet:puppet /var/run/puppet + +case "$1" in + start) + log_begin_msg "Starting $DESC" + start_puppet + log_end_msg 0 + ;; + stop) + log_begin_msg "Stopping $DESC" + stop_puppet + log_end_msg 0 + ;; + reload) + log_begin_msg "Reloading $DESC" + reload_puppet + log_end_msg 0 + ;; + restart|force-reload) + log_begin_msg "Restarting $DESC" + stop_puppet + sleep 1 + start_puppet + log_end_msg 0 + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload|reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/conf/debian/puppet.logrotate b/conf/debian/puppet.logrotate new file mode 100644 index 000000000..3864e396d --- /dev/null +++ b/conf/debian/puppet.logrotate @@ -0,0 +1,11 @@ +/var/log/puppet/*log { + missingok + create 0644 puppet puppet + compress + rotate 4 + + postrotate + [ -e /etc/init.d/puppetmaster ] && /etc/init.d/puppetmaster restart >/dev/null 2>&1 || true + [ -e /etc/init.d/puppet ] && /etc/init.d/puppet reload > /dev/null 2>&1 || true + endscript +} diff --git a/conf/debian/puppet.postinst b/conf/debian/puppet.postinst new file mode 100644 index 000000000..ac765ba85 --- /dev/null +++ b/conf/debian/puppet.postinst @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = "configure" ]; then + if [ -d /etc/puppet/ssl ] && [ ! -e /var/lib/puppet/ssl ] && grep -q 'ssldir=/var/lib/puppet/ssl' /etc/puppet/puppet.conf; then + mv /etc/puppet/ssl /var/lib/puppet/ssl + fi +fi + +#DEBHELPER# diff --git a/conf/debian/puppet.postrm b/conf/debian/puppet.postrm new file mode 100644 index 000000000..da994c3c3 --- /dev/null +++ b/conf/debian/puppet.postrm @@ -0,0 +1,21 @@ +#! /bin/sh + +case "$1" in + purge) + rm -rf /var/lib/puppet + /usr/sbin/deluser --system puppet + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +#DEBHELPER# + +exit 0 diff --git a/conf/debian/puppet.preinst b/conf/debian/puppet.preinst new file mode 100644 index 000000000..ce8e76083 --- /dev/null +++ b/conf/debian/puppet.preinst @@ -0,0 +1,25 @@ +#! /bin/sh + +case "$1" in + install|upgrade) + /usr/sbin/adduser --system \ + --group \ + --home /var/lib/puppet \ + --gecos "Puppet configuration management daemon" \ + puppet > /dev/null + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + + diff --git a/conf/debian/puppetmaster.files b/conf/debian/puppetmaster.files new file mode 100644 index 000000000..15bc694b1 --- /dev/null +++ b/conf/debian/puppetmaster.files @@ -0,0 +1,4 @@ +usr/sbin/puppetmasterd +usr/sbin/puppetca +usr/sbin/puppetrun +etc/puppet/ diff --git a/conf/debian/puppetmaster.init b/conf/debian/puppetmaster.init new file mode 100644 index 000000000..ea5c1bafb --- /dev/null +++ b/conf/debian/puppetmaster.init @@ -0,0 +1,58 @@ +#! /bin/sh + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/puppetmasterd +DAEMON_OPTS="" +NAME=puppetmasterd +DESC="puppet configuration management tool master server" + +test -x $DAEMON || exit 0 + +[ -r /etc/default/puppetmaster ] && . /etc/default/puppetmaster + +. /lib/lsb/init-functions + +if [ ! -d /var/run/puppet ]; then + rm -rf /var/run/puppet + mkdir -p /var/run/puppet +fi + +chown puppet:puppet /var/run/puppet + +start_puppetmaster() { + start-stop-daemon --start --quiet --pidfile /var/run/puppet/$NAME.pid \ + --startas $DAEMON -- $DAEMON_OPTS +} + +stop_puppetmaster() { + start-stop-daemon --stop --quiet --pidfile /var/run/puppet/$NAME.pid +} + +case "$1" in + start) + log_begin_msg "Starting $DESC" + start_puppetmaster + log_end_msg $? + ;; + stop) + log_begin_msg "Stopping $DESC" + stop_puppetmaster + log_end_msg $? + ;; + reload) + # Do nothing, as Puppetmaster rechecks its config automatically + ;; + restart|force-reload) + log_begin_msg "Restarting $DESC" + stop_puppetmaster + sleep 1 + start_puppetmaster + log_end_msg 0 + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/conf/debian/rules b/conf/debian/rules new file mode 100755 index 000000000..ecabcbad0 --- /dev/null +++ b/conf/debian/rules @@ -0,0 +1,115 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +INSTALL=install -Dp + +prefix := $(CURDIR)/debian/tmp +bindir := $(prefix)/usr/bin +sbindir := $(prefix)/usr/sbin +libdir := $(prefix)/usr/lib +localstatedir := $(prefix)/var +rubylibdir := $(libdir)/ruby/1.8 +sysconfdir := $(prefix)/etc +pkgconfdir := $(sysconfdir)/puppet + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + touch configure-stamp + + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # ripped from the redhat spec + # this sucks, who wants to maintain this? + # note to self, fix the install.rb to handle DESTDIR and change + # library path + install -d -m0755 $(sbindir) + install -d -m0755 $(bindir) + install -d -m0755 $(rubylibdir) + install -d -m0755 $(pkgconfdir)/manifests + install -d -m0755 $(localstatedir)/lib/puppet + install -d -m0755 $(localstatedir)/run + install -d -m0755 $(localstatedir)/log/puppet + + $(INSTALL) -m0755 bin/puppet bin/puppetdoc $(bindir) + $(INSTALL) -m0755 bin/puppetd bin/puppetmasterd bin/puppetca bin/puppetrun $(sbindir) + $(INSTALL) -m0644 lib/puppet.rb $(rubylibdir)/puppet.rb + cp -a lib/puppet $(rubylibdir) + find $(rubylibdir) -type f -perm +ugo+x -exec chmod a-x {} \; + + $(INSTALL) -m0644 debian/fileserver.conf $(pkgconfdir)/fileserver.conf + $(INSTALL) -m0644 debian/puppet.conf $(pkgconfdir)/puppet.conf + + # Vim auto-syntax-highlighting stuff + $(INSTALL) -m0644 ext/vim/syntax/puppet.vim \ + $(CURDIR)/debian/puppet/usr/share/vim/vim71/syntax/ + $(INSTALL) -m0644 ext/vim/ftdetect/puppet.vim \ + $(CURDIR)/debian/puppet/usr/share/vim/addons/ftdetect/ + + # Emacs keeping up with the Joneses + $(INSTALL) -m0644 ext/emacs/puppet-mode-init.el \ + $(CURDIR)/debian/puppet/etc/emacs/site-start.d/50puppet-mode-init.el + $(INSTALL) -m0644 ext/emacs/puppet-mode.el \ + $(CURDIR)/debian/puppet/usr/share/emacs/site-lisp/puppet-mode.el + + dh_installexamples examples/* + + # Logcheck rules. Gee I wish you could specify a file to source + # in dh_installlogcheck. + cp ext/logcheck/puppet debian/puppet.logcheck.ignore.server + cp ext/logcheck/puppet debian/puppet.logcheck.ignore.workstation + dh_installlogcheck + rm debian/puppet.logcheck.* + + # Clean out any SVN cruft that may still be lingering in our + # packages + find debian/tmp debian/puppet debian/puppetmaster -name .svn |xargs rm -rf + +# Build architecture-dependent files here. +binary-arch: build install + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_movefiles -i + dh_installchangelogs -i CHANGELOG + dh_installdocs -i + dh_installinit -ppuppetmaster + dh_installinit -ppuppet -- defaults 21 + dh_installlogrotate -i + dh_compress -i + dh_fixperms -i + dh_installdeb -i + dh_shlibdeps -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/conf/debian/watch b/conf/debian/watch new file mode 100644 index 000000000..29d439f6d --- /dev/null +++ b/conf/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://reductivelabs.com/downloads/puppet/puppet-([0-9]+\..*)\.tgz diff --git a/debian/README.source b/debian/README.source deleted file mode 100644 index fd9155241..000000000 --- a/debian/README.source +++ /dev/null @@ -1,2 +0,0 @@ -The debian directory is now maintained on Alioth in git. -See http://pkg-puppet.alioth.debian.org/ for more information. diff --git a/debian/TODO.Debian b/debian/TODO.Debian deleted file mode 100644 index ac70b97be..000000000 --- a/debian/TODO.Debian +++ /dev/null @@ -1 +0,0 @@ -* clean up initscripts per http://mail.madstop.com/pipermail/puppet-dev/2006-June/001069.html diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 69984d622..000000000 --- a/debian/changelog +++ /dev/null @@ -1,257 +0,0 @@ -puppet (0.24.1-2) unstable; urgency=low - - * Set rundir correctly (Closes: #460203, #459579) - * Apply patch for puppet#1003 to enable collection of tagged resources - - -- Thom May Wed, 16 Jan 2008 11:08:55 +0100 - -puppet (0.24.1-1) unstable; urgency=low - - * New upstream release (Closes: #445626) - * Set maintainer to pkg-puppet-devel - - -- Thom May Sun, 30 Dec 2007 19:13:47 +0100 - -puppet (0.24.0-1) unstable; urgency=low - - * New upstream release - - -- Thom May Wed, 19 Dec 2007 16:00:34 +0100 - -puppet (0.23.2-15) unstable; urgency=low - - * No change upload setting maintainer to me whilst waiting for an alioth - project. - - -- Thom May Thu, 29 Nov 2007 10:44:50 +0100 - -puppet (0.23.2-14) unstable; urgency=low - - * Orphaning. - * Create /var/lib/puppet in the puppet package. Closes: #452506. - * Start the puppet init script after puppetmaster, to silence whiny bug - reports. Closes: #452064. - * Add a reload command to the Puppet init script. Closes: #452060. - - -- Matthew Palmer Thu, 29 Nov 2007 10:48:21 +1100 - -puppet (0.23.2-13) unstable; urgency=low - - * Drop quotes from an already-quoted value in a query. Closes: #448179. - * Remove excessive quoting from puppet/network/handler/master.rb. - Closes: #448221. - * Force removal of directories during pluginsync. Closes: #448180. - - -- Matthew Palmer Tue, 30 Oct 2007 14:55:19 +1100 - -puppet (0.23.2-12) unstable; urgency=low - - * Create /var/run/puppet and set the perms in the various initscripts, as - well as hardcoding the rundir better in configuration.rb and removing - the explicit rundir setting from puppet.conf. Closes: #447314. - * Apply additional patch given (backwards) to fix export/collect on some - database backends. Closes: #445591 (again!) - - -- Matthew Palmer Sat, 20 Oct 2007 11:28:50 +1000 - -puppet (0.23.2-11) unstable; urgency=low - - * Apply patch from puppet#786 to fix a problem with exported resources not - being properly detected as needing a rerun. Closes: #445591. - * Fix ignore handling for the plugins mount. Closes: #446390. - - -- Matthew Palmer Mon, 15 Oct 2007 09:11:25 +1000 - -puppet (0.23.2-10) unstable; urgency=low - - * Recycle connections when we change (or get) certs. - * Catch and retry more transient errors in the XMLRPC wrapper. - - -- Matthew Palmer Thu, 27 Sep 2007 15:06:11 +1000 - -puppet (0.23.2-9) unstable; urgency=low - - * Recycle the HTTP connection if we get an EPIPE during a request. - Closes: #444177. Thanks to Jos Backus for helping with testing. - - -- Matthew Palmer Thu, 27 Sep 2007 09:55:34 +1000 - -puppet (0.23.2-8) unstable; urgency=low - - * Remove extraneous debugging output accidentally left behind in the last - release. - * Fix spelling mistakes in debian/control and debian/puppet.preinst. - Closes: #444158. - - -- Matthew Palmer Thu, 27 Sep 2007 07:45:07 +1000 - -puppet (0.23.2-7) unstable; urgency=low - - * Ignore ENOENT errors in the module plugin syncing code, since they're - innocuous and expected. - * Allow facts that are downloaded through pluginsync to be used like any - other fact. - * Allow users to still have an old-style plugins mount if they want, by - specifying a path for the mount. Also track down a fault in old-style - fileserving which did strange slash-stripping. Closes: #443932. - - -- Matthew Palmer Tue, 25 Sep 2007 16:41:32 +1000 - -puppet (0.23.2-6) unstable; urgency=low - - * Patch rails/param_name.rb to stop query failures, as per puppet#784. - * Actually honour namevar. - * Only set dbuser if explicitly asked for. - * Fix annoying database deletion error for ParamValue objects. - * Add an accessor for ca_file, since older openssl-ruby only had a writer. - * Fix the fileserver to honour ignore. Thanks to Nathan Ward for the - bug report on IRC. - - -- Matthew Palmer Thu, 20 Sep 2007 16:10:41 +1000 - -puppet (0.23.2-5) unstable; urgency=low - - * Add some NEWS for the ssldir transition. Should have done that earlier. - * Remove the explicit mode change for vardir, and fix up the mode on - statedir, as well. Closes: #425496. - * Only set some database parameters if they're explicitly set; this makes - life easier for PgSQL ident auth. - * Allow empty config options. - - -- Matthew Palmer Thu, 13 Sep 2007 11:09:59 +1000 - -puppet (0.23.2-4) unstable; urgency=low - - * Fix puppet#776 in a slightly better way by only flushing the cache when - a value is changed, rather than whenever a value is read. - * Apply patch from puppet#755 to cache connections to the Puppetmaster, - which improves performance by more than a little. - * Modify the fileserver so that it provides a 'plugins' mount which - exports the union of the plugins directory of all modules. - - -- Matthew Palmer Fri, 31 Aug 2007 15:32:04 +1000 - -puppet (0.23.2-3) unstable; urgency=low - - * Clear the config value cache every time. This is a titchy little - performance hit, but it works around puppet#776 rather nicely. - - -- Matthew Palmer Fri, 24 Aug 2007 16:08:04 +1000 - -puppet (0.23.2-2) unstable; urgency=low - - * Move the SSL state directory to a more policy-friendly location, - /var/lib/puppet/ssl. - - -- Matthew Palmer Tue, 21 Aug 2007 12:54:40 +1000 - -puppet (0.23.2-1) unstable; urgency=low - - * New upstream release. - - -- Matthew Palmer Tue, 7 Aug 2007 12:47:49 +1000 - -puppet (0.23.1-1) unstable; urgency=low - - * New upstream release. - * Switch primary maintainer to me. Thanks jaq. - * Make the recommendation for rails >= 1.2.3-2, to avoid - incompatibilities. This breaks compatibility with stable, but the rails - package from unstable should install cleanly in stable. Closes: #433999 - - -- Matthew Palmer Sat, 21 Jul 2007 16:34:36 +1000 - -puppet (0.23.0-1) unstable; urgency=low - - * New upstream release. - - Includes a new configuration file handling system; see NEWS.Debian. - - -- Matthew Palmer Mon, 25 Jun 2007 09:55:12 +1000 - -puppet (0.22.4-2) unstable; urgency=low - - * Depend on libshadow-ruby1.8, for new password modification functionality - added to upstream 0.22.4. - * Several improvements from Micah Anderson: - - Better vim syntax installation process. - - Install Emacs syntax highlighting. - - Install logcheck rules. Closes: #421851. - - -- Matthew Palmer Thu, 3 May 2007 15:04:15 +1000 - -puppet (0.22.4-1) unstable; urgency=low - - * New upstream release. - - -- Matthew Palmer Wed, 2 May 2007 12:20:15 +1000 - -puppet (0.22.3-1) unstable; urgency=low - - * New upstream release. Closes: #415773. - * Switch to using our own logrotate config, and enhance it as per - David Schmitt's suggestions. Closes: #414282. - * Add puppetrun to the puppetmaster package, and actually put puppetdoc - into the puppet package. Closes: #419273. - * Copy vim syntax highlighting file into the puppet package, and add a - stanza to have Vim automatically highlight .pp files. Closes: #412868. - Thanks to David Schmitt for researching how to do all of that. - * Add a templatedir setting to the default puppetmasterd.conf to make it - obvious that it can be changed. Closes: #407506. - - -- Matthew Palmer Wed, 18 Apr 2007 14:03:33 +1000 - -puppet (0.22.1-1) unstable; urgency=low - - * New upstream release. - - -- Matthew Palmer Fri, 2 Feb 2007 09:06:46 +1100 - -puppet (0.22.0-1) unstable; urgency=low - - * New upstream release. - * Use --startas instead of --init in init scripts, which (according to - Paul Hampson) makes checking for already-running instances work. - Closes: #405912. - - -- Matthew Palmer Mon, 8 Jan 2007 08:41:35 +1100 - -puppet (0.20.1-1) unstable; urgency=low - - * New upstream release. (Closes: #387674) - * Rationalise the puppetmasterd init script. - * Add inclusion of /etc/default files for init scripts. (Closes: #388178) - * Add puppet.conf to match puppetd.conf. (Closes: #385646) - - -- Matthew Palmer Thu, 30 Nov 2006 10:54:19 +1100 - -puppet (0.18.4-1) unstable; urgency=low - - * New upstream release. - - Properly detect all services, including those in rcS.d. - (Closes: #378351) - * Add Homepage: to the long description. (Closes: #377896) - - -- Matthew Palmer Mon, 24 Jul 2006 19:46:06 +1000 - -puppet (0.18.3-1) unstable; urgency=low - - * New upstream version. - - Set DEBIAN_FRONTEND=noninteractive when installing Debian packages. - (Closes: #378338) - - -- Matthew Palmer Sun, 16 Jul 2006 10:58:50 +1000 - -puppet (0.18.1-1) unstable; urgency=low - - * Make Puppet not wait for a cert at all (to prevent startup hangs). - * Cleanup the init scripts to not have NO_START detritus. - * Apply puppet.debian-frontend, to set DEBIAN_FRONTEND=noninteractive on - package installation. - - -- Matthew Palmer Tue, 27 Jun 2006 15:05:32 +1000 - -puppet (0.18.0-1) unstable; urgency=low - - * Initial release. (Closes: #348625) - - -- Matthew Palmer Wed, 24 May 2006 13:10:01 +1000 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index b8626c4cf..000000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/debian/control b/debian/control deleted file mode 100644 index 8b0e92e7e..000000000 --- a/debian/control +++ /dev/null @@ -1,45 +0,0 @@ -Source: puppet -Section: admin -Priority: optional -Maintainer: Puppet Package Maintainers -Uploaders: Thom May -Build-Depends-Indep: debhelper (>= 4.0.0), ruby (>= 1.8.1) -Standards-Version: 3.6.2 - -Package: puppet -Architecture: all -Depends: ruby (>= 1.8.1), libxmlrpc-ruby, libopenssl-ruby, libshadow-ruby1.8, adduser, facter, lsb-base -Recommends: rdoc -Description: centralised configuration management for networks - Puppet lets you centrally manage every important aspect of your system - using a cross-platform specification language that manages all the - separate elements normally aggregated in different files, like users, - cron jobs, and hosts, along with obviously discrete elements like - packages, services, and files. - . - Puppet's simple declarative specification language provides powerful - classing abilities for drawing out the similarities between hosts while - allowing them to be as specific as necessary, and it handles dependency - and prerequisite relationships between objects clearly and explicitly. - . - Homepage: http://reductivelabs.com/projects/puppet - -Package: puppetmaster -Architecture: all -Depends: ruby (>= 1.8.1), puppet (= ${Source-Version}), facter, lsb-base -Recommends: rails (>= 1.2.3-2), rdoc -Description: centralised configuration management control daemon - Puppet lets you centrally manage every important aspect of your system - using a cross-platform specification language that manages all the - separate elements normally aggregated in different files, like users, - cron jobs, and hosts, along with obviously discrete elements like - packages, services, and files. - . - Puppet's simple declarative specification language provides powerful - classing abilities for drawing out the similarities between hosts while - allowing them to be as specific as necessary, and it handles dependency - and prerequisite relationships between objects clearly and explicitly. - . - This package contains the manifest server, 'puppetmaster'. - . - Homepage: http://reductivelabs.com/projects/puppet diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 06bdcab30..000000000 --- a/debian/copyright +++ /dev/null @@ -1,17 +0,0 @@ -This package was debianized by Jamie Wilkinson on -Thu, 27 Apr 2006 10:18:04 +1000. - -It was downloaded from http://reductivelabs.com/downloads/puppet - -Copyright Holder: Luke Kanies - -License: - -From -http://reductivelabs.com/documents/faq#what-license-is-puppet-released-under: - -Puppet is open source and is released under the GNU Public License. - -On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - diff --git a/debian/docs b/debian/docs deleted file mode 100644 index e845566c0..000000000 --- a/debian/docs +++ /dev/null @@ -1 +0,0 @@ -README diff --git a/debian/fileserver.conf b/debian/fileserver.conf deleted file mode 100644 index 04a51c080..000000000 --- a/debian/fileserver.conf +++ /dev/null @@ -1,12 +0,0 @@ -# This file consists of arbitrarily named sections/modules -# defining where files are served from and to whom - -# Define a section 'files' -# Adapt the allow/deny settings to your needs. Order -# for allow/deny does not matter, allow always takes precedence -# over deny -[files] - path /etc/puppet/files -# allow *.example.com -# deny *.evil.example.com -# allow 192.168.0.0/24 diff --git a/debian/puppet.NEWS b/debian/puppet.NEWS deleted file mode 100644 index a712aafd4..000000000 --- a/debian/puppet.NEWS +++ /dev/null @@ -1,63 +0,0 @@ -puppet (0.23.2-12) unstable; urgency=low - - * Handling of the rundir setting has been changed; we now store PID files - in /var/run/puppet, and the initscripts have been modified to ensure - that this directory exists on startup. It is no longer necessary to set - rundir explicitly in /etc/puppet/puppet.conf, and you should ensure that - you have no explicit rundir setting in your puppet.conf unless you want - to use a custom rundir setting for your own local purposes. - - -- Matthew Palmer Sat, 20 Oct 2007 11:58:58 +1000 - -puppet (0.23.2-3) unstable; urgency=low - - * This version of Puppet makes a fairly major change to the location of - the CA and certificates, from /etc/puppet/ssl to the more FHS-compliant - location /var/lib/puppet/ssl. This is to be both policy-compliant and - to match the location of the ssldir in other distributions. - - If you have transitioned to using the consolidated puppet.conf config - file, there should be no problems. If you are using a stock - puppet.conf, the change should be made for you automatically, while if - you've customised puppet.conf the ssldir will be left where it is and - you should transition to the new location manually. - - The only source of problems is if you're still using per-program config - files (puppetd.conf, puppetmasterd.conf, etc). I haven't been able to - work out a damage-free way of transitioning to the new location, so - things will likely break for you -- ssldir will have been moved to - /var/lib/puppet/ssl, but your puppet programs will use the - old config file (with the default ssldir of /etc/puppet/ssl. In this - case, you'll likely get all sorts of certificate-related problems. - - The solution is to either switch to using puppet.conf (which is - necessary anyway because support for the deprecated per-program config - files will be going away sometime) with the new ssldir setting, or add - the ssldir setting to all your per-program config files (this includes - creating them for programs that don't already have a config file, like - puppetca.conf). Then delete /etc/puppet/ssl (since it's not needed) and - use the existing SSL data that was moved to /var/lib/puppet/ssl. - - -- Matthew Palmer Fri, 24 Aug 2007 16:08:04 +1000 - -puppet (0.23.0-1) unstable; urgency=low - - * As of upstream 0.23.0, the configuration file layout has been largely - revamped. Now, instead of having one file per program, there is now - a single file, /etc/puppet/puppet.conf, which contains sections for - each program, as well as a "main" section that sets global config - options relevant for all programs. - - See http://reductivelabs.com/trac/puppet/wiki/ConfigurationReference for - more info. - - For backwards compatibility, all programs still read the per-program - configuration files, and will ignore the generic puppet.conf file if the - per-program file still exists. To prevent accidents, you will need to - do the configuration change manually, by rewriting puppet.conf to match - your local configuration parameters and then deleting the old files. If - you haven't changed any config parameters, then it should be as simple - as deleting puppetd.conf and puppetmasterd.conf and restarting the - daemons, as the configuration itself hasn't changed between versions. - - -- Matthew Palmer Mon, 25 Jun 2007 10:43:53 +1000 diff --git a/debian/puppet.conf b/debian/puppet.conf deleted file mode 100644 index c541c748a..000000000 --- a/debian/puppet.conf +++ /dev/null @@ -1,8 +0,0 @@ -[main] -logdir=/var/log/puppet -vardir=/var/lib/puppet -ssldir=/var/lib/puppet/ssl -rundir=/var/run/puppet - -[puppetmasterd] -templatedir=/var/lib/puppet/templates diff --git a/debian/puppet.dirs b/debian/puppet.dirs deleted file mode 100644 index 9ce18f88e..000000000 --- a/debian/puppet.dirs +++ /dev/null @@ -1,7 +0,0 @@ -usr/sbin -usr/lib/ruby/1.8 -var/log/puppet -etc/puppet/files -usr/share/vim/addons/ftdetect -usr/share/vim/vim71/syntax -var/lib/puppet diff --git a/debian/puppet.files b/debian/puppet.files deleted file mode 100644 index d92ac32e9..000000000 --- a/debian/puppet.files +++ /dev/null @@ -1,6 +0,0 @@ -usr/bin/puppet -usr/bin/puppetdoc -usr/sbin/puppetd -usr/lib/ruby/1.8/ -var/log/puppet -etc/puppet/puppet.conf diff --git a/debian/puppet.init b/debian/puppet.init deleted file mode 100644 index 063f9273f..000000000 --- a/debian/puppet.init +++ /dev/null @@ -1,64 +0,0 @@ -#! /bin/sh - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/puppetd -DAEMON_OPTS="-w 0" -NAME=puppetd -DESC="puppet configuration management tool" - -test -x $DAEMON || exit 0 - -[ -r /etc/default/puppet ] && . /etc/default/puppet - -. /lib/lsb/init-functions - -reload_puppet() { - start-stop-daemon --stop --quiet --signal HUP --pidfile /var/run/puppet/$NAME.pid -} - -start_puppet() { - start-stop-daemon --start --quiet --pidfile /var/run/puppet/$NAME.pid \ - --startas $DAEMON -- $DAEMON_OPTS -} - -stop_puppet() { - start-stop-daemon --stop --quiet --pidfile /var/run/puppet/$NAME.pid -} - -if [ ! -d /var/run/puppet ]; then - rm -rf /var/run/puppet - mkdir -p /var/run/puppet -fi - -chown puppet:puppet /var/run/puppet - -case "$1" in - start) - log_begin_msg "Starting $DESC" - start_puppet - log_end_msg 0 - ;; - stop) - log_begin_msg "Stopping $DESC" - stop_puppet - log_end_msg 0 - ;; - reload) - log_begin_msg "Reloading $DESC" - reload_puppet - log_end_msg 0 - ;; - restart|force-reload) - log_begin_msg "Restarting $DESC" - stop_puppet - sleep 1 - start_puppet - log_end_msg 0 - ;; - *) - echo "Usage: $0 {start|stop|restart|force-reload|reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/debian/puppet.logrotate b/debian/puppet.logrotate deleted file mode 100644 index 3864e396d..000000000 --- a/debian/puppet.logrotate +++ /dev/null @@ -1,11 +0,0 @@ -/var/log/puppet/*log { - missingok - create 0644 puppet puppet - compress - rotate 4 - - postrotate - [ -e /etc/init.d/puppetmaster ] && /etc/init.d/puppetmaster restart >/dev/null 2>&1 || true - [ -e /etc/init.d/puppet ] && /etc/init.d/puppet reload > /dev/null 2>&1 || true - endscript -} diff --git a/debian/puppet.postinst b/debian/puppet.postinst deleted file mode 100644 index ac765ba85..000000000 --- a/debian/puppet.postinst +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -e - -if [ "$1" = "configure" ]; then - if [ -d /etc/puppet/ssl ] && [ ! -e /var/lib/puppet/ssl ] && grep -q 'ssldir=/var/lib/puppet/ssl' /etc/puppet/puppet.conf; then - mv /etc/puppet/ssl /var/lib/puppet/ssl - fi -fi - -#DEBHELPER# diff --git a/debian/puppet.postrm b/debian/puppet.postrm deleted file mode 100644 index da994c3c3..000000000 --- a/debian/puppet.postrm +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh - -case "$1" in - purge) - rm -rf /var/lib/puppet - /usr/sbin/deluser --system puppet - ;; - remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - - - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/puppet.preinst b/debian/puppet.preinst deleted file mode 100644 index ce8e76083..000000000 --- a/debian/puppet.preinst +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/sh - -case "$1" in - install|upgrade) - /usr/sbin/adduser --system \ - --group \ - --home /var/lib/puppet \ - --gecos "Puppet configuration management daemon" \ - puppet > /dev/null - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 - - diff --git a/debian/puppetmaster.files b/debian/puppetmaster.files deleted file mode 100644 index 15bc694b1..000000000 --- a/debian/puppetmaster.files +++ /dev/null @@ -1,4 +0,0 @@ -usr/sbin/puppetmasterd -usr/sbin/puppetca -usr/sbin/puppetrun -etc/puppet/ diff --git a/debian/puppetmaster.init b/debian/puppetmaster.init deleted file mode 100644 index ea5c1bafb..000000000 --- a/debian/puppetmaster.init +++ /dev/null @@ -1,58 +0,0 @@ -#! /bin/sh - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/puppetmasterd -DAEMON_OPTS="" -NAME=puppetmasterd -DESC="puppet configuration management tool master server" - -test -x $DAEMON || exit 0 - -[ -r /etc/default/puppetmaster ] && . /etc/default/puppetmaster - -. /lib/lsb/init-functions - -if [ ! -d /var/run/puppet ]; then - rm -rf /var/run/puppet - mkdir -p /var/run/puppet -fi - -chown puppet:puppet /var/run/puppet - -start_puppetmaster() { - start-stop-daemon --start --quiet --pidfile /var/run/puppet/$NAME.pid \ - --startas $DAEMON -- $DAEMON_OPTS -} - -stop_puppetmaster() { - start-stop-daemon --stop --quiet --pidfile /var/run/puppet/$NAME.pid -} - -case "$1" in - start) - log_begin_msg "Starting $DESC" - start_puppetmaster - log_end_msg $? - ;; - stop) - log_begin_msg "Stopping $DESC" - stop_puppetmaster - log_end_msg $? - ;; - reload) - # Do nothing, as Puppetmaster rechecks its config automatically - ;; - restart|force-reload) - log_begin_msg "Restarting $DESC" - stop_puppetmaster - sleep 1 - start_puppetmaster - log_end_msg 0 - ;; - *) - echo "Usage: $0 {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/debian/rules b/debian/rules deleted file mode 100755 index ecabcbad0..000000000 --- a/debian/rules +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -INSTALL=install -Dp - -prefix := $(CURDIR)/debian/tmp -bindir := $(prefix)/usr/bin -sbindir := $(prefix)/usr/sbin -libdir := $(prefix)/usr/lib -localstatedir := $(prefix)/var -rubylibdir := $(libdir)/ruby/1.8 -sysconfdir := $(prefix)/etc -pkgconfdir := $(sysconfdir)/puppet - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - -configure: configure-stamp -configure-stamp: - dh_testdir - touch configure-stamp - - -build: build-stamp -build-stamp: configure-stamp - dh_testdir - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # ripped from the redhat spec - # this sucks, who wants to maintain this? - # note to self, fix the install.rb to handle DESTDIR and change - # library path - install -d -m0755 $(sbindir) - install -d -m0755 $(bindir) - install -d -m0755 $(rubylibdir) - install -d -m0755 $(pkgconfdir)/manifests - install -d -m0755 $(localstatedir)/lib/puppet - install -d -m0755 $(localstatedir)/run - install -d -m0755 $(localstatedir)/log/puppet - - $(INSTALL) -m0755 bin/puppet bin/puppetdoc $(bindir) - $(INSTALL) -m0755 bin/puppetd bin/puppetmasterd bin/puppetca bin/puppetrun $(sbindir) - $(INSTALL) -m0644 lib/puppet.rb $(rubylibdir)/puppet.rb - cp -a lib/puppet $(rubylibdir) - find $(rubylibdir) -type f -perm +ugo+x -exec chmod a-x {} \; - - $(INSTALL) -m0644 debian/fileserver.conf $(pkgconfdir)/fileserver.conf - $(INSTALL) -m0644 debian/puppet.conf $(pkgconfdir)/puppet.conf - - # Vim auto-syntax-highlighting stuff - $(INSTALL) -m0644 ext/vim/syntax/puppet.vim \ - $(CURDIR)/debian/puppet/usr/share/vim/vim71/syntax/ - $(INSTALL) -m0644 ext/vim/ftdetect/puppet.vim \ - $(CURDIR)/debian/puppet/usr/share/vim/addons/ftdetect/ - - # Emacs keeping up with the Joneses - $(INSTALL) -m0644 ext/emacs/puppet-mode-init.el \ - $(CURDIR)/debian/puppet/etc/emacs/site-start.d/50puppet-mode-init.el - $(INSTALL) -m0644 ext/emacs/puppet-mode.el \ - $(CURDIR)/debian/puppet/usr/share/emacs/site-lisp/puppet-mode.el - - dh_installexamples examples/* - - # Logcheck rules. Gee I wish you could specify a file to source - # in dh_installlogcheck. - cp ext/logcheck/puppet debian/puppet.logcheck.ignore.server - cp ext/logcheck/puppet debian/puppet.logcheck.ignore.workstation - dh_installlogcheck - rm debian/puppet.logcheck.* - - # Clean out any SVN cruft that may still be lingering in our - # packages - find debian/tmp debian/puppet debian/puppetmaster -name .svn |xargs rm -rf - -# Build architecture-dependent files here. -binary-arch: build install - -# Build architecture-independent files here. -binary-indep: build install - dh_testdir - dh_testroot - dh_movefiles -i - dh_installchangelogs -i CHANGELOG - dh_installdocs -i - dh_installinit -ppuppetmaster - dh_installinit -ppuppet -- defaults 21 - dh_installlogrotate -i - dh_compress -i - dh_fixperms -i - dh_installdeb -i - dh_shlibdeps -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/debian/watch b/debian/watch deleted file mode 100644 index 29d439f6d..000000000 --- a/debian/watch +++ /dev/null @@ -1,2 +0,0 @@ -version=3 -http://reductivelabs.com/downloads/puppet/puppet-([0-9]+\..*)\.tgz diff --git a/examples/allatonce b/examples/allatonce new file mode 100644 index 000000000..8912ec4e7 --- /dev/null +++ b/examples/allatonce @@ -0,0 +1,13 @@ +# $Id$ + +define thingie { + file { "/tmp/classtest": ensure => file, mode => 755 } + #testing {} +} + +class testing { + thingie { "componentname": } +} + +#component {} +testing { "testingname": } diff --git a/examples/assignments b/examples/assignments new file mode 100644 index 000000000..3edcef84e --- /dev/null +++ b/examples/assignments @@ -0,0 +1,11 @@ +# $Id$ + +$goodness = sunos + +$subvariable = $goodness + +$yayness = "this is a string of text" + +#$sleeper = service { sleeper: +# running => "1" +#} diff --git a/examples/code/allatonce b/examples/code/allatonce deleted file mode 100644 index 8912ec4e7..000000000 --- a/examples/code/allatonce +++ /dev/null @@ -1,13 +0,0 @@ -# $Id$ - -define thingie { - file { "/tmp/classtest": ensure => file, mode => 755 } - #testing {} -} - -class testing { - thingie { "componentname": } -} - -#component {} -testing { "testingname": } diff --git a/examples/code/assignments b/examples/code/assignments deleted file mode 100644 index 3edcef84e..000000000 --- a/examples/code/assignments +++ /dev/null @@ -1,11 +0,0 @@ -# $Id$ - -$goodness = sunos - -$subvariable = $goodness - -$yayness = "this is a string of text" - -#$sleeper = service { sleeper: -# running => "1" -#} diff --git a/examples/code/components b/examples/code/components deleted file mode 100644 index 3da43c571..000000000 --- a/examples/code/components +++ /dev/null @@ -1,73 +0,0 @@ -# $Id$ - -# i still have no 'require'-like functionality, and i should also -# have 'recommend'-like functionality... -define apache(php,docroot,user,group) { - package { apache: - version => "2.0.53" - } - service { apache: - running => true - } - - - # this definitely won't parse - #if $php == "true" { - # # this needs to do two things: - # # - mark a dependency - # # - cause this apache component to receive refresh events generated by php - # #require("php") - # $var = value - #} - - #file { "../examples/root/etc/configfile": - # owner => $user - #} -} - -define sudo() { - package { sudo: - version => "1.6.8p7" - } - file { "/etc/sudoers": - owner => root, - group => root, - mode => "440" - } -} - -define ssh { - package { ssh: - version => "3.4.4.4" - } - service { "sshd": - running => true - } -} - -define sleeper(path,mode) { - Service { - path => "../examples/root/etc/init.d" - } - - service { sleeper: - running => true, - path => "../examples/root/etc/init.d" - } - file { $path: - mode => $mode - } - $files = ["/tmp/testness","/tmp/funtest"] - file { $files: - ensure => file - } -} - -#apache { "test": -# php => false, -# docroot => "/export/html", -# user => "www-data", -# group => "www-data" -#} - -#ssh { "yucko":} diff --git a/examples/code/execs b/examples/code/execs deleted file mode 100644 index 44f133098..000000000 --- a/examples/code/execs +++ /dev/null @@ -1,16 +0,0 @@ -$path = "/usr/bin:/bin" - -exec { "mkdir -p /tmp/fakedir": - path => $path -} - -exec { "rm -rf /tmp/fakedir": - path => $path -} - -exec { "touch /this/directory/does/not/exist": - path => $path, - returns => 1 -} - - diff --git a/examples/code/file.bl b/examples/code/file.bl deleted file mode 100644 index ef46ba223..000000000 --- a/examples/code/file.bl +++ /dev/null @@ -1,11 +0,0 @@ -# $Id$ - -file { - "/tmp/atest": ensure => file, mode => 755; - "/tmp/btest": ensure => file, mode => 755 -} - -file { - "/tmp/ctest": ensure => file; - "/tmp/dtest": ensure => file; -} diff --git a/examples/code/filedefaults b/examples/code/filedefaults deleted file mode 100644 index 56cf76a9a..000000000 --- a/examples/code/filedefaults +++ /dev/null @@ -1,10 +0,0 @@ -# $Id$ - -File { - mode => 755, - recurse => true -} - -file { "/tmp/filedefaultstest": - ensure => file -} diff --git a/examples/code/fileparsing b/examples/code/fileparsing deleted file mode 100644 index f9766b9f6..000000000 --- a/examples/code/fileparsing +++ /dev/null @@ -1,116 +0,0 @@ -# $Id$ - -# this will eventually parse different config files - -# this creates the 'passwd' type, but it does not create any instances -filetype { "passwd": - linesplit => "\n", - escapednewlines => false -} - - -# this creates the 'PasswdUser' type, but again, no instances -filerecord { "user": - filetype => passwd, - fields => [name, password, uid, gid, gcos, home, shell], - namevar => name, - splitchar => ":" - -} - -filetype { ini: - linesplit => "\n\n" -} - -# ini files are different because we don't really care about validating fields -# or at least, we can't do it for most files... -filerecord { "initrecord": - filetype => ini, - fields => [name, password, uid, gid, gcos, home, shell], - namevar => name, - splitchar => ":" - -} - -# this won't work for multiple record types, will it? -# or at least, it requires that we specify multiple times -# ah, and it doesn't specify which of the available record types -# it works for... -passwd { user: - complete => true, # manage the whole file - path => "/etc/passwd" -} - -user { yaytest: - password => x, - uid => 10000, - gid => 10000, - home => "/home/yaytest", - gcos => "The Yaytest", - shell => "/bin/sh" -} - # there seems to be an intrinsic problem here -- i've got subtypes that only - # make sense when an instance of the super type already exists, and i need - # to associate the instances of the subtype with the instances of the supertype - # even if i created the parsers manually, I'd have the same problem - -# this is the crux of it -- i want to be able to say 'user' here without having -# to specify the file, which leaves two options: -# 1) associate the record type with a filetype instance (BAD) -# 2) once the filetype and record type are created, have another command -# that specifically creates a filetype instance and gives names for instances -# of its record types - -define syslog { - - # create a new type, with all defaults - filetype { "syslog": - escapednewlines => true - } - - filerecord { "log": - filetype => syslog, - regex => "^([^#\s]+)\s+(\S+)$", - joinchar => "\t", - fields => [logs, dest] - } - - # these two should just be supported within the filetypes - filerecord { "comment": - filetype => syslog, - regex => "^(#.*)$", - joinchar => "s", - fields => [comment] - } - - filerecord { "blank": - filetype => syslog, - regex => "^(\s*)$", - joinchar => "s", - fields => blank - } -} - -define cron { - filetype { "usercrontab": - } - - # this won't actually work, of course - filerecord { "cronjob": - filetype => crontab, - regex => "^([^#\s]+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.+)$", - joinchar => " ", - fields => [minute, hour, day, month, weekday, command], - defaults => ["*", "*", "*", "*", "*", nil], - optional => [minute, hour, day, month, weekday] - } - - crontab { "luke": - } -} - -# XXX this doesn't work in the slightest -define crontab(name,path) { - usercrontab { "${path}/${name}": - } -} diff --git a/examples/code/filerecursion b/examples/code/filerecursion deleted file mode 100644 index b7d8278c2..000000000 --- a/examples/code/filerecursion +++ /dev/null @@ -1,15 +0,0 @@ -# $Id$ - -file { "/tmp/dirtest/b/a": - mode => 755, -} - -file { "/tmp/dirtest": - mode => 755, - recurse => true, -} - -file { "/tmp/dirtest/b/b": - mode => 644, -} - diff --git a/examples/code/functions b/examples/code/functions deleted file mode 100644 index 8e95c3a72..000000000 --- a/examples/code/functions +++ /dev/null @@ -1,3 +0,0 @@ -# $Id$ - -$yaytest = fact("operatingsystem") diff --git a/examples/code/groups b/examples/code/groups deleted file mode 100644 index 35505a2eb..000000000 --- a/examples/code/groups +++ /dev/null @@ -1,7 +0,0 @@ -# $Id$ - -# there need to be two forms of adding to groups: -# add the current host to a group, and add a list of hosts to a -# group by name - -$group = "crap" diff --git a/examples/code/head b/examples/code/head deleted file mode 100644 index 59cbb6593..000000000 --- a/examples/code/head +++ /dev/null @@ -1,30 +0,0 @@ -# $Id$ - -# this file is responsible for importing all of the files we want to actually test - -# these are all of the simple tests -import "simpletests" -import "assignments" -import "selectors" -#import "iftest" -import "importing" -import "execs" -import "filedefaults" - -# facts are now imported into the top of the namespace -#import "facts" - -# obsoleted -#import "functions" - -# files we no longer need to import directly, or at all in some cases -#import "one" -#import "classing" -#import "components" -#import "file.bl" -#import "fileparsing.disabled" -#import "groups" - -# this imports the more complex files -import "allatonce" # imports classing and components -import "nodes" # imports classing and components diff --git a/examples/code/importing b/examples/code/importing deleted file mode 100644 index f02604109..000000000 --- a/examples/code/importing +++ /dev/null @@ -1,8 +0,0 @@ -# $Id$ - -#import "groups" -# testing import loops -import "importing" - -$name = "value" -$system = $operatingsystem diff --git a/examples/code/mac_automount.pp b/examples/code/mac_automount.pp deleted file mode 100644 index bab0136fc..000000000 --- a/examples/code/mac_automount.pp +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env puppet -# Jeff McCune -# -# Apple's Automounter spawns a child that sends the parent -# a SIGTERM. This makes it *very* difficult to figure out -# if the process started correctly or not. -# - -service {"automount-test": - provider => base, - hasrestart => false, - pattern => '/tmp/hometest', - start => "/usr/sbin/automount -m /tmp/home /dev/null -mnt /tmp/hometest", - stop => "ps auxww | grep '/tmp/hometest' | grep -v grep | awk '{print \$2}' | xargs kill", - ensure => running -} diff --git a/examples/code/mac_dscl.pp b/examples/code/mac_dscl.pp deleted file mode 100755 index ff59f9d8d..000000000 --- a/examples/code/mac_dscl.pp +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env puppet --debug --verbose --trace -# -# Jeff McCune: I use this for developing and testing the directory service -# provider. - -User { provider => "directoryservice" } -Group { provider => "directoryservice" } - -user { - "testgone": - ensure => absent, - uid => 550; - "testhere": - ensure => present, - password => "foobar", - shell => "/bin/bash", - uid => 551; -} - -group { - "testgone": - ensure => absent, - gid => 550; - "testhere": - ensure => present, - gid => 551; - -} \ No newline at end of file diff --git a/examples/code/mac_dscl_revert.pp b/examples/code/mac_dscl_revert.pp deleted file mode 100755 index c9bd2b541..000000000 --- a/examples/code/mac_dscl_revert.pp +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env puppet --debug --verbose --trace -# -# Jeff McCune: I use this for developing and testing the directory service -# provider. - -User { provider => "directoryservice" } -Group { provider => "directoryservice" } - -user { - "testgone": - ensure => absent, - uid => 550; - "testhere": - ensure => absent, - uid => 551; -} - -group { - "testgone": - ensure => absent, - gid => 550; - "testhere": - ensure => absent, - gid => 551; - -} diff --git a/examples/code/mac_netinfo.pp b/examples/code/mac_netinfo.pp deleted file mode 100755 index 544b64818..000000000 --- a/examples/code/mac_netinfo.pp +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env puppet --debug - -user { - "jmccune": provider => "netinfo", ensure => present; -} diff --git a/examples/code/mac_pkgdmg.pp b/examples/code/mac_pkgdmg.pp deleted file mode 100755 index a2499e815..000000000 --- a/examples/code/mac_pkgdmg.pp +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env puppet -# - -package -{ - "Foobar.pkg.dmg": ensure => present, provider => pkgdmg; -} diff --git a/examples/code/modules/sample-module.pp b/examples/code/modules/sample-module.pp deleted file mode 100644 index 57079a0aa..000000000 --- a/examples/code/modules/sample-module.pp +++ /dev/null @@ -1,10 +0,0 @@ -# Jeff McCune -# 2007-08-14 -# -# Use: -# puppet --verbose --debug --modulepath=`pwd` ./sample-module.pp -# -# sample-module demonstrates the use of a custom language function -# included within the module bundle. - -include sample-module diff --git a/examples/code/modules/sample-module/README.txt b/examples/code/modules/sample-module/README.txt deleted file mode 100644 index ee4b8201a..000000000 --- a/examples/code/modules/sample-module/README.txt +++ /dev/null @@ -1,17 +0,0 @@ -Jeff McCune -2007-08-14 - -This small, sample module demonstrates how to extend the puppet language -with a new parser function. - -See: -manifests/init.pp -lib/puppet/parser/functions/hostname_to_dn.rb -templates/sample.erb - -Note the consistent naming of files for Puppet::Util::Autoload - -Reference Documents: -http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation -http://reductivelabs.com/trac/puppet/wiki/WritingYourOwnFunctions -http://reductivelabs.com/trac/puppet/wiki/FunctionReference diff --git a/examples/code/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb b/examples/code/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb deleted file mode 100644 index 9f732b5bc..000000000 --- a/examples/code/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) David Schmitt -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the Author nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. - -# Jeff McCune -# 2007-08-14 -# See: http://reductivelabs.com/trac/puppet/wiki/WritingYourOwnFunctions - -module Puppet::Parser::Functions - newfunction(:hostname_to_dn, :type => :rvalue, :doc => "Given 'foo.bar.com', return 'dc=foo,dc=bar,dc=com'.") do |args| - args[0].split(/\./).map do |s| "dc=%s"%[s] end.join(",") - end -end diff --git a/examples/code/modules/sample-module/manifests/init.pp b/examples/code/modules/sample-module/manifests/init.pp deleted file mode 100644 index 1af8dff1f..000000000 --- a/examples/code/modules/sample-module/manifests/init.pp +++ /dev/null @@ -1,12 +0,0 @@ -# Jeff McCune -# -# Demonstration of a custom parser function and erb template within -# a module, working in concert. - -class sample-module { - $fqdn_to_dn = hostname_to_dn($domain) - $sample_template = template("sample-module/sample.erb") - - notice("hostname_to_dn module function returned: [$fqdn_to_dn]") - info("sample.erb looks like:\n$sample_template") -} diff --git a/examples/code/modules/sample-module/templates/sample.erb b/examples/code/modules/sample-module/templates/sample.erb deleted file mode 100644 index b13561b45..000000000 --- a/examples/code/modules/sample-module/templates/sample.erb +++ /dev/null @@ -1,5 +0,0 @@ - -## Jeff McCune -fqdn: <%= fqdn %> -basedn: <%= fqdn_to_dn %> -## end sample.erb ## diff --git a/examples/code/nodes b/examples/code/nodes deleted file mode 100644 index 42488e689..000000000 --- a/examples/code/nodes +++ /dev/null @@ -1,20 +0,0 @@ -# $Id$ - -# define nodes - -#service.setpath("../examples/root/etc/init.d") - -Service { - path => "../examples/root/etc/init.d" -} - -import "classing" - -sleepserver { - path => $operatingsystem ? { - sunos => "../examples/root/etc/configfile", - hpux => "../examples/other/etc/configfile", - default => "../examples/root/etc/configfile" - }, - schedule => true -} diff --git a/examples/code/one b/examples/code/one deleted file mode 100644 index 452d32f3e..000000000 --- a/examples/code/one +++ /dev/null @@ -1,8 +0,0 @@ -# $Id$ - -# this service doesn't actually exist, so we noop it -# and this way, we can test noop :) -service { "funtest": - running => "0", - noop => true -} diff --git a/examples/code/relationships b/examples/code/relationships deleted file mode 100644 index 795788947..000000000 --- a/examples/code/relationships +++ /dev/null @@ -1,34 +0,0 @@ -# $Id$ - -#service.setpath("../examples/root/etc/init.d") -#puppet.statefile("/tmp/puppetstate") -$path = "../examples/root/etc/configfile" - path => "../examples/root/etc/init.d" - - -define files { - file { "/tmp/yaytest": - ensure => file, - mode => 755 - } - file { "/tmp/exists": - checksum => md5 - } -} - -define sleeper { - file { $path: - mode => 755 - } - service { sleeper: - path => "../examples/root/etc/init.d", - running => 1 - } -} - -files { } - -sleeper { - require => files["yay"], - schedule => true -} diff --git a/examples/code/selectors b/examples/code/selectors deleted file mode 100644 index a70399bc7..000000000 --- a/examples/code/selectors +++ /dev/null @@ -1,28 +0,0 @@ -# $Id$ -# - -$platform = SunOS - -$funtest = $platform ? { - SunOS => yayness, - AIX => goodness, - default => badness -} - -# this is a comment - -$filename = "/tmp/yayness" - -$sleeper = file { $filename: - mode => $platform ? { - SunOS => 644, - default => 755 - }, - create => $platform ? "SunOS" => true -} - -# i guess it has to be solved this way... - -#$platform ? sunos => file { $filename: -# mode => 644 -#} diff --git a/examples/code/simpletests b/examples/code/simpletests deleted file mode 100644 index b4fd3234e..000000000 --- a/examples/code/simpletests +++ /dev/null @@ -1,11 +0,0 @@ -# $Id$ - -file { - "/tmp/atest": ensure => file; - "/tmp/btest": ensure => file -} - -file { - "/tmp/ctest": ensure => file; - "/tmp/dtest": ensure => file; -} diff --git a/examples/code/svncommit b/examples/code/svncommit deleted file mode 100644 index 350cd8580..000000000 --- a/examples/code/svncommit +++ /dev/null @@ -1,13 +0,0 @@ -$path = "/usr/bin:/bin" - -file { "/tmp/svntests": - recurse => true, - checksum => md5 -} - -exec { "echo 'files have been updated'": - cwd => "/tmp/svntests", - refreshonly => true, - require => file["/tmp/svntests"], - path => $path -} diff --git a/examples/components b/examples/components new file mode 100644 index 000000000..3da43c571 --- /dev/null +++ b/examples/components @@ -0,0 +1,73 @@ +# $Id$ + +# i still have no 'require'-like functionality, and i should also +# have 'recommend'-like functionality... +define apache(php,docroot,user,group) { + package { apache: + version => "2.0.53" + } + service { apache: + running => true + } + + + # this definitely won't parse + #if $php == "true" { + # # this needs to do two things: + # # - mark a dependency + # # - cause this apache component to receive refresh events generated by php + # #require("php") + # $var = value + #} + + #file { "../examples/root/etc/configfile": + # owner => $user + #} +} + +define sudo() { + package { sudo: + version => "1.6.8p7" + } + file { "/etc/sudoers": + owner => root, + group => root, + mode => "440" + } +} + +define ssh { + package { ssh: + version => "3.4.4.4" + } + service { "sshd": + running => true + } +} + +define sleeper(path,mode) { + Service { + path => "../examples/root/etc/init.d" + } + + service { sleeper: + running => true, + path => "../examples/root/etc/init.d" + } + file { $path: + mode => $mode + } + $files = ["/tmp/testness","/tmp/funtest"] + file { $files: + ensure => file + } +} + +#apache { "test": +# php => false, +# docroot => "/export/html", +# user => "www-data", +# group => "www-data" +#} + +#ssh { "yucko":} diff --git a/examples/execs b/examples/execs new file mode 100644 index 000000000..44f133098 --- /dev/null +++ b/examples/execs @@ -0,0 +1,16 @@ +$path = "/usr/bin:/bin" + +exec { "mkdir -p /tmp/fakedir": + path => $path +} + +exec { "rm -rf /tmp/fakedir": + path => $path +} + +exec { "touch /this/directory/does/not/exist": + path => $path, + returns => 1 +} + + diff --git a/examples/file.bl b/examples/file.bl new file mode 100644 index 000000000..ef46ba223 --- /dev/null +++ b/examples/file.bl @@ -0,0 +1,11 @@ +# $Id$ + +file { + "/tmp/atest": ensure => file, mode => 755; + "/tmp/btest": ensure => file, mode => 755 +} + +file { + "/tmp/ctest": ensure => file; + "/tmp/dtest": ensure => file; +} diff --git a/examples/filedefaults b/examples/filedefaults new file mode 100644 index 000000000..56cf76a9a --- /dev/null +++ b/examples/filedefaults @@ -0,0 +1,10 @@ +# $Id$ + +File { + mode => 755, + recurse => true +} + +file { "/tmp/filedefaultstest": + ensure => file +} diff --git a/examples/fileparsing b/examples/fileparsing new file mode 100644 index 000000000..f9766b9f6 --- /dev/null +++ b/examples/fileparsing @@ -0,0 +1,116 @@ +# $Id$ + +# this will eventually parse different config files + +# this creates the 'passwd' type, but it does not create any instances +filetype { "passwd": + linesplit => "\n", + escapednewlines => false +} + + +# this creates the 'PasswdUser' type, but again, no instances +filerecord { "user": + filetype => passwd, + fields => [name, password, uid, gid, gcos, home, shell], + namevar => name, + splitchar => ":" + +} + +filetype { ini: + linesplit => "\n\n" +} + +# ini files are different because we don't really care about validating fields +# or at least, we can't do it for most files... +filerecord { "initrecord": + filetype => ini, + fields => [name, password, uid, gid, gcos, home, shell], + namevar => name, + splitchar => ":" + +} + +# this won't work for multiple record types, will it? +# or at least, it requires that we specify multiple times +# ah, and it doesn't specify which of the available record types +# it works for... +passwd { user: + complete => true, # manage the whole file + path => "/etc/passwd" +} + +user { yaytest: + password => x, + uid => 10000, + gid => 10000, + home => "/home/yaytest", + gcos => "The Yaytest", + shell => "/bin/sh" +} + # there seems to be an intrinsic problem here -- i've got subtypes that only + # make sense when an instance of the super type already exists, and i need + # to associate the instances of the subtype with the instances of the supertype + # even if i created the parsers manually, I'd have the same problem + +# this is the crux of it -- i want to be able to say 'user' here without having +# to specify the file, which leaves two options: +# 1) associate the record type with a filetype instance (BAD) +# 2) once the filetype and record type are created, have another command +# that specifically creates a filetype instance and gives names for instances +# of its record types + +define syslog { + + # create a new type, with all defaults + filetype { "syslog": + escapednewlines => true + } + + filerecord { "log": + filetype => syslog, + regex => "^([^#\s]+)\s+(\S+)$", + joinchar => "\t", + fields => [logs, dest] + } + + # these two should just be supported within the filetypes + filerecord { "comment": + filetype => syslog, + regex => "^(#.*)$", + joinchar => "s", + fields => [comment] + } + + filerecord { "blank": + filetype => syslog, + regex => "^(\s*)$", + joinchar => "s", + fields => blank + } +} + +define cron { + filetype { "usercrontab": + } + + # this won't actually work, of course + filerecord { "cronjob": + filetype => crontab, + regex => "^([^#\s]+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.+)$", + joinchar => " ", + fields => [minute, hour, day, month, weekday, command], + defaults => ["*", "*", "*", "*", "*", nil], + optional => [minute, hour, day, month, weekday] + } + + crontab { "luke": + } +} + +# XXX this doesn't work in the slightest +define crontab(name,path) { + usercrontab { "${path}/${name}": + } +} diff --git a/examples/filerecursion b/examples/filerecursion new file mode 100644 index 000000000..b7d8278c2 --- /dev/null +++ b/examples/filerecursion @@ -0,0 +1,15 @@ +# $Id$ + +file { "/tmp/dirtest/b/a": + mode => 755, +} + +file { "/tmp/dirtest": + mode => 755, + recurse => true, +} + +file { "/tmp/dirtest/b/b": + mode => 644, +} + diff --git a/examples/functions b/examples/functions new file mode 100644 index 000000000..8e95c3a72 --- /dev/null +++ b/examples/functions @@ -0,0 +1,3 @@ +# $Id$ + +$yaytest = fact("operatingsystem") diff --git a/examples/groups b/examples/groups new file mode 100644 index 000000000..35505a2eb --- /dev/null +++ b/examples/groups @@ -0,0 +1,7 @@ +# $Id$ + +# there need to be two forms of adding to groups: +# add the current host to a group, and add a list of hosts to a +# group by name + +$group = "crap" diff --git a/examples/head b/examples/head new file mode 100644 index 000000000..59cbb6593 --- /dev/null +++ b/examples/head @@ -0,0 +1,30 @@ +# $Id$ + +# this file is responsible for importing all of the files we want to actually test + +# these are all of the simple tests +import "simpletests" +import "assignments" +import "selectors" +#import "iftest" +import "importing" +import "execs" +import "filedefaults" + +# facts are now imported into the top of the namespace +#import "facts" + +# obsoleted +#import "functions" + +# files we no longer need to import directly, or at all in some cases +#import "one" +#import "classing" +#import "components" +#import "file.bl" +#import "fileparsing.disabled" +#import "groups" + +# this imports the more complex files +import "allatonce" # imports classing and components +import "nodes" # imports classing and components diff --git a/examples/importing b/examples/importing new file mode 100644 index 000000000..f02604109 --- /dev/null +++ b/examples/importing @@ -0,0 +1,8 @@ +# $Id$ + +#import "groups" +# testing import loops +import "importing" + +$name = "value" +$system = $operatingsystem diff --git a/examples/mac_automount.pp b/examples/mac_automount.pp new file mode 100644 index 000000000..bab0136fc --- /dev/null +++ b/examples/mac_automount.pp @@ -0,0 +1,16 @@ +#!/usr/bin/env puppet +# Jeff McCune +# +# Apple's Automounter spawns a child that sends the parent +# a SIGTERM. This makes it *very* difficult to figure out +# if the process started correctly or not. +# + +service {"automount-test": + provider => base, + hasrestart => false, + pattern => '/tmp/hometest', + start => "/usr/sbin/automount -m /tmp/home /dev/null -mnt /tmp/hometest", + stop => "ps auxww | grep '/tmp/hometest' | grep -v grep | awk '{print \$2}' | xargs kill", + ensure => running +} diff --git a/examples/mac_dscl.pp b/examples/mac_dscl.pp new file mode 100755 index 000000000..ff59f9d8d --- /dev/null +++ b/examples/mac_dscl.pp @@ -0,0 +1,28 @@ +#!/usr/bin/env puppet --debug --verbose --trace +# +# Jeff McCune: I use this for developing and testing the directory service +# provider. + +User { provider => "directoryservice" } +Group { provider => "directoryservice" } + +user { + "testgone": + ensure => absent, + uid => 550; + "testhere": + ensure => present, + password => "foobar", + shell => "/bin/bash", + uid => 551; +} + +group { + "testgone": + ensure => absent, + gid => 550; + "testhere": + ensure => present, + gid => 551; + +} \ No newline at end of file diff --git a/examples/mac_dscl_revert.pp b/examples/mac_dscl_revert.pp new file mode 100755 index 000000000..c9bd2b541 --- /dev/null +++ b/examples/mac_dscl_revert.pp @@ -0,0 +1,26 @@ +#!/usr/bin/env puppet --debug --verbose --trace +# +# Jeff McCune: I use this for developing and testing the directory service +# provider. + +User { provider => "directoryservice" } +Group { provider => "directoryservice" } + +user { + "testgone": + ensure => absent, + uid => 550; + "testhere": + ensure => absent, + uid => 551; +} + +group { + "testgone": + ensure => absent, + gid => 550; + "testhere": + ensure => absent, + gid => 551; + +} diff --git a/examples/mac_netinfo.pp b/examples/mac_netinfo.pp new file mode 100755 index 000000000..544b64818 --- /dev/null +++ b/examples/mac_netinfo.pp @@ -0,0 +1,5 @@ +#!/usr/bin/env puppet --debug + +user { + "jmccune": provider => "netinfo", ensure => present; +} diff --git a/examples/mac_pkgdmg.pp b/examples/mac_pkgdmg.pp new file mode 100755 index 000000000..a2499e815 --- /dev/null +++ b/examples/mac_pkgdmg.pp @@ -0,0 +1,7 @@ +#!/usr/bin/env puppet +# + +package +{ + "Foobar.pkg.dmg": ensure => present, provider => pkgdmg; +} diff --git a/examples/modules/sample-module.pp b/examples/modules/sample-module.pp new file mode 100644 index 000000000..57079a0aa --- /dev/null +++ b/examples/modules/sample-module.pp @@ -0,0 +1,10 @@ +# Jeff McCune +# 2007-08-14 +# +# Use: +# puppet --verbose --debug --modulepath=`pwd` ./sample-module.pp +# +# sample-module demonstrates the use of a custom language function +# included within the module bundle. + +include sample-module diff --git a/examples/modules/sample-module/README.txt b/examples/modules/sample-module/README.txt new file mode 100644 index 000000000..ee4b8201a --- /dev/null +++ b/examples/modules/sample-module/README.txt @@ -0,0 +1,17 @@ +Jeff McCune +2007-08-14 + +This small, sample module demonstrates how to extend the puppet language +with a new parser function. + +See: +manifests/init.pp +lib/puppet/parser/functions/hostname_to_dn.rb +templates/sample.erb + +Note the consistent naming of files for Puppet::Util::Autoload + +Reference Documents: +http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation +http://reductivelabs.com/trac/puppet/wiki/WritingYourOwnFunctions +http://reductivelabs.com/trac/puppet/wiki/FunctionReference diff --git a/examples/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb b/examples/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb new file mode 100644 index 000000000..9f732b5bc --- /dev/null +++ b/examples/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb @@ -0,0 +1,36 @@ +# Copyright (C) David Schmitt +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the Author nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +# Jeff McCune +# 2007-08-14 +# See: http://reductivelabs.com/trac/puppet/wiki/WritingYourOwnFunctions + +module Puppet::Parser::Functions + newfunction(:hostname_to_dn, :type => :rvalue, :doc => "Given 'foo.bar.com', return 'dc=foo,dc=bar,dc=com'.") do |args| + args[0].split(/\./).map do |s| "dc=%s"%[s] end.join(",") + end +end diff --git a/examples/modules/sample-module/manifests/init.pp b/examples/modules/sample-module/manifests/init.pp new file mode 100644 index 000000000..1af8dff1f --- /dev/null +++ b/examples/modules/sample-module/manifests/init.pp @@ -0,0 +1,12 @@ +# Jeff McCune +# +# Demonstration of a custom parser function and erb template within +# a module, working in concert. + +class sample-module { + $fqdn_to_dn = hostname_to_dn($domain) + $sample_template = template("sample-module/sample.erb") + + notice("hostname_to_dn module function returned: [$fqdn_to_dn]") + info("sample.erb looks like:\n$sample_template") +} diff --git a/examples/modules/sample-module/templates/sample.erb b/examples/modules/sample-module/templates/sample.erb new file mode 100644 index 000000000..b13561b45 --- /dev/null +++ b/examples/modules/sample-module/templates/sample.erb @@ -0,0 +1,5 @@ + +## Jeff McCune +fqdn: <%= fqdn %> +basedn: <%= fqdn_to_dn %> +## end sample.erb ## diff --git a/examples/nodes b/examples/nodes new file mode 100644 index 000000000..42488e689 --- /dev/null +++ b/examples/nodes @@ -0,0 +1,20 @@ +# $Id$ + +# define nodes + +#service.setpath("../examples/root/etc/init.d") + +Service { + path => "../examples/root/etc/init.d" +} + +import "classing" + +sleepserver { + path => $operatingsystem ? { + sunos => "../examples/root/etc/configfile", + hpux => "../examples/other/etc/configfile", + default => "../examples/root/etc/configfile" + }, + schedule => true +} diff --git a/examples/one b/examples/one new file mode 100644 index 000000000..452d32f3e --- /dev/null +++ b/examples/one @@ -0,0 +1,8 @@ +# $Id$ + +# this service doesn't actually exist, so we noop it +# and this way, we can test noop :) +service { "funtest": + running => "0", + noop => true +} diff --git a/examples/relationships b/examples/relationships new file mode 100644 index 000000000..795788947 --- /dev/null +++ b/examples/relationships @@ -0,0 +1,34 @@ +# $Id$ + +#service.setpath("../examples/root/etc/init.d") +#puppet.statefile("/tmp/puppetstate") +$path = "../examples/root/etc/configfile" + path => "../examples/root/etc/init.d" + + +define files { + file { "/tmp/yaytest": + ensure => file, + mode => 755 + } + file { "/tmp/exists": + checksum => md5 + } +} + +define sleeper { + file { $path: + mode => 755 + } + service { sleeper: + path => "../examples/root/etc/init.d", + running => 1 + } +} + +files { } + +sleeper { + require => files["yay"], + schedule => true +} diff --git a/examples/root/bin/sleeper b/examples/root/bin/sleeper deleted file mode 100755 index 980d66ac1..000000000 --- a/examples/root/bin/sleeper +++ /dev/null @@ -1,67 +0,0 @@ -#!/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/examples/root/etc/configfile b/examples/root/etc/configfile deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/root/etc/debian-passwd b/examples/root/etc/debian-passwd deleted file mode 100644 index 59cdf4acf..000000000 --- a/examples/root/etc/debian-passwd +++ /dev/null @@ -1,29 +0,0 @@ -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/examples/root/etc/debian-syslog.conf b/examples/root/etc/debian-syslog.conf deleted file mode 100644 index 8f2925960..000000000 --- a/examples/root/etc/debian-syslog.conf +++ /dev/null @@ -1,71 +0,0 @@ -# /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/examples/root/etc/init.d/sleeper b/examples/root/etc/init.d/sleeper deleted file mode 100755 index 6da5eae32..000000000 --- a/examples/root/etc/init.d/sleeper +++ /dev/null @@ -1,72 +0,0 @@ -#!/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/root/etc/otherfile b/examples/root/etc/otherfile deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/root/etc/puppet/fileserver.conf b/examples/root/etc/puppet/fileserver.conf deleted file mode 100644 index 32dfcdd5c..000000000 --- a/examples/root/etc/puppet/fileserver.conf +++ /dev/null @@ -1,13 +0,0 @@ -# $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/root/etc/puppet/namespaceauth.conf b/examples/root/etc/puppet/namespaceauth.conf deleted file mode 100644 index fb08d428b..000000000 --- a/examples/root/etc/puppet/namespaceauth.conf +++ /dev/null @@ -1,20 +0,0 @@ -# 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/root/etc/puppet/puppet.conf b/examples/root/etc/puppet/puppet.conf deleted file mode 100644 index 151364ebd..000000000 --- a/examples/root/etc/puppet/puppet.conf +++ /dev/null @@ -1,10 +0,0 @@ -[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/root/etc/puppet/tagmail.conf b/examples/root/etc/puppet/tagmail.conf deleted file mode 100644 index 31c77f4bc..000000000 --- a/examples/root/etc/puppet/tagmail.conf +++ /dev/null @@ -1 +0,0 @@ -all: user@domain.com diff --git a/examples/selectors b/examples/selectors new file mode 100644 index 000000000..a70399bc7 --- /dev/null +++ b/examples/selectors @@ -0,0 +1,28 @@ +# $Id$ +# + +$platform = SunOS + +$funtest = $platform ? { + SunOS => yayness, + AIX => goodness, + default => badness +} + +# this is a comment + +$filename = "/tmp/yayness" + +$sleeper = file { $filename: + mode => $platform ? { + SunOS => 644, + default => 755 + }, + create => $platform ? "SunOS" => true +} + +# i guess it has to be solved this way... + +#$platform ? sunos => file { $filename: +# mode => 644 +#} diff --git a/examples/simpletests b/examples/simpletests new file mode 100644 index 000000000..b4fd3234e --- /dev/null +++ b/examples/simpletests @@ -0,0 +1,11 @@ +# $Id$ + +file { + "/tmp/atest": ensure => file; + "/tmp/btest": ensure => file +} + +file { + "/tmp/ctest": ensure => file; + "/tmp/dtest": ensure => file; +} diff --git a/examples/svncommit b/examples/svncommit new file mode 100644 index 000000000..350cd8580 --- /dev/null +++ b/examples/svncommit @@ -0,0 +1,13 @@ +$path = "/usr/bin:/bin" + +file { "/tmp/svntests": + recurse => true, + checksum => md5 +} + +exec { "echo 'files have been updated'": + cwd => "/tmp/svntests", + refreshonly => true, + require => file["/tmp/svntests"], + path => $path +} 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 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 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 -- cgit