mirror of
https://github.com/famedly/ansible-collection-base
synced 2024-11-10 06:24:17 +00:00
feat(redis): allow configuring bind ip and unix socket
This commit is contained in:
parent
ab33387933
commit
6f639e34dc
2 changed files with 8 additions and 1 deletions
|
@ -8,6 +8,9 @@ redis_config_dir: "{{ redis_basepath }}/{{redis_prefix }}config"
|
|||
redis_config_file: "{{ redis_config_dir }}/redis.conf"
|
||||
redis_secret: ~
|
||||
|
||||
redis_config_bind_ip: "0.0.0.0"
|
||||
redis_config_unix_socket_path: ~
|
||||
redis_config_unix_socket_perm: 775
|
||||
# Overwrite per-instance to be able to run many instances on the same host
|
||||
# prefix should be sth like 'matrix_', modifies mapped directories, container name and uer
|
||||
redis_prefix: ""
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
|
||||
# JUST COMMENT THE FOLLOWING LINE.
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
bind 0.0.0.0
|
||||
bind {{ redis_config_bind_ip }}
|
||||
|
||||
# Protected mode is a layer of security protection, in order to avoid that
|
||||
# Redis instances left open on the internet are accessed and exploited.
|
||||
|
@ -108,6 +108,10 @@ tcp-backlog 511
|
|||
#
|
||||
# unixsocket /tmp/redis.sock
|
||||
# unixsocketperm 700
|
||||
{% if redis_config_unix_socket_path and redis_config_unix_socket_perm %}
|
||||
unixsocket {{ redis_config_unix_socket_path }}
|
||||
unixsocketperm {{ redis_config_unix_socket_perm }}
|
||||
{% endif %}
|
||||
|
||||
# Close the connection after a client is idle for N seconds (0 to disable)
|
||||
timeout 0
|
||||
|
|
Loading…
Reference in a new issue