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