diff --git a/manifests/application.pp b/manifests/application.pp index 145a4806..24c54487 100644 --- a/manifests/application.pp +++ b/manifests/application.pp @@ -17,6 +17,7 @@ Optional[Enum['SSLv23', 'TLSv1', '']] $cdn_ssl_version = undef, Boolean $use_pulp_2_for_file = false, Boolean $use_pulp_2_for_docker = false, + Stdlib::Host $candlepin_host = 'localhost', ) { include foreman include certs @@ -55,7 +56,7 @@ $enable_deb = $katello::params::enable_deb $pulp_url = $katello::params::pulp_url $pulp_ca_cert = $certs::katello_server_ca_cert # TODO: certs::apache::... - $candlepin_url = $katello::params::candlepin_url + $candlepin_url = "https://${candlepin_host}:8443/candlepin" $candlepin_oauth_key = $katello::params::candlepin_oauth_key $candlepin_oauth_secret = $katello::params::candlepin_oauth_secret $candlepin_ca_cert = $certs::ca_cert diff --git a/manifests/candlepin.pp b/manifests/candlepin.pp index c268f4cf..5a6fda3b 100644 --- a/manifests/candlepin.pp +++ b/manifests/candlepin.pp @@ -1,5 +1,7 @@ # @summary Install and configure candlepin # +# @param host +# The host Candlepin's Tomcat should run on # @param db_host # The database host # @param db_port @@ -18,6 +20,7 @@ # @param manage_db # Whether to manage the database. Set this to false when using a remote database class katello::candlepin ( + Stdlib::Host $host = 'localhost', Stdlib::Host $db_host = 'localhost', Optional[Stdlib::Port] $db_port = undef, String $db_name = 'candlepin', @@ -28,11 +31,15 @@ Boolean $manage_db = true, ) { include certs - include certs::candlepin include katello::params + class { 'certs::candlepin': + hostname => $host, + } + Anchor <| title == 'katello::qpid::event_queue' |> -> class { 'candlepin': + host => $host, user_groups => $certs::candlepin::group, oauth_key => $katello::params::candlepin_oauth_key, oauth_secret => $katello::params::candlepin_oauth_secret, diff --git a/manifests/init.pp b/manifests/init.pp index 8467e8c4..65bc9436 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -36,6 +36,8 @@ # # $qpid_hostname:: Hostname used to connect to qpidd. # +# $candlepin_host:: Host for Candlepin +# # $candlepin_db_host:: Host with Candlepin DB # # $candlepin_db_port:: Port accepting connections to Candlepin DB @@ -122,6 +124,7 @@ Stdlib::Absolutepath $repo_export_dir = '/var/lib/pulp/katello-export', + Stdlib::Host $candlepin_host = 'localhost', String $candlepin_db_host = 'localhost', Optional[Stdlib::Port] $candlepin_db_port = undef, String $candlepin_db_name = 'candlepin', @@ -166,6 +169,7 @@ } class { 'katello::candlepin': + host => $candlepin_host, db_host => $candlepin_db_host, db_port => $candlepin_db_port, db_name => $candlepin_db_name, @@ -206,6 +210,7 @@ cdn_ssl_version => $cdn_ssl_version, use_pulp_2_for_file => $use_pulp_2_for_file, use_pulp_2_for_docker => $use_pulp_2_for_docker, + candlepin_host => $candlepin_host, } } diff --git a/manifests/params.pp b/manifests/params.pp index 8ed70324..cbf60ded 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -8,8 +8,6 @@ # This is a reversed model compared to the "regular" globals, but the # parameters on globals are reserved for the foreman-installer # -# @param candlepin_url -# The URL to connect to Candlepin # @param pulp_url # The URL to connect to Pulp # @param crane_url @@ -21,7 +19,6 @@ # @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',