5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'manifests/ldap.pp', line 5
class postfix::ldap {
assert_private()
assert_type(String, $postfix::ldap_base)
assert_type(String, $postfix::ldap_host)
assert_type(String, $postfix::ldap_options)
package { $postfix::ldap_packages:
ensure => installed,
before => File["${postfix::confdir}/ldap-aliases.cf"],
}
if ! $postfix::ldap_base {
fail 'Missing $postfix::ldap_base !'
}
$ldap_host = $postfix::ldap_host ? {
undef => 'localhost',
default => $postfix::ldap_host,
}
$ldap_base = $postfix::ldap_base
$ldap_options = $postfix::ldap_options ? {
undef => '',
default => $postfix::ldap_options,
}
file { "${postfix::confdir}/ldap-aliases.cf":
ensure => 'file',
owner => 'root',
group => 'postfix',
content => template('postfix/postfix-ldap-aliases.cf.erb'),
}
}
|