File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1616# Source of configuration snippet
1717#
1818# @param template
19- # Path of a template file
19+ # Path of a erb template file or epp template file without parameters
2020#
2121# @param sudo_config_dir
2222# Where to place configuration snippets.
4040 $content = undef ,
4141 $source = undef ,
4242 $template = undef ,
43+ $template_epp = undef ,
4344 $sudo_config_dir = undef ,
4445 $sudo_file_name = undef ,
4546 $sudo_syntax_path = ' /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
9495 }
9596 }
9697
98+ if $template and $template_epp {
99+ fail(" 'template' and 'template_epp' are mutually exclusive" )
100+ }
101+
97102 if $content != undef {
98103 if $content =~ Array {
99104 $lines = join($content , " \n " )
104109 } elsif $template != undef {
105110 if $template =~ /\.epp$/ {
106111 $content_real = epp($template )
107- }
108- else {
112+ } else {
109113 $content_real = template ($template )
110114 }
115+ } elsif $template_epp != undef {
116+ $content_real = epp($template_epp [filename], $template_epp [params])
111117 } else {
112118 $content_real = undef
113119 }
You can’t perform that action at this time.
0 commit comments