ansible-debops-infrastructure

DebOps and Ansible scripts to manage my infrastructure
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

cron.yml (829B)


      1 ---
      2 
      3 cron__host_jobs:
      4   "purge_old_media":
      5     user: "root"
      6     jobs:
      7       - name: "Purge old Synapse media"
      8         job: "curl --header 'Authorization: Bearer {{ synapse__admin_auth_token }}' -X POST {{ ansible_host }}:8008/_synapse/admin/v1/purge_media_cache?before_ts=`date --date='-1 days' +\\%s\\%3N`"
      9     special_time: "daily"
     10   "cleanup_room_history":
     11     user: "root"
     12     jobs:
     13       - name: "Delete events for room 1"
     14         job: "curl --header 'Authorization: Bearer {{ synapse__admin_auth_token }}' -X POST -H 'Content-Type: application/json' {{ ansible_host }}:8008/_synapse/admin/v1/purge_history/{{ lookup('password', secret + '/credentials/productionmatrix/synapse/room_id_1') }} -d \"{\\\"delete_local_events\\\": true, \\\"purge_up_to_ts\\\": $(date --date='-10 days' +\\%s\\%3N)}\""
     15     special_time: "daily"