aboutsummaryrefslogtreecommitdiffstats
path: root/modules/postfix/manifests/server
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-03-22 15:18:24 +0000
committerMichael Scherer <misc@mageia.org>2012-03-22 15:18:24 +0000
commit6c686c242f8b05fd88cd977cb250c250dcf6104c (patch)
tree93145719973dcb8f8a1de28a024f0fb19e59ea23 /modules/postfix/manifests/server
parent040e85305d9d750c7e9d7792aa6abfa4317cbf44 (diff)
downloadpuppet-6c686c242f8b05fd88cd977cb250c250dcf6104c.tar
puppet-6c686c242f8b05fd88cd977cb250c250dcf6104c.tar.gz
puppet-6c686c242f8b05fd88cd977cb250c250dcf6104c.tar.bz2
puppet-6c686c242f8b05fd88cd977cb250c250dcf6104c.tar.xz
puppet-6c686c242f8b05fd88cd977cb250c250dcf6104c.zip
clean postfix module, rework the layout and split it in several file
Diffstat (limited to 'modules/postfix/manifests/server')
-rw-r--r--modules/postfix/manifests/server/primary.pp37
-rw-r--r--modules/postfix/manifests/server/secondary.pp1
2 files changed, 38 insertions, 0 deletions
diff --git a/modules/postfix/manifests/server/primary.pp b/modules/postfix/manifests/server/primary.pp
new file mode 100644
index 00000000..3f089685
--- /dev/null
+++ b/modules/postfix/manifests/server/primary.pp
@@ -0,0 +1,37 @@
+class postfix::server::primary inherits postfix::server {
+
+ package { 'postfix-ldap': }
+
+ # council is here until we fully decide who has aliases in com team,
+ # see https://bugs.mageia.org/show_bug.cgi?id=1345
+ # alumini is a special group for tracking previous members of
+ # the project, so they keep their aliases for a time
+ $aliases_group = ['mga-founders',
+ 'mga-packagers',
+ 'mga-sysadmin',
+ 'mga-council',
+ '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');
+ '/etc/postfix/ldap_aliases.conf':
+ content => template('postfix/ldap_aliases.conf');
+ # TODO merge the file with the previous one, for common part (ldap, etc)
+ '/etc/postfix/group_aliases.conf':
+ content => template('postfix/group_aliases.conf');
+ # TODO make it conditional to the presence of sympa
+ '/etc/postfix/sympa_aliases':
+ content => template('postfix/sympa_aliases');
+ '/etc/postfix/virtual_aliases':
+ content => template('postfix/virtual_aliases');
+ }
+
+ exec { 'postmap /etc/postfix/virtual_aliases':
+ refreshonly => true,
+ subscribe => File['/etc/postfix/virtual_aliases'],
+ }
+}
diff --git a/modules/postfix/manifests/server/secondary.pp b/modules/postfix/manifests/server/secondary.pp
new file mode 100644
index 00000000..e4dd8721
--- /dev/null
+++ b/modules/postfix/manifests/server/secondary.pp
@@ -0,0 +1 @@
+class postfix::server::secondary inherits postfix::server { }