Skip to content

Commit

Permalink
Support RedHat/CentOS 8
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed Dec 14, 2020
1 parent ff8df63 commit bae5907
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,10 @@
$pip_category = undef
$pip_package = "${python}-pip"
$pip_provider = $python.regsubst(/^.*python3\.?/,'pip3.').regsubst(/\.$/,'')
} elsif ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '8') >= 0) {
$pip_category = undef
$pip_package = 'python3-pip'
$pip_provider = pip3
} elsif ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '7') >= 0) {
$pip_category = undef
$pip_package = 'python2-pip'
Expand Down
9 changes: 6 additions & 3 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@
default => 'gunicorn',
}

$version = $facts['os']['release']['major'] ? {
'20.04' => '3',
default => 'system',
if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '8' {
$version = '3'
} elsif $facts['os']['release']['major'] == '20.04' {
$version = '3'
} else {
$version = 'system'
}
}
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"7"
"7",
"8"
]
},
{
Expand Down

0 comments on commit bae5907

Please sign in to comment.