Skip to content

Commit

Permalink
Allow other manifests to define ::apache::mod{ 'ssl': }.
Browse files Browse the repository at this point in the history
This will allow Apache from the httpd24 SCL on RHELish systems to
include the proper mod_ssl package while still letting ssl
::apache::vhost defines work as expected.

Add package_name param to ::apache::mod::ssl.

Add a test for the package_name parameter.

Update the package_name parameter test.
  • Loading branch information
smerrill committed Aug 14, 2014
1 parent 445fdc7 commit 503be6d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion manifests/mod/ssl.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
$ssl_options = [ 'StdEnvVars' ],
$ssl_cipher = 'HIGH:MEDIUM:!aNULL:!MD5',
$apache_version = $::apache::apache_version,
$package_name = undef,
) {
$session_cache = $::osfamily ? {
'debian' => '${APACHE_RUN_DIR}/ssl_scache(512000)',
Expand Down Expand Up @@ -31,7 +32,9 @@
}
}

::apache::mod { 'ssl': }
::apache::mod { 'ssl':
package => $package_name,
}

if versioncmp($apache_version, '2.4') >= 0 {
::apache::mod { 'socache_shmcb': }
Expand Down
9 changes: 9 additions & 0 deletions spec/classes/mod/ssl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_apache__mod('ssl') }
it { is_expected.to contain_package('mod_ssl') }
context 'with a custom package_name parameter' do
let :params do
{ :package_name => 'httpd24-mod_ssl' }
end
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_apache__mod('ssl') }
it { is_expected.to contain_package('httpd24-mod_ssl') }
it { is_expected.not_to contain_package('mod_ssl') }
end
end

context 'on a Debian OS' do
Expand Down

0 comments on commit 503be6d

Please sign in to comment.