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

Searching for a possibility the just delete ALL OTHER config entries and only keep the ones I defined. #399

Open
realvinx opened this issue Aug 22, 2024 · 0 comments

Comments

@realvinx
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 7.31
  • Ruby: ruby-2.7.8-139
  • Distribution: AlmaLinux 9.4
  • Module version: puppet-postfix (v2.0.0)

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

I use hiera and create_resources to use the defined_types.
When you have existing entries in a config file, f.e. main.cf or transport etc. I see no possibility to purge all that I don't have defined.

What are you seeing

It does not delete existing entries in configfiles that are not defined.
I guess it's because it uses augeas which only sets config parameters one by one and not the whole file.

What behaviour did you expect instead

I can delete entries I don't want with ensure=absent, but I don't "know" what is already defined on the target machine.
I can't really set all other parameters to absent, I'm searching for a possibility the just delete ALL OTHER entries and only keep the ones I defined.
Looking for an equivalent to the purge directories feature.
I want to ensure that only my config is deployed and not just added, at the moment puppet just adds or changes config entries but won't delete existing config lines.

Output log

Any additional information you'd like to impart

Not really an issue, just looking for ideas how to achieve this.

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

1 participant