Skip to content

Module fails with blank mydestination on a satellite #339

@jchonig

Description

@jchonig

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 7 aio
  • Ruby:
  • Distribution: Ubuntu 20.04/22.04
  • Module version: 3.0.0

How to reproduce (e.g Puppet code you use)

This should be a minimal configuration that will recreate the issue.

class {'::postfix':
  satellite => true,
  relayhost => $relayhost,
  masquerade_domains => [
    $masquerade_domain,
  ],
}

What are you seeing

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, pick(): must receive at least one non empty value (file: /etc/puppetlabs/code/environments/postfix/modules/postfix/manifests/satellite.pp, line: 40, column: 21) on node

What behaviour did you expect instead

Setting $mydestination to an empty value w/o a puppet Evaluation Error

Output log

See above

Any additional information you'd like to impart

I'm trying to configure a satellite relay with no local delivery, hence setting mydestination to an empty string. This causes the pick() command to fail as I have not specified satellite::mydestination. It seems that this is not a good use of pick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions