Skip to content

Commit e722e04

Browse files
hdepTheMeier
authored andcommitted
debug epp
1 parent 60f5da4 commit e722e04

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

manifests/instance.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,9 @@
510510

511511
$bind_arr = [$bind].flatten
512512

513+
$default_redis_version = '8.0.0'
514+
$redis_version = $facts.get('redis_server_version', $instance::default_version_var)
515+
513516
$_template_params = {
514517
daemonize => $daemonize,
515518
pid_file => $pid_file,
@@ -616,6 +619,7 @@
616619
rdb_save_incremental_fsync => $rdb_save_incremental_fsync,
617620
acls => $acls,
618621
custom_options => $custom_options,
622+
redis_version => $redis_version,
619623
}
620624

621625
# TODO: Rely on https://github.com/puppetlabs/puppetlabs-stdlib/pull/1425

templates/redis.conf.epp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
Optional[Boolean] $rdb_save_incremental_fsync,
105105
Array[String[1]] $acls,
106106
Hash[String[1],Variant[String[1], Integer]] $custom_options,
107+
String[1] $redis_version
107108
| -%>
108109
# Redis configuration file example
109110

@@ -595,7 +596,7 @@ min-slaves-max-lag <%= $min_slaves_max_lag %>
595596
#
596597
# With slow disks and fast (large bandwidth) networks, diskless replication
597598
# works better.
598-
<%- if versioncmp($facts['redis_server_version'], '7.0.0') >= 0 { -%>
599+
<%- if versioncmp($redis_version, '7.0.0') >= 0 { -%>
599600
repl-diskless-sync <%= bool2str($repl_diskless_sync, 'yes', 'no') -%>
600601
<%- } -%>
601602

@@ -890,7 +891,7 @@ latency-monitor-threshold <%= $latency_monitor_threshold %>
890891
#
891892
# By default, the extended latency monitoring is enabled since the overhead
892893
# of keeping track of the command latency is very small.
893-
<% if versioncmp($facts['redis_server_version'], '7.0.0') >= 0 { %>
894+
<% if versioncmp($redis_version, '7.0.0') >= 0 { %>
894895
latency-tracking <%= bool2str($latency_tracking, 'yes', 'no') -%>
895896
<% } %>
896897

0 commit comments

Comments
 (0)