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

introduce rhsm_hostname parameter #148

Merged
merged 1 commit into from
Nov 28, 2017
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
6 changes: 5 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
#
# $reverse_proxy_port:: Reverse proxy listening port
#
# $rhsm_url:: The URL that the RHSM API is rooted at
# $rhsm_hostname:: The hostname that the RHSM API is rooted at
#
# $rhsm_url:: The URL path that the RHSM API is rooted at
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this parameter is badly named. 👍 for at least improving the documentation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the parameter name is very misleading. rhsm_path or something would be better.

#
# $qpid_router:: Configure qpid dispatch router
#
Expand Down Expand Up @@ -65,6 +67,7 @@
Boolean $reverse_proxy = $foreman_proxy_content::params::reverse_proxy,
Integer[0, 65535] $reverse_proxy_port = $foreman_proxy_content::params::reverse_proxy_port,

Optional[String] $rhsm_hostname = $foreman_proxy_content::params::rhsm_hostname,
String $rhsm_url = $foreman_proxy_content::params::rhsm_url,

Boolean $qpid_router = $foreman_proxy_content::params::qpid_router,
Expand Down Expand Up @@ -107,6 +110,7 @@
}

class { '::certs::katello':
hostname => $rhsm_hostname,
deployment_url => $rhsm_url,
rhsm_port => $rhsm_port,
require => Class['certs'],
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
$reverse_proxy_port = 8443

$certs_tar = undef
$rhsm_hostname = undef
$rhsm_url = '/rhsm'

$puppet = true
Expand Down
16 changes: 16 additions & 0 deletions spec/classes/foreman_proxy_content_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@ class {'foreman_proxy::plugin::pulp': pulpnode_enabled => true}"
it { should contain_pulp__apache__fragment('gpg_key_proxy').with({
:ssl_content => %r{ProxyPass /katello/api/repositories/}} ) }
end

context 'with rhsm_hostname and rhsm_url' do
let(:params) do
{
:rhsm_hostname => 'katello.example.com',
:rhsm_url => '/abc/rhsm'
}

it do
should contain_class('certs::katello').with(
:hostname => 'katello.example.com',
:deployment_url => '/abc/rhsm'
)
end
end
end
end
end
end