diff options
author | mh <mh@immerda.ch> | 2012-02-16 16:51:56 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2012-02-16 16:51:56 +0100 |
commit | 77578b93bd98bf0bf9cf69e4fa8da75dcf9c236d (patch) | |
tree | c0ce83a00c9c6220b4bdddd1d5781e86b7ce2e48 /manifests/transport.pp | |
parent | 5108973b37903047b8b17fbe54313cb4b6ea114f (diff) | |
download | puppet-postfix-77578b93bd98bf0bf9cf69e4fa8da75dcf9c236d.tar.gz puppet-postfix-77578b93bd98bf0bf9cf69e4fa8da75dcf9c236d.tar.bz2 |
put classes and defines in the proper place
To take advantage of puppet's autoloading feature, which will be
mandatory sooner or later. We move all the files in their appropriate
place.
Diffstat (limited to 'manifests/transport.pp')
-rw-r--r-- | manifests/transport.pp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/manifests/transport.pp b/manifests/transport.pp new file mode 100644 index 0000000..5ca5554 --- /dev/null +++ b/manifests/transport.pp @@ -0,0 +1,44 @@ +/* +== Definition: postfix::transport + +Manages content of the /etc/postfix/transport map. + +Parameters: +- *name*: name of address postfix will lookup. See transport(5). +- *destination*: where the emails will be delivered to. See transport(5). +- *ensure*: present/absent, defaults to present. + +Requires: +- Class["postfix"] +- Postfix::Hash["/etc/postfix/transport"] +- Postfix::Config["transport_maps"] +- common::line (from module common) + +Example usage: + + node "toto.example.com" { + + include postfix + + postfix::hash { "/etc/postfix/transport": + ensure => present, + } + postfix::config { "transport_maps": + value => "hash:/etc/postfix/transport" + } + postfix::transport { "mailman.example.com": + ensure => present, + destination => "mailman", + } + } + +*/ +define postfix::transport ($ensure="present", $destination) { + line {"${name} ${destination}": + ensure => $ensure, + file => "/etc/postfix/transport", + line => "${name} ${destination}", + notify => Exec["generate /etc/postfix/transport.db"], + require => Package["postfix"], + } +} |