Minor fixes for the DHCP and DNS setup.

This commit is contained in:
Andreas B. Mundt 2021-04-10 20:59:41 +02:00 committed by Andreas B. Mundt
parent 013c250e50
commit 13993ef45e
3 changed files with 7 additions and 1 deletions

View file

@ -9,3 +9,7 @@
- name: restart tftpd-hpa
systemd: name=tftpd-hpa state=restarted enabled=yes
listen: restart tftpd-hpa
- name: restart dhcp-client
systemd: name=ifup@{{ if_wan }} state=restarted enabled=yes
listen: restart dhcp-client

View file

@ -66,6 +66,7 @@
template:
src: resolv.conf.j2
dest: /etc/resolv.conf
notify: restart isc-dhcp-server
## stop dhclient from overwriting /etc/resolv.conf:
- name: supersede dhcp client data
@ -75,6 +76,7 @@
supersede domain-search "{{ ansible_domain }}";
supersede domain-name-servers 127.0.0.1;
insertbefore: "#send dhcp-client-identifier.*"
notify: restart dhcp-client
- name: generate rndc key
command:

View file

@ -1,2 +1,2 @@
search {{ ansible_domain }}
search {{ ansible_domain }}.
nameserver 127.0.0.1