Commit graph

166 commits

Author SHA1 Message Date
Bret Comnes
2718f14017 Special case for $datadir on Amazon
Closes #252
2013-10-02 12:48:44 -07:00
Marco Nenciarini
0cb71c7c5f Support apt.postgresql.org version specific packages.
This change will allow to test beta and release candidate version of
postgres from apt.postgresql.org.

For stable version this change will make available the libpq package
for that specific version (that will not hurts).
2013-09-25 18:01:07 +02:00
Ashley Penney
6ac2e25821 Merge pull request #249 from aboe76/master
Added Archlinux Support
2013-09-23 16:22:59 -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
Niels Abspoel
1e3bcb73bb Added Archlinux Support 2013-09-23 20:08:17 +02: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
Ken Barber
3ba3b6df54 Ensure proper removal of the client package
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-19 23:51:16 +01:00
Ken Barber
fa82eec94b Fix encoding issues for ubuntu
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-19 21:15:09 +01:00
Ken Barber
809003d0f9 serverspec + some cleanup
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-19 16:30:15 +01:00
Ken Barber
2876dacb94 Make sure $ensure is passed through to repo correctly
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-19 01:16:20 +01:00
Ken Barber
c8d3ecde14 Various cleanups
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-18 22:25:51 +01:00
Ken Barber
b9598796e0 Calculate default version for Fedora
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-18 00:05:14 +01:00
Ken Barber
cd2bc50cdf Fix repo removal for testing purposes
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-17 22:19:01 +01:00
Ken Barber
27c5cc0304 Provide package removal fixes for Debian tests
This patch provides fixes to help tests pass on Debian. The failures were in
relation to the lack of proper removal of the server and contrib parts. Setting
the ensure => purged parameter for removal seems to have solved a lot of this.

Also, the ordering for contrib being (un)installed needed some work.

I've also made sure we use 'purged' a lot more in tests to make sure we clean
up after ourselves properly.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:17 +01:00
Ken Barber
a0a2a00a49 Fix debian 7 regexp, rename to default_version and some cleanup
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:17 +01:00
Ken Barber
7d84b6ac0e Add datadir back, as its used within a lot of tests
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:17 +01:00
Ken Barber
59c1cbfbf8 Major rewrite to solve order dependencies and unclear public API
This is a very very large change to the module. It started out as a fix to add
postgresl::server::config_entry, and quickly became a rewrite to fix a lot of
ordering issues inherent in the API.

Since this changes the Public API it is considered a backwards compatible
change.

See the upgrading guide in README.md for more details as to what has been
modified in this patch.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:15 +01:00
Rahul Gopinath
20bdf10b72 Adding anchors around contained resources 2013-09-14 06:38:53 +01:00
Rahul Gopinath
1dce6454c8 Pulling in pgconf module from camptocamp/puppet-pgconf
This includes the following changes:
  - Hooking up pgconf module to postgresql to manage postgresql.conf
   - pgconf includes a type and provider for postgresql.conf the provider
     is a simple parsed file following basic ini parsing.
  - Add config_entry.pp which wraps the pgconf module.
  - Replace file_line resources by postgresql::config_entry in beforeservice.pp
  - Adding unit tests for the newly introduced functionality
2013-09-14 06:38:53 +01:00
Greg Sutcliffe
ba005467dc Remove trailing comma which breaks 2.6 compat 2013-08-30 13:00:57 +01:00
Ashley Penney
8ce9952600 Merge pull request #236 from apenney/style
Style fixes (and a bugfix)
2013-08-27 12:00:30 -07:00
Ashley Penney
c2d48f1953 Merge pull request #235 from kamilszymanski/db_docs_update
Add missing documentation for istemplate parameter
2013-08-27 12:00:10 -07:00
Ashley Penney
d378d8aa17 Merge pull request #209 from mnencia/patch-1
Tag the postgresql-contrib package as postgresql
2013-08-27 11:58:18 -07:00
Ashley Penney
f7116f5aad Style guide cleanup.
Most of these changes are just simple bits but I've wrapped a bunch of
stuff around 80 lines so it's slightly more readable.  These should all
be no-op changes.
2013-08-26 12:22:13 -04:00
Kamil Szymanski
83086c2712 Add missing documentation for istemplate parameter 2013-08-25 13:22:33 +02:00
Ashley Penney
0ddb9b109a Add the two missing variables that the if check requires. 2013-08-24 12:07:07 -07:00
Hunter Haugen
b2b9b13df8 Merge pull request #218 from fiddyspence/set_postgres_postgrespw
Alter escaping in postgresql::config::afterservice
2013-08-13 16:13:18 -07:00
Hunter Haugen
9d753b40a8 Merge pull request #229 from mcanevet/plperl
Add README entry for postgresql::plperl
2013-08-13 16:07:34 -07:00
Mickaël Canévet
84f79507ed Fix postgresql::plperl documentation 2013-08-12 10:15:25 +02:00
Ken Barber
9c2dab95aa (GH-216) Alter role call not idempotent with cleartext passwords
The postgresql::role defined type was not idempotent when passed cleartext
passwords. This is because we were comparing it with its md5 equivalent in
the db.

