Skip to content

Commit

Permalink
Drop EoL EL7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Jan 24, 2025
1 parent d6423b9 commit bd4db09
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
3 changes: 1 addition & 2 deletions manifests/plugin/python.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 1 addition & 3 deletions manifests/plugin/rabbitmq.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}

Expand Down
6 changes: 3 additions & 3 deletions manifests/plugin/write_http.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 0 additions & 9 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,24 @@
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"7",
"8",
"9"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"7",
"8",
"9"
]
},
{
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
"7",
"8",
"9"
]
},
{
"operatingsystem": "Scientific",
"operatingsystemrelease": [
"7"
]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def baseline_os_hash
supported_os: [
{
'operatingsystem' => 'CentOS',
'operatingsystemrelease' => %w[7 8]
'operatingsystemrelease' => %w[8 9]
}
]
}
Expand Down

0 comments on commit bd4db09

Please sign in to comment.