griggheo / ansible-consul-template

Ansible role for installing consul-template
Apache License 2.0
54 stars 52 forks source link

fix: signal behaviour for systemd #54

Closed Dombo closed 3 years ago

Dombo commented 3 years ago

What

The systemd service file resulted in slow restarts of the service (30s+ for one service, I run this on many hosts)

Why

Wrapping consul-template in /bin/sh isn't appropriate here, if you're using it for output redirection purposes consul-template and/or systemd both have support for sinking your logs somewhere.

If it's for signal handling purposes I've addressed that by relying on ssytemd primitives to ensure the correct signals get passed to consul-template for reload and stop/restart purposes.