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