Commit 148c496 1 parent dba70f7 commit 148c496 Copy full SHA for 148c496
File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 16
16
# Source of configuration snippet
17
17
#
18
18
# @param template
19
- # Path of a template file
19
+ # Path of a erb template file or epp template file without parameters
20
20
#
21
21
# @param sudo_config_dir
22
22
# Where to place configuration snippets.
40
40
$content = undef ,
41
41
$source = undef ,
42
42
$template = undef ,
43
+ $template_epp = undef ,
43
44
$sudo_config_dir = undef ,
44
45
$sudo_file_name = undef ,
45
46
$sudo_syntax_path = ' /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
94
95
}
95
96
}
96
97
98
+ if $template and $template_epp {
99
+ fail(" 'template' and 'template_epp' are mutually exclusive" )
100
+ }
101
+
97
102
if $content != undef {
98
103
if $content =~ Array {
99
104
$lines = join($content , " \n " )
104
109
} elsif $template != undef {
105
110
if $template =~ /\.epp$/ {
106
111
$content_real = epp($template )
107
- }
108
- else {
112
+ } else {
109
113
$content_real = template ($template )
110
114
}
115
+ } elsif $template_epp != undef {
116
+ $content_real = epp($template_epp [filename], $template_epp [params])
111
117
} else {
112
118
$content_real = undef
113
119
}
You can’t perform that action at this time.
0 commit comments