adguard-home/tasks/enable-dns-bypass.yaml
author Luke Hoersten <luke@hoersten.org>
Mon, 07 Oct 2024 23:31:51 -0500
changeset 239 c3e3169399a8
parent 226 ce33bf94045f
permissions -rw-r--r--
Updated java version and disabled geyser due to too old jde.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
226
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: check if resolv.conf exists
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  stat: path="/etc/resolv.conf"
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  register: sym
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
- name: replace systemd-resolved conf link
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
  become: yes
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
  file:
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
    src:  "../run/systemd/resolve/stub-resolv.conf"
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
    dest: "/etc/resolv.conf"
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
    state: "link"
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
  when: sym.stat.islnk is defined and not sym.stat.islnk
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
- name: enable systemd-resolved service
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
  become: yes
ce33bf94045f Added optional admin-local DNS bypass.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
  systemd: name="systemd-resolved.service" enabled="yes" state="started"