From b389ad4b3e2a67ffdfa9d8088abca8dd6aedd771 Mon Sep 17 00:00:00 2001 From: Arjen Heidinga Date: Mon, 3 Jul 2023 09:41:39 +0200 Subject: [PATCH] Rocky does as weel not have a seperate venv package. --- manifests/install.pp | 2 +- spec/classes/python_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/install.pp b/manifests/install.pp index 6a738435..1107c872 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -35,7 +35,7 @@ ## ## CentOS has no extra package for venv ## - unless $facts['os']['name'] == 'CentOS' { + unless $facts['os']['name'] in ['CentOS', 'Rocky'] { package { 'python-venv': ensure => $python::venv, name => "${python}-venv", diff --git a/spec/classes/python_spec.rb b/spec/classes/python_spec.rb index cca3ef65..44effbde 100644 --- a/spec/classes/python_spec.rb +++ b/spec/classes/python_spec.rb @@ -23,7 +23,7 @@ it { is_expected.to contain_package('pip') } end - if %w[Archlinux CentOS].include?(facts[:os]['name']) + if %w[Archlinux CentOS Rocky].include?(facts[:os]['name']) it { is_expected.not_to contain_package('python-venv') } else it { is_expected.to contain_package('python-venv') } @@ -58,7 +58,7 @@ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_package('pip').with(ensure: 'present') } - it { is_expected.to contain_package('python-venv').with(ensure: 'present') } unless facts[:os]['name'] == 'CentOS' + it { is_expected.to contain_package('python-venv').with(ensure: 'present') } unless %w[CentOS Rocky].include?(facts[:os]['name']) end case facts[:os]['family']