diff --git a/hshbase/systemd-resolved/files/etc/systemd/resolved.conf b/hshbase/systemd-resolved/files/etc/systemd/resolved.conf new file mode 100644 index 0000000000000000000000000000000000000000..fb054d244ac7c4a1f31eddb50ae2824ea7fd96ee --- /dev/null +++ b/hshbase/systemd-resolved/files/etc/systemd/resolved.conf @@ -0,0 +1,27 @@ +### THIS FILE IS MANAGED BY SALT! +### YOUR CHANGES WILL BE OVERWRITTEN! + +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# Entries in this file show the compile time defaults. +# You can change settings by editing this file. +# Defaults can be restored by simply deleting this file. +# +# See resolved.conf(5) for details + +[Resolve] +DNS= {{ hshbase['dns']|join(',') }} +#FallbackDNS= +#Domains= +#LLMNR=yes +MulticastDNS=no +#DNSSEC=allow-downgrade +#DNSOverTLS=no +Cache=no +#DNSStubListener=yes +#ReadEtcHosts=yes diff --git a/hshbase/systemd-resolved/init.sls b/hshbase/systemd-resolved/init.sls new file mode 100644 index 0000000000000000000000000000000000000000..5b6e73ea5b1159e67a4ef7569711d53770a1cee3 --- /dev/null +++ b/hshbase/systemd-resolved/init.sls @@ -0,0 +1,15 @@ +hsh_manage_systemd_resolved_config: + file.managed: + - name: /etc/systemd/resolved.conf + - source: salt://hshbase/systemd-resolved/files/etc/systemd/resolved.conf + - template: jinja + +hsh_enable_and_restart_systemd_resolved: + service.running: + - name: systemd-resolved.service + - enable: True + - restart: True + - require: + - file: hsh_manage_systemd_resolved_config + - watch: + - file: hsh_manage_systemd_resolved_config