Commit graph

56 commits

Author SHA1 Message Date
Ashley Penney
4e002d7fd9 Make sure we continue working post 7.0. 2014-05-08 16:52:04 -04:00
Ashley Penney
5488821ce6 Ensure we've always started postgresql at least once before a reload. 2014-05-08 16:47:37 -04:00
Ashley Penney
a575884908 Ensure repo is in place before postgis installation.
We need to make sure we've actually setup the repo before installing
postgis.
2014-05-08 16:47:10 -04:00
Ashley Penney
3e3fa8cab1 Handle ports for systemd.
This is a terrible hack currently but it appropriately handles systemd.
2014-05-08 16:46:39 -04:00
Ashley Penney
d010bc8c7f This doesn't exist on RHEL7. 2014-05-08 16:46:09 -04:00
Ashley Penney
5e33409342 Add service_ensure.
This allows you to control the status of the Postgresql service directly
from postgresql::server.
2014-05-08 16:43:22 -04:00
Brian Almeida
86f2950248 Add support for port parameter to postgresql::server, fix underlying assumptions that port=5432 2014-04-17 15:09:07 -04:00
Ashley Penney
3d73e7fe7f Merge pull request #372 from jhoblitt/feature/pg_hba.conf-ownership
change pg_hba.conf to be owned by postgres user account
2014-04-17 13:31:04 -04:00
Ashley Penney
0adbcfb64f Merge pull request #280 from 3dna/feature/postgis
postgis support
2014-04-02 09:31:03 -04:00
Ashley Penney
d8875983c9 Merge pull request #395 from thunderkeys/postgresql-server-role-inherit-support
Postgresql server role inherit support
2014-04-02 07:30:20 -04:00
Jeremy Kitchen
c4bca511e9 add support for postgis
rhel support added by @mcanevet, but the branch has been squashed.
thanks!
2014-03-31 21:40:01 +00:00
Pieter Lexis
dcdc7c8f5a Allow the ex- and import of postgresql::server::db 2014-03-27 16:49:48 +01:00
Brian Almeida
ad083d0e4d Add support to postgresql::server::role for INHERIT/NOINHERIT 2014-03-24 11:19:12 -04:00
Geoff Garside
688b0aa3fc Replace psql_db => $user with $default_database.
On FreeBSD systems the $user variable is not 'postgres' so does not
match the default database correctly. These changes use the existing
default_database parameter to replace instances where $user is passed as
the database to be connected to.

These changes are in server::database, server::role and
server::grant.
2014-03-10 09:26:28 +00:00
Joshua Hoblitt
d49939014c change pg_hba.conf to be owned by postgres user account
At present, the ownership of pg_hba.conf is hardwired to be uid 0.  It should have the same ownership as all of the other postgressql configuration files in the same cluster so that they can be managed/edited by the postgres role user (system) account.
2014-02-27 11:38:20 -07:00
Igor Galić
828c3b99d2 use fully-qualified path to psql to set password
When setting the a user's password, use the fully qualified path to the
psql binary. This should fix #359
2014-02-13 11:53:41 +01:00
Ashley Penney
4409dbc4b2 Merge pull request #324 from aadamovich/patch-1
Wrong parameter name: manage_pg_conf -> manage_pg_hba_conf
2014-01-21 14:35:35 -08:00
Ashley Penney
0bb214d1be Merge pull request #317 from hubspotdevops/validate_db_connection_float
Prevent float of defined resource.
2014-01-21 14:32:19 -08:00
Ashley Penney
301715b8a9 Merge pull request #256 from mnencia/patch-3
Add support to custom xlogdir parameter
2014-01-21 14:24:10 -08:00
Axel Bock
6f99380a8b fix for concat error 2014-01-09 17:39:57 +01:00
Brandon Wamboldt
694c3ffbf7 Fix NOREPLICATION option for Postgres 9.1
Fixing a bug when using this module with Postgresql 9.1 that causes alter role statements to execute during every apply.
2013-12-20 13:09:42 -04:00
Marco Nenciarini
2b81d5cb63 Add support to custom xlogdir parameter
Having a custom xlogdir location is desiderable for performances in many production environments
2013-12-14 23:55:24 +01:00
aadamovich
0e1fa6f8b2 Wrong parameter name: manage_pg_conf -> manage_pg_hba_conf 2013-12-04 21:09:56 +01:00
Ashley Penney
0796eb9fc6 Merge pull request #311 from kronn/patch-1
Remove deprecated and unused parameters to concat::fragment
2013-11-20 11:01:47 -08:00
Ashley Penney
68ac871e8b Merge pull request #309 from leehanel/master
add lc_* config entry settings
2013-11-20 08:57:02 -08:00
Ashley Penney
fdf5f04351 Merge pull request #313 from hubspotdevops/initdb_order
Exec['postgresql_initdb'] needs to be done after $datadir exists
2013-11-19 13:56:23 -08:00
Ken Barber
c114885a04 Merge pull request #310 from mcanevet/table_grant_fix
Fix table_grant_spec to show a bug
2013-11-15 08:40:16 -08:00
Mickaël Canévet
4cd64e80ac Add missing privileges 2013-11-15 15:20:15 +01:00
Mickaël Canévet
1ce75d5bc8 Fix granting all privileges on a table 2013-11-14 18:17:23 +01:00
Mickaël Canévet
f0924df7c8 Can pass template at database creation 2013-11-14 18:01:30 +01:00
Tom McLaughlin
bac4b87a8d Prevent float of defined resource. 2013-11-13 15:30:58 -05:00
Tom McLaughlin
05eaaa1670 Should have had cofee before doing this commit... 2013-11-13 10:17:25 -05:00
Tom McLaughlin
99a1e03154 Exec['postgresql_initdb'] needs to be done after $datadir exists 2013-11-13 08:59:39 -05:00
Matthias Viehweger
673838c3d8 Remove deprecated and unused parameters to concat::fragment
The warnings are as follows:

