mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Renamed sys-ctl-cln-backups to sys-ctl-cln-bkps
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
- block:
|
||||
- include_tasks: 01_core.yml
|
||||
- include_tasks: utils/run_once.yml
|
||||
vars:
|
||||
flush_handlers: true
|
||||
when: run_once_sys_ctl_cln_bkps is not defined
|
||||
|
||||
|
@@ -4,5 +4,5 @@ OnFailure={{ SYS_SERVICE_ON_FAILURE_COMPOSE }}
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/usr/bin/python {{ PATH_SYSTEM_LOCK_SCRIPT }} {{ SYS_SERVICE_GROUP_MANIPULATION | join(' ') }} --ignore {{ SYS_SERVICE_GROUP_CLEANUP| join(' ') }} --timeout "{{ SYS_TIMEOUT_BACKUP_SERVICES }}"
|
||||
ExecStartPre=/usr/bin/python {{ PATH_SYSTEM_LOCK_SCRIPT }} {{ SYS_SERVICE_GROUP_MANIPULATION | join(' ') }} --ignore {{ SYS_SERVICE_GROUP_CLEANUP | join(' ') }} --timeout "{{ SYS_TIMEOUT_BACKUP_SERVICES }}"
|
||||
ExecStart={{ systemctl_script_exec }} --backups-folder-path {{ BACKUPS_FOLDER_PATH }} --maximum-backup-size-percent {{SIZE_PERCENT_MAXIMUM_BACKUP}}
|
@@ -24,7 +24,7 @@ if [ "$force_freeing" = true ]; then
|
||||
|
||||
{% if BACKUPS_FOLDER_PATH is defined and SIZE_PERCENT_MAXIMUM_BACKUP is defined %}
|
||||
echo "cleaning up backups" &&
|
||||
python {{ 'sys-ctl-cln-backups' | get_service_script_path('sh') }} --backups-folder-path {{ BACKUPS_FOLDER_PATH }} --maximum-backup-size-percent {{ SIZE_PERCENT_MAXIMUM_BACKUP }} || exit 2
|
||||
python {{ 'sys-ctl-cln-bkps' | get_service_script_path('sh') }} --backups-folder-path {{ BACKUPS_FOLDER_PATH }} --maximum-backup-size-percent {{ SIZE_PERCENT_MAXIMUM_BACKUP }} || exit 2
|
||||
{% endif %}
|
||||
|
||||
if pacman -Qs $package > /dev/null ; then
|
||||
|
@@ -8,7 +8,7 @@ This role sets up a systemd timer to schedule the periodic cleanup of old backup
|
||||
|
||||
Optimized for automated maintenance, this role:
|
||||
- Sets a fact for the service name.
|
||||
- Integrates with the [sys-timer](../sys-timer/README.md) role to schedule sys-ctl-cln-backups tasks at defined intervals.
|
||||
- Integrates with the [sys-timer](../sys-timer/README.md) role to schedule sys-ctl-cln-bkps tasks at defined intervals.
|
||||
|
||||
## Purpose
|
||||
|
||||
|
@@ -6,9 +6,9 @@
|
||||
vars:
|
||||
flush_handlers: true
|
||||
|
||||
- name: set systemctl_timer_service to sys-ctl-cln-backups
|
||||
- name: set systemctl_timer_service to sys-ctl-cln-bkps
|
||||
set_fact:
|
||||
systemctl_timer_service: "sys-ctl-cln-backups"
|
||||
systemctl_timer_service: "sys-ctl-cln-bkps"
|
||||
|
||||
- name: "include role for sys-timer for {{ systemctl_timer_service }}"
|
||||
include_role:
|
||||
|
Reference in New Issue
Block a user