Commit graph

214 commits

Author SHA1 Message Date
Chris Price
16c7dda9d4 Merge pull request #143 from kamilszymanski/postgres_default_version
Update postgres_default_version for Ubuntu
2013-02-28 09:19:02 -08:00
Kamil Szymanski
b46763d4a7 Update postgres_default_version for Ubuntu 2013-02-28 16:04:43 +01:00
Chris Price
cb1a751fed Merge pull request #140 from kbarber/maint/master/fix_travis_gem_versions
Fix versions for travis-ci
2013-02-26 09:36:40 -08:00
Ken Barber
794ef22934 Fix versions for travis-ci
This fixes some mistakes in the .travis.yml file:

* Corrects matches so the minor gem revisions get rounded, this means 2.6.0
  for example is used.
* Adds Ruby 2.0.0 tests
* Allows 2.6.0 to fail for now, as it doesn't have create_resources.
* Removes trailing commas and arrays in functions for 2.6.0.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-26 14:32:25 +00:00
Ken Barber
10992e115d Merge branch 'replication_support'
* replication_support:
  Add documentation for replication flag for postgresql::role
  Add support for the REPLICATION flag when creating roles
2013-02-25 18:47:23 +00:00
Ken Barber
e74360c805 Add documentation for replication flag for postgresql::role
Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-25 18:46:31 +00:00
Jordi Boggiano
49ecb872fa Add support for the REPLICATION flag when creating roles 2013-02-25 19:11:28 +01:00
Chris Price
8df74b92da Merge pull request #137 from kbarber/maint/master/create_sudoers_for_centos5
Create dependent directory for sudoers so tests work on Centos 5
2013-02-25 10:02:02 -08:00
Chris Price
673e47ee94 Merge pull request #138 from kbarber/ticket/master/128-provide_more_custom_parameters_for_custom_packaging
Ticket/master/128 provide more custom parameters for custom packaging
2013-02-25 10:01:17 -08:00
Ken Barber
501289394a Cleaned up and added unit tests
Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-25 17:50:53 +00:00
Karel Brezina
5ef164b1a6 Generalization to provide more flexibility in postgresql configuration 2013-02-25 17:50:34 +00:00
Ken Barber
abc63627d5 Create dependent directory for sudoers so tests work on Centos 5
Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-25 16:51:20 +00:00
Ken Barber
cd31c71cb4 Merge pull request #134 from cv/patch-1
Allow SQL commands to be run against a specific DB
2013-02-24 15:46:15 -08:00
Carlos Villela
6f6da927d1 Allow SQL commands to be run against a specific DB
If resource[:db] is set, then it is sent to psql. 

Otherwise, argument is omitted and should not introduce any regression.
2013-02-24 02:50:26 -03:00
Ken Barber
92023f1afb Merge pull request #133 from razorsedge/feature/support2.6
Restore support for Puppet 2.6.
2013-02-23 16:25:24 -08:00
Michael Arnold
0db0849054 Drop trailing comma to support Puppet 2.6. 2013-02-23 16:09:26 -07:00
Chris Price
74463409f5 Merge pull request #132 from kbarber/ticket/master/release_211
Change Modulefile and Changelog for Release 2.1.1
2013-02-22 09:35:19 -08:00
Ken Barber
8770bf461e Change Modulefile and Changelog for Release 2.1.1
Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-22 12:14:41 +00:00
Chris Price
ca41523630 Merge pull request #131 from kbarber/ticket/master/130-unsupported_include_directive_postgres_81
Ticket/master/130 unsupported include directive postgres 81
2013-02-21 13:28:48 -08:00
Ken Barber
0a76406e23 (GH-130) Amend system tests for Centos 5
Skip tests that don't apply to Centos 5, and make sure the parent directory
for tablespace correction has the correct SELinux settings for tablespace
management.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-21 21:23:56 +00:00
Ken Barber
4d70c188e8 (GH-130) Fix 'include' parameter for Postgresql 8.1
This removes the 'include' parameter for PostgreSQL 8.1 as it was failing on
Centos 5.

Also added Centos 5 system tests using our new Vagrant boxes.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-21 19:17:04 +00:00
Ken Barber
0e6a396a66 Merge branch 'maint/other_minor_fixed_for_210'
* maint/other_minor_fixed_for_210:
  Correct permission requirement for concat
2013-02-20 14:09:23 +00:00
Ken Barber
74bb35716d Correct permission requirement for concat
Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-20 14:09:08 +00:00
Ken Barber
cd0846dfb2 Merge branch 'maint/changes_before_210_release'
* maint/changes_before_210_release:
  Fix module file, remove extra README.md and fix some docs
2013-02-20 13:47:46 +00:00
Ken Barber
39f30eb886 Fix module file, remove extra README.md and fix some docs
The module file had the wrong revision in it for starters. And there was some
missing items from the .gitignore.

The extra README.md in spec/system was getting extracted as the main README
on the forge so I remove it, moving the content that was not duplicated
already into README.md.

I took the opportunity also to finish the documentation in the Reference
section of the README to make sure all classes and defined resources are
documented.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-20 13:47:10 +00:00
Chris Price
e523239a86 Merge pull request #123 from kbarber/ticket/master/release_210
Increment version, cleanup and changelog for release 2.1.0
2013-02-19 10:53:02 -08:00
Ken Barber
07eb908847 Increment version, cleanup and changelog for release 2.1.0
This patch provides new changelog notes for the next release. It also does some
cleanup:

* Move CHANGELOG.md to Changelog so it gets rendered in the forge
* Fix LICENSE so only the necessary boiler plate gets displayed in the Forge

And finally it increments the Modulefile version to 2.1.0.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-17 01:01:17 +00:00
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