Renamed sys-ctl-cln-backups to sys-ctl-cln-bkps

This commit is contained in:
Kevin Veen-Birkenbach 2025-08-19 12:15:33 +02:00
parent 83b9f697ab
commit 7ef20474a0
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
7 changed files with 12 additions and 11 deletions

View File

@ -7,7 +7,7 @@ SYS_SERVICE_ALL_ENABLED: false # Flush all services
SYS_SERVICE_DEFAULT_STATE: "{{ omit }}"
## Names
SYS_SERVICE_CLEANUP_BACKUPS_OLD: "{{ 'sys-ctl-cln-backups' | get_service_name(SOFTWARE_NAME) }}"
SYS_SERVICE_CLEANUP_BACKUPS_OLD: "{{ 'sys-ctl-cln-bkps' | get_service_name(SOFTWARE_NAME) }}"
SYS_SERVICE_CLEANUP_BACKUPS_FAILED: "{{ 'sys-ctl-cln-faild-bkps' | get_service_name(SOFTWARE_NAME) }}"
SYS_SERVICE_OPTIMIZE_DRIVE: "{{ 'svc-opt-ssd-hdd' | get_service_name(SOFTWARE_NAME) }}"
SYS_SERVICE_BACKUP_RMT_2_LOC: "{{ 'svc-bkp-rmt-2-loc' | get_service_name(SOFTWARE_NAME) }}"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -4,8 +4,8 @@ from filter_plugins import get_service_name
class TestGetServiceName(unittest.TestCase):
def test_default_suffix_service(self):
self.assertEqual(
get_service_name.get_service_name("sys-ctl-cln-backups", "nginx"),
"sys-ctl-cln-backups.nginx.service"
get_service_name.get_service_name("sys-ctl-cln-bkps", "nginx"),
"sys-ctl-cln-bkps.nginx.service"
)
def test_default_suffix(self):
@ -26,8 +26,8 @@ class TestGetServiceName(unittest.TestCase):
"sys-ctl-bkp.postgres@"
)
self.assertEqual(
get_service_name.get_service_name("sys-ctl-cln-backups", "nginx", False),
"sys-ctl-cln-backups.nginx"
get_service_name.get_service_name("sys-ctl-cln-bkps", "nginx", False),
"sys-ctl-cln-bkps.nginx"
)
def test_case_is_lowered(self):