Puppet Function: openldap::flatten_generic

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

Overview

openldap::flatten_generic(Optional[Array[Variant[Numeric, String], 1]] $values)Optional[String]

Flatten a generic list attribute to a string.

Examples:

openldap::flatten_generic([1, 'foo', 3])

Parameters:

  • values (Optional[Array[Variant[Numeric, String], 1]])

    The list to flatten, undef is passed through.

Returns:

  • (Optional[String])

    The flattened list as a string.

Since:

  • 2.0.0



11
12
13
14
15
16
17
# File 'functions/flatten_generic.pp', line 11

function openldap::flatten_generic(Optional[Array[Variant[Numeric, String], 1]] $values) {

  $values ? {
    undef   => undef,
    default => join($values, ' '),
  }
}