File tree 4 files changed +24
-0
lines changed
4 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 15
15
# Path for pid file. Full pid path is <sentinel_pid_dir>/redis-sentinel_<redis_name>.pid. Default: /var/run
16
16
# [*monitors*]
17
17
# Default is
18
+ #
19
+ # [*protected_mode*]
20
+ # If no password and/or no bind address is set, sentinel defaults to being reachable only
21
+ # on the loopback interface. Turn this behaviour off by setting protected mode to 'no'.
22
+ #
18
23
# {
19
24
# 'mymaster' => {
20
25
# master_host => '127.0.0.1',
50
55
$sentinel_log_dir = ' /var/log' ,
51
56
$sentinel_pid_dir = ' /var/run' ,
52
57
$sentinel_run_dir = ' /var/run/redis' ,
58
+ $protected_mode = undef ,
53
59
$monitors = {
54
60
' mymaster' = > {
55
61
master_host = > ' 127.0.0.1' ,
80
86
validate_bool($enabled )
81
87
validate_bool($manage_logrotate )
82
88
89
+ if $protected_mode {
90
+ validate_re($protected_mode ,[' ^no$' , ' ^yes$' ])
91
+ }
92
+
83
93
$redis_install_dir = $::redis::install::redis_install_dir
84
94
$sentinel_init_script = $::operatingsystem ? {
85
95
/(Debian|Ubuntu)/ => ' redis/etc/init.d/debian_redis-sentinel.erb' ,
Original file line number Diff line number Diff line change 78
78
# [*hash_max_ziplist_value*]
79
79
# Threshold for ziplist value. Default: 64
80
80
#
81
+ # [*protected_mode*]
82
+ # If no password and/or no bind address is set, redis defaults to being reachable only
83
+ # on the loopback interface. Turn this behaviour off by setting protected mode to 'no'.
84
+ #
81
85
# [*redis_run_dir*]
82
86
#
83
87
# Default: `/var/run/redis`
159
163
$cluster_slave_validity_factor = undef ,
160
164
$cluster_migration_barrier = undef ,
161
165
$cluster_require_full_coverage = true ,
166
+ $protected_mode = undef ,
162
167
) {
163
168
$redis_user = $::redis::install::redis_user
164
169
$redis_group = $::redis::install::redis_group
Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ daemonize no
22
22
daemonize yes
23
23
<% end -%>
24
24
25
+ <% if @protected_mode then -%>
26
+ protected-mode <%= @protected_mode %>
27
+ <% end -%>
28
+
25
29
# When running daemonized, Redis writes a pid file in <%= @redis_pid_dir %> /redis.pid by
26
30
# default. You can specify a custom pid file location here.
27
31
pidfile <%= @redis_pid_dir %> /redis_<%= @redis_name %> .pid
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ bind <%= @sentinel_ip %>
18
18
<% end -%>
19
19
port <%= @sentinel_port %>
20
20
21
+ <% if @protected_mode then -%>
22
+ protected-mode <%= @protected_mode %>
23
+
24
+ <% end -%>
25
+
21
26
<%
22
27
#rules = scope.lookupvar('redis::sentinel::monitors')
23
28
@monitors.sort.each do |name, rule| -%>
You can’t perform that action at this time.
0 commit comments