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

Remove resolv.conf after purging resolvconf #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oonska
Copy link

@oonska oonska commented Aug 16, 2017

If there is an existing symlink to resolv.conf then the file.managed
state will fail. Here we resolve that by destroying the resolv.conf
file if we remove resolvconf.

If there is an existing symlink to resolv.conf then the file.managed
state will fail. Here we resolve that by destroying the resolv.conf
file if we remove resolvconf.
@aboe76
Copy link
Member

aboe76 commented Aug 16, 2017

@oonska I understand the issue, but removing the symlink won't it render the system unusable?

@0xf10e
Copy link

0xf10e commented Aug 17, 2017

Not if you replace it with a proper resolv.conf after removing the symlink but at a quick glance I can't see the PR taking care of that.

@oonska
Copy link
Author

oonska commented Aug 17, 2017

The next state 'resolv-file' will create the /etc/resolv.conf file after we remove the symlink in 'remove-symlink'.
The file removal and replacement only happens when we uninstall resolvconf.
As far as name resolution goes this will work provided that resolvconf is the only utility managing the resolv.conf file.

@aabouzaid
Copy link
Member

I think a better way to do that is just adding:
- follow_symlinks: False

So no need to remove the symlink then create it, but it will be overwritten.
That what I did in resolver.ng formula to deal with that.

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

Successfully merging this pull request may close these issues.

5 participants