ansible-redis icon indicating copy to clipboard operation
ansible-redis copied to clipboard

use yes/no for slave-read-only

Open schferbe opened this issue 5 years ago • 1 comments

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.

schferbe avatar Mar 25 '20 13:03 schferbe

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.

DavidWittman avatar Apr 16 '20 14:04 DavidWittman