Private
Public Access
2
0

First version in Galaxy

This commit is contained in:
2026-01-21 15:29:56 +03:00
parent ebe4f15c0f
commit b923810fe3
79 changed files with 235 additions and 299 deletions

View File

@@ -0,0 +1,28 @@
{
"log_level": "INFO",
"domain": "{{ consul_domain }}",
"datacenter": "{{ consul_datacenter | mandatory }}",
"key_file": "{{ consul_key_file }}",
"cert_file": "{{ consul_cert_file }}",
"ca_file": "{{ consul_ca_file }}",
"verify_incoming": true,
"verify_outgoing": true,
"verify_server_hostname": true,
"encrypt": "{{ consul_secret_key }}",
"data_dir": "/opt/consul",
{% if consul_server %}
"node_name": "{{ ansible_hostname }}",
"server": true,
"ui": true,
"leave_on_terminate": true,
"client_addr": "{{ consul_client_addr }}",
"bind_addr": "{{ consul_bind_addr }}",
"advertise_addr": "{{ consul_advertise_addr }}",
"bootstrap_expect": {{ (consul_servers | length) - 1 }},
"enable_syslog": true,
"performance": {
"raft_multiplier": 1
},
{% endif %}
"retry_join": ["{{ consul_servers | join('", "') }}"]
}

View File

@@ -0,0 +1,18 @@
[Unit]
Description="HashiCorp Consul - A service mesh solution"
Documentation=https://www.consul.io/
Requires=network-online.target
After=network-online.target
ConditionFileNotEmpty=/etc/consul/config.json
[Service]
Type=notify
User=consul
Group=consul
ExecStart=/usr/local/bin/consul agent -config-file=/etc/consul/config.json
KillMode=process
Restart=on-failure
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target