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 |