mirror of
https://gitea.0xace.cc/ansible-galaxy/redis.git
synced 2025-07-03 13:03:08 +00:00
fix templating with blockinline and include within redis.conf
This commit is contained in:
6
templates/etc/redis/redis-auth.conf.j2
Normal file
6
templates/etc/redis/redis-auth.conf.j2
Normal file
@ -0,0 +1,6 @@
|
||||
masterauth {{ redis_masterauth }}
|
||||
masteruser {{ redis_masteruser }}
|
||||
user {{ redis_masteruser }} +@all on >{{ redis_masterauth }}
|
||||
{% if redis_requirepass is defined %}
|
||||
requirepass {{ redis_requirepass }}
|
||||
{% endif %}
|
@ -1,13 +1,10 @@
|
||||
include /etc/redis/redis-auth.conf
|
||||
bind 127.0.0.1 {{ ansible_default_ipv4.address }}
|
||||
protected-mode no
|
||||
supervised systemd
|
||||
{% if master is not defined %}
|
||||
{% if redis_master_ip != ansible_default_ipv4.address %}
|
||||
replicaof {{ redis_master_ip }} 6379
|
||||
{% endif %}
|
||||
masterauth {{ redis_masterauth }}
|
||||
masteruser {{ redis_masteruser }}
|
||||
user {{ redis_masteruser }} +@all on >{{ redis_masterauth }}
|
||||
|
||||
port 6379
|
||||
tcp-backlog 511
|
||||
timeout 0
|
14
templates/etc/redis/sentinel.conf.j2
Normal file
14
templates/etc/redis/sentinel.conf.j2
Normal file
@ -0,0 +1,14 @@
|
||||
bind 127.0.0.1 {{ ansible_default_ipv4.address }}
|
||||
port 26379
|
||||
daemonize yes
|
||||
supervised systemd
|
||||
pidfile "/run/sentinel/redis-sentinel.pid"
|
||||
logfile "/var/log/redis/redis-sentinel.log"
|
||||
dir "/var/lib/redis"
|
||||
sentinel monitor {{ redis_mastername }} {{ redis_master_ip }} 6379 2
|
||||
sentinel auth-pass {{ redis_mastername }} {{ redis_masterauth }}
|
||||
sentinel auth-user {{ redis_mastername }} {{ redis_masteruser }}
|
||||
acllog-max-len 128
|
||||
sentinel deny-scripts-reconfig yes
|
||||
sentinel resolve-hostnames no
|
||||
sentinel announce-hostnames no
|
@ -1,17 +0,0 @@
|
||||
bind {{ ansible_default_ipv4.address }}
|
||||
port 26379
|
||||
daemonize yes
|
||||
supervised auto
|
||||
pidfile /run/sentinel/redis-sentinel.pid
|
||||
logfile /var/log/redis/redis-sentinel.log
|
||||
dir /var/lib/redis
|
||||
sentinel monitor mymaster {{ redis_master_ip }} 6379 2
|
||||
sentinel auth-pass mymaster {{ redis_masterauth }}
|
||||
sentinel auth-user mymaster {{ redis_masteruser }}
|
||||
sentinel down-after-milliseconds mymaster 30000
|
||||
acllog-max-len 128
|
||||
sentinel parallel-syncs mymaster 1
|
||||
sentinel failover-timeout mymaster 180000
|
||||
sentinel deny-scripts-reconfig yes
|
||||
SENTINEL resolve-hostnames no
|
||||
SENTINEL announce-hostnames no
|
Reference in New Issue
Block a user