Warning: Scope(Concat::Fragment[pg_hba_rule_deny access to postgresql user]): The $mode parameter to concat::fragment is deprecated and has no effect
Warning: Scope(Concat::Fragment[pg_hba_rule_deny access to postgresql user]): The $owner parameter to concat::fragment is deprecated and has no effect
2013-11-12 16:36:53 +01:00
leehanel
b706edff9b add lc_* config entry settings 2013-11-08 09:09:03 -06:00
Reid Vandewiele
6afb4a0367 Allow specification of default database name
E.g. pe-postgresql does NOT use postgres as the default database name.
It uses pe-postgres. So if there is no way to specify a default database
name, the postgesql::validate_db_connection resource in
postgresql::server::service will ALWAYS fail. This commit exposes the
parameter in order to avoid that situation.
2013-10-26 16:33:36 -07:00
Ken Barber
2b697c10f9 Use main psql path and cleanup old packages properly
Signed-off-by: Ken Barber <ken@bob.sh>
2013-10-25 03:01:02 +02:00
Ken Barber
ef45251a31 Provide a greater timeout for slower systems
Signed-off-by: Ken Barber <ken@bob.sh>
2013-10-24 00:33:46 +01:00
Ken Barber
acabbbf530 Remove concat::setup for include
Since the class is now throwing an error when you use the class directly,
I'm just removing it.

We left this in from the last rewrite as someone reported an issue a long
time ago, but alas we have been unable to prove its a problem.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-10-24 00:33:45 +01:00
Ken Barber
5df36cf1f7 (GH-198) Fix race condition on postgresql startup
This patch is a fix for the race condition that keeps occuring during
postgresql setup. Its very rare on its own, but when you are using this
module in a CI environment it happens quite frequently.

Basically what happens is that sometimes the service will announce the
database has started, but really it is still working in the background.
Sometimes the unix socket may not be listening, and sometimes the
system is still loading and you get a weird client error.

The fix itself is a modification to postgresql::validate_db_connection
so that it is able to connect on the local unix socket, plus retry
until the database is available.

This new and improved validate_db_connection can then be put into the
build pipeline (in the service class in particular) to ensure the
database is started before continuing on with the remaining steps.

This in effect blocks the puppet module from continuing until the
postgresql database is fully started and able to receive connections
which is perfect.

Tests and documentation provided.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-10-24 00:33:45 +01:00
Ken Barber
f021ef3cdb Merge pull request #286 from jalli/master
Add zero length string to join() function
2013-10-23 04:59:11 -07:00
Jarl Stefansson
017d134188 Add zero length string to join() function
The stdlib join() function takes an array and a string as parameters, it then joins all the elements of the array using the string as a separator.
On Centos 6.4 the join() function fails if given just an array but not a string.
2013-10-19 12:04:04 -04:00
jonoterc
a93fcf850c enabling defined postgres user password without resetting on every puppet run (based on https://github.com/puppetlabs/puppetlabs-postgresql/issues/92) 2013-10-17 17:57:33 -04:00
Mickaël Canévet
6f614b0b37 Add a parameter to (un)manage pg_hba.conf 2013-10-16 14:58:08 +02:00
Marek Hulan
b784676c2e Expose owner in db definition 2013-10-10 17:34:26 +02:00
Neil Northrop
f9e6046132 fixed the rspec test to include 'sha1' in 2013-10-04 15:14:10 -07:00
Ashley Penney
5ac999b72c Merge pull request #251 from kamilszymanski/authentication_method_validation
Validate authentication method against server version
2013-09-23 12:19:28 -07:00
Kamil Szymanski
71e0236659 Validate authentication method against server version 2013-09-22 22:35:18 +02:00
Kamil Szymanski
480fc64f6b lint fixes 2013-09-21 19:45:35 +02:00
Ken Barber
891b1d71a2 Rename contrib to server::contrib
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-20 14:35:24 +01:00