diff --git a/manifests/init.pp b/manifests/init.pp index 2bee908d5..5efd58295 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -48,8 +48,6 @@ # # === Advanced parameters: # -# $foreman_url:: URL on which foreman is going to run -# # $unattended:: Should Foreman manage host provisioning as well # # $unattended_url:: URL hosts will retrieve templates from during build (normally http as many installers don't support https) @@ -203,7 +201,6 @@ # $keycloak_realm:: The realm as passed to keycloak-httpd-client-install # class foreman ( - Stdlib::HTTPUrl $foreman_url = $foreman::params::foreman_url, Boolean $unattended = true, Optional[Stdlib::HTTPUrl] $unattended_url = undef, Boolean $apache = true, @@ -303,6 +300,8 @@ $db_sslmode_real = $db_sslmode } + $foreman_url = "https://${servername}" + include foreman::install include foreman::config include foreman::database diff --git a/manifests/params.pp b/manifests/params.pp index de87bb52b..2e3749e9a 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,8 +3,6 @@ class foreman::params inherits foreman::globals { $lower_fqdn = downcase($facts['networking']['fqdn']) - # Basic configurations - $foreman_url = "https://${lower_fqdn}" # Server name of the VirtualHost $servername = $facts['networking']['fqdn'] diff --git a/spec/classes/foreman_cli_spec.rb b/spec/classes/foreman_cli_spec.rb index 618e7f461..7c6a1b20f 100644 --- a/spec/classes/foreman_cli_spec.rb +++ b/spec/classes/foreman_cli_spec.rb @@ -115,7 +115,7 @@ class { 'foreman': initial_admin_username => 'jane', initial_admin_password => 'supersecret', - foreman_url => 'https://foreman.example.com', + servername => 'foreman.example.com', server_ssl_chain => '/etc/puppetlabs/puppet/ssl/certs/ca.pub', } PUPPET diff --git a/spec/classes/foreman_spec.rb b/spec/classes/foreman_spec.rb index 76dd527ec..23f21514b 100644 --- a/spec/classes/foreman_spec.rb +++ b/spec/classes/foreman_spec.rb @@ -182,7 +182,6 @@ describe 'with all parameters' do let :params do { - foreman_url: 'http://localhost', unattended: true, servername: 'localhost', serveraliases: ['foreman'], diff --git a/spec/classes/plugin/remote_execution_cockpit_spec.rb b/spec/classes/plugin/remote_execution_cockpit_spec.rb index eab988491..e0d59e5c9 100644 --- a/spec/classes/plugin/remote_execution_cockpit_spec.rb +++ b/spec/classes/plugin/remote_execution_cockpit_spec.rb @@ -7,7 +7,7 @@ let(:pre_condition) do <<-PUPPET class {'foreman': - foreman_url => 'https://foreman.example.com', + servername => 'foreman.example.com', server_ssl_chain => '/path/to/ca.pem', client_ssl_cert => '/path/to/cert.pem', client_ssl_key => '/path/to/key.pem',