dns_resolver_conf/README.md

75 lines
1.9 KiB
Markdown
Raw Normal View History

dns_resolver_conf
2023-03-20 21:48:29 +00:00
=========
> This repository is only a mirror. Development and testing is done on a private gitea server.
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
This role configures dns resolvers on **debian-based** distributions.
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
Requirements
------------
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
None.
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
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.
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
```yaml
dns_resolv_conf_disable_resolvectl: false # by default, set to false
2023-03-20 20:00:20 +00:00
```
2023-03-20 21:48:29 +00:00
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.
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
```yaml
dns_resolv_conf_path: '/etc'
```
This variable defines the path where the resolv.conf fie should be copied.
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
```yaml
dns_resolv_conf_nameservers: []
```
This variable is the list of nameservers to configure on the host.
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
```yaml
dns_resolv_conf_domain: ""
```
This variable sets the domain field in resolv.conf.
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
```yaml
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.
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
```yaml
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.
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
```yaml
dns_resolv_conf_options: []
```
This variable sets the options to pass in resolv.conf, like `rotate`, etc...
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
Dependencies
------------
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
None.
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
Example Playbook
----------------
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
```yaml
# calling the role inside a playbook with either the default or group_vars/host_vars
- hosts: servers
roles:
- ednxzu.dns_resolver_conf
```
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
License
-------
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
MIT / BSD
2023-03-20 20:00:20 +00:00
2023-03-20 21:48:29 +00:00
Author Information
------------------
2023-03-20 20:00:20 +00:00
This role was created by Bertrand Lanson in 2023.