Add Consul templates

This commit is contained in:
2026-02-04 10:00:18 -06:00
parent cbc3e161da
commit 934cef544a
+48
View File
@@ -0,0 +1,48 @@
# {{ ansible_managed }}
# Consul Agent Configuration
datacenter = "{{ consul_datacenter }}"
data_dir = "{{ consul_data_dir }}"
log_level = "{{ consul_log_level }}"
# Network configuration
bind_addr = "{{ consul_bind_addr }}"
client_addr = "{{ consul_client_addr }}"
# Cluster join configuration
{% if consul_retry_join | length > 0 %}
retry_join = {{ consul_retry_join | to_json }}
{% endif %}
# Encryption
{% if consul_encrypt_key != "" %}
encrypt = "{{ consul_encrypt_key }}"
{% endif %}
# DNS configuration
domain = "{{ consul_domain }}"
ports {
http = {{ consul_ports.http }}
https = {{ consul_ports.https }}
grpc = {{ consul_ports.grpc }}
dns = {{ consul_ports.dns }}
}
# UI
ui_config {
enabled = {{ consul_ui_enabled | lower }}
}
# Performance tuning for small clusters
performance {
raft_multiplier = 1
}
# Enable local script checks
enable_local_script_checks = true
# Service mesh (Connect)
connect {
enabled = true
}