mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Renamed to backup and cleanup roles
This commit is contained in:
3
roles/cleanup-backups-timer/README.md
Normal file
3
roles/cleanup-backups-timer/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# role cleanup-backups-timer
|
||||
|
||||
Timer for cleaning up old backups
|
6
roles/cleanup-backups-timer/handlers/main.yml
Normal file
6
roles/cleanup-backups-timer/handlers/main.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
- name: "restart backups-cleanup.timer"
|
||||
systemd:
|
||||
name: backups-cleanup.timer
|
||||
state: restarted
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
2
roles/cleanup-backups-timer/meta/main.yml
Normal file
2
roles/cleanup-backups-timer/meta/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- cleanup-backups-service
|
5
roles/cleanup-backups-timer/tasks/main.yml
Normal file
5
roles/cleanup-backups-timer/tasks/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
- name: create backups-cleanup.timer
|
||||
template:
|
||||
src: "backups-cleanup.timer.j2"
|
||||
dest: "/etc/systemd/system/backups-cleanup.timer"
|
||||
notify: restart backups-cleanup.timer
|
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=starts backups-cleanup.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar={{on_calendar_backups_cleanup}}
|
||||
RandomizedDelaySec={{randomized_delay_sec}}
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Reference in New Issue
Block a user