Skip to content

Commit b74ba27

Browse files
committed
directory environment support
1 parent 5486895 commit b74ba27

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

manifests/masterenv.pp

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,34 @@
1919
# }
2020
#
2121
define puppet::masterenv ($modulepath, $manifest, $puppet_conf = $::puppet::params::puppet_conf){
22+
23+
case $::puppet::master::environments {
24+
'directory': {
25+
$path = "${::puppet::master::environmentpath}/environment.conf"
26+
$section = ''
27+
},
28+
default: {
29+
$path = $puppet_conf
30+
$section = $name
31+
}
32+
}
33+
2234
Ini_setting {
23-
path => $puppet_conf,
35+
path => $path,
36+
section => $section,
2437
require => [File[$puppet_conf], Class['puppet::master']],
2538
notify => Service['httpd'],
2639
}
2740

28-
ini_setting {"masterenvmodule${name}":
29-
ensure => present,
30-
section => $name,
31-
setting => 'modulepath',
32-
value => $modulepath,
33-
}
34-
ini_setting {"masterenvmanifest${name}":
35-
ensure => present,
36-
section => $name,
37-
setting => 'manifest',
38-
value => $manifest,
41+
ini_setting {
42+
"masterenvmodule${name}":
43+
ensure => present,
44+
setting => 'modulepath',
45+
value => $modulepath;
46+
47+
"masterenvmanifest${name}":
48+
ensure => present,
49+
setting => 'manifest',
50+
value => $manifest;
3951
}
4052
}

0 commit comments

Comments
 (0)