Unverified Commit 5dc0f711 authored by Marcus Poller's avatar Marcus Poller
Browse files

separate ldap_bind_pw so it may have an eyaml entry

parent a9551f4b
Loading
Loading
Loading
Loading
+6 −2
Changes for manifests/init.pp: 6 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -83,9 +83,12 @@
#   Example: `ldaps://ldap.example.com:636 ldap://ldap2.example.com`.
#
# @param ldap_options
#   A free form string that can define any LDAP options to be passed through (ldap_table(5)).
#   A free form string or array of strings that can define any LDAP options to be passed through (ldap_table(5)).
#   Example: `start_tls = yes`.
#
# @param ldap_bind_pw
#   A password that is to be provided separately (eyaml) from ldap_options
#
# @param ldap_packages
#   An array of package names to install for LDAP support if $ldap is true.
#
@@ -276,7 +279,8 @@ class postfix (
  Boolean $ldap = false,
  Optional[String] $ldap_base = undef,
  Optional[String] $ldap_host = undef,
  Optional[String] $ldap_options = undef,
  Optional[Variant[String[1],Array[String[1]]]] $ldap_options = undef,
  Optional[String[1]] $ldap_bind_pw = undef,
  Array[String[1]] $ldap_packages = [],
  String $lookup_table_type = 'hash',
  Hash $mailaliases = {},
+3 −0
Changes for manifests/ldap.pp: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@ class postfix::ldap {
  assert_type(String, $postfix::ldap_base)
  assert_type(String, $postfix::ldap_host)
  assert_type(String, $postfix::ldap_options)
  assert_type(Optional[String], $postfix::ldap_bind_pw)
  assert_type(Optional[Variant[String[1],Array[String[1]]]], $postfix::ldap_options)

  package { $postfix::ldap_packages:
    ensure => installed,
@@ -17,6 +19,7 @@ class postfix::ldap {
    fail 'Missing $postfix::ldap_base !'
  }

  $ldap_bind_pw = $postfix::ldap_bind_pw
  $ldap_host = $postfix::ldap_host ? {
    undef   => 'localhost',
    default => $postfix::ldap_host,
+11 −1
Changes for templates/postfix-ldap-aliases.cf.erb: 11 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -3,4 +3,14 @@ server_host = <%= @ldap_host %>
<% if @ldap_base -%>
search_base = <%= @ldap_base %>
<% end -%>
<%= @ldap_options %>
<%
if @ldap_options
  options = [ @ldap_options ].flatten
  if @ldap_bind_pw
    options.append('bind_pw = ' + @ldap_bind_pw )
  end
end
-%>
<% if options -%>
<%= options.join("\n") %>
<% end -%>
 No newline at end of file