comparison manifests/templates.pp @ 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
comparison
equal deleted inserted replaced
408:8a2efdcc5a98 409:621e78abf82c
280 ensure => absent, 280 ensure => absent,
281 } 281 }
282 file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el7': 282 file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el7':
283 ensure => absent, 283 ensure => absent,
284 } 284 }
285 # Python requires the `devel` package on CentOS, but by default the module tries to uninstall it
286 $dev = 'present'
287 }
288 else {
289 # Other distros can take the default devel status
290 $dev = $::python::params::dev
285 } 291 }
286 292
287 if $operatingsystem == 'CentOS' and versioncmp($operatingsystemrelease, '8') >= 0 { 293 if $operatingsystem == 'CentOS' and versioncmp($operatingsystemrelease, '8') >= 0 {
288 # The following may possibly work to ensure a CentOS Streams install. 294 # The following may possibly work to ensure a CentOS Streams install.
289 # Or it might fail for inexplicable reasons. 295 # Or it might fail for inexplicable reasons.
302 class { 'python': 308 class { 'python':
303 ensure => 'present', 309 ensure => 'present',
304 version => 'python3', 310 version => 'python3',
305 pip => 'present', 311 pip => 'present',
306 use_epel => false, 312 use_epel => false,
313 dev => $dev,
307 } 314 }
308 } 315 }
309 316
310 class tools { 317 class tools {
311 $packages = [ 'sqlite', 'bash-completion', 'nano', 'bzip2', 'mlocate', 'patch', 'tmux', 'wget', 'rsync' ] 318 $packages = [ 'sqlite', 'bash-completion', 'nano', 'bzip2', 'mlocate', 'patch', 'tmux', 'wget', 'rsync' ]