Puppet Class: ldap::yamlcreds

Defined in:
modules/ldap/manifests/yamlcreds.pp

Overview

Provision /etc/ldap.yaml file, with credentials for readonly access to the labs ldap



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'modules/ldap/manifests/yamlcreds.pp', line 3

class ldap::yamlcreds {
    include ::ldap::config::labs

    $ldapconfig = $::ldap::config::labs::ldapconfig

    $ldap_pw = $ldapconfig['basedn']
    $client_readable_config = {
        'servers'  => $ldapconfig['servernames'],
        'basedn'   => $ldapconfig['basedn'],
        'user'     => "cn=proxyagent,ou=profile,${ldap_pw}",
        'password' => $ldapconfig['proxypass'],
    }

    file { '/etc/ldap.yaml':
        content => ordered_yaml($client_readable_config),
    }
}