adguard-home/tasks/enable-dns-bypass.yaml
changeset 226 ce33bf94045f
equal deleted inserted replaced
225:6936497313ac 226:ce33bf94045f
       
     1 ---
       
     2 
       
     3 - name: check if resolv.conf exists
       
     4   stat: path="/etc/resolv.conf"
       
     5   register: sym
       
     6 
       
     7 - name: replace systemd-resolved conf link
       
     8   become: yes
       
     9   file:
       
    10     src:  "../run/systemd/resolve/stub-resolv.conf"
       
    11     dest: "/etc/resolv.conf"
       
    12     state: "link"
       
    13   when: sym.stat.islnk is defined and not sym.stat.islnk
       
    14 
       
    15 - name: enable systemd-resolved service
       
    16   become: yes
       
    17   systemd: name="systemd-resolved.service" enabled="yes" state="started"