Skip to content

Commit 3520635

Browse files
authored
Merge pull request #1518 from ekohl/drop-non-systemd-red-hat
Drop code compatibility for non-systemd Red Hat
2 parents 4767340 + 70130eb commit 3520635

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

manifests/params.pp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,8 @@
8585
$postgresql_conf_mode = pick($postgresql_conf_mode, '0600')
8686
}
8787

88-
if pick($service_provider, $facts['service_provider']) == 'systemd' {
89-
$service_reload = "systemctl reload ${service_name}"
90-
$service_status = pick($service_status, "systemctl status ${service_name}")
91-
} else {
92-
$service_reload = "service ${service_name} reload"
93-
$service_status = pick($service_status, "service ${service_name} status")
94-
}
88+
$service_reload = "systemctl reload ${service_name}"
89+
$service_status = pick($service_status, "systemctl status ${service_name}")
9590

9691
$psql_path = pick($psql_path, "${bindir}/psql")
9792

manifests/server/instance/config.pp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,8 @@
242242
notify => Class['postgresql::server::reload'],
243243
}
244244
}
245-
# lint:ignore:140chars
246-
# RHEL 7 and 8 both support drop-in files for systemd units. Gentoo also supports drop-in files.
247-
# Edit 02/2023 RHEL basedc Systems and Gentoo need Variables set for $PGPORT, $DATA_DIR or $PGDATA, thats what the drop-in file is for.
248-
# lint:endignore:140chars
249-
if $facts['os']['family'] in ['RedHat', 'Gentoo'] and $facts['service_provider'] == 'systemd' {
245+
# RHEL based systems and Gentoo need variables set for $PGPORT, $DATA_DIR or $PGDATA via a drop-in file
246+
if $facts['os']['family'] == 'RedHat' or ($facts['os']['family'] == 'Gentoo' and $facts['service_provider'] == 'systemd') {
250247
postgresql::server::instance::systemd { $service_name:
251248
port => $port,
252249
datadir => $datadir,

0 commit comments

Comments
 (0)