Commit graph

241 commits

Author SHA1 Message Date
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
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
Morgan Haskel
f3a17066d1 Merge pull request #593 from cmurphy/rspec-puppet-2
Testing updates
2015-03-24 15:58:01 -04:00
Reno Reckling
1ecc5bc8dd properly quote create and drop extension statements 2015-03-23 14:06:41 +01: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
Colleen Murphy
e049fbc464 Update rspec-puppet tests for 2.0
This patch replaces `subject` with `catalogue` for the raise_error
matchers because `subject` no longer contains Puppet errors. We also
unpin rspec-puppet.
2015-03-19 13:55:26 -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
8053ea7232 Fix acceptance tests for EL
The return value of fact('selinux') is a stringified bool.
2015-03-17 16:35:31 -07:00
Hunter Haugen
c323cea12a Fix specs for #567 2015-03-13 14:20:26 -07:00
Hunter Haugen
6b8c3a9526 Don't make change to .gitignore
It will be stomped on by modulesync.

And remove trailing whitespace
2015-03-12 10:58:48 -07:00
Krzysztof Suszyński
a9b16b6ccf I've added some acceptance tests to 100% check that my method is valid and passwords ane not placed in report 2015-03-12 10:57:20 -07:00
Krzysztof Suszyński
5419384473 Fix for not running acceptance tests on CentOS box
This was caused by fact that SELinux is already disabled and `setenforce 0` returns 1 insted of 0 in that case.
2015-03-12 10:57:20 -07: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
Hunter Haugen
a50a16d97d Merge pull request #580 from raphink/dev/replication
Replication type
2015-03-12 10:18:42 -07:00
Raphaël Pinson
76ab6f1160 Add a postgresql_replication_slot type 2015-03-12 18:14:58 +01:00
Morgan Haskel
8295b488cc Revert "(MODULES-661) Add host parameter to psql commands"
This reverts commit d92b2545e2.

Conflicts:
	spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb
2015-03-09 17:00:06 -07:00
Morgan Haskel
593e953bf7 Readme and test updates for service_reload parameter 2015-03-06 14:11:33 -08:00
Peter Souter
d1c2144b74 (MAINT) Fixes incorrect rspec it description
Copy-paste error from before
2015-03-04 11:57:06 +00: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
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
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
Hunter Haugen
bfaef511a6 This wasn't matching anything other than psql 8 2015-02-06 08:40:22 -08:00