Showing with 44 additions and 8 deletions.
  1. +14 −0 CHANGELOG.md
  2. +6 −0 manifests/init.pp
  3. +3 −3 metadata.json
  4. +11 −3 spec/classes/foreman_spec.rb
  5. +10 −2 templates/settings.yaml.erb
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [23.2.0](https://github.com/theforeman/puppet-foreman/tree/23.2.0) (2023-10-10)

[Full Changelog](https://github.com/theforeman/puppet-foreman/compare/23.1.0...23.2.0)

**Implemented enhancements:**

- Fixes [\#36812](https://projects.theforeman.org/issues/36812) - allow setting \(fc\)ct\_location [\#1135](https://github.com/theforeman/puppet-foreman/pull/1135) ([evgeni](https://github.com/evgeni))
- Mark compatible with puppetlabs/apache 11.x [\#1131](https://github.com/theforeman/puppet-foreman/pull/1131) ([ekohl](https://github.com/ekohl))
- Allow puppet/systemd 5.x and 6.x [\#1129](https://github.com/theforeman/puppet-foreman/pull/1129) ([evgeni](https://github.com/evgeni))

**Fixed bugs:**

- correct sendmail configuration [\#1130](https://github.com/theforeman/puppet-foreman/pull/1130) ([evgeni](https://github.com/evgeni))

## [23.1.0](https://github.com/theforeman/puppet-foreman/tree/23.1.0) (2023-08-16)

[Full Changelog](https://github.com/theforeman/puppet-foreman/compare/23.0.0...23.1.0)
Expand Down
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@
#
# $register_in_foreman:: Register host in Foreman
#
# $provisioning_ct_location:: The location of the binary to call when transpiling CoreOS templates.
#
# $provisioning_fcct_location:: The location of the binary to call when transpiling Fedora CoreOS templates.
#
# === Dynflow parameters:
#
# $dynflow_manage_services:: Whether to manage the dynflow services
Expand Down Expand Up @@ -297,6 +301,8 @@
String[1] $keycloak_app_name = 'foreman-openidc',
String[1] $keycloak_realm = 'ssl-realm',
Boolean $register_in_foreman = true,
Optional[Stdlib::Absolutepath] $provisioning_ct_location = undef,
Optional[Stdlib::Absolutepath] $provisioning_fcct_location = undef,
) inherits foreman::params {
assert_type(Array[Stdlib::IP::Address], $trusted_proxies)

Expand Down
6 changes: 3 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "theforeman-foreman",
"version": "23.1.0",
"version": "23.2.0",
"author": "theforeman",
"summary": "Foreman server configuration",
"license": "GPL-3.0+",
Expand All @@ -14,11 +14,11 @@
"dependencies": [
{
"name": "puppet/systemd",
"version_requirement": ">= 3.1.0 < 5.0.0"
"version_requirement": ">= 3.1.0 < 7.0.0"
},
{
"name": "puppetlabs/apache",
"version_requirement": ">= 8.0.0 < 11.0.0"
"version_requirement": ">= 8.0.0 < 12.0.0"
},
{
"name": "puppetlabs/apt",
Expand Down
14 changes: 11 additions & 3 deletions spec/classes/foreman_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
.with_queues(['dynflow_orchestrator'])
}
it {
is_expected.to contain_service('postgresqld')
is_expected.to contain_service('postgresqld_instance_main')
.that_notifies('Service[dynflow-sidekiq@orchestrator]')
}
it { should contain_foreman__dynflow__worker('worker').with_ensure('absent') }
Expand Down Expand Up @@ -246,6 +246,8 @@
keycloak: true,
keycloak_app_name: 'cloak-app',
keycloak_realm: 'myrealm',
provisioning_ct_location: '/usr/bin/myct',
provisioning_fcct_location: '/usr/bin/myfcct',
}
end

Expand All @@ -262,11 +264,17 @@

it 'should configure certificates in settings.yaml' do
is_expected.to contain_concat__fragment('foreman_settings+01-header.yaml')
.with_content(%r{^:email_sendmail_location: "/usr/bin/mysendmail"$})
.with_content(%r{^:email_sendmail_arguments: "--myargument"$})
.with_content(%r{^:sendmail_location: "/usr/bin/mysendmail"$})
.with_content(%r{^:sendmail_arguments: "--myargument"$})
.with_content(%r{^:websockets_ssl_key: /etc/ssl/private/snakeoil-ws\.pem$})
.with_content(%r{^:websockets_ssl_cert: /etc/ssl/certs/snakeoil-ws\.pem$})
end

it 'should configure ct and fcct commands in settings.yaml' do
is_expected.to contain_concat__fragment('foreman_settings+01-header.yaml')
.with_content(%r{^:ct_location: "/usr/bin/myct"$})
.with_content(%r{^:fcct_location: "/usr/bin/myfcct"$})
end
end

context 'with journald logging' do
Expand Down
12 changes: 10 additions & 2 deletions templates/settings.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@

# Email settings
<% if scope.lookupvar("foreman::email_sendmail_location") -%>
:email_sendmail_location: "<%= scope.lookupvar("foreman::email_sendmail_location") %>"
:sendmail_location: "<%= scope.lookupvar("foreman::email_sendmail_location") %>"
<% end -%>
<% if scope.lookupvar("foreman::email_sendmail_arguments") -%>
:email_sendmail_arguments: "<%= scope.lookupvar("foreman::email_sendmail_arguments") %>"
:sendmail_arguments: "<%= scope.lookupvar("foreman::email_sendmail_arguments") %>"
<% end -%>
<% end -%>
Expand All @@ -114,3 +114,11 @@
:namespace: foreman
<% end -%>
<% end -%>
<% if scope.lookupvar("foreman::provisioning_ct_location") -%>

:ct_location: "<%= scope.lookupvar("foreman::provisioning_ct_location") %>"
<% end -%>
<% if scope.lookupvar("foreman::provisioning_fcct_location") -%>

:fcct_location: "<%= scope.lookupvar("foreman::provisioning_fcct_location") %>"
<% end -%>