Commit graph

187 commits

Author SHA1 Message Date
Ken Barber
18ab5b5ef5 Merge branch 'stylefixes'
* stylefixes:
  don't modify variables
2013-02-15 17:20:37 +00:00
Erik Dalén
6322aff0e8 don't modify variables 2013-02-15 17:19:31 +00:00
Ken Barber
a33d845881 Merge pull request #121 from dalen/stylefixes
fix lots of style issues
2013-02-15 09:07:30 -08:00
Erik Dalén
23368ffb03 fix lots of style issues 2013-02-15 17:22:52 +01:00
Chris Price
c6532b0dea Merge pull request #120 from kbarber/ticket/master/pg_hba_template
Provide new defined resources for managing pg_hba.conf
2013-02-13 12:55:44 -08:00
Ken Barber
b9db279c04 Do not run the reload of postgresql as postgresql
While this worked fine in Ubuntu, it failed silently in Centos.

The script is really designed to be ran as root, so removing the user
property. This was failing our new pg_hba_rule tests without it.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-12 00:34:44 +00:00
Ken Barber
86a0453f2f Provide new defined resources for managing pg_hba.conf
This patch provides a more advanced way of managing pg_hba rules, by providing a
defined resource to manage a pg_hba file, and a defined resource for managing
rules within such a file (pg_hba_rule).

These new resources are wrappers around ripinaar-concat, and utilise file
assemblies instead of a template to compose the pg_hba.conf file.

I've provided a function that interprets the old ip4|6acl arrays and converts
them to this new format for backwards compatibility as well.

I slightly reformatted our documentation to allow for better documentation of
defined resources in 'Usage' as well, and provided examples of how to use this
new resource.

This hopefully should go a long way to solving the PR's related to lack of full
functionality for pg_hba.conf.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-12 00:34:42 +00:00
Ken Barber
8dba376aff Merge pull request #118 from fhrbek/coding_style_reverts
Reverted some of the coding style fixes
2013-02-07 04:21:10 -08:00
fhrbek
e29e0c0d58 Reverted some of the coding style fixes. Strings containing single quotes may be easier to read if enclosed in double quotes although it generated puppet lint warning. 2013-02-07 10:51:33 +01:00
Ken Barber
39862106b2 Merge pull request #117 from fhrbek/coding_style
Coding style fixes
2013-02-06 14:32:39 -08:00
fhrbek
bc7be13a3a Added metadata.json to gitignore 2013-02-06 19:19:04 +01:00
fhrbek
10cb81468e Coding style fixes 2013-02-06 18:51:58 +01:00
Chris Price
b97d38fb13 Merge pull request #116 from razorsedge/feature/jdbc
Thanks for your patience while we were sorting out the repo organization issues!
2013-02-06 08:43:29 -08:00
Michael Arnold
bbe92fbc1b Clean up java.pp manifest documentation.
Also clarify postgresql::java rspec test.
2013-02-05 23:22:27 -07:00
Michael Arnold
d013c16902 Add rspec test for Class['postgresql::java'].
This test conforms to the rspec-puppet and puppetlabs_spec_helper
standards.
2013-02-05 23:22:27 -07:00
Michael Arnold
556ab32b73 Add support for JDBC connector.
Modify params.pp to abstract the package name for the postgresql JDBC
connector and add Class['postgresql::java'].  Also update the README.md
to mention the availability of this class.
2013-02-05 23:22:13 -07:00
Chris Price
aa1cd44c25 Merge pull request #108 from kbarber/ticket/master/add_locale_parameter
Add locale parameter support
2013-02-05 09:53:31 -08:00
Ken Barber
2114333539 Add locale parameter support
This adds the parameter 'locale' to the 'postgresql' class so we have a global
default, and adds it two the defined resources 'postgresql::db' and
'postgresql::database'. This allows users to either:

* Defined a global default for the cluster
* Define a per-database default

As a side-effect I had to make sure 'charset' was also exposed in a similar
manner as some locales need a particular charset to work.

Tests were added to test both the 'createdb' case and 'initdb' case for Redhat,
and some refactoring was done to make the existing non_default test area use
heredocs so my manifests and test code was kept close together. As apposed to
entirely different files and places in the directory structure.

I cleaned up the related execs a little bit, adding logoutput => on_failure
where needed so we can debug failures. Beforehand execs just 'failed', but
now we should be able to get better feedback from failed execs helping support.

I also add intention comments in parts of the Puppet code that I touched where
it made sense.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-05 17:23:52 +00:00
Chris Price
4abcff0b8d Merge pull request #115 from kbarber/ticket/master/unit_tests
Add unit tests and travis-ci support
2013-02-05 09:19:11 -08:00
Ken Barber
e9370fee7b Add unit tests and travis-ci support
This patch includes some very basic and initial unit testing using rspec-puppet
and for the case of facts, just normal rspec.

I've taken a very light approach here as rspec-puppet can be quite combinatorial
when one gets carried away. For now I've just added basic compile failure
detection effectively for classes and defined resources. As we continue to work
on the code and find regressions this work can be expanded.

For facts and functions I've also taken a basic approach for now.

One little thing I did change, was the strange string that the fact returns
when the default version is undefined. Instead of an error message I've just
returned the string 'unknown' which is more in line with other facts I've seen
in the wild, and to be quite honest 'unknown' is fairly self-explantory. Since
a fact isn't an error reporting message this seemed more appropriate, and looked
nicer in the rspec test.

