Commit b3ce7b50 authored by Raphaël Pinson's avatar Raphaël Pinson
Browse files

Support nexthop in postfix::transport (since this was removed by migrating to augeas)

parent 2b8b59ad
......@@ -33,6 +33,7 @@
#
define postfix::transport (
$destination,
$nexthop='',
$file='/etc/postfix/transport',
$ensure='present'
) {
......@@ -40,12 +41,21 @@ define postfix::transport (
case $ensure {
'present': {
if ($nexthop) {
$changes = [
"set pattern[. = '${name}'] '${name}'",
"set pattern[. = '${name}']/transport '${destination}'",
# TODO: support nexthop
"set pattern[. = '${name}']/nexthop '${nexthop}'",
]
} else {
$changes = [
"set pattern[. = '${name}'] '${name}'",
"set pattern[. = '${name}']/transport '${destination}'",
# TODO: support nexthop
"clear pattern[. = '${name}']/nexthop",
]
}
}
'absent': {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment