adguard-home/tasks/main.yaml
changeset 204 fd38efd8f637
parent 174 431c6d5e5dd4
child 226 ce33bf94045f
equal deleted inserted replaced
203:4be395f0d127 204:fd38efd8f637
    54     remote_src: yes
    54     remote_src: yes
    55     src:  "/run/systemd/resolve/resolv.conf"
    55     src:  "/run/systemd/resolve/resolv.conf"
    56     dest: "/etc/resolv.conf"
    56     dest: "/etc/resolv.conf"
    57   when: sym.stat.islnk is defined and sym.stat.islnk
    57   when: sym.stat.islnk is defined and sym.stat.islnk
    58 
    58 
       
    59 - name: ensure nameserver is self
       
    60   become: yes
       
    61   lineinfile:
       
    62     path: "/etc/resolv.conf"
       
    63     regexp: "^nameserver"
       
    64     line: "nameserver {{ansible_default_ipv4.address}}"
       
    65 
    59 - name: disable systemd-resolved service
    66 - name: disable systemd-resolved service
    60   become: yes
    67   become: yes
    61   systemd: name="systemd-resolved.service" enabled="no" state="stopped"
    68   systemd: name="systemd-resolved.service" enabled="no" state="stopped"
    62 
    69 
    63 - name: ensure adguard home is started
    70 - name: ensure adguard home is started