From e34b0e2ab00c7e5827131e8d94c5eddb202f86e0 Mon Sep 17 00:00:00 2001 From: Benedikt Trefzer Date: Sat, 11 Dec 2021 16:16:12 +0100 Subject: [PATCH] add custom_options parameter for instance --- manifests/instance.pp | 5 +++++ templates/redis.conf.epp | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/manifests/instance.pp b/manifests/instance.pp index 8bd2d74a..87bde750 100644 --- a/manifests/instance.pp +++ b/manifests/instance.pp @@ -289,6 +289,9 @@ # @param output_buffer_limit_pubsub # Value of client-output-buffer-limit-pubsub in redis config # +# @param custom_options +# hash of custom options, not available as direct parameter. +# define redis::instance ( Boolean $activerehashing = $redis::activerehashing, Boolean $aof_load_truncated = $redis::aof_load_truncated, @@ -412,6 +415,7 @@ Optional[Boolean] $jemalloc_bg_thread = $redis::jemalloc_bg_thread, Optional[Boolean] $rdb_save_incremental_fsync = $redis::rdb_save_incremental_fsync, Array[String[1]] $acls = $redis::acls, + Hash[String[1],Variant[String[1], Integer]] $custom_options = {}, ) { if $title == 'default' { $redis_file_name_orig = $config_file_orig @@ -604,6 +608,7 @@ jemalloc_bg_thread => $jemalloc_bg_thread, rdb_save_incremental_fsync => $rdb_save_incremental_fsync, acls => $acls, + custom_options => $custom_options, } ), } diff --git a/templates/redis.conf.epp b/templates/redis.conf.epp index db32607d..8d97c443 100644 --- a/templates/redis.conf.epp +++ b/templates/redis.conf.epp @@ -100,6 +100,7 @@ Optional[Boolean] $jemalloc_bg_thread, Optional[Boolean] $rdb_save_incremental_fsync, Array[String[1]] $acls, + Hash[String[1],Variant[String[1], Integer]] $custom_options, | -%> # Redis configuration file example @@ -1178,6 +1179,9 @@ active-defrag-max-scan-fields <%= $active_defrag_max_scan_fields %> # Jemalloc background thread for purging will be enabled by default <% if $jemalloc_bg_thread { -%>jemalloc-bg-thread <%= $jemalloc_bg_thread ? {true => 'yes', default => 'no'} %><% } -%> +<% $custom_options.each |String $k, String $v| { -%> +<%= $k %> <%= $v %> +<% } -%> ################################## MODULES #####################################