diff --git a/templates/redis.conf.j2 b/templates/redis.conf.j2 index d5bc6950..7c5177a3 100644 --- a/templates/redis.conf.j2 +++ b/templates/redis.conf.j2 @@ -30,7 +30,7 @@ rdbchecksum {{ redis_rdbchecksum|string }} dbfilename dump.rdb # Replication -{% if redis_slaveof -%} +{% if redis_slaveof and redis_slaveof != ansible_eth0.ipv4.address ~ " " ~ redis_port -%} slaveof {{ redis_slaveof }} {% endif -%} slave-serve-stale-data yes