Commit graph

262 commits

Author SHA1 Message Date
Nate Potter
82c6716d48 (MODULES-3247) Enable schema and database ownership change
Currently postgresql::server::schema, postgresql::server::db and
postgresql::server::database allow creating new schemas and
databases if they don't already exist and assigning owners to
them. This patch enables changing the owner of a schema or database
that already exists if the change_ownership variable is set to true.
2016-07-09 15:55:51 -07:00
David Schmitt
cf5140777b Update to newest modulesync_configs [9ca280f] 2016-04-18 20:15:09 +01:00
David Schmitt
31914f3547 (maint) fix test to run under strict variables 2016-04-04 14:38:19 +01:00
Travis Fields
740c0b3b40 Update postgresql::globals::default_connect_settings and default to {}
- Add missing parameter `default_connect_settings` to class `postgresql::server`
  which was required by all of the classes and actually would have failed if the
  tests where not masking the issue
- Remove test param that was masking the issue
2016-03-01 09:47:44 -08:00
Hunter Haugen
f6dd7ca482 Update quoting because addresses are not floats 2016-02-18 10:05:56 -08:00
Bryan Jen
e06fc02731 Revert "Add postgresql_version fact" 2016-02-17 12:54:02 -07:00
David Schmitt
8ce25cc6f3 (FM-4046) Update to current msync configs [006831f]
This moves all copyright statements to the NOTICE file in accordance with the ASFs guidelines on applying the Apache-2.0 license.
2016-02-16 16:33:49 +00:00
Hunter Haugen
9f1cf29857 Merge pull request #730 from puppetlabs/4.7.x
4.7.x mergeback to master
2016-02-03 15:37:40 -08:00
Bryan Jen
d1b7be8782 Merge pull request #720 from jyaworski/postgresql_version_fact
Add postgresql_version fact
2016-02-03 13:44:22 -07:00
Bryan Jen
6f5002aa0e Merge pull request #719 from matonb/psql_port
Fix password change failing
2016-02-03 11:40:00 -07:00
Hunter Haugen
7e27a989c0 Fix quoting 2016-02-02 10:51:20 -08:00
Farzad FARID
810448afa0 Escape case where password ends with '$'.
postgresql_escape returned an invalid string if the password end in '$':
    postgres=# alter role "postgres" password $$foo$$$;
    ERROR:  syntax error at or near "$"
    LINE 1: alter role "postgres" password $$foo$$$;
2016-02-02 10:13:19 +01:00
Hunter Haugen
f7dfa262dc Merge pull request #727 from supercow/quote_owner
(MODULES-3024) Quote database objects when creating databases
2016-02-01 15:23:14 -08:00
James Sweeny
5354d0f1ea (MODULES-3024) Quote database objects when creating databases
Prior to this commit, when creating databases with a name or owner that has
characters which must be quoted (e.g., "pe-postgres"), the postgresql::server::database define
fails due to a SQL syntax error.
2016-02-01 17:58:55 -05:00
Helen Campbell
9004ad5747 Changelog, metadata and nodeset update for 4.7.0 2016-02-01 14:35:15 +00:00
Brett Maton
d71e3f754d Fix password change failing
postgres db user password change failing when postgres is listening on non standard port number.
2016-01-30 19:01:02 +00:00
Hunter Haugen
355376989d Whoops 2016-01-29 14:23:39 -08:00
Bryan Jen
e67abfeefa Merge pull request #721 from hunner/allow_floats
(MODULES-2960) Allow float postgresql_conf values
2016-01-29 14:46:19 -07:00
Hunter Haugen
e18342829e (MODULES-2960) Allow float postgresql_conf values 2016-01-29 12:38:02 -08:00
Joseph Yaworski
edc8d3c3e3 Add postgresql_version fact 2016-01-29 15:00:06 -05:00
Sebastian Gerhards
2a78c474a3 Fix postgresql::server acceptance test descriptions
The descriptions of the acceptance tests should match the class under
test, i.e. postgresql::server.
2016-01-28 15:26:14 +01:00
Hunter Haugen
a6ccfb217e (MODULES-2968) Add default postgis version for 9.5
This commit also updates the logic that determines the postgis version
so that if version association is missing in the future, it will still
compile.
2016-01-27 15:34:22 -08:00
David Schmitt
6e6d242419 (FM-4049) Update to current msync configs [2c99161] 2016-01-27 14:46:24 +00:00
Jason Downs
9f0141f955 Fix paths to work on Amazon Linux, update unit test 2015-11-19 11:06:19 -08:00
Stefan Warten
e8c661e207 Added parameter description in README, before-relation if restart_on_change is false, and unit tests for both conditions of the parameter 2015-10-07 16:24:41 +02:00
Bryan Jen
0ffbcc0a5c Merge pull request #693 from frconil/master
Fixes MODULES_2059 - adds extension argument
2015-09-09 15:21:09 -07:00
François Conil
c1f4530634 Fixes MODULES_2059 - adds extension argument
This adds the ability to define the extension name separately from the
"title" of the resource, which allows you to add the extension to more
than one database.

