Skip to content

Commit b39a5e0

Browse files
authored
add tls options to redis (Icinga#281)
1 parent 18b345d commit b39a5e0

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

roles/icingadb_redis/defaults/main.yml

+5
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,8 @@ icingadb_redis_hz: 10
6060
icingadb_redis_dynamic_hz: 'yes'
6161
icingadb_redis_aof_rewrite_incremental_fsync: 'yes'
6262
icingadb_redis_rdb_save_incremental_fsync: 'yes'
63+
64+
#icingadb_redis_tls_port:
65+
#icingadb_redis_tls_cert: /etc/ssl/certs/host.crt
66+
#icingadb_redis_tls_key: /etc/ssl/private/host.key
67+
#icingadb_redis_tls_ca: /etc/ssl/certs/root-ca.crt

roles/icingadb_redis/templates/icingadb-redis.conf.j2

+10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ bind {% for host in icingadb_redis_binds %}
77

88
protected-mode {{ icingadb_redis_protected_mode | string }}
99
port {{ icingadb_redis_port }}
10+
{% if icingadb_redis_tls_port is defined %}
11+
tls-port {{ icingadb_redis_tls_port }}
12+
{% endif %}
1013
tcp-backlog {{ icingadb_redis_tcp_backlog }}
1114
timeout {{ icingadb_redis_timeout }}
1215
tcp-keepalive {{ icingadb_redis_tcp_keepalive }}
@@ -218,3 +221,10 @@ rdb-save-incremental-fsync {{ icingadb_redis_rdb_save_incremental_fsync }}
218221
# Maximum number of set/hash/zset/list fields that will be processed from
219222
# the main dictionary scan
220223
# active-defrag-max-scan-fields 1000
224+
225+
# TLS
226+
{% if icingadb_redis_tls_cert is defined and icingadb_redis_tls_ca is defined and icingadb_redis_tls_key is defined %}
227+
tls-cert-file {{ icingadb_redis_tls_cert }}
228+
tls-key-file {{ icingadb_redis_tls_key }}
229+
tls-ca-cert-file {{ icingadb_redis_tls_ca }}
230+
{% endif %}

0 commit comments

Comments
 (0)