diff --git a/spec/classes/redis_spec.rb b/spec/classes/redis_spec.rb index f3316d10..e663ce3d 100644 --- a/spec/classes/redis_spec.rb +++ b/spec/classes/redis_spec.rb @@ -1687,7 +1687,7 @@ class { 'redis': } end - it { is_expected.to contain_file(config_file_orig).without('content' => %r{^rdb-save-incremental-fsync.*$}) } + it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes$}) } end describe 'test rdb-save-incremental-fsync enabled' do diff --git a/templates/redis.conf.epp b/templates/redis.conf.epp index 1b10d867..5e4acc65 100644 --- a/templates/redis.conf.epp +++ b/templates/redis.conf.epp @@ -1030,9 +1030,9 @@ aof-rewrite-incremental-fsync <%= bool2str($aof_rewrite_incremental_fsync, 'yes' # the file will be fsync-ed every 32 MB of data generated. This is useful # in order to commit the file to the disk more incrementally and avoid # big latency spikes. -<% unless $rdb_save_incremental_fsync == undef { -%> +<% if $ rdb_save_incremental_fsync == undef { %>#rdb-save-incremental-fsync yes<% } else { %> rdb-save-incremental-fsync <%= bool2str($rdb_save_incremental_fsync, 'yes', 'no') %> -<% } -%> +<% } %> # Redis Cluster Settings <% if $cluster_enabled { -%>