move the remaining virtualdomains to the mailrelay class
authorPeter Palfrader <peter@palfrader.org>
Sun, 22 Sep 2019 10:26:01 +0000 (12:26 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sun, 22 Sep 2019 10:26:01 +0000 (12:26 +0200)
modules/exim/manifests/init.pp
modules/exim/manifests/mailrelay.pp
modules/exim/templates/virtualdomains-mailrelay.erb [new file with mode: 0644]
modules/exim/templates/virtualdomains.erb [deleted file]

index 4510362..92fdc18 100644 (file)
@@ -46,12 +46,6 @@ class exim (
 
   Package['exim4-daemon-heavy']->Mailalias<| |>
 
-  concat::fragment { 'virtual_domain_template':
-    target  => '/etc/exim4/virtualdomains',
-    content => template('exim/virtualdomains.erb'),
-    order   => '05',
-  }
-
   service { 'exim4':
     ensure  => running,
     require => [
index 4296d3c..9d0f625 100644 (file)
@@ -10,7 +10,10 @@ class exim::mailrelay {
       @hourly  root if [ ! -d /etc/exim4/email-virtualdomains ]; then cd /etc/exim4 && git clone mail-git:email-virtualdomains ; fi && cd /etc/exim4/email-virtualdomains && git pull --quiet --ff-only
       | EOF
   }
-
+  concat::fragment { 'virtual_domain_template':
+    target  => '/etc/exim4/virtualdomains',
+    content => template('exim/virtualdomains-mailrelay.erb'),
+  }
 
   concat { '/etc/exim4/manualroute':
     mode           => '0444',
diff --git a/modules/exim/templates/virtualdomains-mailrelay.erb b/modules/exim/templates/virtualdomains-mailrelay.erb
new file mode 100644 (file)
index 0000000..066d79f
--- /dev/null
@@ -0,0 +1,20 @@
+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
+security.debian.org: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/security.debian.org
+women.debian.org: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/women.debian.org
+release.debian.org: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/release.debian.org
+ports-master.debian.org: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/ports-master.debian.org
+
+debian-ports.org: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian-ports.org
+
+debconf.org: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debconf.org
+
+debian.com: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
+debian.net: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
+debian.gr: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
+debian.us: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
+debian.es: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
+debian.eu: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
+debian.nl: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
+debian.org.tw: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
diff --git a/modules/exim/templates/virtualdomains.erb b/modules/exim/templates/virtualdomains.erb
deleted file mode 100644 (file)
index 3552473..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<% 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
-security.debian.org: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/security.debian.org
-women.debian.org: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/women.debian.org
-release.debian.org: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/release.debian.org
-ports-master.debian.org: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/ports-master.debian.org
-
-debian-ports.org: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian-ports.org
-
-debconf.org: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debconf.org
-
-debian.com: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
-debian.net: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
-debian.gr: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
-debian.us: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
-debian.es: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
-debian.eu: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
-debian.nl: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
-debian.org.tw: user=nobody group=nogroup directory=/etc/exim4/email-virtualdomains/debian.star
-<% end -%>