Debian Codegraph @

functions/default.pp

raw
1 # @summary This function pull default values from the `params` class or `globals` class if the value is not present in `params`.
2 #
3 # @example
4 # postgresql::default('variable')
5 #
6 function postgresql::default(
7 String $parameter_name
8 ) {
9 include postgresql::params
10
11 # Search for the variable name in params.
12 # params inherits from globals, so it will also catch these variables.
13 pick(getvar("postgresql::params::${parameter_name}"))
14 }