Remove Prometheus file after 5 minutes; remove inotify dependency

This commit is contained in:
2023-11-24 20:09:18 +02:00
parent bf45b66782
commit 20cb8a5a70
2 changed files with 8 additions and 1 deletions

View File

@@ -141,3 +141,10 @@ for container_path in ${CONTAINER_PATHS[@]}; do
cd $LOCAL_DIR cd $LOCAL_DIR
done done
echo "All done!" echo "All done!"
## Once the script finishes, the .prom file will live on for 5 minutes before being deleted.
#+ This allows Prometheus to pick up the alert, send out a notification, and move on with its life.
(
sleep 300
rm $PROM_FILE
) 2>1 >/dev/null &

View File

@@ -6,7 +6,7 @@
ansible_sudo_pass: "{{ ANSIBLE_SUDO_PASS }}" ansible_sudo_pass: "{{ ANSIBLE_SUDO_PASS }}"
tasks: tasks:
- name: Install Skopeo - name: Install Dependencies
ansible.builtin.package: ansible.builtin.package:
name: skopeo name: skopeo
state: latest state: latest