Install Sentinel if needed

This commit is contained in:
Jérémy Lecour 2019-09-05 05:58:59 +02:00
parent 13b7ca204f
commit 415aedb78a
2 changed files with 11 additions and 0 deletions

View File

@ -48,3 +48,5 @@ redis_restart_if_needed: True
redis_restart_force: False
redis_disabled_commands: []
redis_sentinel_install: False

View File

@ -14,6 +14,15 @@
- redis
- packages
- name: Redis Sentinel is installed.
apt:
name: "redis-sentinel"
state: present
tags:
- redis
- packages
when: redis_sentinel_install
- name: Get Redis version
shell: "redis-server -v | grep -Eo '(v=\\S+)' | cut -d'=' -f 2 | grep -E '^([0-9]|\\.)+$'"
changed_when: false