summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-10-14 17:50:04 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-10-14 17:50:04 -0300
commit0426f5e47f64c2c502815836a6a734f7c2e299de (patch)
tree331fe4420dbd7195cf22efe09b853a91be044ef9 /manifests
parent201807bf576afd286d7c0d7d31796b00ae9706b3 (diff)
downloadpuppet-exim-0426f5e47f64c2c502815836a6a734f7c2e299de.tar.gz
puppet-exim-0426f5e47f64c2c502815836a6a734f7c2e299de.tar.bz2
Aliases: support for templates and custom root recipient
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp19
1 files changed, 14 insertions, 5 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index a79a524..c877805 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -30,6 +30,8 @@ class exim(
$hide_mailname = '',
$mailname_in_oh = 'true',
$localdelivery = 'mail_spool',
+ $root_mail_recipient = 'root',
+ $aliases = 'template',
) {
package { "exim4":
ensure => present,
@@ -41,11 +43,18 @@ class exim(
}
file { "/etc/aliases":
- source => [ "puppet:///modules/site_mail/${::domain}/aliases",
- "puppet:///modules/site_mail/${::hostname}/aliases",
- "puppet:///modules/site_mail/aliases",
- "puppet:///modules/mail/aliases",
- "puppet:///modules/exim/aliases" ],
+ source => $aliases ? {
+ 'source' => [ "puppet:///modules/site_mail/${::domain}/aliases",
+ "puppet:///modules/site_mail/${::hostname}/aliases",
+ "puppet:///modules/site_mail/aliases",
+ "puppet:///modules/mail/aliases",
+ "puppet:///modules/exim/aliases" ],
+ default => undef,
+ },
+ content => $aliases ? {
+ 'template' => template('exim/aliases.erb'),
+ default => undef,
+ },
owner => "root",
group => "root",
mode => 0644,