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
# File 'functions/default.pp', line 6

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

  # Search for the variable name in params.
  # params inherits from globals, so it will also catch these variables.
  pick(getvar("postgresql::params::${parameter_name}"))
}