From a7e0aa46b1b995fcbaba16f4c572d7a3779e3e1e Mon Sep 17 00:00:00 2001 From: Andrew Halligan Date: Fri, 2 Nov 2018 11:44:58 -0400 Subject: [PATCH] Add diskless replication and aof-use-rdb-preamble config options --- defaults/main.yml | 3 +++ templates/redis.conf.j2 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 0fe50ee0..d63b342c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -52,6 +52,8 @@ redis_slaveof: false redis_slave_read_only: "yes" redis_slave_priority: 100 redis_repl_backlog_size: false +redis_repl_diskless_sync: "no" +redis_repl_diskless_sync_delay: 5 ## Logging redis_logfile: '""' @@ -95,6 +97,7 @@ redis_no_appendfsync_on_rewrite: "no" redis_auto_aof_rewrite_percentage: "100" redis_auto_aof_rewrite_min_size: "64mb" redis_notify_keyspace_events: '""' +redis_aof_use_rdb_preamble: "no" ## Redis sentinel configs # Set this to true on a host to configure it as a Sentinel diff --git a/templates/redis.conf.j2 b/templates/redis.conf.j2 index a7bcde24..0c94a66b 100644 --- a/templates/redis.conf.j2 +++ b/templates/redis.conf.j2 @@ -49,6 +49,8 @@ min-slaves-max-lag {{ redis_min_slaves_max_lag }} {% if redis_password -%} masterauth {{ redis_password }} {% endif -%} +repl-diskless-sync {{ redis_repl_diskless_sync }} +repl-diskless-sync-delay {{ redis_repl_diskless_sync_delay }} # Security {% if redis_password -%} @@ -97,3 +99,4 @@ client-output-buffer-limit slave 256mb 64mb 60 client-output-buffer-limit pubsub 32mb 8mb 60 hz 10 aof-rewrite-incremental-fsync yes +aof-use-rdb-preamble {{ redis_aof_use_rdb_preamble }}