From ef94a2c51df6d683975b3fad31d4855c4665f7fb Mon Sep 17 00:00:00 2001 From: Michael Moll Date: Sat, 20 Feb 2016 19:55:19 +0100 Subject: [PATCH] Ubuntu/vidid and newer use systemd --- manifests/globals.pp | 9 ++++----- manifests/params.pp | 3 +++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/manifests/globals.pp b/manifests/globals.pp index 674602d..04602c3 100644 --- a/manifests/globals.pp +++ b/manifests/globals.pp @@ -88,12 +88,11 @@ class postgresql::globals ( default => undef, }, 'Ubuntu' => $::operatingsystemrelease ? { - /^(15.10)$/ => '9.4', - /^(15.04)$/ => '9.4', - /^(14.10)$/ => '9.4', - /^(14.04)$/ => '9.3', - /^(11.10|12.04|12.10|13.04|13.10)$/ => '9.1', /^(10.04|10.10|11.04)$/ => '8.4', + /^(11.10|12.04|12.10|13.04|13.10)$/ => '9.1', + /^(14.04)$/ => '9.3', + /^(14.10|15.04|15.10)$/ => '9.4', + /^(16.04)$/ => '9.5', default => undef, }, default => undef, diff --git a/manifests/params.pp b/manifests/params.pp index de50fe5..cabe9d9 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -159,6 +159,9 @@ class postgresql::params inherits postgresql::globals { if $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8.0') >= 0 { # Jessie uses systemd $service_status = pick($service_status, "/usr/sbin/service ${service_name}@*-main status") + } elsif $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '15.04') >= 0 { + # Ubuntu releases since vivid use systemd + $service_status = pick($service_status, "/usr/sbin/service ${service_name} status") } else { $service_status = pick($service_status, "/etc/init.d/${service_name} status | /bin/egrep -q 'Running clusters: .+|online'") }