This Ansible role provides a simple and effective way to configure DNS settings on your servers. It allows you to specify a list of nameservers and updates the DNS configuration file accordingly.
MIT License
This role will help you to set new DNS servers IP for your hosts.
Ansible 2.9 or higher
nameservers
: List of DNS server IP addresses. Default is ['8.8.8.8', '8.8.4.4']
.Include the role in Playbook
- hosts: all
become: true
roles:
- role: SamanKhalife.changing_dns
to change dns ips you can change defaults/main.yml
or
just define it in your playbook
- hosts: all
become: true
roles:
- role: SamanKhalife.changing_dns
vars:
nameservers:
- 9.9.9.9
- 149.112.112.112
None
MIT