Fix GPDB puppet manifest to work.
@@ -76,7 +76,7 @@ class gpdb {
db_base_dir => $gpdb::common::db_base_dir,
master_db_port => $gpdb::common::master_db_port,
segment_db_port_prefix => $gpdb::common::segment_db_port_prefix,
- require => [ Server["stop_if_running"], Class['gpdb::common::stop_master_in_admin_mode'] ],
+ require => [ Gpdb::Server["stop_if_running"], Class['gpdb::common::stop_master_in_admin_mode'] ],
start_or_stop => running,
}
@@ -95,29 +95,40 @@ class gpdb {
class install_packages{
case $operatingsystem{
- /(?i:(centos|fedora))/: {
+ /(?i:(centos|fedora|redhat))/: {
+ if ($operatingsystem != 'Fedora') {
+ if (versioncmp($operatingsystemmajrelease, '8') < 0) {
+ $base_url = 'http://download.fedoraproject.org/pub/epel/$releasever/$basearch'
+ $python_devel = 'python-devel'
+ } else {
+ $base_url = 'http://download.fedoraproject.org/pub/epel/$releasever/Everything/$basearch'
+ $python_devel = 'python2-devel'
+ }
+ } else {
+ # Looks like it works, at least with Fedora 31
+ $base_url = 'http://download.fedoraproject.org/pub/epel/7/$basearch'
+ $python_devel = 'python2-devel'
+ }
yumrepo { "epel":
- baseurl => "http://download.fedoraproject.org/pub/epel/7/\$basearch",
+ baseurl => $base_url,
descr => "epel packages",
enabled => 1,
gpgcheck => 0,
}
- package { ["libffi-devel"]:
+ package { [$python_devel]:
ensure => latest,
}
- package { ["python-lockfile"]:
+ package { ["libffi-devel"]:
ensure => latest,
}
- package { ["gcc"]:
+ package { ["python2-lockfile"]:
ensure => latest,
}
- package { ["python-devel"]:
+ package { ["gcc"]:
ensure => latest,
}
- package { ["psutil"]:
+ package { ["python2-psutil"]:
ensure => latest,
- provider => pip,
- require => [ File["/usr/bin/pip-python"], Package["gcc"], Package["python-devel"] ],
}
package { ["paramiko"]:
ensure => latest,
@@ -129,7 +140,7 @@ class gpdb {
require => [
Yumrepo["epel"],
Package["libffi-devel"],
- Package["python-lockfile"],
+ Package["python2-lockfile"],
],
}
file { '/usr/bin/pip-python':
