ansible-redis
ansible-redis copied to clipboard
use yes/no for slave-read-only
I used this role to install a redis 5.0.8 master/slave setup. On the slave I got the following error in journalctl -u redis_6379:
Mär 25 13:59:02 *** redis-server[11357]: *** FATAL CONFIG FILE ERROR ***
Mär 25 13:59:02 *** redis-server[11357]: Reading the configuration file, at line 32
Mär 25 13:59:02 *** redis-server[11357]: >>> 'slave-read-only False'
Mär 25 13:59:02 *** redis-server[11357]: argument must be 'yes' or 'no'
This PR fixes the error.
Currently, these should be set to "yes" or "no" (with quotes) to avoid being interpreted by YAML as booleans and ending up as True/False in the config. While I think your proposed method is probably superior, it's likely to cause a breaking change for anyone currently using redis_slave_read_only: "no", which I think would evaluate to True.