Puppet Function: postgresql::default

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

Summary

This function pull default values from the `params` class or `globals` class if the value is not present in `params`.

Overview

postgresql::default(String $parameter_name)Any

Examples:

postgresql::default('variable')

Parameters:

  • parameter_name (String)

Returns:

  • (Any)


6
7
8
9
10
11
12
13
14
15
# File 'functions/default.pp', line 6

function postgresql::default(
  String $parameter_name
) {
  include postgresql::params

  #search for the variable name in params first
  #then fall back to globals if not found
  pick( getvar("postgresql::params::${parameter_name}"),
  "postgresql::globals::${parameter_name}")
}