ansible/roles/common/templates/vm_service.j2
2023-09-25 10:40:20 +02:00

19 lines
472 B
Django/Jinja

{# Updated: 2023-09-25 #}
# master: {{ common_mastering }}
# updated: {{ ansible_date_time.date }}
[Unit]
Description=VM Start/Stop Notifications
After=network.target docker.service
After=systemd-networkd-wait-online@{{ ethernet_interface }}.service
RequiresMountsFor=/opt/scripts
[Service]
Type=oneshot
ExecStart=bash /opt/scripts/ntfy.sh -t "vm" -m "START"
ExecStop=bash /opt/scripts/ntfy.sh -t "vm" -m "STOP"
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target