Skip to content

Commit

Permalink
Update redis to df98121
Browse files Browse the repository at this point in the history
df98121 Updated test for redid-sentinel (auth_pass)
c9de95f Added auth-pass to redis sentinel
  • Loading branch information
xbezdick committed Mar 23, 2015
1 parent 0be9230 commit 7a289ad
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ mod 'rabbitmq',
:git => 'https://github.com/puppetlabs/puppetlabs-rabbitmq.git'

mod 'redis',
:commit => '8f9c2bc96e08409b558de678aa6a023abbfacfb8',
:commit => 'df98121b24a8075e817b1f41ce7b5aea7516736b',
:git => 'https://github.com/arioch/puppet-redis.git'

mod 'remote',
Expand Down
1 change: 1 addition & 0 deletions redis/manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
$port = 6379
$rdbcompression = true
$requirepass = undef
$sentinel_auth_pass = undef
$sentinel_config_file_mode = '0644'
$sentinel_config_group = 'root'
$sentinel_config_owner = 'redis'
Expand Down
7 changes: 7 additions & 0 deletions redis/manifests/sentinel.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
#
# == Parameters:
#
#
# [*auth_pass*]
# The password to use to authenticate with the master and slaves.
#
# Default: undef
#
# [*config_file*]
# The location and name of the sentinel config file.
#
Expand Down Expand Up @@ -138,6 +144,7 @@
# }
#
class redis::sentinel (
$auth_pass = $::redis::params::sentinel_auth_pass,
$config_file = $::redis::params::sentinel_config_file,
$config_file_orig = $::redis::params::sentinel_config_file_orig,
$config_file_mode = $::redis::params::sentinel_config_file_mode,
Expand Down
2 changes: 2 additions & 0 deletions redis/spec/classes/redis_sentinel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
sentinel down-after-milliseconds cow 6000
sentinel parallel-syncs cow 1
sentinel failover-timeout cow 28000
sentinel auth-pass cow password
sentinel notification-script cow bar.sh
logfile /tmp/barn-sentinel.log
Expand Down Expand Up @@ -63,6 +64,7 @@
describe 'with custom parameters' do
let (:params) {
{
:auth_pass => 'password',
:master_name => 'cow',
:down_after => 6000,
:log_file => '/tmp/barn-sentinel.log',
Expand Down
3 changes: 3 additions & 0 deletions redis/templates/redis-sentinel.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ sentinel monitor <%= @master_name %> <%= @redis_host %> <%= @redis_port %> <%= @
sentinel down-after-milliseconds <%= @master_name %> <%= @down_after %>
sentinel parallel-syncs <%= @master_name %> <%= @parallel_sync %>
sentinel failover-timeout <%= @master_name %> <%= @failover_timeout %>
<% if @auth_pass -%>
sentinel auth-pass <%= @master_name %> <%= @auth_pass %>
<% end -%>
<% if @notification_script -%>
sentinel notification-script <%= @master_name %> <%= @notification_script %>
<% end -%>
Expand Down

0 comments on commit 7a289ad

Please sign in to comment.