aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/nomad
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/nomad')
-rw-r--r--ansible/roles/nomad/templates/nomad.hcl.j24
1 files changed, 3 insertions, 1 deletions
diff --git a/ansible/roles/nomad/templates/nomad.hcl.j2 b/ansible/roles/nomad/templates/nomad.hcl.j2
index 8d62d9b..b39a96b 100644
--- a/ansible/roles/nomad/templates/nomad.hcl.j2
+++ b/ansible/roles/nomad/templates/nomad.hcl.j2
@@ -1,3 +1,5 @@
+datacenter = "{{ datacenter }}"
+
addresses {
http = "0.0.0.0"
rpc = "0.0.0.0"
@@ -14,7 +16,7 @@ data_dir = "/var/lib/nomad"
server {
enabled = true
- bootstrap_expect = 3
+ bootstrap_expect = {{ groups['cluster_nodes']|length }}
}
consul {