Skip to content

Commit

Permalink
Merge pull request #1195 from ngrossmann/modules-2513_mod_ssl_fails_o…
Browse files Browse the repository at this point in the history
…n_sles

MODULES-2513 mod::ssl fails on SLES
  • Loading branch information
tphoney committed Sep 3, 2015
2 parents 00b0da7 + be08985 commit abcdc9f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
17 changes: 11 additions & 6 deletions manifests/mod/ssl.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
$apache_version = $::apache::apache_version,
$package_name = undef,
) {
$session_cache = $::osfamily ? {
'debian' => "\${APACHE_RUN_DIR}/ssl_scache(512000)",
'redhat' => '/var/cache/mod_ssl/scache(512000)',
'freebsd' => '/var/run/ssl_scache(512000)',
'gentoo' => '/var/run/ssl_scache(512000)',
}

case $::osfamily {
'debian': {
Expand All @@ -38,11 +32,22 @@
'gentoo': {
$ssl_mutex = 'default'
}
'Suse': {
$ssl_mutex = 'default'
}
default: {
fail("Unsupported osfamily ${::osfamily}")
}
}

$session_cache = $::osfamily ? {
'debian' => "\${APACHE_RUN_DIR}/ssl_scache(512000)",
'redhat' => '/var/cache/mod_ssl/scache(512000)',
'freebsd' => '/var/run/ssl_scache(512000)',
'gentoo' => '/var/run/ssl_scache(512000)',
'Suse' => '/var/lib/apache2/ssl_scache(512000)'
}

::apache::mod { 'ssl':
package => $package_name,
}
Expand Down
16 changes: 16 additions & 0 deletions spec/classes/mod/ssl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,22 @@
it { is_expected.to contain_apache__mod('ssl') }
end

context 'on a Suse OS' do
let :facts do
{
:osfamily => 'Suse',
:operatingsystem => 'SLES',
:operatingsystemrelease => '11.2',
:concat_basedir => '/dne',
:id => 'root',
:kernel => 'Linux',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin',
:is_pe => false,
}
end
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_apache__mod('ssl') }
end
# Template config doesn't vary by distro
context "on all distros" do
let :facts do
Expand Down

0 comments on commit abcdc9f

Please sign in to comment.