From fcd644ead4bad000cfc8ac10dec0ded43cfea34f Mon Sep 17 00:00:00 2001 From: markasammut Date: Thu, 21 May 2020 13:36:31 +0200 Subject: [PATCH 1/3] Allow sentinel instances authentication https://redis.io/topics/sentinel#configuring-sentinel-instances-with-authentication --- templates/redis-sentinel.conf.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/redis-sentinel.conf.erb b/templates/redis-sentinel.conf.erb index d11c4024..8f02829e 100644 --- a/templates/redis-sentinel.conf.erb +++ b/templates/redis-sentinel.conf.erb @@ -19,6 +19,9 @@ sentinel notification-script <%= @master_name %> <%= @notification_script %> <% if @client_reconfig_script -%> sentinel client-reconfig-script <%= @master_name %> <%= @client_reconfig_script %> <% end -%> +<% if @requirepass -%> +requirepass <%= @requirepass %> +<% end -%> loglevel <%= @log_level %> logfile <%= @log_file %> From a9ac1598c8395e3a33625d78bfaa15450b245a89 Mon Sep 17 00:00:00 2001 From: markasammut Date: Thu, 21 May 2020 13:40:16 +0200 Subject: [PATCH 2/3] Allow requirepass parameter for sentinel --- manifests/sentinel.pp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manifests/sentinel.pp b/manifests/sentinel.pp index 14948742..0d3d607c 100644 --- a/manifests/sentinel.pp +++ b/manifests/sentinel.pp @@ -49,6 +49,9 @@ # @param redis_port # Specify the port of the master redis server. # +# @param requirepass +# Specify the password to require client authentication via the AUTH command, however this feature is only available starting with Redis 5.0.1. +# # @param package_name # The name of the package that installs sentinel. # @@ -120,6 +123,7 @@ String[1] $master_name = 'mymaster', Stdlib::Host $redis_host = '127.0.0.1', Stdlib::Port $redis_port = 6379, + Optional[String] $requirepass = undef, String[1] $package_name = $redis::params::sentinel_package_name, String[1] $package_ensure = 'present', Integer[0] $parallel_sync = 1, From c642cec408c0694feff185d4e3904a64f889ffa1 Mon Sep 17 00:00:00 2001 From: markasammut Date: Wed, 28 Apr 2021 10:29:13 +0200 Subject: [PATCH 3/3] Update manifests/sentinel.pp Co-authored-by: Tim Meusel --- manifests/sentinel.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/sentinel.pp b/manifests/sentinel.pp index b10e0eb5..4565139a 100644 --- a/manifests/sentinel.pp +++ b/manifests/sentinel.pp @@ -122,7 +122,7 @@ String[1] $master_name = 'mymaster', Stdlib::Host $redis_host = '127.0.0.1', Stdlib::Port $redis_port = 6379, - Optional[String] $requirepass = undef, + Optional[String[1]] $requirepass = undef, String[1] $package_name = $redis::params::sentinel_package_name, String[1] $package_ensure = 'present', Integer[0] $parallel_sync = 1,