This patch converts any cleartext passwords to md5 before comparison, but
only if they are cleartext (ie. not starting with md5).

I also bumped the version of rspec-system-puppet to get use of the refresh
method, plus did some cleanup because the old tests were a bit dusty, again
taking advantage of refresh plus changing some matchers for clarity.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-08-01 03:18:46 +01:00
fiddyspence
165e12d88e amending the unless on the exec for quoting also 2013-07-23 14:43:45 +01:00
fiddyspence
82d79dd21a reverting path on exec 2013-07-23 13:08:54 +01:00
fiddyspence
2eb03efc29 Alter escaping in postgresql::config::afterservice
This allows non-standard users (pe-postgres) to change passwords. Also
added a function to do escaping of the password, added system tests
and rspec tests for the function.
2013-07-23 13:04:46 +01:00
Hunter Haugen
847f54ce6c Merge pull request #204 from mcanevet/set_istemplate
Add support for istemplate parameter where creating db
2013-07-19 12:55:16 -07:00
Hunter Haugen
95452ceb90 Merge pull request #205 from mcanevet/plperl
Add support for installing PL/Perl
2013-07-19 12:49:21 -07:00
Marco Nenciarini
2344960980 Tag the postgresql-contrib package as postgresql 2013-07-17 12:10:19 +02:00
Hunter Haugen
a37eaa053b Split database_grant up
The code to grant permissions databases and their objects has been
abstracted to `postgresql::grant` and is used by both
`postgresql::database_grant` and `postgresql::table_grant`
2013-07-16 14:31:28 -07:00
Mickaël Canévet
5ff47cf1b8 Test plperl only on non standard installation as it does not work on redhat5 2013-07-16 16:06:12 +02:00
Mickaël Canévet
f0ac7325f4 Set plperl_package_name to postgresql-plperl on every RedHat family OS except RHEL5 2013-07-16 15:32:56 +02:00
Mickaël Canévet
68361236c0 Use $::operatingsystemrelease instead of $::lsbmajdistrelease 2013-07-16 10:21:19 +02:00
Mickaël Canévet
d7cb86ca1e Add missing manifests/plperl.pp file 2013-07-16 08:52:20 +02:00
Mickaël Canévet
5065246512 Add support for installing PL/Perl 2013-07-10 15:20:57 +02:00
Mickaël Canévet
c86fec994a Add support for istemplate parameter where creating db 2013-07-10 14:44:58 +02:00
Mickaël Canévet
1f736fcfc0 Add support for optional management of pg_hba.conf
This patch adds support for disabling management of pg_hba.conf by the module,
through the parameter `manage_pg_hba_conf`.
2013-07-08 13:29:48 +01:00
Mickaël Canévet
abf8f64ab5 Alter superuser, createdb, createrole, login, replication status and the connection limit of a role that already exists
Previously we only created a new user, any updates to the defined resource
would not update the role. This patch adds extra logic to modify a role
whenever a parameter is changed.

System tests have also been added to support this.
2013-07-03 14:11:54 +01:00
Chris Price
dcac94a70d Merge pull request #156 from harbulot/issue_114
Setting the owner of the database with createdb.
2013-06-06 14:45:07 -07:00
Chris Price
5bc584ef26 Merge pull request #188 from cprice-puppet/bug/master/fix-hard-coded-postgres-user-in-hba
Don't hard-code postgres user's username for pg_hba
2013-06-06 14:43:02 -07:00
Chris Price
8502de54a7 Don't hard-code postgres user's username for pg_hba 2013-06-06 12:55:43 -07:00