Skip to content

Commit

Permalink
Refs #28922: Communicate via localhost to Candlepin
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Mar 4, 2020
1 parent 185ca82 commit 5326d9e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 5 additions & 1 deletion manifests/candlepin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@
Boolean $manage_db = true,
) {
include certs
include certs::candlepin
include katello::params

class { 'certs::candlepin':
hostname => $katello::params::candlepin_host,
}

Anchor <| title == 'katello::qpid::event_queue' |> ->
class { 'candlepin':
host => $katello::params::candlepin_host,
user_groups => $certs::candlepin::group,
oauth_key => $katello::params::candlepin_oauth_key,
oauth_secret => $katello::params::candlepin_oauth_secret,
Expand Down
5 changes: 4 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# This is a reversed model compared to the "regular" globals, but the
# parameters on globals are reserved for the foreman-installer
#
# @param candlepin_host
# The host to run Candlepin as
# @param candlepin_url
# The URL to connect to Candlepin
# @param pulp_url
Expand All @@ -21,11 +23,12 @@
# @param candlepin_oauth_secret
# The oauth secret for Candlepin
class katello::params (
Stdlib::Httpsurl $candlepin_url = "https://${facts['fqdn']}:8443/candlepin",
Stdlib::Httpsurl $pulp_url = "https://${facts['fqdn']}/pulp/api/v2/",
Stdlib::Httpsurl $crane_url = "https://${facts['fqdn']}:5000",
Stdlib::Host $qpid_hostname = 'localhost',
String[1] $candlepin_oauth_key = $katello::globals::candlepin_oauth_key,
String[1] $candlepin_oauth_secret = $katello::globals::candlepin_oauth_secret,
Stdlib::Host $candlepin_host = 'localhost',
Stdlib::Httpsurl $candlepin_url = "https://${candlepin_host}:8443/candlepin"
) inherits katello::globals {
}
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
{
"name": "katello/candlepin",
"version_requirement": ">= 4.0.0 < 10.0.0"
"version_requirement": ">= 9.0.0 < 10.0.0"
},
{
"name": "katello/certs",
Expand Down
6 changes: 3 additions & 3 deletions spec/classes/application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class { 'katello::params':
' :docker: true',
' :ostree: false',
' :candlepin:',
' :url: https://foo.example.com:8443/candlepin',
' :url: https://localhost:8443/candlepin',
' :oauth_key: "katello"',
' :oauth_secret: "candlepin-secret"',
' :ca_cert_file: /etc/pki/katello/certs/katello-default-ca.crt',
Expand Down Expand Up @@ -129,7 +129,7 @@ class { 'katello::params':
' :docker: true',
' :ostree: false',
' :candlepin:',
' :url: https://foo.example.com:8443/candlepin',
' :url: https://localhost:8443/candlepin',
' :oauth_key: "katello"',
' :oauth_secret: "candlepin-secret"',
' :ca_cert_file: /etc/pki/katello/certs/katello-default-ca.crt',
Expand Down Expand Up @@ -173,7 +173,7 @@ class {'katello::globals':
' :docker: true',
' :ostree: true',
' :candlepin:',
' :url: https://foo.example.com:8443/candlepin',
' :url: https://localhost:8443/candlepin',
' :oauth_key: "katello"',
' :oauth_secret: "candlepin-secret"',
' :ca_cert_file: /etc/pki/katello/certs/katello-default-ca.crt',
Expand Down

0 comments on commit 5326d9e

Please sign in to comment.