Ansible role te define the content of the /etc/resolv.conf file
No requrements are needed for this roles
Define in a group_vars file or in a ./vars/resolv.conf.yml file define the following variables e.g.:
resolv_dns_domain: 'cloudalbania.com'
resolv_searchpath: ['cloudalbania.com', 'cloudalbania.local']
resolv_options:
- "rotate"
- "timeout:2"
- "attempts:2
resolv_dns_server:
- 8.8.8.8
- 8.8.4.4
Variables are defined here.
No dependecies, tested on CentOs 7.
This is a sample playbook:
- hosts: all
vars_files:
- ./vars/resolv.conf.yml
roles:
- { role: besmirzanaj.ansible_resolv_conf }
CC-BY-4.0
This role was created in 2020 by Besmir Zanaj.