From 4d849c5494151dca1a9bb73449ff93806feb1139 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 24 Jan 2025 10:43:56 +0100 Subject: [PATCH 1/5] Drop EoL EL7 support --- Gemfile | 2 +- manifests/install.pp | 2 +- manifests/plugin/python.pp | 3 +-- manifests/plugin/rabbitmq.pp | 4 +--- manifests/plugin/write_http.pp | 6 +++--- metadata.json | 9 --------- spec/classes/collectd_plugin_rabbitmq_spec.rb | 14 +++++++------- spec/classes/collectd_plugin_write_http_spec.rb | 4 ++-- spec/spec_helper_methods.rb | 2 +- 9 files changed, 17 insertions(+), 29 deletions(-) diff --git a/Gemfile b/Gemfile index 7123c6636..9d5b5e789 100644 --- a/Gemfile +++ b/Gemfile @@ -26,7 +26,7 @@ end gem 'rake', :require => false gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test] -puppetversion = ENV['PUPPET_GEM_VERSION'] || '~> 7.24' +puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 7.24' gem 'puppet', puppetversion, :require => false, :groups => [:test] # vim: syntax=ruby diff --git a/manifests/install.pp b/manifests/install.pp index a198bb9cd..26f64a7bc 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -11,7 +11,7 @@ } } - if $collectd::utils and ( $facts['os']['family'] == 'Debian' or ( $facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'],'8') >= 0 )) { + if $collectd::utils and ( $facts['os']['family'] == 'Debian' or $facts['os']['family'] == 'RedHat' ) { package { 'collectd-utils': ensure => $collectd::package_ensure, } diff --git a/manifests/plugin/python.pp b/manifests/plugin/python.pp index fb505c823..ba4add2d6 100644 --- a/manifests/plugin/python.pp +++ b/manifests/plugin/python.pp @@ -31,8 +31,7 @@ $ensure_real = 'absent' } - if $facts['os']['name'] == 'Amazon' or - ($facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'],'8') >= 0) { + if $facts['os']['name'] == 'Amazon' or ($facts['os']['family'] == 'RedHat') { if $_manage_package { package { 'collectd-python': ensure => $ensure_real, diff --git a/manifests/plugin/rabbitmq.pp b/manifests/plugin/rabbitmq.pp index 291fe6860..c623ffec6 100644 --- a/manifests/plugin/rabbitmq.pp +++ b/manifests/plugin/rabbitmq.pp @@ -61,9 +61,7 @@ ) { include collectd - if $facts['os']['family'] == 'Debian' or - $facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'], '8') >= 0 or - $facts['os']['name'] == 'Ubuntu' { + if $facts['os']['family'] == 'Debian' or $facts['os']['family'] == 'RedHat' { fail('https://pypi.org/project/collectd-rabbitmq/ does not support Python 3') } diff --git a/manifests/plugin/write_http.pp b/manifests/plugin/write_http.pp index 3b993b512..56f95dbb6 100644 --- a/manifests/plugin/write_http.pp +++ b/manifests/plugin/write_http.pp @@ -19,10 +19,10 @@ if $manage_package !~ Undef { $_manage_package = $manage_package } else { - if $facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'],'8') >= 0 { - $_manage_package = true + $_manage_package = if $facts['os']['family'] == 'RedHat' { + true } else { - $_manage_package = false + false } } if $_manage_package { diff --git a/metadata.json b/metadata.json index 645009100..aaee67cb9 100644 --- a/metadata.json +++ b/metadata.json @@ -33,7 +33,6 @@ { "operatingsystem": "RedHat", "operatingsystemrelease": [ - "7", "8", "9" ] @@ -41,7 +40,6 @@ { "operatingsystem": "CentOS", "operatingsystemrelease": [ - "7", "8", "9" ] @@ -49,17 +47,10 @@ { "operatingsystem": "OracleLinux", "operatingsystemrelease": [ - "7", "8", "9" ] }, - { - "operatingsystem": "Scientific", - "operatingsystemrelease": [ - "7" - ] - }, { "operatingsystem": "Debian", "operatingsystemrelease": [ diff --git a/spec/classes/collectd_plugin_rabbitmq_spec.rb b/spec/classes/collectd_plugin_rabbitmq_spec.rb index 8f55956d6..f25ced6a8 100644 --- a/spec/classes/collectd_plugin_rabbitmq_spec.rb +++ b/spec/classes/collectd_plugin_rabbitmq_spec.rb @@ -26,7 +26,7 @@ end case [facts['os']['family'], facts['os']['release']['major']] - when %w[RedHat 8], %w[Ubuntu 20.04] + when %w[RedHat 8], %w[RedHat 9], %w[Ubuntu 20.04] it { is_expected.to raise_error(%r{does not support Python 3}) } else it 'import collectd_rabbitmq.collectd_plugin in python-config' do @@ -69,7 +69,7 @@ end case [facts['os']['family'], facts['os']['release']['major']] - when %w[RedHat 8], %w[Ubuntu 20.04] + when %w[RedHat 8], %w[RedHat 9], %w[Ubuntu 20.04] it { is_expected.to raise_error(%r{does not support Python 3}) } else it 'override custom TypesDB' do @@ -84,7 +84,7 @@ end case [facts['os']['family'], facts['os']['release']['major']] - when %w[RedHat 8], %w[Ubuntu 20.04] + when %w[RedHat 8], %w[RedHat 9], %w[Ubuntu 20.04] it { is_expected.to raise_error(%r{does not support Python 3}) } else it 'override Username to foo in python-config' do @@ -99,7 +99,7 @@ end case [facts['os']['family'], facts['os']['release']['major']] - when %w[RedHat 8], %w[Ubuntu 20.04] + when %w[RedHat 8], %w[RedHat 9], %w[Ubuntu 20.04] it { is_expected.to raise_error(%r{does not support Python 3}) } else it 'override Username to foo in python-config' do @@ -114,7 +114,7 @@ end case [facts['os']['family'], facts['os']['release']['major']] - when %w[RedHat 8], %w[Ubuntu 20.04] + when %w[RedHat 8], %w[RedHat 9], %w[Ubuntu 20.04] it { is_expected.to raise_error(%r{does not support Python 3}) } else it 'override Username to foo in python-config' do @@ -130,7 +130,7 @@ end case [facts['os']['family'], facts['os']['release']['major']] - when %w[RedHat 8], %w[Ubuntu 20.04] + when %w[RedHat 8], %w[RedHat 9], %w[Ubuntu 20.04] it { is_expected.to raise_error(%r{does not support Python 3}) } else it 'Will remove python-config' do @@ -157,7 +157,7 @@ end case [facts['os']['family'], facts['os']['release']['major']] - when %w[RedHat 8], %w[Ubuntu 20.04] + when %w[RedHat 8], %w[RedHat 9], %w[Ubuntu 20.04] it { is_expected.to raise_error(%r{does not support Python 3}) } else it do diff --git a/spec/classes/collectd_plugin_write_http_spec.rb b/spec/classes/collectd_plugin_write_http_spec.rb index eef7e7452..2254fe484 100644 --- a/spec/classes/collectd_plugin_write_http_spec.rb +++ b/spec/classes/collectd_plugin_write_http_spec.rb @@ -33,8 +33,8 @@ ) end - case [facts['os']['family'], facts['os']['release']['major']] - when %w[RedHat 8] + case facts['os']['family'] + when 'RedHat' it { is_expected.to contain_package('collectd-write_http') } else it { is_expected.not_to contain_package('collectd-write_http') } diff --git a/spec/spec_helper_methods.rb b/spec/spec_helper_methods.rb index 9595fa59d..4a6e1700d 100644 --- a/spec/spec_helper_methods.rb +++ b/spec/spec_helper_methods.rb @@ -22,7 +22,7 @@ def baseline_os_hash supported_os: [ { 'operatingsystem' => 'CentOS', - 'operatingsystemrelease' => %w[7 8] + 'operatingsystemrelease' => %w[9] } ] } From a31929201708c523f6a2af17f183aeacc391fb6d Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 24 Jan 2025 10:54:26 +0100 Subject: [PATCH 2/5] Drop EoL CentOS 8 --- metadata.json | 1 - 1 file changed, 1 deletion(-) diff --git a/metadata.json b/metadata.json index aaee67cb9..154454d4c 100644 --- a/metadata.json +++ b/metadata.json @@ -40,7 +40,6 @@ { "operatingsystem": "CentOS", "operatingsystemrelease": [ - "8", "9" ] }, From 82ee084bb422104089ac0be7098512acdae1d016 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 24 Jan 2025 10:54:54 +0100 Subject: [PATCH 3/5] Drop EoL FreeBSD 12 --- metadata.json | 1 - 1 file changed, 1 deletion(-) diff --git a/metadata.json b/metadata.json index 154454d4c..5e6a91962 100644 --- a/metadata.json +++ b/metadata.json @@ -67,7 +67,6 @@ { "operatingsystem": "FreeBSD", "operatingsystemrelease": [ - "12", "13", "14" ] From 9fad09300c172f4622b9f504f36c20e0708fdf34 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 13 Sep 2024 13:57:09 +0200 Subject: [PATCH 4/5] modulesync 9.2.0 --- .github/workflows/ci.yml | 3 ++- .github/workflows/labeler.yml | 1 + .github/workflows/release.yml | 1 + .msync.yml | 2 +- .pmtignore | 1 + Gemfile | 2 +- 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83c9c329d..ab21e5fa5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ name: CI +# yamllint disable-line rule:truthy on: pull_request: {} push: @@ -18,7 +19,7 @@ concurrency: jobs: puppet: name: Puppet - uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2 + uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v3 with: timeout_minutes: 75 unit_runs_on: 'cern-self-hosted' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 66127cd0b..73be88dce 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -4,6 +4,7 @@ name: "Pull Request Labeler" +# yamllint disable-line rule:truthy on: pull_request_target: {} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 93b33c2bc..1b1477502 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ name: Release +# yamllint disable-line rule:truthy on: push: tags: diff --git a/.msync.yml b/.msync.yml index 95e8c977c..8606f6ec5 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '9.1.0' +modulesync_config_version: '9.2.0' diff --git a/.pmtignore b/.pmtignore index 10b983069..a9d37aa0c 100644 --- a/.pmtignore +++ b/.pmtignore @@ -20,6 +20,7 @@ /.github/ /.librarian/ /Puppetfile.lock +/Puppetfile *.iml /.editorconfig /.fixtures.yml diff --git a/Gemfile b/Gemfile index 9d5b5e789..2ac98f891 100644 --- a/Gemfile +++ b/Gemfile @@ -26,7 +26,7 @@ end gem 'rake', :require => false gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test] -puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 7.24' +puppetversion = ENV['PUPPET_GEM_VERSION'] || [">= 7.24", "< 9"] gem 'puppet', puppetversion, :require => false, :groups => [:test] # vim: syntax=ruby From 986eb5d417902cf1796146b246240532912b5b03 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 16 Sep 2024 20:33:10 +0200 Subject: [PATCH 5/5] modulesync 9.3.0 --- .github/workflows/release.yml | 2 +- .msync.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b1477502..4adf65cd1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ on: jobs: release: name: Release - uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v2 + uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v3 with: allowed_owner: 'voxpupuli' secrets: diff --git a/.msync.yml b/.msync.yml index 8606f6ec5..ac84b45df 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '9.2.0' +modulesync_config_version: '9.3.0'