1 |
misc |
2134 |
# to not repeat the settings everywhere |
2 |
misc |
2667 |
Exec { |
3 |
|
|
path => '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin/', |
4 |
misc |
2134 |
} |
5 |
misc |
2133 |
|
6 |
misc |
2134 |
Package { |
7 |
misc |
2667 |
ensure => present, |
8 |
misc |
2134 |
} |
9 |
misc |
2133 |
|
10 |
misc |
2134 |
File { |
11 |
misc |
2667 |
ensure => present, |
12 |
|
|
owner => 'root', |
13 |
|
|
group => 'root', |
14 |
misc |
2155 |
# on directory, this will be 755 |
15 |
|
|
# see http://docs.puppetlabs.com/references/2.7.0/type.html#file |
16 |
misc |
2667 |
mode => '0644', |
17 |
misc |
2134 |
} |
18 |
|
|
|
19 |
misc |
2199 |
Group { |
20 |
|
|
ensure => present, |
21 |
|
|
} |
22 |
|
|
|
23 |
|
|
User { |
24 |
misc |
2667 |
ensure => present, |
25 |
misc |
2199 |
managehome => true, |
26 |
misc |
2667 |
shell => '/bin/bash', |
27 |
misc |
2199 |
} |
28 |
|
|
|
29 |
misc |
2241 |
Service { |
30 |
|
|
ensure => running, |
31 |
|
|
} |
32 |
|
|
|
33 |
misc |
2667 |
define local_script($content, |
34 |
|
|
$owner = 'root', |
35 |
|
|
$group = 'root', |
36 |
|
|
$mode = '0755') { |
37 |
misc |
2155 |
file { "/usr/local/bin/$name": |
38 |
misc |
2667 |
owner => $owner, |
39 |
|
|
group => $group, |
40 |
|
|
mode => $mode, |
41 |
misc |
2155 |
content => $content, |
42 |
|
|
} |
43 |
|
|
} |