changeset 409:621e78abf82c

Fix `requires devel` problem with CentOS
author IBBoard <dev@ibboard.co.uk>
date Wed, 25 May 2022 20:54:03 +0100
parents 8a2efdcc5a98
children 575764c36e16
files manifests/templates.pp
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/manifests/templates.pp	Wed May 25 20:52:17 2022 +0100
+++ b/manifests/templates.pp	Wed May 25 20:54:03 2022 +0100
@@ -282,6 +282,12 @@
 		file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el7':
 			ensure => absent,
 		}
+		# Python requires the `devel` package on CentOS, but by default the module tries to uninstall it
+		$dev = 'present'
+	}
+	else {
+		# Other distros can take the default devel status
+		$dev = $::python::params::dev
 	}
 
 	if $operatingsystem == 'CentOS' and versioncmp($operatingsystemrelease, '8') >= 0 {
@@ -304,6 +310,7 @@
 		version => 'python3',
 		pip => 'present',
 		use_epel => false,
+		dev => $dev,
 	}
 }