From bfddf278e202580a2aed215cf767297e2604c803 Mon Sep 17 00:00:00 2001 From: vincent Date: Sat, 26 Mar 2022 11:41:13 +0100 Subject: [PATCH] add resolved-systemd template --- tasks/main.yml | 17 +++++++++++++++++ templates/resolved.conf.d/consul.conf.j2 | 4 ++++ 2 files changed, 21 insertions(+) create mode 100644 templates/resolved.conf.d/consul.conf.j2 diff --git a/tasks/main.yml b/tasks/main.yml index dcdfeac..524af28 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -28,6 +28,23 @@ mode: 0644 notify: reload consul configuration +- name: systemd consul resolution + block: + - name: create resolved.conf.d folder + file: + state: directory + path: /etc/systemd/resolved.conf.d + owner: root + group: root + mode: 0755 + - name: consul resolution file + template: + src: resolved.conf.d/consul.conf.j2 + dest: /etc/systemd/resolved.conf.d/consul.conf + owner: root + group: root + mode: 0644 + - name: configure backup block: - name: copy backup script diff --git a/templates/resolved.conf.d/consul.conf.j2 b/templates/resolved.conf.d/consul.conf.j2 new file mode 100644 index 0000000..0d939a2 --- /dev/null +++ b/templates/resolved.conf.d/consul.conf.j2 @@ -0,0 +1,4 @@ +[Resolve] +DNS=127.0.0.1:8600 +DNSSEC=false +Domains=~consul