Redis: Add the possibility to set an instance password
This commit is contained in:
parent
eab2c3946a
commit
c12559193a
|
@ -16,6 +16,7 @@ Main variables are :
|
|||
* `redis_conf_path`: config file location ;
|
||||
* `redis_port`: listening TCP port ;
|
||||
* `redis_bind_interface`: listening IP address ;
|
||||
* `redis_password`: password for redis. Empty means no password ;
|
||||
* `redis_unixsocket`: Unix socket ;
|
||||
* `redis_loglevel`: log verbosity ;
|
||||
* `redis_logfile`: log file location.
|
||||
|
|
|
@ -7,6 +7,8 @@ redis_bind_interface: 127.0.0.1
|
|||
redis_unixsocket: '/var/run/redis/redis.sock'
|
||||
redis_timeout: 300
|
||||
|
||||
redis_password: ''
|
||||
|
||||
redis_loglevel: "notice"
|
||||
redis_logfile: /var/log/redis/redis-server.log
|
||||
|
||||
|
|
|
@ -60,3 +60,13 @@
|
|||
- used_memory
|
||||
notify: restart munin-node
|
||||
tags: redis
|
||||
|
||||
- name: Add redis password for munin
|
||||
ini_file:
|
||||
dest: /etc/munin/plugin-conf.d/munin-node
|
||||
section: 'redis_*'
|
||||
option: env.password
|
||||
value: '{{ redis_password }}'
|
||||
notify: restart munin-node
|
||||
when: redis_password != ''
|
||||
tags: redis
|
||||
|
|
|
@ -7,6 +7,10 @@ bind {{ redis_bind_interface }}
|
|||
unixsocket {{ redis_unixsocket }}
|
||||
{% endif %}
|
||||
|
||||
{% if redis_password %}
|
||||
requirepass {{ redis_password }}
|
||||
{% endif %}
|
||||
|
||||
timeout {{ redis_timeout }}
|
||||
|
||||
loglevel {{ redis_loglevel }}
|
||||
|
|
Loading…
Reference in New Issue