Skip to content

Commit 03aebb6

Browse files
committed
debug epp
1 parent 106ab67 commit 03aebb6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

manifests/instance.pp

+4
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,9 @@
507507

508508
$bind_arr = [$bind].flatten
509509

510+
$default_redis_version = '8.0.0'
511+
$redis_version = $facts.get('redis_server_version', $instance::default_version_var)
512+
510513
$_template_params = {
511514
daemonize => $daemonize,
512515
pid_file => $pid_file,
@@ -612,6 +615,7 @@
612615
rdb_save_incremental_fsync => $rdb_save_incremental_fsync,
613616
acls => $acls,
614617
custom_options => $custom_options,
618+
redis_version => $redis_version,
615619
}
616620

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

templates/redis.conf.epp

+3-2
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
Optional[Boolean] $rdb_save_incremental_fsync,
104104
Array[String[1]] $acls,
105105
Hash[String[1],Variant[String[1], Integer]] $custom_options,
106+
String[1] $redis_version
106107
| -%>
107108
# Redis configuration file example
108109

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

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

0 commit comments

Comments
 (0)