From d28e89dfc10f8fc023aa7396fd6f9b32aff6a948 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Mar 26 2024 15:04:43 +0000 Subject: Add Redis pillar macro Some roles require a local Redis instance with generic settings. Signed-off-by: Georg Pfuetzenreuter --- diff --git a/pillar/macros.jinja b/pillar/macros.jinja index 99ca0b2..be5be0b 100644 --- a/pillar/macros.jinja +++ b/pillar/macros.jinja @@ -21,3 +21,16 @@ etherdevice: {{ device }} zone: drop {%- endmacro -%} + +{%- macro redis(instance, tcp=False) -%} +redis: + {{ instance }}: + acllog-max-len: 64 + databases: 1 + tcp-backlog: 512 + timeout: 0 + {#- TODO: switch Redis consumers on localhost to Unix sockets #} + {%- if tcp %} + port: 6379 + {%- endif %} +{%- endmacro %}