From e09f986749590125fa59bac9607b66ac5605d075 Mon Sep 17 00:00:00 2001
From: Jan Philipp Timme <jan.philipp@timme.it>
Date: Wed, 29 Dec 2021 11:15:06 +0100
Subject: [PATCH] Add workaround for Debian 9

---
 hshbase/systemd-resolved/init.sls | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/hshbase/systemd-resolved/init.sls b/hshbase/systemd-resolved/init.sls
index 64a8829..86d7bf6 100644
--- a/hshbase/systemd-resolved/init.sls
+++ b/hshbase/systemd-resolved/init.sls
@@ -21,3 +21,18 @@ hsh_override_resolveconf_with_symlink:
     - force: True
     - require:
       - service: hsh_enable_and_restart_systemd_resolved
+
+{% if grains['oscodename'] == 'stretch' %}
+hsh_override_resolveconf_with_symlink:
+  file.managed:
+    - name: /run/systemd/resolve/stub-resolv.conf
+    - require:
+      - service: hsh_enable_and_restart_systemd_resolved
+    - content: |
+        # This file is managed by Salt.
+        # Welcome to the Debian 9 sadness. This file is a workaround.
+        # With Debian 10, systemd-resolved should replace this.
+        ########
+        nameserver 127.0.0.53
+        options edns0
+{% endif %}
-- 
GitLab