computer-playbook/roles/cleanup-backups-timer/tasks/main.yml

17 lines
520 B
YAML

- name: set service_name to cleanup-backups
set_fact:
service_name: "cleanup-backups"
when: run_once_cleanup_backups_timer is not defined
- name: "include role for systemd-timer for {{service_name}}"
include_role:
name: systemd-timer
vars:
on_calendar: "{{on_calendar_cleanup_backups}}"
when: run_once_cleanup_backups_timer is not defined
- name: run the cleanup_backups_timer tasks once
set_fact:
run_once_cleanup_backups_timer: true
when: run_once_cleanup_backups_timer is not defined