Install consul dns forwarding

This commit is contained in:
IamTheFij 2022-06-23 20:12:09 -07:00
parent 0bfdddf3ee
commit d40d585358
1 changed files with 15 additions and 0 deletions

View File

@ -35,6 +35,18 @@
telemetry:
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
tasks:
@ -44,6 +56,9 @@
name: consul
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
block:
- name: Install python-consul