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 @@ ...@@ -33,6 +33,7 @@
# #
define postfix::transport ( define postfix::transport (
$destination, $destination,
$nexthop='',
$file='/etc/postfix/transport', $file='/etc/postfix/transport',
$ensure='present' $ensure='present'
) { ) {
...@@ -40,12 +41,21 @@ define postfix::transport ( ...@@ -40,12 +41,21 @@ define postfix::transport (
case $ensure { case $ensure {
'present': { 'present': {
if ($nexthop) {
$changes = [
"set pattern[. = '${name}'] '${name}'",
"set pattern[. = '${name}']/transport '${destination}'",
# TODO: support nexthop
"set pattern[. = '${name}']/nexthop '${nexthop}'",
]
} else {
$changes = [ $changes = [
"set pattern[. = '${name}'] '${name}'", "set pattern[. = '${name}'] '${name}'",
"set pattern[. = '${name}']/transport '${destination}'", "set pattern[. = '${name}']/transport '${destination}'",
# TODO: support nexthop # TODO: support nexthop
"clear pattern[. = '${name}']/nexthop", "clear pattern[. = '${name}']/nexthop",
] ]
}
} }
'absent': { 'absent': {
......
Supports Markdown
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