Skip to content

Mynetworks value in init.pp is not applied #371

Description

@pier4r

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions