This repository has been archived on 2023-03-15. You can view files and clone it, but cannot push or open issues or pull requests.
infrastructure/ansible/roles/nomad/templates/nomad.hcl.j2
Alex d3ada90d83 Fix nomad ip address
Remove the networ_interface parameter in nomad config
This means that nomad will now autodetect its own ip address
by looking at the default route.
Thus nodes in a LAN behind a NAT will get their LAN address,
and internet nodes will get their public address.
They won't get their VPN addresses.
This seems not to break Consul's use of VPN addresses to address
services, and fixes attr.unique.network.ip-address for DiploNAT.
2020-07-15 16:03:51 +02:00

37 lines
572 B
Django/Jinja

datacenter = "{{ datacenter }}"
addresses {
http = "0.0.0.0"
rpc = "0.0.0.0"
serf = "0.0.0.0"
}
advertise {
http = "{{ vpn_ip }}"
rpc = "{{ vpn_ip }}"
serf = "{{ vpn_ip }}"
}
data_dir = "/var/lib/nomad"
server {
enabled = true
bootstrap_expect = {{ groups['cluster_nodes']|length }}
}
consul {
address="127.0.0.1:8500"
}
client {
enabled = true
#cpu_total_compute = 4000
servers = ["127.0.0.1:4648"]
options {
docker.privileged.enabled = "true"
docker.volumes.enabled = "true"
}
#network_interface = "wgdeuxfleurs"
}