Add Nomad templates

This commit is contained in:
2026-02-04 10:00:32 -06:00
parent 3917db49a5
commit 4c9309b19a
+45
View File
@@ -0,0 +1,45 @@
# {{ ansible_managed }}
# Nomad Agent Configuration
datacenter = "{{ nomad_datacenter }}"
region = "{{ nomad_region }}"
data_dir = "{{ nomad_data_dir }}"
log_level = "{{ nomad_log_level }}"
bind_addr = "{{ nomad_bind_addr }}"
# Advertise addresses
advertise {
http = "{{ ansible_default_ipv4.address }}:4646"
rpc = "{{ ansible_default_ipv4.address }}:4647"
serf = "{{ ansible_default_ipv4.address }}:4648"
}
# Consul integration
consul {
address = "{{ nomad_consul_address }}"
auto_advertise = {{ nomad_consul_auto_advertise | lower }}
server_auto_join = {{ nomad_consul_server_auto_join | lower }}
client_auto_join = {{ nomad_consul_client_auto_join | lower }}
# Service registration
server_service_name = "nomad"
client_service_name = "nomad-client"
}
{% if nomad_vault_enabled %}
# Vault integration
vault {
enabled = true
address = "{{ nomad_vault_address }}"
}
{% endif %}
# Telemetry (for Prometheus)
telemetry {
collection_interval = "10s"
disable_hostname = true
prometheus_metrics = true
publish_allocation_metrics = true
publish_node_metrics = true
}