Commit graph

855 commits

Author SHA1 Message Date
Morgan Haskel
1ca8ecda15 Merge pull request #561 from igalic/docs-current
doc links should point to /current/ rather than a specific version
2015-03-06 14:26:42 -08:00
Morgan Haskel
593e953bf7 Readme and test updates for service_reload parameter 2015-03-06 14:11:33 -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
Hunter Haugen
ab98ae34ce Merge pull request #572 from mhaskel/readme
README had outdated upgrade info
2015-03-06 13:52:27 -08:00
Morgan Haskel
a3d79445b0 README had outdated upgrade info
Info was on upgrading from 2.x->3.0, but this is 4.x.
2015-03-06 13:51:28 -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
TP Honey
4dbf624b2a Merge pull request #570 from petems/MAINT-fix-spec-describe
(MAINT) Fixes incorrect rspec it description
2015-03-04 18:25:30 +00:00
Peter Souter
d1c2144b74 (MAINT) Fixes incorrect rspec it description
Copy-paste error from before
2015-03-04 11:57:06 +00:00
Morgan Haskel
8b49b58f3c Merge pull request #568 from petems/MODULES-661-remote_postgres
(MODULES-661) Add host parameter to psql commands
2015-03-03 14:19:39 -08:00
Peter Souter
d92b2545e2 (MODULES-661) Add host parameter to psql commands
This allows you to use `postgres_pqsl` commands to be run against a specified host. The ultimate goal being that you can use `puppetlabs-postsgresql` to run against remote instances, especially things such as Amazons RDS service.

This PR will be further extended to do things like allow remote `table_grant` and the like.
2015-03-03 17:13:37 +00:00
JT (Jonny)
018437c5ff Merge pull request #567 from antaflos/patch-1
Use correct TCP port when checking password
2015-03-02 16:35:23 +00:00
Andreas Ntaflos
aee6dba6f8 Use correct TCP port when checking password
The PostgreSQL server's port is specified in `postgresql::server::port`, so use it in the `unless` clause of `Exec['set_postgres_postgrespw']`. Failing to do so results in repeated invocations of the exec resource during Puppet runs when the server's port is not set to the default of 5432.
2015-02-27 04:48:15 +01:00
Colleen Murphy
b77c213351 Merge pull request #565 from gerhardsam/create_role_before_db
create role before database
2015-02-26 13:20:04 -08:00
Colleen Murphy
8b9ebd84bc Merge pull request #566 from mcanevet/fix/future_parser
Fix for future parser
2015-02-25 08:48:43 -08:00
Mickaël Canévet
9303828255 Fix for future parser 2015-02-25 13:50:32 +01:00
Sebastian Gerhards
a246e586be create role before database
Creating the role before creating the database is mandatory because otherwise
granting the access right to the database fails.
2015-02-23 11:57:05 +01:00
Colleen Murphy
9c2399be6c Merge pull request #540 from mcanevet/fix/encoding
Fix/encoding
2015-02-20 11:15:33 -08:00
Mickaël Canévet
e1034d9bee Fix template1 encoding on debian 2015-02-19 08:37:31 +01:00
Mickaël Canévet
0daf411a3e Add an acceptance test to prove that default encoding is wrong on Debian 2015-02-19 08:37:31 +01:00
Morgan Haskel
b0f2a8f765 Merge pull request #562 from hunner/fix_version
This wasn't matching anything other than psql 8
2015-02-06 17:42:24 +01:00
Hunter Haugen
bfaef511a6 This wasn't matching anything other than psql 8 2015-02-06 08:40:22 -08:00
Morgan Haskel
fdc8180820 Merge pull request #559 from hunner/fix_dbcomment
Fix comment detection
2015-02-06 15:40:38 +01:00
Igor Galić
f51bb46cea doc links should point to /current/ rather than a specific version 2015-02-06 13:34:47 +01:00
Bjoern Kortuemm (@uuid0)
1e7a91f4c5 Allowing validation of db connection for more than one user and port per host/dbname combination 2015-02-06 13:19:14 +01:00
Hunter Haugen
f889a4612d Fix comment detection
On psql 8.1, `pg_catalog.shobj_description` does not exist. Also, if the
database to comment is not the current db then this warning will be
raised and the comment will not be applied: `WARNING:  database comments
may only be applied to the current database`

