Puppet Function: icingaweb2::pick

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

Summary

This function returns first parameter if set.

Overview

icingaweb2::pick(Any $arg1, Any $arg2)Any

Parameters:

  • arg1 (Any)
  • arg2 (Any)

Returns:

  • (Any)

    One of the two parameters.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'functions/pick.pp', line 7

function icingaweb2::pick($arg1, $arg2) {
  # @param arg1
  #   First argument.
  #
  # @param arg2
  #   Second argument.
  #
  unless $arg1 {
    $arg2
  } else {
    $arg1
  }
}