summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-10-11 17:54:55 +0200
committervarac <varacanero@zeromail.org>2013-10-11 17:54:55 +0200
commit55d866039cbfa9baa0a0d42210467050c400bbbe (patch)
tree729a70668c842a5aec77986bb02f4de1949692f2 /puppet
parent9890125a57c3a06792e8d08ba15f1b636c764c61 (diff)
parent2a4ae58cc5e3f6e4a1e09ef6a9f15ade1e2c59fa (diff)
Merge branch 'feature/1683_configure_postfix_satellites' into develop
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/site_config/manifests/default.pp4
-rw-r--r--puppet/modules/site_postfix/manifests/mx.pp5
-rw-r--r--puppet/modules/site_postfix/manifests/mx/checks.pp (renamed from puppet/modules/site_postfix/manifests/checks.pp)0
-rw-r--r--puppet/modules/site_postfix/manifests/mx/reserved_aliases.pp4
-rw-r--r--puppet/modules/site_postfix/manifests/satellite.pp11
5 files changed, 19 insertions, 5 deletions
diff --git a/puppet/modules/site_config/manifests/default.pp b/puppet/modules/site_config/manifests/default.pp
index d3bb241f..a645cb1a 100644
--- a/puppet/modules/site_config/manifests/default.pp
+++ b/puppet/modules/site_config/manifests/default.pp
@@ -71,4 +71,8 @@ class site_config::default {
include site_squid_deb_proxy::client
}
+ if $::services !~ /\bmx\b/ {
+ include site_postfix::satellite
+ }
+
}
diff --git a/puppet/modules/site_postfix/manifests/mx.pp b/puppet/modules/site_postfix/manifests/mx.pp
index a043c277..474ed03d 100644
--- a/puppet/modules/site_postfix/manifests/mx.pp
+++ b/puppet/modules/site_postfix/manifests/mx.pp
@@ -3,10 +3,9 @@ class site_postfix::mx {
$domain_hash = hiera ('domain')
$domain = $domain_hash['full_suffix']
$host_domain = $domain_hash['full']
- $mx_hash = hiera('mx')
$cert_name = hiera('name')
- $root_mail_recipient = $mx_hash['contact']
+ $root_mail_recipient = hiera ('contacts')
$postfix_smtp_listen = 'all'
include site_config::x509::cert
@@ -32,7 +31,7 @@ class site_postfix::mx {
}
include site_postfix::mx::smtpd_checks
- include site_postfix::checks
+ include site_postfix::mx::checks
include site_postfix::mx::tls
include site_postfix::mx::reserved_aliases
diff --git a/puppet/modules/site_postfix/manifests/checks.pp b/puppet/modules/site_postfix/manifests/mx/checks.pp
index 31399d32..31399d32 100644
--- a/puppet/modules/site_postfix/manifests/checks.pp
+++ b/puppet/modules/site_postfix/manifests/mx/checks.pp
diff --git a/puppet/modules/site_postfix/manifests/mx/reserved_aliases.pp b/puppet/modules/site_postfix/manifests/mx/reserved_aliases.pp
index 6df53355..aea66f78 100644
--- a/puppet/modules/site_postfix/manifests/mx/reserved_aliases.pp
+++ b/puppet/modules/site_postfix/manifests/mx/reserved_aliases.pp
@@ -1,11 +1,11 @@
-class site_postfix::reserved_aliases {
+class site_postfix::mx::reserved_aliases {
postfix::mailalias {
[ 'postmaster', 'hostmaster', 'domainadmin', 'certmaster', 'ssladmin',
'arin-admin', 'administrator', 'webmaster', 'www-data', 'www',
'nobody', 'sys', 'postgresql', 'mysql', 'bin', 'cron', 'lp', 'games',
'maildrop', 'abuse', 'noc', 'security', 'usenet', 'news', 'uucp',
- 'ftp':
+ 'ftp' ]:
ensure => present,
recipient => 'root'
}
diff --git a/puppet/modules/site_postfix/manifests/satellite.pp b/puppet/modules/site_postfix/manifests/satellite.pp
new file mode 100644
index 00000000..de20b667
--- /dev/null
+++ b/puppet/modules/site_postfix/manifests/satellite.pp
@@ -0,0 +1,11 @@
+class site_postfix::satellite {
+
+ $root_mail_recipient = hiera ('contacts')
+ $mail = hiera ('mail')
+ $relayhost = $mail['smarthost']
+
+ class { '::postfix::satellite':
+ relayhost => $relayhost,
+ root_mail_recipient => $root_mail_recipient
+ }
+}