fix: rename roles to use underscores instead of hyphens which was causing the roles not to be found
This commit is contained in:
48
roles/system_maintenance/README.md
Normal file
48
roles/system_maintenance/README.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# System Maintenance Role
|
||||
|
||||
Updates packages and handles system maintenance tasks across multiple distributions.
|
||||
|
||||
## Features
|
||||
|
||||
- Multi-distribution support (Debian/Ubuntu/Alpine)
|
||||
- Package cache updates and upgrades
|
||||
- Automatic cleanup of unused packages
|
||||
- Reboot handling when required
|
||||
- Distribution detection and validation
|
||||
|
||||
## Supported Distributions
|
||||
|
||||
- **Debian/Ubuntu** - Updates via apt, removes unused packages, checks for reboot requirements
|
||||
- **Alpine** - Updates via apk package manager
|
||||
|
||||
## Usage
|
||||
|
||||
```yaml
|
||||
- name: Perform system maintenance
|
||||
include_role:
|
||||
name: system_maintenance
|
||||
```
|
||||
|
||||
## What It Does
|
||||
|
||||
### Debian/Ubuntu Systems
|
||||
1. Updates package cache (6-hour validity)
|
||||
2. Upgrades all packages
|
||||
3. Removes unused packages and purges configs
|
||||
4. Checks if reboot is required
|
||||
5. Triggers reboot handler if needed
|
||||
|
||||
### Alpine Systems
|
||||
1. Updates package cache
|
||||
2. Upgrades all packages
|
||||
|
||||
## Requirements
|
||||
|
||||
- Root privileges
|
||||
- Supported distribution (Debian/Ubuntu/Alpine)
|
||||
|
||||
## Notes
|
||||
|
||||
- Role automatically detects distribution and uses appropriate tasks
|
||||
- Fails gracefully on unsupported distributions
|
||||
- Reboot is handled via handler (only when required on Debian/Ubuntu)
|
||||
Reference in New Issue
Block a user