aboutsummaryrefslogtreecommitdiffstats
path: root/modules/postfix
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-01-08 22:24:48 +0000
committerMichael Scherer <misc@mageia.org>2012-01-08 22:24:48 +0000
commitaf29bf33a6466aa2742f4229008ca6fb543d5eb4 (patch)
treeb25d3a522d1394ae9c844e25aeab872238800698 /modules/postfix
parent6f3b3cb22c091ed1e18ebd796a3c32b4efd7e646 (diff)
downloadpuppet-af29bf33a6466aa2742f4229008ca6fb543d5eb4.tar
puppet-af29bf33a6466aa2742f4229008ca6fb543d5eb4.tar.gz
puppet-af29bf33a6466aa2742f4229008ca6fb543d5eb4.tar.bz2
puppet-af29bf33a6466aa2742f4229008ca6fb543d5eb4.tar.xz
puppet-af29bf33a6466aa2742f4229008ca6fb543d5eb4.zip
cleaning of the postfix module
Diffstat (limited to 'modules/postfix')
-rw-r--r--modules/postfix/manifests/init.pp74
1 files changed, 13 insertions, 61 deletions
diff --git a/modules/postfix/manifests/init.pp b/modules/postfix/manifests/init.pp
index 50c152cd..748e9861 100644
--- a/modules/postfix/manifests/init.pp
+++ b/modules/postfix/manifests/init.pp
@@ -1,12 +1,7 @@
class postfix {
-
class base {
- package { postfix:
- ensure => installed
- }
- package { 'nail':
- ensure => installed
- }
+ package { [postfix,nail]: }
+
service { postfix:
ensure => running,
subscribe => [ Package['postfix']],
@@ -14,10 +9,6 @@ class postfix {
}
file { '/etc/postfix/main.cf':
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
require => Package["postfix"],
content => "",
notify => [Service['postfix']],
@@ -35,32 +26,21 @@ class postfix {
include postgrey
include amavis
include spamassassin
+
File['/etc/postfix/main.cf'] {
content => template("postfix/main.cf"),
}
file { '/etc/postfix/transport_regexp':
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
content => template("postfix/transport_regexp"),
}
}
class primary_smtp inherits smtp_server {
- file { '/etc/postfix/master.cf':
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- content => template("postfix/primary_master.cf"),
- }
- package { "postfix-ldap":
- ensure => installed
- }
+ 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
@@ -70,41 +50,15 @@ class postfix {
'mga-alumni','mga-i18n-committers',
]
$ldap_password = extlookup("postfix_ldap",'x')
- file { '/etc/postfix/ldap_aliases.conf':
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- content => template("postfix/ldap_aliases.conf"),
- }
- # TODO merge the file with the previous one, for common part (ldap, etc)
- file { '/etc/postfix/group_aliases.conf':
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- content => template("postfix/group_aliases.conf"),
- }
-
- # TODO make it conditional to the presence of sympa
- file { '/etc/postfix/sympa_aliases':
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- content => template("postfix/sympa_aliases"),
- }
-
-
-
-
- file { '/etc/postfix/virtual_aliases':
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- content => template("postfix/virtual_aliases"),
+ 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":
@@ -113,8 +67,6 @@ class postfix {
}
}
-
class secondary_smtp inherits smtp_server {
}
-
}