# XXX - used by ferm templates/defs.conf.erb
- fasolo.debian.org
mailrelay:
- # XXX - used by ferm templates/defs.conf.erb
+ # XXX - ONLY used by ferm templates/defs.conf.erb
- mailly.debian.org
- muffat.debian.org
mirrormaster:
--- /dev/null
+---
+classes:
+ - roles::mailrelay
+
+exim::is_mailrelay: true
--- /dev/null
+---
+classes:
+ - roles::mailrelay
+
+exim::is_mailrelay: true
class exim (
Boolean $is_bugsmx = false,
+ Boolean $is_mailrelay = false,
Boolean $is_rtmaster = false,
) {
- $is_mailrelay = has_role('mailrelay')
$is_packagesmaster = has_role('packagesmaster')
$is_packagesqamaster = has_role('packagesqamaster')
ensure => installed,
}
- if has_role('mailrelay') {
+ if $exim::is_mailrelay {
concat::fragment { 'puppet-crontab--email-virtualdomains':
target => '/etc/cron.d/puppet-crontab',
content => @(EOF)
routes = []
extraroutes = []
-if scope.function_has_role(['mailrelay'])
+if @is_mailrelay
mxmatches << 'mailout.debian.org'
mxmatches << 'INCOMING-MX'
extraroutes = [ ]
end
vdoms
%>
-<% if classes.include?("roles::mailrelay") -%>
+<% if @is_mailrelay -%>
debian.org: user=nobody group=Debian directory=/etc/exim4/email-virtualdomains/debian.org
admin.debian.org: user=mail_admin group=mail_admin directory=/etc/exim4/email-virtualdomains/admin.debian.org
ftp-master.debian.org: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/ftp-master.debian.org
include roles::syncproxy
}
- if has_role('mailrelay') {
- include roles::mailrelay
- }
-
if has_role('dns_primary') {
include roles::dns_primary
}
# include roles::mailrelay
#
class roles::mailrelay {
- include roles::pubsub::parameters
+ include roles::pubsub::parameters
- $rabbit_password = $roles::pubsub::parameters::rabbit_password
+ $rabbit_password = $roles::pubsub::parameters::rabbit_password
- roles::pubsub::config { 'emailvdomains':
- key => 'dsa-emailvdomains-receive',
- exchange => dsa,
- queue => "email-${::fqdn}",
- topic => 'dsa.email.update',
- vhost => dsa,
- username => $::fqdn,
- password => $rabbit_password
- }
+ roles::pubsub::config { 'emailvdomains':
+ key => 'dsa-emailvdomains-receive',
+ exchange => dsa,
+ queue => "email-${::fqdn}",
+ topic => 'dsa.email.update',
+ vhost => dsa,
+ username => $::fqdn,
+ password => $rabbit_password
+ }
}