ansible-role-orientdb/tasks/orientdb_backups.yml

22 lines
763 B
YAML

---
- name: orientdb_backups | Clean up the backups
tags: ['orientdb', 'orientdb_backup']
when: orientdb_install
block:
- name: orientdb_backups | Install a script that removes the old orientdb backups
ansible.builtin.template:
src: backup-cleaner.sh.j2
dest: /usr/local/bin/orientdb-backup-cleaner
owner: root
group: root
mode: "0555"
- name: orientdb_backups | Add a cron job that removes the old backups
ansible.builtin.cron:
cron_file: orientdb-backup-cleaner
disabled: false
job: "/usr/local/bin/orientdb-backup-cleaner >/dev/null 2>&1"
special_time: daily
user: "{{ orientdb_user }}"
name: "Remove old orientdb backups"
state: present