Optimized tests für run once

This commit is contained in:
2025-08-12 02:38:37 +02:00
parent 82aaf7ad74
commit 1595a7c4a6
148 changed files with 1803 additions and 1147 deletions

View File

@@ -1,4 +1,3 @@
---
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: "Automates the cleanup of old backups by executing a Python script that deletes outdated backup versions when disk usage exceeds a specified threshold."
@@ -10,19 +9,14 @@ galaxy_info:
https://www.veen.world
min_ansible_version: "2.9"
platforms:
- name: Linux
versions:
- all
- name: Linux
versions:
- all
galaxy_tags:
- backup
- cleanup
- disk
- automation
- backup
- cleanup
- disk
- automation
repository: "https://github.com/kevinveenbirkenbach/infinito-nexus"
issue_tracker_url: "https://github.com/kevinveenbirkenbach/infinito-nexus/issues"
documentation: "https://docs.infinito.nexus"
dependencies:
- dev-python-pip
- sys-alm-compose
- sys-lock
- sys-rst-daemon

View File

@@ -1,8 +1,21 @@
- name: Load former meta dependencies once
block:
- name: Include moved dependencies
include_role:
name: '{{ item }}'
loop:
- dev-python-pip
- sys-alm-compose
- sys-lock
- sys-rst-daemon
- set_fact:
run_once_sys_cln_bkps_service: true
when: run_once_sys_cln_bkps_service is not defined
- name: install lsof and python-psutil
community.general.pacman:
name:
- lsof
- python-psutil
- lsof
- python-psutil
state: present
- name: "create {{cleanup_backups_directory}}"
@@ -12,12 +25,12 @@
mode: 0755
- name: create sys-cln-backups.py
copy:
src: "sys-cln-backups.py"
copy:
src: "sys-cln-backups.py"
dest: "{{cleanup_backups_directory}}sys-cln-backups.py"
- name: create sys-cln-backups.infinito.service
template:
src: "sys-cln-backups.service.j2"
template:
src: "sys-cln-backups.service.j2"
dest: "/etc/systemd/system/sys-cln-backups.infinito.service"
notify: reload sys-cln-backups.infinito.service