fix: alertmanager deprecated PIDFile= path warning
Starting from systemd 239 (commit link), it started showing warning about using deprecated path to pidfile in /var/run instead of /run.
This warning can be seen by launching command systemctl status alertmanager or sometring like journalctl -xeu alertmanager:
/etc/systemd/system/alertmanager.service:12: PIDFile= references a path below legacy directory /var/run/, updating /var/run/alertmanager.pid → /run/alertmanager.pid; please update the unit file accordingly.
Thanks!
Do you know if using /run/alertmanager.pid will cause issues on versions older than 239? Wondering if we could just use /run/ for all versions.
As far as i know, /run directory exists on systemd-based systems from 2011: https://lwn.net/Articles/436012/
Since introduction of /run, many distros implemented bind-mounting /var/run to /run or vice versa for compatibility.
I think it's safe to use /run for all supported distros.
As far as i know,
/rundirectory exists on systemd-based systems from 2011: https://lwn.net/Articles/436012/ Since introduction of/run, many distros implemented bind-mounting/var/runto/runor vice versa for compatibility. I think it's safe to use/runfor all supported distros.
Sounds good, do you mind changing it to /run/ for all versions then? Thanks.
Docs Build 📝
Thank you for contribution!✨
This PR has been merged and the docs are now incorporated into main:
https://prometheus-community.github.io/ansible/branch/main