besmirzanaj.ansible_resolv_conf

ansible_resolv_conf

Ansible role to set up the content of the /etc/resolv.conf file.

Requirements

No specific requirements for this role.

Role Variables

You can define the following variables in a group_vars file or in a ./vars/resolv.conf.yml file, for example:

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

For more information about these variables, check here.

Dependencies

No dependencies, tested on CentOS 7.

Example Playbook

Here is a sample playbook:

- hosts: all
  vars_files:
    - ./vars/resolv.conf.yml
  roles:
     - { role: besmirzanaj.ansible_resolv_conf }

License

CC-BY-4.0

Author Information

This role was created in 2020 by Besmir Zanaj.

Informazioni sul progetto

Ansible role to define /etc/resolv.conf file

Installa
ansible-galaxy install besmirzanaj.ansible_resolv_conf
Licenza
Unknown
Download
2.8k
Proprietario
Sysadmin & Netsec by day.