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

Add possibility to specify a template for main.cf #391

Open
Rocco83 opened this issue Jun 29, 2024 · 1 comment
Open

Add possibility to specify a template for main.cf #391

Rocco83 opened this issue Jun 29, 2024 · 1 comment

Comments

@Rocco83
Copy link

Rocco83 commented Jun 29, 2024

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: any
  • Ruby: any
  • Distribution: any
  • Module version: latest

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

One of the widely used postfix module is going to be deprecated soon.
https://forge.puppet.com/modules/dhoppe/postfix/readme
There is one parameter that can be set to template the main.cf file: $config_file_template
Configure the module to use of a template for main.cf file

What are you seeing

The voxpupuli module does not support the template of main.cf file, while it does support master.cf

What behaviour did you expect instead

The support of main.cf template

Output log

N/A

Any additional information you'd like to impart

The support for templating master.cf exists since 2018
#91

Is there a reason for which this was not implemented also for main.cf?
Would a PR be welcome for this feature?

@smortex
Copy link
Member

smortex commented Jun 29, 2024

The module currently rely on augeas to manipulate the main configuration file. This is IMHO very fragile and often lead to broken configuration when applying major changes. Switching to a template would indeed be a major backwards incompatible change but AFAIAC, would be a move in the right direction: augeas is fine for amateur configuration management with orchestration tools like ansible, but I would expect puppet modules to produce deterministic and reproducible configurations. A "production grade" module should not do "soft" configuration (ensure at minimum the manifest config is present in a configuration file) but "hard" configuration (ensure the configuration match exactly what the manifest says).

So 👍 for me!

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