fix noresolv

This commit is contained in:
itdoginfo
2022-11-06 11:59:10 +04:00
parent 8187ccb9f4
commit 74168ed0d7

View File

@@ -353,20 +353,16 @@
line: "server_names = ['google', 'cloudflare', 'scaleway-fr', 'yandex']" line: "server_names = ['google', 'cloudflare', 'scaleway-fr', 'yandex']"
when: check_server_names.stdout when: check_server_names.stdout
- name: edit dhcp config. resolvfile commented
lineinfile:
path: /etc/config/dhcp
regexp: "option resolvfile"
line: " #option resolvfile '/tmp/resolv.conf.auto'"
- name: edit dhcp config. add localhost server - name: edit dhcp config. add localhost server
lineinfile: lineinfile:
path: /etc/config/dhcp path: /etc/config/dhcp
insertafter: "#option resolvfile" firstmatch: "true"
insertafter: "option leasefile '/tmp/dhcp.leases'"
line: "{{ item }}" line: "{{ item }}"
with_items: with_items:
- " list server '127.0.0.53#53'" - " list server '127.0.0.53#53'"
- " list server '/pool.ntp.org/208.67.222.222'" - " list server '/pool.ntp.org/208.67.222.222'"
- " option noresolv '1'"
- name: enable and start dnscrypt-proxy - name: enable and start dnscrypt-proxy
service: service: