now with notify

This commit is contained in:
2023-11-21 23:45:29 +01:00
parent 3d27a0ee04
commit 58d318faee
4 changed files with 51 additions and 9 deletions

View File

@@ -10,6 +10,7 @@
service_target_dir: /etc/systemd/system/
# adapt to taste
own_image_percent: 90
recipient: "???"
tasks:
- name: Pull the latest version of the code

View File

@@ -6,8 +6,11 @@ Type=oneshot
User={{ ansible_user }}
WorkingDirectory={{ code_dest }}
ExecStart=python main.py
Environment="OWN_IMAGE_PERCENT={{ own_image_percent }}"
Environment="OWN_IMAGE_PERCENT={{ own_image_percent }}"#
Environment="RECIPIENT={{ recipient }}"
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
# this ensures that the service is started after the network is up (@reboot)