ansible/roles/sdcron/templates/etc/systemd/system/sdcron.service.j2

11 lines
290 B
Django/Jinja

[Unit]
Description=Service for {{ item.name }}
OnFailure=failuremail@%N.service
# TODO: comprendre pourquoi OnSuccess n'est pas reconnu par systemd (malgré systemd.unit(5))
[Service]
Type=oneshot
ExecStart={{ item.command }}
ExecStartPost=/usr/bin/systemctl start successmail@%N.service