ansible-roles/redis/templates/redis.conf.j2

64 lines
1.6 KiB
Plaintext
Raw Normal View History

2016-09-29 10:59:13 +02:00
daemonize yes
pidfile "{{ redis_pid_dir }}/redis-server.pid"
2016-09-29 10:59:13 +02:00
port {{ redis_port }}
bind {{ redis_bind_interfaces | join(' ') }}
2016-09-29 10:59:13 +02:00
{% if redis_socket_enabled %}
unixsocket "{{ redis_socket_dir }}/redis.sock"
unixsocketperm {{ redis_socket_perms }}
2016-09-29 10:59:13 +02:00
{% endif %}
{% if redis_password %}
requirepass "{{ redis_password }}"
{% endif %}
{% if redis_password_master %}
masterauth "{{ redis_password_master }}"
{% 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 %}
rdbcompression {{ redis_rdbcompression | bool | ternary('yes','no') }}
dbfilename "{{ redis_data_file }}"
dir "{{ redis_data_dir }}"
2016-09-29 10:59:13 +02:00
{% if redis_installed_version is version('3.2', '>=') %}
protected-mode {{ redis_protected_mode | bool | ternary('yes','no') }}
{% endif %}
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 %}
appendonly {{ redis_appendonly | bool | ternary('yes','no') }}
2016-09-29 10:59:13 +02:00
appendfsync {{ redis_appendfsync }}
no-appendfsync-on-rewrite no
{% 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 %}