Shorted cleanup- to cln-

This commit is contained in:
2025-07-09 03:45:02 +02:00
parent 9668e74139
commit f548faa80f
60 changed files with 88 additions and 88 deletions

View File

@@ -0,0 +1,21 @@
# Cleanup Backups Timer
## Description
This role sets up a systemd timer to schedule the periodic cleanup of old backups. It leverages the cln-backups-service role to perform the actual cleanup operation.
## Overview
Optimized for automated maintenance, this role:
- Sets a fact for the service name.
- Integrates with the [generic-timer](../generic-timer/README.md) role to schedule cln-backups tasks at defined intervals.
## Purpose
The primary purpose of this role is to automate the scheduling of backup cleanup operations using a systemd timer, ensuring that backup storage remains within defined limits.
## Features
- **Timer Scheduling:** Configures a systemd timer to trigger the backup cleanup service.
- **Role Integration:** Works in conjunction with the cln-backups-service role.
- **Idempotency:** Ensures the timer tasks execute only once per playbook run.

View File

@@ -0,0 +1,25 @@
---
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: "Schedules periodic cleanup of old backups by configuring a systemd timer to trigger the cln-backups-service role."
license: "CyMaIS NonCommercial License (CNCL)"
license_url: "https://s.veen.world/cncl"
company: |
Kevin Veen-Birkenbach
Consulting & Coaching Solutions
https://www.veen.world
min_ansible_version: "2.9"
platforms:
- name: Linux
versions:
- all
galaxy_tags:
- timer
- backup
- cleanup
- automation
repository: "https://s.veen.world/cymais"
issue_tracker_url: "https://s.veen.world/cymaisissues"
documentation: "https://s.veen.world/cymais"
dependencies:
- cln-backups-service

View File

@@ -0,0 +1,16 @@
- name: set service_name to cln-backups
set_fact:
service_name: "cln-backups"
when: run_once_cleanup_backups_timer is not defined
- name: "include role for generic-timer for {{service_name}}"
include_role:
name: generic-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