Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(SERVER-2500) Use DNF modules to install postgres on RHEL 8 #337

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion manifests/database/postgresql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
$manage_database = $puppetdb::params::manage_database,
$manage_server = $puppetdb::params::manage_dbserver,
$manage_package_repo = $puppetdb::params::manage_pg_repo,
$manage_dnf_module = $puppetdb::params::manage_pg_dnf_module,
$postgres_version = $puppetdb::params::postgres_version,
$postgresql_ssl_on = $puppetdb::params::postgresql_ssl_on,
$postgresql_ssl_key_path = $puppetdb::params::postgresql_ssl_key_path,
Expand All @@ -19,10 +20,10 @@
$read_database_password = $puppetdb::params::read_database_password,
$read_database_host = $puppetdb::params::read_database_host
) inherits puppetdb::params {

if $manage_server {
class { '::postgresql::globals':
manage_package_repo => $manage_package_repo,
manage_dnf_module => $manage_dnf_module,
version => $postgres_version,
}
# get the pg server up and running
Expand Down
6 changes: 6 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
$manage_pg_repo = false
}

if $::osfamily =~ /RedHat/ and $facts['os']['release']['major'] == '8' {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be changed to check for either any version >= 8 or match EL8 & EL9.

$manage_pg_dnf_module = true
} else {
$manage_pg_dnf_module = false
}

if $puppetdb_version in ['latest','present'] or versioncmp($puppetdb_version, '7.0.0') >= 0 {
$postgres_version = '11'
} else {
Expand Down