Skip to content

Commit 1a1117e

Browse files
committed
Refs #36573 - Drop default value for foreman_url
This default matches what's in theforeman/puppetserver_foreman and is not needed. Users can still override it, but the default just duplicates things.
1 parent be5143f commit 1a1117e

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@
693693
Boolean $server_strict_variables = $puppet::params::server_strict_variables,
694694
Hash[String, Data] $server_additional_settings = $puppet::params::server_additional_settings,
695695
Boolean $server_foreman = $puppet::params::server_foreman,
696-
Stdlib::HTTPUrl $server_foreman_url = $puppet::params::server_foreman_url,
696+
Optional[Stdlib::HTTPUrl] $server_foreman_url = $puppet::params::server_foreman_url,
697697
Optional[Stdlib::Absolutepath] $server_foreman_ssl_ca = $puppet::params::server_foreman_ssl_ca,
698698
Optional[Stdlib::Absolutepath] $server_foreman_ssl_cert = $puppet::params::server_foreman_ssl_cert,
699699
Optional[Stdlib::Absolutepath] $server_foreman_ssl_key = $puppet::params::server_foreman_ssl_key,

manifests/params.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@
329329
true => '/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet',
330330
false => undef,
331331
}
332-
$server_foreman_url = "https://${lower_fqdn}"
332+
$server_foreman_url = undef
333333
$server_foreman_ssl_ca = undef
334334
$server_foreman_ssl_cert = undef
335335
$server_foreman_ssl_key = undef

manifests/server.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@
404404
Boolean $strict_variables = $puppet::server_strict_variables,
405405
Hash[String, Data] $additional_settings = $puppet::server_additional_settings,
406406
Boolean $foreman = $puppet::server_foreman,
407-
Stdlib::HTTPUrl $foreman_url = $puppet::server_foreman_url,
407+
Optional[Stdlib::HTTPUrl] $foreman_url = $puppet::server_foreman_url,
408408
Optional[Stdlib::Absolutepath] $foreman_ssl_ca = $puppet::server_foreman_ssl_ca,
409409
Optional[Stdlib::Absolutepath] $foreman_ssl_cert = $puppet::server_foreman_ssl_cert,
410410
Optional[Stdlib::Absolutepath] $foreman_ssl_key = $puppet::server_foreman_ssl_key,

spec/classes/puppet_server_spec.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,11 @@
154154
it { should contain_class('puppet::server::puppetserver') }
155155
end
156156

157-
describe 'with uppercase hostname' do
158-
let(:facts) do
159-
override_facts(super(),
160-
networking: {fqdn: 'PUPPETSERVER.example.com'},
161-
)
162-
end
157+
describe 'with server_foreman_url' do
158+
let(:params) { super().merge(server_foreman_url: 'https://foreman.example.com') }
163159

164160
it { should compile.with_all_deps }
165-
it { should contain_class('puppet').with_server_foreman_url('https://puppetserver.example.com') }
161+
it { should contain_class('puppet').with_server_foreman_url('https://foreman.example.com') }
166162
end
167163

168164
describe 'with ip parameter' do

0 commit comments

Comments
 (0)