Shorted maintenance- to maint-

This commit is contained in:
2025-07-09 03:25:03 +02:00
parent ae5f021b8d
commit d0bd33fee3
63 changed files with 96 additions and 96 deletions

View File

@@ -0,0 +1,24 @@
# System Btrfs Auto Balancer
## Description
This role automates the management and balancing of Btrfs file systems. It clones the latest version of the [auto-btrfs-balancer](https://github.com/kevinveenbirkenbach/auto-btrfs-balancer.git) repository and configures a systemd service and timer to run the balancing script automatically.
## Overview
Optimized for automated file system management, this role:
- Clones the auto-btrfs-balancer repository.
- Configures a systemd service to run the balancing script.
- Integrates a systemd timer for regular execution.
- Notifies via systemd in case of errors during the balancing process.
## Purpose
The primary purpose of this role is to maintain optimal performance of Btrfs file systems by automating balancing tasks, ensuring efficient storage allocation and performance.
## Features
- **Repository Cloning:** Automatically fetches the latest auto-btrfs-balancer repository.
- **Service Configuration:** Sets up a systemd service for running the balancing script.
- **Timer Integration:** Schedules the balancing process via a systemd timer.
- **Error Notification:** Notifies on failure using alert-compose.

View File

@@ -0,0 +1,4 @@
- name: "reload maint-btrfs-auto-balancer.cymais.service"
systemd:
name: maint-btrfs-auto-balancer.cymais.service
daemon_reload: yes

View File

@@ -0,0 +1,25 @@
---
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: "Automates the balancing of Btrfs file systems by cloning the auto-btrfs-balancer repository and configuring a systemd service and timer for regular execution."
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: Archlinux
versions:
- rolling
galaxy_tags:
- btrfs
- balancing
- filesystem
- automation
repository: "https://s.veen.world/cymais"
issue_tracker_url: "https://s.veen.world/cymaisissues"
documentation: "https://s.veen.world/cymais"
dependencies:
- alert-compose

View File

@@ -0,0 +1,30 @@
- name: "pkgmgr install"
include_role:
name: pkgmgr-install
vars:
package_name: btrfs-auto-balancer
when: run_once_system_btrfs_auto_balancer is not defined
- name: configure maint-btrfs-auto-balancer.cymais.service
template:
src: maint-btrfs-auto-balancer.service.j2
dest: /etc/systemd/system/maint-btrfs-auto-balancer.cymais.service
notify: reload maint-btrfs-auto-balancer.cymais.service
when: run_once_system_btrfs_auto_balancer is not defined
- name: set service_name to the name of the current role
set_fact:
service_name: "{{ role_name }}"
when: run_once_system_btrfs_auto_balancer is not defined
- name: "include role for generic-timer for {{service_name}}"
include_role:
name: generic-timer
vars:
on_calendar: "{{on_calendar_btrfs_auto_balancer}}"
when: run_once_system_btrfs_auto_balancer is not defined
- name: run the system_btrfs_auto_balancer tasks once
set_fact:
run_once_system_btrfs_auto_balancer: true
when: run_once_system_btrfs_auto_balancer is not defined

View File

@@ -0,0 +1,7 @@
[Unit]
Description=auto balance btrfs
OnFailure=alert-compose.cymais@%n.service
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'btrfs-auto-balancer 90 10'

View File

@@ -0,0 +1 @@
system_btrfs_auto_balancer_folder: "{{path_administrator_scripts}}auto-btrfs-balancer/"