From 74168ed0d736ff93daec3075d1641f3fdb5f3ee6 Mon Sep 17 00:00:00 2001 From: itdoginfo Date: Sun, 6 Nov 2022 11:59:10 +0400 Subject: [PATCH] fix noresolv --- playbooks/hirkn.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/playbooks/hirkn.yml b/playbooks/hirkn.yml index 2e18377..67586c8 100644 --- a/playbooks/hirkn.yml +++ b/playbooks/hirkn.yml @@ -352,21 +352,17 @@ regexp: "# server_names =" line: "server_names = ['google', 'cloudflare', 'scaleway-fr', 'yandex']" 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 lineinfile: path: /etc/config/dhcp - insertafter: "#option resolvfile" + firstmatch: "true" + insertafter: "option leasefile '/tmp/dhcp.leases'" line: "{{ item }}" with_items: - " list server '127.0.0.53#53'" - " list server '/pool.ntp.org/208.67.222.222'" + - " option noresolv '1'" - name: enable and start dnscrypt-proxy service: