Install consul dns forwarding

This commit is contained in:
IamTheFij 2022-06-23 20:12:09 -07:00
parent 0bfdddf3ee
commit d40d585358

View File

@ -35,6 +35,18 @@
telemetry: telemetry:
prometheus_retention_time: "2h" prometheus_retention_time: "2h"
# DNS forwarding
consul_dnsmasq_enable: true
consul_dnsmasq_servers:
# TODO: use addresses of other nomad nodes?
# Maybe this can be [] to get the values from dhcp
- 1.1.1.1
- 1.0.0.1
consul_dnsmasq_bind_interfaces: true
consul_dnsmasq_listen_addresses:
# Listen only to loopback interface
- 127.0.0.1
become: true become: true
tasks: tasks:
@ -44,6 +56,9 @@
name: consul name: consul
become: true become: true
# If DNS is broken after dnsmasq, then need to set /etc/resolv.conf to something
# pointing to 127.0.0.1 and possibly restart Docker and Nomad
- name: Add values - name: Add values
block: block:
- name: Install python-consul - name: Install python-consul