This fix uses the pg_* databases to find the comment based on the
database oid rather than the shared object description function.
2015-02-05 14:39:58 -08:00
Colleen Murphy
6d2b66cc3d Merge pull request #558 from hunner/fix_dbcomment
Fix comment detection
2015-02-04 22:48:28 -08:00
Colleen Murphy
ed66176030 Merge pull request #557 from hunner/fix_tablespace
Require server package before user permissions
2015-02-04 22:47:21 -08:00
Hunter Haugen
bd80c54664 Fix comment detection
On psql 8.1, `pg_catalog.shobj_description` does not exist. Also, if the
database to comment is not the current db then this warning will be
raised and the comment will not be applied: `WARNING:  database comments
may only be applied to the current database`

This fix uses the pg_* databases to find the comment based on the
database oid rather than the shared object description function.
2015-02-04 13:41:11 -08:00
Hunter Haugen
50ae9efbad Require server package before user permissions
The postgresql user is created by the server package, but this file
resource may be evaluated before the package is installed resulting in
permission failures.
2015-02-04 13:39:33 -08:00
Hunter Haugen
4ffa8adc89 Merge pull request #556 from cmurphy/rspec
Pin rspec gems
2015-02-04 12:03:21 -08:00
Colleen Murphy
6d9768ac38 Pin rspec gems 2015-02-04 17:02:04 +01:00
Colleen Murphy
d42b821969 Merge pull request #521 from raphink/dev/server_extension
Add postgresql::server::extension definition
2015-02-04 14:26:53 +01:00
Colleen Murphy
7a5a298fd0 Merge pull request #551 from juniorsysadmin/database-comment
(MODULES-1153) Add database comment parameter
2015-02-04 13:01:56 +01:00
juniorsysadmin
435d63297a (MODULES-1153) Add database comment parameter 2015-02-04 22:45:28 +11:00
Colleen Murphy
46567450fa Merge pull request #529 from phervieux/utopic
add utopic support
2015-02-04 12:05:14 +01:00
Colleen Murphy
f2e075d92c Merge pull request #554 from multiplay/freebsdfix
FreeBSD PostgreSQL wouldn't start first time
2015-02-04 11:59:54 +01:00
Colleen Murphy
39f920657b Merge pull request #542 from dhoppe/patch-1
Update README.md
2015-02-04 11:52:09 +01:00
Colleen Murphy
881d96481c Merge pull request #555 from phaf/improve_readme_roles
change example of postgresql::server::role definition to version 3
2015-01-29 08:40:42 -08:00
Patric Hafner
63fad69e05 change example of postgresql::server::role definition to version 3 2015-01-29 14:58:32 +01:00
Colleen Murphy
7b5a992aa1 Merge pull request #553 from PierreR/patch-1
Replace require by include
2015-01-27 12:14:47 -08:00
Colleen Murphy
cc7d2faeb0 Merge pull request #552 from juniorsysadmin/fix-lint-warnings
Fix lint warnings
2015-01-27 11:55:09 -08:00
Lee Packham
937f8825f5 FreeBSD PostgreSQL wouldn't start first time
It would be enabled, but it wouldn't work properly. This fixes that
issue the same way Puppet does itself; use the onestart/onestop and most
importantly in this case, the onestatus command.

By using this approach it means the Database server will actually start
whereas it would not before. It would enable, but not actually start.
onestatus means the service type gets the right response and behaves
properly.
2015-01-24 00:07:29 +00:00
juniorsysadmin
32ebbb5e34 Fix lint warnings 2015-01-21 10:46:29 +11:00
Colleen Murphy
db42203ba9 Merge pull request #549 from arioch/fix_invalid_byte_sequence
Fix invalid byte sequence in US-ASCII error
2015-01-20 12:28:28 -08:00
Pi3r
9a29aea976 Replace require by include
Avoid using the `require` function (which is IMHO a bad practice) by being more explicit in the `require` attribute value.
2015-01-13 09:24:29 +01:00
Tom De Vylder
0625b91d71 Fix invalid byte sequence in US-ASCII error 2015-01-09 13:33:30 +01:00
Hunter Haugen
094f5d8d0b Merge pull request #535 from pishro-oss/master
Fixing autodetected version for Debian Jessie, which should use postgresql 9.4
2015-01-08 10:10:25 -08:00
Morgan Haskel
0caf8a5b18 Merge pull request #548 from cmurphy/master
Add IntelliJ files to the ignore list
2014-12-29 11:22:26 -08:00
Colleen Murphy
04588a79a4 Add IntelliJ files to the ignore list 2014-12-29 10:41:19 -08:00
Morgan Haskel
7c520bd220 Merge pull request #538 from mattbostock/groupeseb-master
Allow per-schema grants and support for 'ALL TABLES IN SCHEMA'
2014-12-22 10:10:48 -08:00