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 check for /etc/resolvconf.conf #525

Closed
wants to merge 1 commit into from

Conversation

jerzerisz
Copy link
Contributor

add option to diable /etc/resolvconf.conf update

ansible facts /etc/os_release /etc/debian_version don't differentiate debian vrs raspberrypi os, so test if /etc/resolvconf.conf file exists and update if it exists

Fixes #520
tested deploying on debian 11.7 micropc and raspberrypi os 20230214 rpi 4b 4g

add option to diable /etc/resolvconf.conf update
@geerlingguy
Copy link
Owner

Could we instead just have a variable like resolvconf_file_path and let the user override it? So instead of hardcoding /etc/resolvconf.conf, we could have resolvconf_file_path: /etc/resolvconf.conf, and Debian users could set that to resolvconf_file_path: /etc/resolve.conf.

@jerzerisz
Copy link
Contributor Author

I started with the config to disable it, but then figured out checking if the file exists. And I left that option in because it' was useful to run multiple ad block DNS containers for testing.

I looked into something like that, unfortunately they aren't the same file/format, and are usually externally managed.

on Raspberry pi OS resolvconf regenerates /etc/resolve.conf based on /etc/resolveconf.conf as well as integrate with dnsmasq/pdnsd/unbound and other name services.

On Debian NetworkManager configures /etc/resolv.conf
On Ubuntu systemd-resolved manages it.

Looking at the ansible NetworkManager module: https://docs.ansible.com/ansible/latest/collections/community/general/nmcli_module.html

I don't see a way to just add a DNS server.

Copy link

This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@github-actions github-actions bot added the stale label Nov 20, 2023
Copy link

This pr has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

@github-actions github-actions bot closed this Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ansible regenerate resolveconf file fails
2 participants