Commit 2c295cb0 authored by cruelsmith's avatar cruelsmith
Browse files

Replace pick_default with lest function

Because pick_default converts undef to an empty string we need to use
lest here as a work around.
https://tickets.puppetlabs.com/browse/MODULES-6534
For datatype consistency we also change it in the manifests/mta.pp.
parent f65b39ad
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -41,9 +41,9 @@ class postfix::mta (
  $_mydestination = pick($mydestination, $postfix::mydestination)
  $_mynetworks = pick($mynetworks, $postfix::mynetworks)
  $_relayhost = pick($relayhost, $postfix::relayhost)
  $_masquerade_classes    = pick_default($masquerade_classes, $postfix::masquerade_classes)
  $_masquerade_domains    = pick_default($masquerade_domains, $postfix::masquerade_domains)
  $_masquerade_exceptions = pick_default($masquerade_exceptions, $postfix::masquerade_exceptions)
  $_masquerade_classes    = $masquerade_classes.lest || { $postfix::masquerade_classes }
  $_masquerade_domains    = $masquerade_domains.lest || { $postfix::masquerade_domains }
  $_masquerade_exceptions = $masquerade_exceptions.lest || { $postfix::masquerade_exceptions }

  # If direct is specified then relayhost should be blank
  if ($_relayhost == 'direct') {
+3 −3
Original line number Diff line number Diff line
@@ -40,9 +40,9 @@ class postfix::satellite (
  $_mydestination = pick($mydestination, $postfix::mydestination)
  $_mynetworks = pick($mynetworks, $postfix::mynetworks)
  $_relayhost = pick($relayhost, $postfix::relayhost)
  $_masquerade_classes    = pick_default($masquerade_classes, $postfix::masquerade_classes)
  $_masquerade_domains    = pick_default($masquerade_domains, $postfix::masquerade_domains)
  $_masquerade_exceptions = pick_default($masquerade_exceptions, $postfix::masquerade_exceptions)
  $_masquerade_classes    = $masquerade_classes.lest || { $postfix::masquerade_classes }
  $_masquerade_domains    = $masquerade_domains.lest || { $postfix::masquerade_domains }
  $_masquerade_exceptions = $masquerade_exceptions.lest || { $postfix::masquerade_exceptions }

  class { 'postfix::mta':
    mydestination         => $_mydestination,