ansible-restic/templates/restic-failure.service.j2
2025-08-12 18:38:51 +01:00

7 lines
275 B
Django/Jinja

[Unit]
Description=Restic backup failure
[Service]
Type=oneshot
User={{ restic_user }}
ExecStartPre=/bin/sh -c 'curl -X POST -H "Content-Type: application/json" -d "{\"text\": \"Restic backup service failed on {{ inventory_hostname }}!\"}" {{ restic_failure_webhook_url }}'