summaryrefslogtreecommitdiff
path: root/puppet/modules/postfix/manifests/mailalias.pp
diff options
context:
space:
mode:
authorMicah <micah@leap.se>2016-05-24 10:19:37 -0400
committerMicah <micah@leap.se>2016-05-24 10:19:37 -0400
commit38ac177664f763f08153239992568f1aad04c89b (patch)
tree3bb398154ea70b4320f4b4597a8aba8b83a9cf19 /puppet/modules/postfix/manifests/mailalias.pp
parent93ff36e36236542e6b2a35b0c03a69623662a298 (diff)
parent6570cad05280d8fc9c9c22a403e1dc234ca6ab25 (diff)
Merge commit '6570cad05280d8fc9c9c22a403e1dc234ca6ab25' as 'puppet/modules/postfix'
Diffstat (limited to 'puppet/modules/postfix/manifests/mailalias.pp')
-rw-r--r--puppet/modules/postfix/manifests/mailalias.pp32
1 files changed, 32 insertions, 0 deletions
diff --git a/puppet/modules/postfix/manifests/mailalias.pp b/puppet/modules/postfix/manifests/mailalias.pp
new file mode 100644
index 00000000..2f239ac3
--- /dev/null
+++ b/puppet/modules/postfix/manifests/mailalias.pp
@@ -0,0 +1,32 @@
+/*
+== Definition: postfix::mailalias
+
+Wrapper around Puppet mailalias resource, provides newaliases executable.
+
+Parameters:
+- *name*: the name of the alias.
+- *ensure*: present/absent, defaults to present.
+- *recipient*: recipient of the alias.
+
+Requires:
+- Class["postfix"]
+
+Example usage:
+
+ node "toto.example.com" {
+
+ class { 'postfix': }
+
+ postfix::mailalias { "postmaster":
+ ensure => present,
+ recipient => 'foo'
+ }
+
+*/
+define postfix::mailalias ($ensure = 'present', $recipient) {
+ mailalias { "${name}":
+ ensure => $ensure,
+ recipient => $recipient,
+ notify => Exec['newaliases']
+ }
+}