Skip to content

Commit

Permalink
Refs #36573 - Drop default value for foreman_url
Browse files Browse the repository at this point in the history
This default matches what's in theforeman/puppetserver_foreman and is
not needed. Users can still override it, but the default just duplicates
things.
  • Loading branch information
ekohl committed Aug 7, 2023
1 parent be5143f commit 509f86b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion manifests/init.pp
Expand Up @@ -693,7 +693,7 @@
Boolean $server_strict_variables = $puppet::params::server_strict_variables,
Hash[String, Data] $server_additional_settings = $puppet::params::server_additional_settings,
Boolean $server_foreman = $puppet::params::server_foreman,
Stdlib::HTTPUrl $server_foreman_url = $puppet::params::server_foreman_url,
Optional[Stdlib::HTTPUrl] $server_foreman_url = $puppet::params::server_foreman_url,
Optional[Stdlib::Absolutepath] $server_foreman_ssl_ca = $puppet::params::server_foreman_ssl_ca,
Optional[Stdlib::Absolutepath] $server_foreman_ssl_cert = $puppet::params::server_foreman_ssl_cert,
Optional[Stdlib::Absolutepath] $server_foreman_ssl_key = $puppet::params::server_foreman_ssl_key,
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Expand Up @@ -329,7 +329,7 @@
true => '/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet',
false => undef,
}
$server_foreman_url = "https://${lower_fqdn}"
$server_foreman_url = undef
$server_foreman_ssl_ca = undef
$server_foreman_ssl_cert = undef
$server_foreman_ssl_key = undef
Expand Down
2 changes: 1 addition & 1 deletion manifests/server.pp
Expand Up @@ -404,7 +404,7 @@
Boolean $strict_variables = $puppet::server_strict_variables,
Hash[String, Data] $additional_settings = $puppet::server_additional_settings,
Boolean $foreman = $puppet::server_foreman,
Stdlib::HTTPUrl $foreman_url = $puppet::server_foreman_url,
Optional[Stdlib::HTTPUrl] $foreman_url = $puppet::server_foreman_url,
Optional[Stdlib::Absolutepath] $foreman_ssl_ca = $puppet::server_foreman_ssl_ca,
Optional[Stdlib::Absolutepath] $foreman_ssl_cert = $puppet::server_foreman_ssl_cert,
Optional[Stdlib::Absolutepath] $foreman_ssl_key = $puppet::server_foreman_ssl_key,
Expand Down
10 changes: 3 additions & 7 deletions spec/classes/puppet_server_spec.rb
Expand Up @@ -154,15 +154,11 @@
it { should contain_class('puppet::server::puppetserver') }
end

describe 'with uppercase hostname' do
let(:facts) do
override_facts(super(),
networking: {fqdn: 'PUPPETSERVER.example.com'},
)
end
describe 'with server_foreman_url' do
let(:params) { super().merge(server_foreman_url: 'https://foreman.example.com') }

it { should compile.with_all_deps }
it { should contain_class('puppet').with_server_foreman_url('https://puppetserver.example.com') }
it { should contain_class('puppet').with_server_foreman_url('https://foreman.example.com') }
end

describe 'with ip parameter' do
Expand Down

0 comments on commit 509f86b

Please sign in to comment.