12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- # A description of what this class does
- #
- # @summary A short summary of the purpose of this class
- #
- # @example
- # include openldap::server::config
- class openldap::server::config {
- # Ensure the main server class has been defined
- if !defined(Class['openldap::server']) {
- fail 'Class openldap::server not defined'
- }
- # Generate interface lists for the three types of connections
- $slapd_ldap_ifs = empty($openldap::server::ldap_ifs) ? {
- true => '',
- false => join(prefix($openldap::server::ldap_ifs, 'ldap://'), ' '),
- }
- $slapd_ldapi_ifs = empty($openldap::server::ldapi_ifs) ? {
- true => '',
- false => join(prefix($openldap::server::ldapi_ifs, 'ldapi://'), ' '),
- }
- $slapd_ldaps_ifs = empty($openldap::server::ldaps_ifs) ? {
- true => '',
- false => join(prefix($openldap::server::ldaps_ifs, 'ldaps://'), ' '),
- }
- # Concat into a single interface string
- $slapd_ldap_urls = "${slapd_ldap_ifs} ${slapd_ldapi_ifs} ${slapd_ldaps_ifs}"
- case $::osfamily {
- 'Debian': {
- shellvar { 'slapd':
- ensure => present,
- target => '/etc/default/slapd',
- variable => 'SLAPD_SERVICES',
- value => $slapd_ldap_urls,
- }
- }
- default: {
- fail "Operating-system family ${::osfamily} not yet supported"
- }
- }
- }
|