adguard-home/tasks/enable-dns-bypass.yaml
author Luke Hoersten <luke@hoersten.org>
Sat, 20 Jul 2024 13:51:46 -0500
changeset 234 f46b0f7e758c
parent 226 ce33bf94045f
permissions -rw-r--r--
Added task to ensure log2ram is running.

---

- name: check if resolv.conf exists
  stat: path="/etc/resolv.conf"
  register: sym

- name: replace systemd-resolved conf link
  become: yes
  file:
    src:  "../run/systemd/resolve/stub-resolv.conf"
    dest: "/etc/resolv.conf"
    state: "link"
  when: sym.stat.islnk is defined and not sym.stat.islnk

- name: enable systemd-resolved service
  become: yes
  systemd: name="systemd-resolved.service" enabled="yes" state="started"