ansible/roles/common/templates/vm_service.j2

19 lines
472 B
Plaintext
Raw Normal View History

2023-09-25 08:40:20 +00:00
{# 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