adguard-home/tasks/main.yaml
changeset 122 cde9702e3bff
parent 55 376bb71909a4
child 174 431c6d5e5dd4
equal deleted inserted replaced
121:6b9694f833a4 122:cde9702e3bff
    42 - name: configure adguard home
    42 - name: configure adguard home
    43   become: yes
    43   become: yes
    44   template: src="AdGuardHome.yaml.j2" dest="/etc/AdGuardHome/AdGuardHome.yaml"
    44   template: src="AdGuardHome.yaml.j2" dest="/etc/AdGuardHome/AdGuardHome.yaml"
    45   notify: restart adguard home
    45   notify: restart adguard home
    46 
    46 
       
    47 - stat: "path=/etc/resolv.conf"
       
    48   register: sym
       
    49 
       
    50 - name: replace systemd-resolved conf stub
       
    51   become: yes
       
    52   copy:
       
    53     remote_src: yes
       
    54     src:  "/run/systemd/resolve/resolv.conf"
       
    55     dest: "/etc/resolv.conf"
       
    56   when: sym.stat.islnk is defined and sym.stat.islnk
       
    57 
    47 - name: disable systemd-resolved service
    58 - name: disable systemd-resolved service
    48   become: yes
    59   become: yes
    49   systemd: name="systemd-resolved.service" enabled="no" state="stopped"
    60   systemd: name="systemd-resolved.service" enabled="no" state="stopped"
    50 
    61 
    51 - name: replace systemd-resolved conf stub
       
    52   become: yes
       
    53   file:
       
    54     src:  "/run/systemd/resolve/resolv.conf"
       
    55     dest: "/etc/resolv.conf"
       
    56     state: "link"
       
    57 
       
    58 - name: ensure adguard home is started
    62 - name: ensure adguard home is started
    59   become: yes
    63   become: yes
    60   systemd: name="AdGuardHome.service" enabled="yes" state="started"
    64   systemd: name="AdGuardHome.service" enabled="yes" state="started"