From 9301e8223252c8d7005f75630d5daa7926e1473d Mon Sep 17 00:00:00 2001 From: Dinerroger Oliveira Date: Fri, 27 Jun 2014 10:30:17 -0300 Subject: [PATCH 1/2] Add support for SLES 11 Adds support for SLES 11 using the package postgresql91. --- manifests/globals.pp | 5 +++++ manifests/params.pp | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/manifests/globals.pp b/manifests/globals.pp index 4db95ee..853492d 100644 --- a/manifests/globals.pp +++ b/manifests/globals.pp @@ -85,6 +85,10 @@ class postgresql::globals ( default => '9.2', }, 'FreeBSD' => '93', + 'Suse' => $::operatingsystem ? { + 'SLES' => '91', + default => undef, + }, default => undef, } $globals_version = pick($version, $default_version, 'unknown') @@ -97,6 +101,7 @@ class postgresql::globals ( '8.4' => '1.5', '9.0' => '1.5', '9.1' => '1.5', + '91' => '1.5', '9.2' => '2.0', '9.3' => '2.1', default => undef, diff --git a/manifests/params.pp b/manifests/params.pp index 36e3027..9b1cd2c 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -172,6 +172,30 @@ class postgresql::params inherits postgresql::globals { $needs_initdb = pick($needs_initdb, true) } + 'Suse': { + $user = pick($user, 'postgres') + $group = pick($group, 'postgres') + + $client_package_name = pick($client_package_name, "postgresql${version}") + $server_package_name = pick($server_package_name, "postgresql${version}-server") + $contrib_package_name = pick($contrib_package_name, "postgresql${version}-contrib") + $devel_package_name = pick($devel_package_name, "postgresql${version}-devel") + $java_package_name = pick($java_package_name, 'undef') + $perl_package_name = pick($plperl_package_name, 'undef') + $plperl_package_name = pick($plperl_package_name, "undef") + $python_package_name = pick($python_package_name, 'undef') + + $service_name = pick($service_name, 'postgresql') + $bindir = pick($bindir, "/usr/lib/postgresql${version}/bin") + $datadir = pick($datadir, '/var/lib/pgsql/data') + $confdir = pick($confdir, "${datadir}") + $service_status = pick($service_status, "/etc/init.d/${service_name} status") + $psql_path = pick($psql_path, "${bindir}/psql") + + $firewall_supported = pick($firewall_supported, false) + $needs_initdb = pick($needs_initdb, true) + } + default: { # Based on the existing version of the firewall module, this is normally # false for other OS, but this allows an escape hatch to override it. From 5054d3475ab05061ca6c196bd56e93c07ee331b1 Mon Sep 17 00:00:00 2001 From: Dinerroger Oliveira Date: Thu, 21 Aug 2014 14:22:21 -0300 Subject: [PATCH 2/2] Fix typo --- manifests/params.pp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 9b1cd2c..35f9668 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -180,15 +180,15 @@ class postgresql::params inherits postgresql::globals { $server_package_name = pick($server_package_name, "postgresql${version}-server") $contrib_package_name = pick($contrib_package_name, "postgresql${version}-contrib") $devel_package_name = pick($devel_package_name, "postgresql${version}-devel") - $java_package_name = pick($java_package_name, 'undef') - $perl_package_name = pick($plperl_package_name, 'undef') - $plperl_package_name = pick($plperl_package_name, "undef") - $python_package_name = pick($python_package_name, 'undef') + $java_package_name = pick($java_package_name, undef) + $perl_package_name = pick($plperl_package_name, undef) + $plperl_package_name = pick($plperl_package_name, undef) + $python_package_name = pick($python_package_name, undef) $service_name = pick($service_name, 'postgresql') $bindir = pick($bindir, "/usr/lib/postgresql${version}/bin") $datadir = pick($datadir, '/var/lib/pgsql/data') - $confdir = pick($confdir, "${datadir}") + $confdir = pick($confdir, $datadir) $service_status = pick($service_status, "/etc/init.d/${service_name} status") $psql_path = pick($psql_path, "${bindir}/psql")