2016-09-29 10:59:13 +02:00
|
|
|
daemonize yes
|
2019-09-05 06:44:38 +02:00
|
|
|
pidfile {{ redis_pid_dir }}/redis-server.pid
|
2016-09-29 10:59:13 +02:00
|
|
|
port {{ redis_port }}
|
|
|
|
bind {{ redis_bind_interface }}
|
|
|
|
|
2019-09-05 09:41:58 +02:00
|
|
|
{% if redis_socket_enabled %}
|
2019-09-05 06:44:38 +02:00
|
|
|
unixsocket {{ redis_socket_dir }}/redis.sock
|
|
|
|
unixsocketperm {{ redis_socket_perms }}
|
2016-09-29 10:59:13 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2017-09-28 15:02:29 +02:00
|
|
|
{% if redis_password %}
|
|
|
|
requirepass {{ redis_password }}
|
2018-12-21 11:08:18 +01:00
|
|
|
{% endif %}
|
|
|
|
{% if redis_password_master %}
|
|
|
|
masterauth {{ redis_password_master }}
|
2017-09-28 15:02:29 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2016-09-29 10:59:13 +02:00
|
|
|
timeout {{ redis_timeout }}
|
|
|
|
|
2019-09-05 09:44:25 +02:00
|
|
|
loglevel {{ redis_log_level }}
|
|
|
|
logfile {{ redis_log_dir }}/redis-server.log
|
2016-09-29 10:59:13 +02:00
|
|
|
|
|
|
|
# To enable logging to the system logger, just set 'syslog-enabled' to yes,
|
|
|
|
# and optionally update the other syslog parameters to suit your needs.
|
|
|
|
# syslog-enabled no
|
|
|
|
# syslog-ident redis
|
|
|
|
# syslog-facility local0
|
|
|
|
|
|
|
|
databases {{ redis_databases }}
|
|
|
|
|
|
|
|
{% for save in redis_save %}
|
|
|
|
save {{ save }}
|
|
|
|
{% endfor %}
|
|
|
|
|
2019-09-05 09:46:54 +02:00
|
|
|
rdbcompression {{ redis_rdbcompression | bool | ternary('yes','no') }}
|
2019-09-05 06:44:38 +02:00
|
|
|
dbfilename {{ redis_data_file }}
|
|
|
|
dir {{ redis_data_dir }}
|
2016-09-29 10:59:13 +02:00
|
|
|
|
2020-02-25 10:45:35 +01:00
|
|
|
{% if redis_installed_version is version('3.2', '>=') %}
|
2019-09-05 09:46:54 +02:00
|
|
|
protected-mode {{ redis_protected_mode | bool | ternary('yes','no') }}
|
2017-12-28 17:28:31 +01:00
|
|
|
{% endif %}
|
2017-12-27 15:10:59 +01:00
|
|
|
|
2019-08-30 08:53:12 +02:00
|
|
|
{% if redis_maxclients %}
|
|
|
|
maxclients {{ redis_maxclients }}
|
|
|
|
{% endif %}
|
2016-09-29 10:59:13 +02:00
|
|
|
|
|
|
|
{% if redis_maxmemory %}
|
|
|
|
maxmemory {{ redis_maxmemory }}
|
|
|
|
maxmemory-policy {{ redis_maxmemory_policy }}
|
|
|
|
maxmemory-samples {{ redis_maxmemory_samples }}
|
|
|
|
{% endif %}
|
|
|
|
|
2019-09-05 09:46:54 +02:00
|
|
|
appendonly {{ redis_appendonly | bool | ternary('yes','no') }}
|
2016-09-29 10:59:13 +02:00
|
|
|
appendfsync {{ redis_appendfsync }}
|
|
|
|
no-appendfsync-on-rewrite no
|
|
|
|
|
2019-01-08 10:04:27 +01:00
|
|
|
{% for disabled_command in redis_disabled_commands %}
|
|
|
|
rename-command {{ disabled_command }} ""
|
|
|
|
{% endfor %}
|
|
|
|
|
2016-09-29 10:59:13 +02:00
|
|
|
{% for include in redis_includes %}
|
|
|
|
include {{ include }}
|
|
|
|
{% endfor %}
|