Commit graph

381 commits

Author SHA1 Message Date
JT (Jonny)
7981b0950e Merge pull request #671 from sanoma-technology/master
Allow for undefined PostGIS version.
2015-08-10 15:40:41 +01:00
Christian Kaenzig
1956881b2b Fix postgis default package name on RedHat
The /5/ regex on $::operatingsystemrelease would match any distro release
with a 5 in it, including for example Centos "7.1.1503". Given the commit
message for this regex, it was meant to match RedHat / Centos 5.x.
2015-07-23 09:59:36 +02:00
Steve Maddison
cda13dfd66 Allow for undefined PostGIS version. 2015-07-10 13:19:19 +02:00
David Schmitt
00322bdad7 Merge pull request #615 from tampakrap/opensuse_defaults
Add default values for more openSUSE and SLES distro versions
2015-07-03 09:50:06 +01:00
Theo Chatzimichos
5ddc88992b Add default values for more openSUSE and SLES distro versions 2015-07-02 20:58:38 +02:00
David Schmitt
d5efb1fea3 Merge pull request #665 from bmjen/squash-620
Support granting permission on sequences.
2015-07-02 19:18:48 +01:00
qha
c9ffadd31b Support granting permission on sequences.
add spec test for sequence grant and document postgresql::server::grant.
2015-07-02 10:33:15 -07:00
Morgan Haskel
d6435e47c6 Merge pull request #625 from covermymeds/update_pg_hba_rule
(#2056) Added 9.4, corrected past versions based on docs
2015-07-02 10:23:35 -07:00
Ken Barber
1d974be09f (MODULES-2181) Fix variable scope for systemd-override
$manage_package_repo wasn't in scope for the template systemd-override.erb
This was causing all RHEL7 systems with manage_package_repo on to fail on
startup using systemctl, as the proper path to the original service file
is set incorrectly.

This patch adds the manage_package_repo to the top of the ::config class,
and adds some basic tests in config_spec.rb to ensure we don't regress on
this.

Signed-off-by: Ken Barber <ken@bob.sh>
2015-07-01 14:13:29 -07:00
Travis Fields
c4c0402bd4 Merge pull request #527 from kimor79/psql-onlyif 2015-06-25 14:04:10 -07:00
Kimo Rosenbaum
39f15c313c Add onlyif parameter to postgresql_psql to only run command if onlyif returns true
Add option to only attempt table grant if table already exists

Make this slightly more generic
2015-06-25 13:54:02 -07:00
CJ Estel
51fc426be8 Added 9.4, corrected past versions based on docs
adjusted spec to have correct values with change
2015-06-25 16:00:42 -04:00
Travis Fields
5b2c017693 Merge pull request #624 from saimonn/vivid
add ubuntu/vivid support
2015-06-25 10:55:21 -07:00
Hunter Haugen
cb57b323d6 Merge pull request #633 from b0e/master
disabling pg_hba_conf_defaults should not disable ipv4acls and ipv6ac…
2015-06-25 10:43:08 -07:00
Mickaël Canévet
6dbbb6ae9a Copy snakeoil certificate and key instead of symlinking
Since postgresql-9.1_9.1.16-0+deb7u1 on wheezy, postgresql can't read
snakeoil certificate as symlink anymore, so server does not restart.
This patch copies cert and key instead of symlinking so that it works
again.
2015-06-19 14:37:25 +02:00
Chris Denneen
9dc891d06d Fixed systemd override for manage_repo package versions 2015-06-12 10:29:50 -04:00
Hunter Haugen
b5b9c78d76 Merge pull request #623 from dirkweinhardt/MODULES-2049
(#2049) Make title of psql resource for schema creation unique
2015-05-29 10:12:47 -07:00
deVIAntCode
f9c0d91680 Add classes to install PL/Python and the postgresql-docs
See the README for usage and provided parameters.
2015-05-29 10:00:01 +01:00
Achim Ledermüller
eec3c9505a disabling pg_hba_conf_defaults should not disable ipv4acls and ipv6acls rules 2015-05-28 15:37:02 +02:00
Simon Séhier
13bf63db51 add ubuntu/vivid support 2015-05-20 17:35:39 +02:00
dirkweinhardt
d9cc161595 Made title of psql resource for schema creation unique. 2015-05-19 10:12:28 +02:00
Bryan Jen
eb75ec2e36 Merge pull request #609 from hunner/antaflos-patch-2
Antaflos patch 2
2015-04-10 16:08:19 -07:00
JT (Jonny)
8dbf982b62 Merge pull request #410 from ccin2p3/validate_cmd
Add param for specifying validate connection script in postgresql::client.
2015-03-31 16:55:05 +01:00
JT (Jonny)
7e0547fbe5 Merge pull request #602 from buzzdeee/master
Reorder environment and require parameter, to unbreak
2015-03-31 16:45:13 +01:00
JT (Jonny)
40061ba1a4 Merge pull request #603 from dacrome/ticket/1761-provide_recovery_conf
(MODULES-1761) Provide defined resource for managing recovery.conf
2015-03-31 16:30:44 +01:00
David Crome
81b4778b93 (MODULES-1761) Provide defined resource for managing recovery.conf
Currently there is no resource to use for creating the recovery.conf

This resource can create a recovery.conf for replication with all
currently supported parameters
2015-03-30 10:27:55 +02:00
Sebastian Reitenbach
d4713efce1 Reorder environment and require parameter, to unbreak
on OpenBSD puppet 3.7.4, with future parser, and ruby 2.1.5.

Without the change, ran into error:

Info: Loading facts
    Info: Loading facts
    Error: Could not retrieve catalog from remote server: Error 400 on SERVER: I
nvalid parameter environment on Postgresql_psql[CREATE ROLE puppetdb ENCRYPTED P
ASSWORD ****] at /etc/puppet/environments/production/modules/postgresql/manifest
s/server/role.pp:46 on node puppetdb.srv.intern
    Warning: Not using cache on failed catalog
    Error: Could not retrieve catalog; skipping run

I guess the future parser requires adhering to the order?
2015-03-29 13:43:26 +02:00
Hunter Haugen
f5f87f9347 Merge pull request #591 from exptom/patch-1
Update apt key to full 40characters
2015-03-24 14:18:37 -07:00
Reno Reckling
1ecc5bc8dd properly quote create and drop extension statements 2015-03-23 14:06:41 +01:00
Tom Ford
313235a1f9 Update apt key to full 40characters
Latest version of puppetlabs/apt module shows warning on every puppet run if using a short key so this update includes the full 40 character key.
2015-03-20 14:26:26 +00:00
Remi Ferrand
995e1983f2 Add param for specifying validate connection script.
* Add param `validcon_path` in `postgresql::client` (defaults to
previous hard coded value).
* Add tests for this new parameter.

All tests runs successfully on Scientific Linux 6.4

```
$ bundle exec rake spec SPEC_OPTS='--format documentation'
[...]

Finished in 2 minutes 10.5 seconds (files took 1.4 seconds to load)
201 examples, 0 failures
```
2015-03-20 12:18:12 +01:00
Hunter Haugen
a189ed7789 Merge pull request #560 from DECK36/master
Allowing validation of db connection for more than one user and port
2015-03-19 10:42:49 -07:00
Hunter Haugen
7018a5f5ad Merge pull request #582 from rvstaveren/rvstaveren-extension-postgresql_psql-fix
postgresql::server::extension needs to have defaults for postgresql_psql
2015-03-19 10:30:02 -07:00
Hunter Haugen
88dc7eeb6c Merge pull request #585 from backstop/master
Use space.  Join seems to be defaulting to comma.
2015-03-19 10:27:21 -07:00
Andreas Ntaflos
863a4b80de Fix setting postgres role password
Discussed in https://tickets.puppetlabs.com/browse/MODULES-1869

It seems env variables passed via `exec`'s `environment` parameter must
not be single-quoted, otherwise the single-quotes are interpreted
literally in the command strings in `command` and `unless`. For a
postgres password of `foobar` this leads to the `unless` code trying to
use literally `'foobar'` as password, and the `psql` line in `command`
setting literally `'$$foobar$$'` as password.
2015-03-19 03:16:27 +01:00
Morgan Haskel
72c6942759 Since this was in an osfamily block it was getting picked up on ubuntu
Fixes #586
2015-03-17 17:12:31 -07:00
Raphaël Pinson
3a2717111d Adjust $service_status for Debian Jessie 2015-03-17 16:20:27 +01:00
Ruben van Staveren
05c466c9d0 Provide postgresql_psql defaults for postgresql::server::initdb 2015-03-16 21:30:21 +01:00
Ruben van Staveren
977a7495f8 Fix indentation to 2 spaces 2015-03-16 21:22:08 +01:00
Ruben van Staveren
01b38f5bb4 postgresql::server::extension needs to have defaults for postgresql_psql
Using same pattern as with postgresql::server::database.
observed when installing the pg_trgm using pgsql 9.4
2015-03-16 21:22:07 +01:00
Kevin Wolf
fc580e1f93 Use space. Join seems to be defaulting to comma. 2015-03-16 13:56:44 -05:00
Krzysztof Suszyński
cfbf2f9308 Using enviromental varables to hide actual password in psql commands displayed in output and reports. 2015-03-12 10:57:19 -07:00
Colin Wood
83b4ac1661 Allow management of logdir and add logdir parameter 2015-03-12 10:40:46 -07:00
Hunter Haugen
9e9aa9da85 Merge pull request #564 from antaflos/idempotency_for_grant_all_tables
Make granting on ALL TABLES IN SCHEMA idempotent
2015-03-12 10:28:34 -07:00
Morgan Haskel
d348cdb4b6 Merge pull request #579 from sathieu/template_encoding
(MODULES-1834) Be less strict when changing template1 encoding
2015-03-12 10:06:53 -07:00
Mathieu Parent
f3a0db44ef (MODULES-1834) Be less strict when changing template1 encoding
We currently use: UTF8 != UTF-8
We should instead use: pg_char_to_encoding(UTF8) == pg_char_to_encoding(UTF-8)
2015-03-10 10:03:44 +01:00
Morgan Haskel
154517aa32 There was a default case in the selector 2015-03-06 15:53:05 -08:00
Morgan Haskel
dcfe75eb95 Rework defaults for $object_name in postgresql::server::grant
You don't have access to parameters within the parameter list.
2015-03-06 15:49:07 -08:00
Sebastian Reitenbach
ef1681f5e5 Changes to support OpenBSD.
Added $service_reload parameter to params.pp, in order to allow
a reload of the postgresql server on OpenBSD, which apparently doesn't
have a service binary.
2015-03-06 14:11:33 -08:00
Andreas Ntaflos
dbbb7aa2b3 Make granting on ALL TABLES IN SCHEMA idempotent
Define a proper SELECT statement to feed into Postgresql_psql's
`unless` parameter that checks if there are any tables in the specified
schema for which the specified role *does not* have the specified
privilege. Only then allow the GRANT statement to be executed. For
details see comments.

Note that this, too, suffers from the problem that there is no feasible
way to check if a role has ALL PRIVILEGES on a table in plain SQL. By
terrible convention the INSERT privilege represents ALL PRIVILEGES here.
2015-03-05 17:18:42 +01:00