module-postfix/manifests/mailalias.pp
2013-01-25 14:03:24 -02:00

32 lines
639 B
Puppet

/*
== 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']
}
}