Ansible role configure the dns resolver (/etc/resolv.conf) on debian-based systems. https://ednz.fr
Go to file
Bertrand Lanson d364c79650
Some checks failed
test / Linting (push) Successful in 6s
test / Molecule tests (default, debian12) (push) Failing after 28s
test / Molecule tests (default, debian11) (push) Successful in 33s
test / Molecule tests (default, ubuntu2004) (push) Successful in 34s
test / Molecule tests (with_custom_config, debian12) (push) Failing after 27s
test / Molecule tests (with_custom_config, debian11) (push) Successful in 33s
test / Molecule tests (default, ubuntu2204) (push) Successful in 39s
test / Molecule tests (with_custom_config, ubuntu2004) (push) Successful in 35s
test / Molecule tests (with_custom_config, ubuntu2204) (push) Successful in 34s
move to gitea actions, support debian12
2023-06-29 22:23:09 +02:00
.gitea/workflows move to gitea actions, support debian12 2023-06-29 22:23:09 +02:00
.github/workflows publish role 2023-03-20 23:29:46 +01:00
defaults quick win 2023-03-20 22:48:29 +01:00
files remove lint from molecule, it has been removed in new release 2023-04-26 22:06:00 +02:00
handlers quick win 2023-03-20 22:48:29 +01:00
meta move to gitea actions, support debian12 2023-06-29 22:23:09 +02:00
molecule migrated tests to ansible from testinfra ahead of deprecation 2023-05-26 22:11:11 +02:00
tasks moved from systemd task to service for setting up systemd-resolved 2023-03-20 23:37:11 +01:00
templates remove lint from molecule, it has been removed in new release 2023-04-26 22:06:00 +02:00
vars quick win 2023-03-20 22:48:29 +01:00
.ansible-lint quick win 2023-03-20 22:48:29 +01:00
.gitignore ignore .vscode 2023-05-21 20:14:08 +02:00
.yamllint quick win 2023-03-20 22:48:29 +01:00
LICENSE move to gitea actions, support debian12 2023-06-29 22:23:09 +02:00
README.md move to gitea actions, support debian12 2023-06-29 22:23:09 +02:00

dns_resolver_conf

This repository is only a mirror. Development and testing is done on a private gitea server.

This role configures dns resolvers on debian-based distributions.

Requirements

None.

Role Variables

Available variables are listed below, along with default values. A sample file for the default values is available in default/dns_resolver_conf.yml.sample in case you need it for any group_vars or host_vars configuration.

dns_resolv_conf_disable_resolvectl: false # by default, set to false

This variable determines if systemd-resolved should be kept enabled/started or not. On some systems, like dns servers, it can interfere with the actual server, and disabling it might be a good idea.

dns_resolv_conf_path: '/etc'

This variable defines the path where the resolv.conf fie should be copied.

dns_resolv_conf_nameservers: []

This variable is the list of nameservers to configure on the host.

dns_resolv_conf_domain: ""

This variable sets the domain field in resolv.conf.

dns_resolv_conf_search: []

This variable is a list of all the search domains. Ideally, only one of dns_resolv_conf_domain or dns_resolv_conf_search should be specified. The other should be left untouched.

dns_resolv_conf_sortlist: []

This variable sets the sortlist option for resolv.conf. This option is a bit obsolete, and is here only for completeness of the config.

dns_resolv_conf_options: []

This variable sets the options to pass in resolv.conf, like rotate, etc...

Dependencies

None.

Example Playbook

# calling the role inside a playbook with either the default or group_vars/host_vars
- hosts: servers
  roles:
    - ednxzu.dns_resolver_conf

License

MIT / BSD

Author Information

This role was created by Bertrand Lanson in 2023.