Commit graph

601 commits

Author SHA1 Message Date
Clayton O'Neill
6e55b9bbb3 Ensure db user exists before validating db connection
The validate_db_connection class takes a user to connect as, but if we're
using the progresql::server::db defined type then the user might not be
created yet, and might not have any permissions granted yet.  This patch
users a collector to ensure that the that the user and grants are active
before validating.
2014-05-23 17:05:17 -04:00
Ashley Penney
7ad1390c1d Merge pull request #421 from blkperl/puppet36_future_parser
Change selector statements to have default listed last
2014-05-22 19:17:28 -07:00
Ashley Penney
d37a2216eb Merge pull request #408 from fredj/readme-typo
Fix wrong config option in README
2014-05-22 19:15:26 -07:00
William Van Hevelingen
fee21d858d Change selector statements to have default listed last
As per the official docs "the default case must be at the end of the list."
http://docs.puppetlabs.com/puppet/latest/reference/lang_conditional.html#selectors

This commit fixes breakage in Puppet 3.6.0 where it enforces the behavior
described above when Future parser is enabled.

See https://tickets.puppetlabs.com/browse/PUP-2642
2014-05-22 15:30:55 -07:00
Ashley Penney
d8fec75635 Merge pull request #409 from mnencia/patch-1
Update apt.postgresql.org key url
2014-05-18 08:02:52 -07:00
Morgan Haskel
a06a061952 Merge pull request #417 from apenney/fix-platforms
Add RHEL7 and Ubuntu 14.04.
2014-05-13 16:20:36 -04:00
Ashley Penney
8bf9bda098 Add RHEL7 and Ubuntu 14.04. 2014-05-13 22:19:45 +02:00
Ashley Penney
131aa5dbb3 Merge pull request #416 from apenney/merge33x
Merge33x
2014-05-13 15:44:13 -04:00
Ashley Penney
bd1eec24d0 Merge branch '3.3.x' into merge33x 2014-05-13 21:08:41 +02:00
Ashley Penney
78bbe0d947 Merge pull request #415 from apenney/rhel7
[WIP] Fixes to tests and RHEL7 support.
2014-05-13 15:02:56 -04:00
Ashley Penney
bb26d47090 Merge branch 'rhel7' of https://github.com/apenney/puppetlabs-postgresql into rhel7 2014-05-13 20:25:19 +02:00
Ashley Penney
246725cfb9 Fix postgis so it installs the approprate RHEL5 package.
In RHEL5 the package was just named 'postgis' in the external repos,
rather than postgis$package_version.
2014-05-13 20:24:28 +02:00
Ashley Penney
636e693821 Merge pull request #5 from mhaskel/rhel7
Need to flush iptables on rhel5.
2014-05-13 14:09:53 -04:00
Morgan Haskel
d51e9779f0 Need to flush iptables on rhel5. 2014-05-13 14:07:46 -04:00
Ashley Penney
2c58670bea Merge pull request #4 from mhaskel/rhel7
If we're just testing for a warning no need to start up the services.
2014-05-13 12:29:35 -04:00
Morgan Haskel
f004ca39f3 If we're just testing for a warning no need to start up the services. 2014-05-13 12:10:44 -04:00
Ashley Penney
abe2b9ceb2 Merge pull request #3 from mhaskel/rhel7
'!' binds before 'and'.
2014-05-13 11:02:47 -04:00
Morgan Haskel
906794d3ce '!' binds before 'and'.
This caused the repo not to be included on RHEL5 and added extra failures.
2014-05-13 10:54:09 -04:00
Ashley Penney
911b868bcb Merge pull request #2 from mhaskel/rhel7
Fix validate_db_connection_spec.
2014-05-12 21:17:47 -04:00
Morgan Haskel
46d3717c34 Fix validate_db_connection_spec.
The for loop inside the shell() was confusing things (although it's unclear why.  I don't think we need to be looping in the spec, and this works.
2014-05-12 21:00:13 -04:00
Ashley Penney
ff59d421f9 See if this fixes puppet 2.7. 2014-05-13 00:52:29 +02:00
Ashley Penney
192ea5e3f3 Fix service_ensure.
We now test if service_ensure is 'running' or 'stopped' but it was
actually picking up the default value of ensure in params.pp which
was true, not present.

Fix this and thereby fix the failing test.
2014-05-12 23:34:25 +02:00
Ashley Penney
c00b47f220 Restructure the tests here to be cleaner. 2014-05-12 23:28:18 +02:00
Ashley Penney
f37b3a6ba5 Fixes broken tests and add a service_ensure test. 2014-05-12 23:25:05 +02:00
Ashley Penney
a8e3021cd2 Return Gemfile back to stock. 2014-05-12 22:14:08 +02:00
Ashley Penney
a8705e2cb2 Fix RHEL5 service stopping.
On RHEL5 a service stop returns a 1 instead of 0 if the thing is already
stopped, so we now check the status first before attempting to stop.
2014-05-10 16:57:29 +02:00
Ashley Penney
0be58d7a2c Fix rspec-beaker for now. 2014-05-10 16:57:16 +02:00
Ashley Penney
66651d4ad5 Make sure that the location for 12.04 is set.
This is really clumsy and we need a better way.
2014-05-10 02:14:38 +02:00
Ashley Penney
74039db1a1 Add an entry for RHEL5. 2014-05-10 02:14:27 +02:00
Ashley Penney
6b929da99f Fix tests on Centos. 2014-05-09 18:30:34 -04:00
Ashley Penney
e947e96e79 Fix the way we remove postgresql::client. 2014-05-09 16:36:31 -04:00
Ashley Penney
05b77232f9 Allow psql to fail as it sometimes will in the tests. 2014-05-09 15:28:30 -04:00
Ashley Penney
b7685998b6 Various fixes to the tests. 2014-05-09 15:28:19 -04:00
Ashley Penney
4334dc7bd9 Stop postgresql before changing port. 2014-05-09 15:28:00 -04:00
Ashley Penney
6bf896fa34 Switch to 'running'/'stopped' to match the test below. 2014-05-08 19:50:11 -04:00
Ashley Penney
4e002d7fd9 Make sure we continue working post 7.0. 2014-05-08 16:52:04 -04:00
Ashley Penney
3205359afe Make sure we set selinux contexts on Redhat. 2014-05-08 16:49:25 -04:00
Ashley Penney
06f1727336 Various test updates to handle RHEL7 better. 2014-05-08 16:48:57 -04:00
Ashley Penney
e71cdfc044 Add the template for port overriding on RHEL7.
This lets us tell systemd to do the right thing.  Can be extended later
for PGDATA.
2014-05-08 16:48:29 -04:00
Ashley Penney
5488821ce6 Ensure we've always started postgresql at least once before a reload. 2014-05-08 16:47:37 -04:00
Ashley Penney
a575884908 Ensure repo is in place before postgis installation.
We need to make sure we've actually setup the repo before installing
postgis.
2014-05-08 16:47:10 -04:00
Ashley Penney
3e3fa8cab1 Handle ports for systemd.
This is a terrible hack currently but it appropriately handles systemd.
2014-05-08 16:46:39 -04:00
Ashley Penney
d010bc8c7f This doesn't exist on RHEL7. 2014-05-08 16:46:09 -04:00
Ashley Penney
5323054ddc Update for RHEL7.
Block RHEL7 from pulling in the PostgreSQL repos from upstream as they
don't exist yet.
2014-05-08 16:44:53 -04:00
Ashley Penney
5e33409342 Add service_ensure.
This allows you to control the status of the Postgresql service directly
from postgresql::server.
2014-05-08 16:43:22 -04:00
Ashley Penney
702998d8fd Merge pull request #407 from hunner/deprecate_version
(MODULES-630) Deprecate postgresql::server::version
2014-05-07 18:28:26 -04:00
Hunter Haugen
21001d5b0c (MODULES-630) Deprecate postgresql::server::version
Adjusting the version is explicitly done though the postgresql::globals
class, as this affects many parts of the module. This parameter did not
function correctly on systems that did not have a default, as described
in the ticket.
2014-05-07 15:25:18 -07:00
Morgan Haskel
7fb35f52c1 Merge pull request #412 from apenney/fix-tests-1404
Fix tests 1404
2014-05-05 19:25:09 -04:00
Ashley Penney
4c85eee2d8 Fixes to get the tests running on Ubuntu 14.04. 2014-05-06 01:22:59 +02:00
Ashley Penney
f75dbbf10d Move into the hosts loop. 2014-05-05 22:44:47 +02:00