ansible-roles/roles/timers/defaults/main.yml
2021-12-01 19:13:34 +01:00

38 lines
975 B
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
system_timers_base: []
system_timers_extra: []
system_timers: "{{ system_timers_base + system_timers_extra }}"
# Default settings, if not specified for a timer
system_timer_defaults:
description: System timer managed by ansible
calendar: daily
persistent: False
enabled: True
user: root
max_duration: 0
# Define systemd timers
# system_timers:
# - id: vaccuum-db
# calendar: weekly
# enabled: True
# user: postgres
# command: |
# #!/bin/bash -e
# start=`date +%s`
# echo "Start purging data older than ${RETENTION_TIME_IN_DAYS} days"
# psql -U postgres -d exchangeStatusDB << EOF
#   delete
#   from tracking
#   where timestamp < now()-'${RETENTION_TIME_IN_DAYS} day'::interval;
# EOF
# end=`date +%s`
# echo Purge ended and take `expr $end - $start` seconds.
#
# - id: dump
# calendar: daily
# command: |
# mysqldump --all-databases > /opt/backup/mysql.sql