diff --git a/manifests/candlepin.pp b/manifests/candlepin.pp index c268f4cf..a2954b77 100644 --- a/manifests/candlepin.pp +++ b/manifests/candlepin.pp @@ -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, diff --git a/manifests/params.pp b/manifests/params.pp index 8ed70324..c0f04c01 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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 @@ -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 { } diff --git a/metadata.json b/metadata.json index 8cb1938d..c62115e7 100644 --- a/metadata.json +++ b/metadata.json @@ -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", diff --git a/spec/classes/application_spec.rb b/spec/classes/application_spec.rb index d0d93026..8fa7fdd9 100644 --- a/spec/classes/application_spec.rb +++ b/spec/classes/application_spec.rb @@ -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', @@ -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', @@ -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',