ansible-common/tasks/dns.yml
Frank Villaro-Dixon 4b17ef07a4 add dns stuff
Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
2024-10-04 21:25:03 +02:00

16 lines
No EOL
437 B
YAML

# Set DNS server and search domain
- name: Set DNS server
ini_file:
path: /etc/systemd/resolved.conf
section: Resolve
option: DNS
value: "{{ vars.dns_servers | join(' ') }}"
notify: restart systemd-resolved
- name: Set DNS search domain
ini_file:
path: /etc/systemd/resolved.conf
section: Resolve
option: Domains
value: "{{ vars.dns_search_domains | join(' ') }}"
notify: restart systemd-resolved