Puppet Function: psick::template
- Defined in:
-
functions/template.pp
- Function type:
- Puppet Language
Overview
psick::template(Optional[String] $filename, Hash $parameters = {}) ⇒ Optional[String]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'functions/template.pp', line 1
function psick::template(
Optional[String] $filename,
Hash $parameters = {}
) >> Optional[String] {
if $filename and $filename !='' {
$ext=$filename[-4,4]
case $ext {
'.epp': {
epp($filename, $parameters)
}
'.erb': {
template($filename)
}
default: {
file($filename)
}
}
} else {
$result = undef
}
}
|