Puppet Function: openldap::boolean

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

Overview

openldap::boolean(Optional[Boolean] $value)Optional[String]

Convert boolean values to their OpenLDAP form.

Examples:

openldap::boolean(true)
openldap::boolean(false)
openldap::boolean(undef)

Parameters:

  • value (Optional[Boolean])

    The boolean value to convert, undef is passed through unchanged.

Returns:

  • (Optional[String])

    One of TRUE, FALSE or undef.

Since:

  • 2.0.0



14
15
16
17
18
19
20
# File 'functions/boolean.pp', line 14

function openldap::boolean(Optional[Boolean] $value) {

  $value ? {
    undef   => undef,
    default => bool2str($value, 'TRUE', 'FALSE'),
  }
}