- Replace jvm_filters with unified memory_filters (JVM + Redis helpers) - Add redis_maxmemory_mb filter and unit tests - Introduce sys-ctl-cln-docker role (systemd-based Docker prune + anon volumes) - Refactor disk space health check to Python script and wire SIZE_PERCENT_CLEANUP_DISC_SPACE - Adjust schedules and services for Docker cleanup and disk space health See discussion: https://chatgpt.com/share/6925c1c5-ee38-800f-84b6-da29ccfa7537
Redis
Description
This Ansible role provides a Jinja2 snippet to inject a Redis service definition into your Docker Compose setup. It renders a service.yml.j2 template that defines a redis container with sensible defaults.
Overview
The role’s service.yml.j2 template includes:
-
An Alpine-based Redis image (
redis:alpine) -
Container naming based on
application_id(defaults toredis) -
Restart policy
-
Journald logging driver
-
A named volume (
redis:/data) for persistence -
A basic healthcheck using
redis-cli ping -
Attachment to the default network
Include this snippet in your top-level docker-compose.yml.j2 where you want Redis to appear.
Features
-
Configurable
application_id
Sets container name ({{ application_id }}-redis). -
Restart policy
Controlled byDOCKER_RESTART_POLICY. -
Journald logging
Ensures logs are captured by systemd’s journal. -
Persistent storage
Declares and mountsredis:/data. -
Built-in healthcheck
Usesredis-cli pingwith configurable intervals and retries.