wal-g-pg/tasks/backup_retention_job_timer.yaml

15 lines
510 B
YAML

- name: Template systemd backup retention timer
template:
src: backup-retention.timer.j2
dest: /etc/systemd/system/backup-retention.timer
notify: Restart backup retention timer
register: backup_retention_timer
- name: Enable and start systemd backup retention timer
systemd:
name: backup-retention.timer
enabled: "{{ 'yes' if wal_g_backup_retention_enable else 'no' }}"
masked: no
state: "{{ 'started' if wal_g_backup_retention_enable else 'stopped' }}"
daemon_reload: yes