As far as travis-ci support, I've added the same configuration that @jmmcune
came up with for stdlib which is pretty light and reasonable standard now we
propogated that to 4 or so other modules in the puppetlabs/ namespace. It should
work out of the box.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-05 15:15:03 +00:00
Chris Price
d0419adac9 Merge pull request #105 from kbrezina/feature/master/adding-include-to-pg-conf
Support for included configuration file
2013-02-01 12:50:21 -08:00
Karel Brezina
236ce4783a Added info about the advanced configuration file 2013-02-01 12:46:59 +01:00
Karel Brezina
db93a91283 Added test of the included postgresql configuration file 2013-02-01 09:41:50 +01:00
Chris Price
5e0a45e6da Merge pull request #104 from boinger/master
Minor typo fix in README
2013-01-31 14:20:17 -08:00
jv
f9ad9776e2 typo fix in example 2013-01-31 11:50:45 -08:00
Karel Brezina
b16c1e0d64 Improved test result matching for the advanced PGS configuration test. 2013-01-31 16:27:47 +01:00
Karel Brezina
ed29a9931d RSpec tests were fixed to work properly with included postgresql_puppet_extras.conf 2013-01-31 15:56:50 +01:00
Chris Price
a4ec366811 WIP - adding support for an 'included' config file 2013-01-31 15:56:48 +01:00
Chris Price
7b080970c8 WIP 2013-01-31 15:56:18 +01:00
Chris Price
6e4ea18e8b Merge pull request #100 from kbrezina/master
Support for tablespaces
2013-01-30 11:31:22 -08:00
Chris Price
9fd7f1a4b1 Final commit for 2.0.1 release; update CHANGELOG and Modulefile 2013-01-30 09:55:29 -08:00
Karel Brezina
8a01e1917c Improved tablespace rspec test 2013-01-30 14:35:14 +01:00
Chris Price
83861ebd29 Update spec/README.md 2013-01-29 10:54:27 -08:00
Karel Brezina
9114490e9d Tablespacing improvements 2013-01-29 14:05:15 +01:00
Karel Brezina
fad93fbeea Added support for tablespaces 2013-01-28 18:01:11 +01:00
Chris Price
cdd4220071 Merge pull request #89 from laurenrother/master
Updated content to conform to README best practices template
2013-01-24 14:29:25 -08:00
Chris Price
5e47aff57a Merge pull request #94 from puppetlabs-operations/wheezy_7_0_default_version
Update postgres_default_version to 9.1 for debian 7.0
2013-01-23 09:02:49 -08:00
Adrien Thebo
04a7b06d15 Update postgres_default_version to 9.1 for debian 7.0
/etc/debian_version on Wheezy was updated to 7.0 with the release of the
base-files package on 2012-12-12, which means that wheezy could be
either 7.0 or wheezy depending on what version of base-files is
installed. To handle both cases we treat 'wheezy' and '7.*' as
synonymous.
2013-01-22 20:54:19 -08:00
Lauren Rother
79879099b7 Fixed typos, rewording and typsetting per feedback
Updated spelling errors, typsetting issues and some wording suggestions
based on module author feedback
2013-01-22 15:16:21 -08:00
Lauren Rother
f140ce3be4 Updated content to conform to README best practices template
Before alterations, this content was the module author-determined
description of and instructions for use of the module.

As part of a joint Forge/Docs team effort to standardize formatting and
encourage quality module documentation, a best practices README
template was created via internal and external user testing. That
template was then applied to this module.

I pulled in content from the original README on GitHub and the Module
of the Week blog post. A table of contents was added for navigability,
standard headings were added (Overview, Module Description, Setup,
Usage, Implementation, etc.) to organize content, existent and
pulled-in content was moved under its appropriate heading and edited
for tone/flow/clarity, links to outside documentation were updated, and
basic formatting was done to adhere to template standards.
2013-01-18 16:17:08 -08:00
Chris Price
2568038e02 Merge pull request #87 from sfontes/patch-1
Syntax error in params.pp file
2013-01-18 09:28:42 -08:00
Chris Price
7e3803441b Merge pull request #88 from FlaPer87/trailing/comma
Removed trailing comma. Makes puppet fail
2013-01-18 09:28:07 -08:00
Flaper Fesp
219e7445bd Removed trailing comma. Makes puppet fail 2013-01-18 15:58:47 +01:00
Simão Fontes
05c9104ae1 Update manifests/params.pp
err: Could not parse for environment production: Syntax error at ')' at /etc/puppet/modules/common/postgresql/manifests/params.pp:34
2013-01-18 11:57:21 +00:00
Chris Price
5a7e1d442f Merge pull request #83 from cprice-puppet/bug/master/82-pg-8.1-connect-privilege
Fix revoke command in database.pp to support postgres 8.1
2013-01-16 17:21:13 -08:00
Chris Price
43ded429de Fix revoke command in database.pp to support postgres 8.1
In postgres 8.1, the 'CONNECT' privilege doesn't exist, which
would result in an error if you tried to use the 'database'
type.  This commit conditions the revoke statement to use the
'ALL' privilege on 8.1.
2013-01-16 16:38:24 -08:00
Daniel Pittman
a018be54e7 Merge pull request #79 from Seldaek/patch-2
Add support for ubuntu 12.10 status
2013-01-16 10:17:19 -08:00
Chris Price
2580464d59 Merge pull request #81 from cprice-puppet/maint/master/2.0-release
Update CHANGELOG, README, Modulefile for 2.0.0 release
2013-01-15 16:43:22 -08:00
Chris Price
1d6ad0ce9b Update CHANGELOG, README, Modulefile for 2.0.0 release 2013-01-15 16:09:10 -08:00
Ken Barber
3b060fa208 Merge pull request #80 from cprice-puppet/bug/master/require-service-from-db
Add a "require" to make sure the service is up before trying to create a...
2013-01-15 14:46:05 -08:00