diff options
author | Michael Scherer <misc@mageia.org> | 2012-01-22 23:57:57 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2012-01-22 23:57:57 +0000 |
commit | cd4451a8645394287172c2ae8cb12b13e8e9af7d (patch) | |
tree | ab83bc4889bbdbab5cbadf159ea096c2d6e971ed /modules/postfix | |
parent | 136a8bab98483e2e40bbb992e78fcda6a43c1721 (diff) | |
download | puppet-cd4451a8645394287172c2ae8cb12b13e8e9af7d.tar puppet-cd4451a8645394287172c2ae8cb12b13e8e9af7d.tar.gz puppet-cd4451a8645394287172c2ae8cb12b13e8e9af7d.tar.bz2 puppet-cd4451a8645394287172c2ae8cb12b13e8e9af7d.tar.xz puppet-cd4451a8645394287172c2ae8cb12b13e8e9af7d.zip |
use get_ldap_servers() instead of hardcoding the servers
Diffstat (limited to 'modules/postfix')
-rw-r--r-- | modules/postfix/manifests/init.pp | 1 | ||||
-rw-r--r-- | modules/postfix/templates/group_aliases.conf | 5 | ||||
-rw-r--r-- | modules/postfix/templates/ldap_aliases.conf | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/modules/postfix/manifests/init.pp b/modules/postfix/manifests/init.pp index 4796f6f2..5722e3e0 100644 --- a/modules/postfix/manifests/init.pp +++ b/modules/postfix/manifests/init.pp @@ -48,6 +48,7 @@ class postfix { 'mga-alumni','mga-i18n-committers', ] $ldap_password = extlookup("postfix_ldap",'x') + $ldap_servers = get_ldap_servers() file { '/etc/postfix/master.cf': content => template("postfix/primary_master.cf"); diff --git a/modules/postfix/templates/group_aliases.conf b/modules/postfix/templates/group_aliases.conf index 85788e41..106a0759 100644 --- a/modules/postfix/templates/group_aliases.conf +++ b/modules/postfix/templates/group_aliases.conf @@ -1,4 +1,7 @@ -server_host = ldaps://ldap.<%= domain %>:636 +<%- + ldap_servers.map! { |l| "'ldaps://#{l}:636'" } +-%> +server_host = <%= ldap_servers.join(' ') %> search_base = <%= dc_suffix %> query_filter = (&(cn=mga-%u)(objectClass=groupOfNames)) result_attribute = mail diff --git a/modules/postfix/templates/ldap_aliases.conf b/modules/postfix/templates/ldap_aliases.conf index 459ed0ec..efb54784 100644 --- a/modules/postfix/templates/ldap_aliases.conf +++ b/modules/postfix/templates/ldap_aliases.conf @@ -4,8 +4,10 @@ query_string = '' aliases_group.each do |g| query_string += '(memberOf=cn=' + g + ',ou=Group,' + dc_suffix + ')' end + +ldap_servers.map! { |l| "'ldaps://#{l}:636'" } -%> -server_host = ldaps://ldap.<%= domain %>:636 ldaps://ldap-slave-1.<%= domain %>:636 +server_host = <%= ldap_servers.join(' ') %> search_base = <%= dc_suffix %> query_filter = (&(uid=%u)(|<%= query_string %>)) result_attribute = mail |