As per the original ticket, extensions in postgresql can be defined on
a per database basis. By using the same name for both the extension and
the instance of postgresql::server::extension, you're getting duplicates
errors if you try to assign an extension to more than one database
2015-09-09 14:26:41 +10:00
Josh Behrends
dbcb359d33 updated systemd-override to support fedora and CentOS paths for systemd 2015-09-04 10:58:53 -07:00
David Schmitt
8ce98ad9a1 (MAINT) do not run the multi-node tests by default 2015-08-27 16:02:36 +01:00
Tom Hey
6a29636155 (MODULES-661) Remote DB support
Adds connection-settings (for remote DB support) when creating DB resources.

Connection-settings allows a hash of options that can be used
when connecting the a remote DB (such as PGHOST, PGPORT, PGPASSWORD
PGSSLKEY) and a special option DBVERSION indicating the version
of the remote database.

Including
- Puppet updates
- Documentation updates
- RSpec unit test updates
- RSpec acceptance test updates
- Some test coverage for connection-settings
- Working acceptance test...
    Basic vagrant setup:
    * Two boxes, server and client
    * Runs puppet code to on server to setup a postgres server that allows all connections and md5 connections, creates db puppet to look at
    * Runs puppet code on client to make a server that a psql command can be run against puppet db on other server
    * Does some fancy stuff to get the fact of the IP from the first server to connect to
- Backwards compatible, with deprecation warnings around old parameters
2015-08-27 11:03:18 +01:00
Alexander Brovman
1eb45d07f1 adding proxy option for yum repositories 2015-08-12 14:42:32 +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
Bryan Jen
3e6a22d166 fixes postgresql::server:recovery acceptance tests 2015-07-01 14:13:29 -07:00
Bryan Jen
2514881d3d adds acceptance tests for postgresql::server::recovery resource 2015-07-01 14:13:29 -07:00
Bryan Jen
026e4a2fdb Unpins apt 1.8 dependency in fixtures.yml and spec_helper_acceptance. 2015-07-01 14:13:29 -07:00
David Schmitt
e963cd153d (FM-2923) install net-tools for tests
serverspec's be_listening uses net-tools' netstat utility to check for
open ports. This was puleld in until recently by puppet-agent packages.
Now this has changed and we need to install this manually.
2015-06-26 14:13:48 +01:00
Travis Fields
4596b59c01 (maint) Fix tests from #527 merge
- Looks like copy tests mismatched logic of when it should expect changes
2015-06-25 16:48:02 -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
2aa3217426 (maint) Add beaker-puppet_install_helper and fix fact bug
- Issue with fact() was being called against default instead of
  using fact_on when iterating against each host, also was installing 3.8.1 despite
  specifying PUPPET_VERSION=1.1.1 so updated to use beaker-puppet_install_helper
2015-06-18 15:15:30 -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
tphoney
900b0858c3 pin apt for unit tests
Revert "fixing the unit test."

This reverts commit b8fa36a233.
2015-05-06 17:47:16 +01:00
tphoney
b8fa36a233 fixing the unit test. 2015-04-18 22:04:50 +01:00
Bryan Jen
eb75ec2e36 Merge pull request #609 from hunner/antaflos-patch-2
Antaflos patch 2
2015-04-10 16:08:19 -07:00
Hunter Haugen
c0da35cb00 Add acceptance test 2015-04-10 14:28:18 -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