diff options
author | R.I.Pienaar <rip@devco.net> | 2010-05-06 22:55:02 +0100 |
---|---|---|
committer | R.I.Pienaar <rip@devco.net> | 2010-05-06 22:55:02 +0100 |
commit | ee1fe7a0236e5fd100bbc229ea034bf7d2b530aa (patch) | |
tree | a373c1239623adf626d75e7ff84a9acecfdc4083 /manifests/setup.pp | |
download | puppet-concat-ee1fe7a0236e5fd100bbc229ea034bf7d2b530aa.tar.gz puppet-concat-ee1fe7a0236e5fd100bbc229ea034bf7d2b530aa.tar.bz2 |
Pull in work from private Subversion repository
Diffstat (limited to 'manifests/setup.pp')
-rwxr-xr-x | manifests/setup.pp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/manifests/setup.pp b/manifests/setup.pp new file mode 100755 index 0000000..9676fb6 --- /dev/null +++ b/manifests/setup.pp @@ -0,0 +1,36 @@ +# Sets up the concat system. +# +# $concatdir should point to a place where you wish the fragments to +# live. This should not be somewhere like /tmp since ideally these files +# should not be deleted ever, puppet should always manage them +# +# $puppetversion should be either 24 or 25 to enable a 24 compatible +# mode, in 24 mode you might see phantom notifies this is a side effect +# of the method we use to clear the fragments directory. +# +# The regular expression below will try to figure out your puppet version +# but this code will only work in 0.24.8 and newer. +# +# It also copies out the concatfragments.sh file to /usr/local/bin +class concat::setup { + $concatdir = "/var/lib/puppet/concat" + $majorversion = regsubst($puppetversion, '^[0-9]+[.]([0-9]+)[.][0-9]+$', '\1') + + file{"/usr/local/bin/concatfragments.sh": + owner => root, + group => root, + mode => 755, + source => $majorversion ? { + 24 => "puppet:///concat/concatfragments.sh", + default => "puppet:///modules/concat/concatfragments.sh" + }; + + $concatdir: + ensure => directory, + owner => root, + group => root, + mode => 755; + } +} + +# vi:tabstop=4:expandtab:ai |