feat: add valkey/redis

This commit is contained in:
Clément Désiles
2025-11-11 00:02:42 +01:00
parent e7dbe470da
commit e692d4df98
9 changed files with 782 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
user default on >{{ valkey_admin_password }} ~* &* +@all
{% for acl_user in valkey_acl_users %}
user {{ acl_user.username }} on >{{ acl_user.password }} {% for pattern in acl_user.keypattern.split() %}~{{ pattern }} {% endfor %}{{ acl_user.commands | default('+@all -@dangerous') }}
{% endfor %}
+33
View File
@@ -0,0 +1,33 @@
# Valkey configuration managed by Ansible
# Bind to localhost only (security)
bind {{ valkey_bind }}
# Port
port {{ valkey_port }}
# Data directory
dir {{ valkey_dir }}
# Log level
loglevel {{ valkey_loglevel }}
# Memory management
maxmemory {{ valkey_maxmemory }}
maxmemory-policy {{ valkey_maxmemory_policy }}
# Persistence
save 900 1
save 300 10
save 60 10000
# Security
protected-mode yes
# ACL configuration
# Use ACL file for user management (modern approach)
aclfile {{ valkey_acl_file }}
# Daemon mode
daemonize no
supervised systemd