Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virt advice is wrong #343

Open
fayeg21 opened this issue Jan 10, 2023 · 0 comments
Open

virt advice is wrong #343

fayeg21 opened this issue Jan 10, 2023 · 0 comments
Labels
docs Improvements or additions to documentation

Comments

@fayeg21
Copy link

fayeg21 commented Jan 10, 2023

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet:
  • Ruby:
  • Distribution:
  • Module version: v3.0.0

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

class{'postfix':
    satellite           => false,
    mta                 => true,
    smtp_listen         => 'all',
    mynetworks          => join([lookup('my_network'),' 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128']),
    myorigin            => lookup('my_origin'),
    mydestination       => join([$facts['networking']['hostname'],', localhost.localdomain, localhost']),
    masquerade_domains  => [lookup('masquerade_domains')],
    masquerade_classes  => ['envelope_sender', 'header_sender'],
    root_mail_recipient => lookup('root_email'),
    relayhost           => 'direct',
  }

  postfix::config { 'smtp_generic_maps':
    ensure  => present,
    value   => 'hash:/etc/postfix/generic',
  }

  postfix::hash { '/etc/postfix/generic':
    ensure  => 'present',
    content => epp('profile/email/generic.epp'),
  }

  postfix::hash { '/etc/postfix/virtual':
    ensure => present,
  }

  postfix::config { 'virtual_alias_maps':
    ensure  => present,
    value   => 'hash:/etc/postfix/virtual',
  }

  postfix::virtual {'root@xxxx':
    ensure      => present,
    destination => lookup('root_email'),
  }

What are you seeing

The docs tell you to define a postfix::hash stanza but when you do (and have mta=>true) you get this error:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Postfix::Hash[/etc/postfix/virtual] is already declared at (file: /etc/puppetlabs/code/modules/postfix/manifests/mta.pp, line: 78); cannot redeclare (file: /etc/puppetlabs/code/environments/production/site/profile/manifests/email/smarthost.pp, line: 39)

What behaviour did you expect instead

No erorr when following the docs.

Output log

Any additional information you'd like to impart

@kenyon kenyon added the docs Improvements or additions to documentation label Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants