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

Feature: Purge main.cf from undeclared parameters #163

Closed
cedef opened this issue Jan 30, 2017 · 2 comments
Closed

Feature: Purge main.cf from undeclared parameters #163

cedef opened this issue Jan 30, 2017 · 2 comments
Labels

Comments

@cedef
Copy link

cedef commented Jan 30, 2017

I really would like the postfix config file main.cf to be purged of parameters unknown to Puppet. I like when config files are completely under Puppet control.

For now, I'm dealing with this workaround:

exec { 'clear-postfix-cfg':
  command => 'echo "### Managed by Puppet - Changes will be lost" > /etc/postfix/main.cf',
  onlyif  => 'grep "^# " /etc/postfix/main.cf',
  path    => ['/bin', '/usr/bin'],
} ->
class { 'postfix':
}

I'm able to implement this feature, but I'm not sure on the simplest/cleanest way to do it and would be glad to get some hints from you.

Regards,

@raphink
Copy link
Member

raphink commented Oct 19, 2018

Turning postfix::config into an augeasproviders type/provider with self.instances would make it purgeable and allow to purge all entries not managed by Puppet (using either the resources type or the purge type). Would that work for you?

@stale
Copy link

stale bot commented Apr 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 19, 2021
@stale stale bot closed this as completed Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants