diff --git a/sasl/manifests/init.pp b/sasl/manifests/init.pp index b8d60b6..f2c904a 100644 --- a/sasl/manifests/init.pp +++ b/sasl/manifests/init.pp @@ -28,6 +28,24 @@ class sasl::saslauthd { case $saslauthd_mech { "","pam": { } + "ldap": { + include ldap::client + + augeas { "set-saslauthd-mech": + context => "/files/etc/sysconfig/saslauthd", + changes => "set MECH ldap", + notify => Service["saslauthd"], + } + + file { "/etc/saslauthd.conf": + ensure => present, + mode => 0644, + owner => "root", + group => "root", + content => template("sasl/saslauthd.conf.erb"), + notify => Service["saslauthd"], + } + } "kerberos5": { augeas { "set-saslauthd-mech": context => "/files/etc/sysconfig/saslauthd", diff --git a/sasl/templates/saslauthd.conf.erb b/sasl/templates/saslauthd.conf.erb new file mode 100644 index 0000000..272bec7 --- /dev/null +++ b/sasl/templates/saslauthd.conf.erb @@ -0,0 +1,4 @@ +<% if has_variable=('saslauthd_mech') && saslauthd_mech == "ldap" -%> +ldap_servers: <% ldap_server.each do |uri| %><%= uri %> <% end %> +ldap_search_base: <%= ldap_basedn %> +<% end -%>