Skip to content

Commit

Permalink
Merge pull request #135 from petems/fix_debian_runfolder_issue
Browse files Browse the repository at this point in the history
adding /var/run/redis for Debian based hosts
  • Loading branch information
petems authored Nov 30, 2016
2 parents c2717f8 + a097c04 commit 7b9955f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
7 changes: 7 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@
owner => $::redis::config_owner,
}

file { '/var/run/redis':
ensure => 'directory',
owner => $::redis::config_owner,
group => $::redis::config_group,
mode => '0755',
}

if $::redis::ulimit {
augeas { 'redis ulimit' :
context => '/files/etc/default/redis-server',
Expand Down
29 changes: 29 additions & 0 deletions spec/classes/redis_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,35 @@
'hasstatus' => 'true'
)
end

case facts[:operatingsystem]
when 'Debian'

context 'on Debian' do

it do
is_expected.to contain_file('/var/run/redis').with({
:ensure => 'directory',
:owner => 'redis',
:group => 'root',
:mode => '0755',
})
end

end

when 'Ubuntu'

it do
is_expected.to contain_file('/var/run/redis').with({
:ensure => 'directory',
:owner => 'redis',
:group => 'root',
:mode => '0755',
})
end

end
end

describe 'with parameter activerehashing' do
Expand Down

0 comments on commit 7b9955f

Please sign in to comment.