resolv
Ansible role: resolv
This role generates custom /etc/resolv.conf
for quick and smart DNS setup during configuration management.
The role is primarily used as a dependency for other roles in the environment which doesn't have stable dns resolver configuration.
For example when testing local dns server setup, this role can be used as temporary resolv configuration for installing dependencies.
Optionally it can lock the /etc/resolv.conf
file by changing it's i
file attribute.
Requirements
One of the following OS (or deriviatives):
- Debian (Raspberry Pi OS, Raspbian, Minibian)
- all
Role Variables
Variables | Description | Default |
---|---|---|
resolv_nameservers |
The list of dns resolvers to be added to /etc/resolv.conf |
9.9.9.9 |
resolv_lock |
Whether or not to lock the /etc/resolv.conf . Useful when setting up the dns resolver which uses DHCP but does not need to use DNS resolver pushed by DHCP server |
no |
Dependencies
None
Example Playboouk
- hosts: rpi_3
roles:
- { role: drew1kun.resolv, resolv_nameservers: [8.8.8.8, 8.8.4.4], resolv_lock: no }
License
Author Information
Andrew Shagayev | e-mail
About
Ansible role that configures the DNS settings writing the /etc/resolv.conf and optionally locks the file.
Install
ansible-galaxy install drew1kun/ansible-role-resolv
License
mit
Downloads
42
Owner