Puppet Function: simplib::ldap::domain_to_dn

Defined in:
functions/ldap/domain_to_dn.pp
Function type:
Puppet Language

Overview

simplib::ldap::domain_to_dn(String $domain = $facts['domain'])String

Provides a reasonable LDAP Base DN as generated from the domain fact

Parameters:

  • domain (String) (defaults to: $facts['domain'])

    The domain to convert

Returns:

  • (String)


7
8
9
10
11
# File 'functions/ldap/domain_to_dn.pp', line 7

function simplib::ldap::domain_to_dn (
  String $domain = $facts['domain']
) {
  join(split($domain,'\.').map |$x| { "DC=${x}" }, ',')
}