From 49117d8dc26347ba41591e4785064568f3b3ab7b Mon Sep 17 00:00:00 2001 From: Martin Jansen Date: Tue, 12 Dec 2023 11:16:57 +0100 Subject: [PATCH 1/4] Bump dependency versions and add support for modern Debian and Ubuntu releases --- metadata.json | 14 +++++++++----- spec/spec_helper_acceptance.rb | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/metadata.json b/metadata.json index b24f8098d..52db81f21 100644 --- a/metadata.json +++ b/metadata.json @@ -23,13 +23,17 @@ { "operatingsystem": "Debian", "operatingsystemrelease": [ - "10" + "10", + "11", + "12" ] }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ - "18.04" + "18.04", + "20.04", + "22.04" ] }, { @@ -58,15 +62,15 @@ "dependencies": [ { "name": "puppetlabs/stdlib", - "version_requirement": ">= 4.25.0 < 9.0.0" + "version_requirement": ">= 4.25.0 < 10.0.0" }, { "name": "puppet/archive", - "version_requirement": ">= 2.0.0 < 7.0.0" + "version_requirement": ">= 2.0.0 < 8.0.0" }, { "name": "puppet/systemd", - "version_requirement": ">= 2.10.0 < 5.0.0" + "version_requirement": ">= 2.10.0 < 7.0.0" } ], "tags": [ diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 94706e396..8980a5859 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -5,7 +5,7 @@ configure_beaker do |host| case fact_on(host, 'os.family') when 'Debian' - install_module_from_forge_on(host, 'puppetlabs-apt', '>= 4.1.0 < 9.0.0') + install_module_from_forge_on(host, 'puppetlabs-apt', '>= 4.1.0 < 10.0.0') when 'RedHat' install_module_from_forge_on(host, 'garethr-erlang', '>= 0.3.0 < 1.0.0') if fact_on(host, 'os.selinux.enabled') From de201414f9c01c3eacd1cea24f09e3257150be6b Mon Sep 17 00:00:00 2001 From: Martin Jansen Date: Tue, 12 Dec 2023 11:48:23 +0100 Subject: [PATCH 2/4] Remove usage of deprecated ensure_packages --- manifests/install/rabbitmqadmin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/install/rabbitmqadmin.pp b/manifests/install/rabbitmqadmin.pp index 5b3cc4038..f49d926d0 100644 --- a/manifests/install/rabbitmqadmin.pp +++ b/manifests/install/rabbitmqadmin.pp @@ -11,7 +11,7 @@ $python_package = $rabbitmq::python_package # Some systems (e.g., Ubuntu 16.04) don't ship Python 2 by default if $rabbitmq::manage_python { - ensure_packages([$python_package]) + stdlib::ensure_packages([$python_package]) $rabbitmqadmin_require = [Archive['rabbitmqadmin'], Package[$python_package]] } else { $rabbitmqadmin_require = Archive['rabbitmqadmin'] From 0c91440a4eeccc5e3f2524f8af237f316f58d8a1 Mon Sep 17 00:00:00 2001 From: Martin Jansen Date: Tue, 12 Dec 2023 11:52:25 +0100 Subject: [PATCH 3/4] Fix Python 2 package name for Debian und Ubuntu --- data/family/Debian.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/data/family/Debian.yaml b/data/family/Debian.yaml index 77d8d0f03..d3d6fe1f7 100644 --- a/data/family/Debian.yaml +++ b/data/family/Debian.yaml @@ -2,3 +2,4 @@ rabbitmq::package_name: 'rabbitmq-server' rabbitmq::service_name: 'rabbitmq-server' rabbitmq::package_gpg_key: 'https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey' +rabbitmq::python_package: 'python2.7' From 0734cf0ee1279e183f9337803ddc8ae64d272b0e Mon Sep 17 00:00:00 2001 From: Martin Jansen Date: Tue, 12 Dec 2023 12:21:52 +0100 Subject: [PATCH 4/4] Fix test expectation on Debian systems --- spec/classes/rabbitmq_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/classes/rabbitmq_spec.rb b/spec/classes/rabbitmq_spec.rb index d89df2839..07b72ccd9 100644 --- a/spec/classes/rabbitmq_spec.rb +++ b/spec/classes/rabbitmq_spec.rb @@ -234,7 +234,8 @@ is_expected.to contain_archive('rabbitmqadmin').with_source('http://1.1.1.1:15672/cli/rabbitmqadmin') end - it { is_expected.to contain_package('python') } if %w[RedHat Debian SUSE Archlinux].include?(os_facts[:os]['family']) + it { is_expected.to contain_package('python') } if %w[RedHat SUSE Archlinux].include?(os_facts[:os]['family']) + it { is_expected.to contain_package('python2.7') } if %w[Debian].include?(os_facts[:os]['family']) it { is_expected.to contain_package('python38') } if %w[FreeBSD].include?(os_facts[:os]['family']) end