Add the system cleanup role

Adds ansible-role-cleanup from the MASH project. It can remove superseded
Docker images and stopped containers on every playbook run (unlike
`docker image prune -a`, keeping the images of stopped services), vacuum
old logs, remove paths and, on Debian-based distributions, upgrade
packages and purge old kernels. Everything is off by default.

The role runs after systemd_service_manager, once every service is
running, so the Docker cleanup can tell which images are still needed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Slavi Pantaleev
2026-10-10 15:44:55 +03:00
co-authored by Claude Opus 5.5
parent 3723f9ddd6
commit 41650478bc
8 changed files with 98 additions and 0 deletions
+2
View File
@@ -224,6 +224,8 @@ Services that help you in administrating and monitoring your Matrix installation
- [Enabling synapse-usage-exporter for Synapse usage statistics](configuring-playbook-synapse-usage-exporter.md)
- [Setting up system cleanup](configuring-playbook-system-cleanup.md) — removing superseded Docker images, old logs, etc.
- Backups:
- [Setting up BorgBackup](configuring-playbook-backup-borg.md) — a full Matrix server backup solution, including the Postgres database