-
Notifications
You must be signed in to change notification settings - Fork 6
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
/etc/resolv.conf facts #2
Comments
This is already available as an ansible fact under
|
Not exactly all of it though. We want to gather the /etc/resolv.conf similar to the structure found in this role: https://github.com/ahuffman/ansible-resolv |
I created a more extensive resolv.conf as an example and checked the ansible facts. This is what I get:
My understanding of resolv.conf is pretty basic, but does this look more like what you're trying to gather from a server? |
Yes actually. I had not noticed this was a built-in fact. It's pretty close to what I would want to gather. The only thing I do not like is the way that the options come out as a dictionary, which makes it slightly more difficult to template out, but I can work with it for the most part. I'd prefer the options to come out as a list with just: options:
- rotate
- timeout:1 Maybe a PR on the Ansible project would be a good approach for this one. |
Build a fact collector for /etc/resolv.conf that has data structure similar to https://github.com/ahuffman/ansible-resolv.
Preferably the facts would reside under ansible_facts['resolv.conf']: with dictionaries for nameservers, domain, search, and options.
The text was updated successfully, but these errors were encountered: