module-postfix/manifests/mailalias.pp

33 lines
639 B
ObjectPascal
Raw Normal View History

2010-09-23 19:05:57 +02:00
/*
== 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" {
2013-01-25 17:03:24 +01:00
class { 'postfix': }
2010-09-23 19:05:57 +02:00
postfix::mailalias { "postmaster":
ensure => present,
recipient => 'foo'
}
*/
define postfix::mailalias ($ensure = 'present', $recipient) {
2010-09-23 19:05:57 +02:00
mailalias { "${name}":
ensure => $ensure,
recipient => $recipient,
notify => Exec['newaliases']
}
}