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

Mynetworks value in init.pp is not applied #371

Open
pier4r opened this issue Oct 4, 2023 · 2 comments
Open

Mynetworks value in init.pp is not applied #371

pier4r opened this issue Oct 4, 2023 · 2 comments

Comments

@pier4r
Copy link

pier4r commented Oct 4, 2023

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 7.26.0
  • Ruby: 2.7.0
  • Distribution: AlmaLinux release 8.8
  • Module version: 4.3.0

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

Simply try to use in your manifest

class { 'postfix':
    mynetworks     => '127.0.0.1, 172.18.104.1, 172.17.0.1, 172.18.104.0/24',
}

What are you seeing

The mynetworks value is not set in /etc/postfix/main.cf

What behaviour did you expect instead

That the mynetworks value would be set in /etc/postfix/main.cf

I achieved the result via file_lineas follows:

file_line { 'postfix main.cf mynetworks since augeas in the postfix class does not work':
    ensure => 'present',
    path   => '/etc/postfix/main.cf',
    after  => '#mynetworks = hash:/etc/postfix/network_table',
    line   => "mynetworks = 127.0.0.1, 172.18.104.1, 172.17.0.1, 172.18.104.0/24",
}

Output log

Any additional information you'd like to impart

Maybe mynetworks shouldn't be set via init.pp, but then why is the attribute there? How can I set the networks?

@olifre
Copy link

olifre commented Oct 4, 2023

Did you enable either mta or satellite in class { 'postfix': ?
One of these must be set to true (both are false by default) for any actual setup to take place.

@pier4r
Copy link
Author

pier4r commented May 6, 2024

No I didn't, thank you (and sorry for the late answer).

In the meantime I found a workaround with configs => { mynetworks => { value => 'networks_here' }} but apparently is the lesser way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants