Skip to content

Commit 968850c

Browse files
ekohlehelms
authored andcommitted
Fixes #38330 - Set foreman_url in settings.yaml
The foreman_url is already a parameter. It'd be more consistent if we enforced this in settings so users can't override it.
1 parent ce3defd commit 968850c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

spec/classes/foreman_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
should contain_concat__fragment('foreman_settings+00-header.yaml').with_content(/^## Module:\s+'foreman'$/)
2727

2828
should contain_concat__fragment('foreman_settings+01-base.yaml')
29+
.with_content(%r{^:foreman_url:\s*https://foo\.example\.com$})
2930
.with_content(/^:unattended:\s*true$/)
3031
.without_content(/^:unattended_url:/)
3132
.with_content(/^:require_ssl:\s*true$/)

templates/settings.yaml.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
:foreman_url: <%= scope.lookupvar("foreman::foreman_url") %>
12
:unattended: <%= scope.lookupvar("foreman::unattended") %>
23
<% unless [nil, :undefined, :undef].include?(scope.lookupvar("foreman::unattended_url")) -%>
34
:unattended_url: <%= scope.lookupvar("foreman::unattended_url") %>

0 commit comments

Comments
 (0)