Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying custom fragment on httpd module #133

Merged
merged 1 commit into from
Mar 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions manifests/apache/fragment.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# provides the ability to specify fragments for the ssl
# virtual host defined for a Pulp server
#
# === Parameters:
#
# $ssl_content:: content of the ssl virtual host fragment
define pulp::apache::fragment(
$ssl_content,
$order = 15,
) {

validate_string($ssl_content)

concat::fragment { $name:
target => '05-pulp-https.conf',
content => $ssl_content,
order => $order,
}

}
30 changes: 30 additions & 0 deletions spec/defines/pulp_apache_fragment_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
require 'spec_helper'

describe 'pulp::apache::fragment' do
let(:title) { 'fragment_title' }

context 'on redhat' do
let :facts do
{
:concat_basedir => '/tmp',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '6.4',
:operatingsystemmajrelease => '6.4',
:osreleasemajor => '6',
:osfamily => 'RedHat',
:processorcount => 3,
}
end

context 'with ssl_content parameter' do
let :params do
{ :ssl_content => "some_string" }
end

it do
should contain_concat__fragment("fragment_title").with_content('some_string')
end
end

end
end