Puppet Function: tp::content

Defined in:
functions/content.pp
Function type:
Puppet Language

Overview

tp::content(Any $local_content, Variant[Undef,String] $template, Variant[Undef,String] $epp_template)Any

Parameters:

  • local_content (Any)
  • template (Variant[Undef,String])
  • epp_template (Variant[Undef,String])

Returns:

  • (Any)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'functions/content.pp', line 1

function tp::content (
  Any $local_content,
  Variant[Undef,String] $template,
  Variant[Undef,String] $epp_template,
) {
  if ::tp::is_something($local_content) {
    $output = $local_content
  } elsif ::tp::is_something($template) {
    $output = template($template)
  } elsif ::tp::is_something($epp_template) {
    $output = epp($epp_template)
  } else {
    $output = undef
  }
}