Fixed resolv.conf in adguard role.
authorLuke Hoersten <luke@hoersten.org>
Thu, 09 Jul 2020 18:49:48 -0500
changeset 122 cde9702e3bff
parent 121 6b9694f833a4
child 123 e8d0308b94b2
Fixed resolv.conf in adguard role.
adguard-home/tasks/main.yaml
pleroma/otp/tasks/main.yaml
--- a/adguard-home/tasks/main.yaml	Wed Jul 08 15:46:28 2020 -0500
+++ b/adguard-home/tasks/main.yaml	Thu Jul 09 18:49:48 2020 -0500
@@ -44,17 +44,21 @@
   template: src="AdGuardHome.yaml.j2" dest="/etc/AdGuardHome/AdGuardHome.yaml"
   notify: restart adguard home
 
+- stat: "path=/etc/resolv.conf"
+  register: sym
+
+- name: replace systemd-resolved conf stub
+  become: yes
+  copy:
+    remote_src: yes
+    src:  "/run/systemd/resolve/resolv.conf"
+    dest: "/etc/resolv.conf"
+  when: sym.stat.islnk is defined and sym.stat.islnk
+
 - name: disable systemd-resolved service
   become: yes
   systemd: name="systemd-resolved.service" enabled="no" state="stopped"
 
-- name: replace systemd-resolved conf stub
-  become: yes
-  file:
-    src:  "/run/systemd/resolve/resolv.conf"
-    dest: "/etc/resolv.conf"
-    state: "link"
-
 - name: ensure adguard home is started
   become: yes
   systemd: name="AdGuardHome.service" enabled="yes" state="started"
--- a/pleroma/otp/tasks/main.yaml	Wed Jul 08 15:46:28 2020 -0500
+++ b/pleroma/otp/tasks/main.yaml	Thu Jul 09 18:49:48 2020 -0500
@@ -77,8 +77,7 @@
     group: "pleroma"
   changed_when: false
 
-- name: install soapbox frontend
-  include_tasks: soapbox.yaml
+- include_tasks: soapbox.yaml
   when: pleroma_soapbox
 
 - name: configure pleroma systemd service