Enhance Podman configuration and management

- Update pruning options to include filters for containers, images, networks, and volumes.
- Modify handlers to restart Podman resources based on new conditions.
- Expand Molecule tests to verify networks, volumes, pods, and containers.
- Adjust service management tasks for Podman services and auto-update.
- Refactor tasks for better clarity and maintainability.
This commit is contained in:
Daniel Akulenok
2026-02-20 14:49:22 +01:00
parent d30423013a
commit b1a627f2ee
12 changed files with 399 additions and 104 deletions

View File

@@ -211,10 +211,21 @@ podman_auto_remove: true
podman_prune_enabled: true
podman_prune_options:
container: true # Remove stopped containers
container_filters:
until: "24h" # Keep containers newer than this age
executable: "podman"
image: true # Remove unused images
image_filters:
until: "24h" # Keep images newer than this age
network: true # Remove unused networks
network_filters:
until: "24h" # Keep networks newer than this age
volume: true # Remove unused volumes
system: true # Full system cleanup
volume_filters:
until: "24h" # Keep volumes newer than this age
system: false # Full system cleanup. Always returns 'changed'
system_all: false
system_volumes: false
```
#### Storage Configuration
@@ -226,7 +237,7 @@ podman_storage_graphroot: /var/lib/containers/storage
podman_storage_runroot: /run/containers/storage
```
#### API & Socket Services
#### Podman auto update
```yaml
podman_enable_auto_update: true # Enable automatic container updates