hcp-ansible/roles/hashicorp_consul/templates/consul.service.j2

20 lines
563 B
Plaintext
Raw Normal View History

[Unit]
Description=Consul
Documentation=https://developer.hashicorp.com/consul/docs
Requires=network-online.target
After=network-online.target
ConditionFileNotEmpty={{ hashi_consul_config_dir }}/consul.json
[Service]
EnvironmentFile=-{{ hashi_consul_config_dir }}/consul.env
User={{ hashi_consul_user }}
Group={{ hashi_consul_group }}
ExecStart=/usr/bin/consul agent -config-dir={{ hashi_consul_config_dir }}
ExecReload=/bin/kill --signal HUP $MAINPID
KillMode=process
KillSignal=SIGTERM
Restart=on-failure
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target