ansible-common/tasks/dns.yml

16 lines
437 B
YAML
Raw Normal View History

# 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