Skip to content

Commit 3a77759

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 b35f763 commit 3a77759

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

manifests/params.pp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,8 @@
164164
$bindir = pick($bindir, "/usr/lib/postgresql/${version}/bin")
165165
$datadir = pick($datadir, "/var/lib/postgresql/${version}/main")
166166
$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-
}
167+
$service_reload = "systemctl reload ${service_name}"
168+
$service_status = pick($service_status, "systemctl status ${service_name}")
174169
$psql_path = pick($psql_path, '/usr/bin/psql')
175170
$postgresql_conf_mode = pick($postgresql_conf_mode, '0644')
176171
}

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)