/[adm]/puppet/modules/concat/manifests/setup.pp
ViewVC logotype

Contents of /puppet/modules/concat/manifests/setup.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 241 - (show annotations) (download)
Fri Nov 12 17:42:22 2010 UTC (13 years, 4 months ago) by boklm
File size: 1308 byte(s)
Add a module to construct files from fragments.

Downloaded from https://github.com/ripienaar/puppet-concat/


1 # Sets up the concat system.
2 #
3 # $concatdir should point to a place where you wish the fragments to
4 # live. This should not be somewhere like /tmp since ideally these files
5 # should not be deleted ever, puppet should always manage them
6 #
7 # $puppetversion should be either 24 or 25 to enable a 24 compatible
8 # mode, in 24 mode you might see phantom notifies this is a side effect
9 # of the method we use to clear the fragments directory.
10 #
11 # The regular expression below will try to figure out your puppet version
12 # but this code will only work in 0.24.8 and newer.
13 #
14 # It also copies out the concatfragments.sh file to /usr/local/bin
15 class concat::setup {
16 $concatdir = "/var/lib/puppet/concat"
17 $majorversion = regsubst($puppetversion, '^[0-9]+[.]([0-9]+)[.][0-9]+$', '\1')
18
19 file{"/usr/local/bin/concatfragments.sh":
20 owner => root,
21 group => root,
22 mode => 755,
23 source => $majorversion ? {
24 24 => "puppet:///concat/concatfragments.sh",
25 default => "puppet:///modules/concat/concatfragments.sh"
26 };
27
28 $concatdir:
29 ensure => directory,
30 owner => root,
31 group => root,
32 mode => 755;
33 }
34 }
35
36 # vi:tabstop=4:expandtab:ai

  ViewVC Help
Powered by ViewVC 1.1.30