Skip to content

Commit 97d2c66

Browse files
committed
Drop code for linux without systemd
FreeBSD 9.4/9.5 are EoL since ages and not listed as supported in metadata.json. Also no linux operating system without Systemd is supported, so we can drop the old code.
1 parent e5a28a0 commit 97d2c66

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

manifests/params.pp

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,7 @@
9797
$python_package_name = pick($python_package_name, 'python-psycopg2')
9898
}
9999

100-
if $postgresql::globals::postgis_package_name {
101-
$postgis_package_name = $postgresql::globals::postgis_package_name
102-
} elsif $facts['os']['release']['major'] == '5' {
103-
$postgis_package_name = 'postgis'
104-
} elsif $postgis_version and versioncmp($postgis_version, '2') < 0 {
105-
$postgis_package_name = "postgis${package_version}"
106-
} else {
107-
$postgis_package_name = "postgis2_${package_version}"
108-
}
100+
$postgis_package_name = pick($postgresql::globals::postgis_package_name, "postgis2_${package_version}")
109101
}
110102

111103
'Archlinux': {
@@ -164,13 +156,8 @@
164156
$bindir = pick($bindir, "/usr/lib/postgresql/${version}/bin")
165157
$datadir = pick($datadir, "/var/lib/postgresql/${version}/main")
166158
$confdir = pick($confdir, "/etc/postgresql/${version}/main")
167-
if pick($service_provider, $facts['service_provider']) == 'systemd' {
168-
$service_reload = "systemctl reload ${service_name}"
169-
$service_status = pick($service_status, "systemctl status ${service_name}")
170-
} else {
171-
$service_reload = "service ${service_name} reload"
172-
$service_status = pick($service_status, "service ${service_name} status")
173-
}
159+
$service_reload = "systemctl reload ${service_name}"
160+
$service_status = pick($service_status, "systemctl status ${service_name}")
174161
$psql_path = pick($psql_path, '/usr/bin/psql')
175162
$postgresql_conf_mode = pick($postgresql_conf_mode, '0644')
176163
}

spec/spec_helper_local.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def param(type, title, param)
155155
# See https://github.com/voxpupuli/voxpupuli-test/blob/master/lib/voxpupuli/test/facts.rb
156156
add_custom_fact :service_provider, ->(_os, facts) do
157157
case facts[:osfamily].downcase
158-
when 'archlinux', 'debian'
158+
when 'archlinux', 'debian', 'redhat', 'suse'
159159
'systemd'
160160
when 'darwin'
161161
'launchd'
@@ -165,10 +165,6 @@ def param(type, title, param)
165165
'openrc'
166166
when 'openbsd'
167167
'openbsd'
168-
when 'redhat'
169-
(facts[:operatingsystemrelease].to_i >= 7) ? 'systemd' : 'redhat'
170-
when 'suse'
171-
(facts[:operatingsystemmajrelease].to_i >= 12) ? 'systemd' : 'redhat'
172168
when 'windows'
173169
'windows'
174170
else

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy