Showing with 39 additions and 13 deletions.
  1. +11 −0 CHANGELOG.md
  2. +6 −0 manifests/plugin/hdm.pp
  3. +1 −1 manifests/repo.pp
  4. +6 −4 metadata.json
  5. +8 −6 spec/acceptance/foreman_cli_plugins_spec.rb
  6. +2 −2 spec/classes/foreman_repo_spec.rb
  7. +5 −0 spec/classes/plugin/hdm_spec.rb
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [24.2.0](https://github.com/theforeman/puppet-foreman/tree/24.2.0) (2024-02-19)

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

**Implemented enhancements:**

- Mark compatible with puppet/redis 10.x [\#1153](https://github.com/theforeman/puppet-foreman/pull/1153) ([ekohl](https://github.com/ekohl))
- Support EL9 [\#1152](https://github.com/theforeman/puppet-foreman/pull/1152) ([ekohl](https://github.com/ekohl))
- Add hiera data manager \(HDM\) plugin [\#1149](https://github.com/theforeman/puppet-foreman/pull/1149) ([tuxmea](https://github.com/tuxmea))
- Only install dnf module on EL8 [\#1147](https://github.com/theforeman/puppet-foreman/pull/1147) ([ekohl](https://github.com/ekohl))

## [24.1.0](https://github.com/theforeman/puppet-foreman/tree/24.1.0) (2023-11-29)

[Full Changelog](https://github.com/theforeman/puppet-foreman/compare/24.0.0...24.1.0)
Expand Down
6 changes: 6 additions & 0 deletions manifests/plugin/hdm.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# @summary Install the Hiera Data Manager (HDM) plugin
#
class foreman::plugin::hdm {
foreman::plugin { 'hdm':
}
}
2 changes: 1 addition & 1 deletion manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
before => Anchor['foreman::repo'],
}

if $facts['os']['family'] == 'RedHat' {
if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '8' {
package { 'foreman':
ensure => "el${facts['os']['release']['major']}",
enable_only => true,
Expand Down
10 changes: 6 additions & 4 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "theforeman-foreman",
"version": "24.1.0",
"version": "24.2.0",
"author": "theforeman",
"summary": "Foreman server configuration",
"license": "GPL-3.0+",
Expand Down Expand Up @@ -42,7 +42,7 @@
},
{
"name": "puppet/redis",
"version_requirement": ">= 5.0.0 < 10.0.0"
"version_requirement": ">= 5.0.0 < 11.0.0"
}
],
"requirements": [
Expand All @@ -55,13 +55,15 @@
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"8"
"8",
"9"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"8"
"8",
"9"
]
},
{
Expand Down
14 changes: 8 additions & 6 deletions spec/acceptance/foreman_cli_plugins_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ class { 'foreman::cli':
gpgcheck => 0,
}
package { 'katello':
ensure => "el${facts['os']['release']['major']}",
enable_only => true,
provider => 'dnfmodule',
require => Yumrepo['katello'],
if $facts['os']['release']['major'] == '8' {
package { 'katello':
ensure => "el${facts['os']['release']['major']}",
enable_only => true,
provider => 'dnfmodule',
require => Yumrepo['katello'],
}
Package['katello'] -> Class['foreman::cli::katello']
}
Package['katello'] -> Class['foreman::cli::katello']
class { 'foreman::cli':
foreman_url => 'https://foreman.example.com',
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/foreman_repo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
}

it do
if facts[:osfamily] == 'RedHat'
if facts[:osfamily] == 'RedHat' && facts[:os]['release']['major'] == '8'
is_expected.to contain_package('foreman').with_ensure('el8').with_provider('dnfmodule')
else
is_expected.not_to contain_package('ruby')
is_expected.not_to contain_package('foreman')
end
end
end
Expand Down
5 changes: 5 additions & 0 deletions spec/classes/plugin/hdm_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'spec_helper'

describe 'foreman::plugin::hdm' do
include_examples 'basic foreman plugin tests', 'hdm'
end