mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 10:19:09 +00:00 
			
		
		
		
	This commit restructures systemctl service definitions and category mappings. Motivation: Alarm-related bugs revealed inconsistencies in service and role handling. Preparation step: lays the groundwork for fixing the alarm issues by aligning categories, roles, and service templates.
		
			
				
	
	
		
			25 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| # Cleanup Disc Space
 | |
| 
 | |
| ## Description
 | |
| 
 | |
| This role frees disk space by executing a script that cleans up temporary files, clears package caches, and optionally cleans up backup directories and Docker resources when disk usage exceeds a specified threshold.
 | |
| 
 | |
| ## Overview
 | |
| 
 | |
| Optimized for efficient storage management, this role:
 | |
| - Creates a directory for disk cleanup scripts.
 | |
| - Deploys a Bash script that frees disk space by cleaning up /tmp, Docker resources, and pacman cache.
 | |
| - Configures a systemd service to run the disk cleanup script.
 | |
| - Optionally integrates with backup cleanup if backup variables are defined.
 | |
| 
 | |
| ## Purpose
 | |
| 
 | |
| The primary purpose of this role is to ensure that disk space remains within safe limits by automating cleanup tasks, thereby improving system performance and stability.
 | |
| 
 | |
| ## Features
 | |
| 
 | |
| - **Automated Cleanup:** Executes a script to remove temporary files and clear caches.
 | |
| - **Threshold-Based Execution:** Triggers cleanup when disk usage exceeds a defined percentage.
 | |
| - **Systemd Integration:** Configures a systemd service to manage the disk cleanup process.
 | |
| - **Docker and Backup Integration:** Optionally cleans Docker resources and backups if configured.
 |