ansible-roles/roles/nomad/templates/consul-template-nomad.service.j2

21 lines
547 B
Plaintext
Raw Normal View History

2022-09-02 18:00:22 +02:00
[Unit]
Description="HashiCorp consul-template"
Documentation=https://github.com/hashicorp/consul-template
Requires=network-online.target
After=network-online.target
2022-09-06 18:00:22 +02:00
Before=nomad.service
2022-09-02 18:00:22 +02:00
ConditionFileNotEmpty={{ nomad_root_dir }}/consul-template/consul-template.hcl
[Service]
Type=simple
ExecStart=/usr/local/bin/consul-template -config={{ nomad_root_dir }}/consul-template/consul-template.hcl
2022-09-06 18:00:22 +02:00
SuccessExitStatus=12
2022-09-02 18:00:22 +02:00
ExecReload=/bin/kill --signal HUP $MAINPID
KillSignal=SIGINT
Restart=on-failure
RestartSec=2
[Install]
WantedBy=multi-user.target