Remove trailing commas.

This makes the module work on Puppet 2.7.1 (from Ubuntu 11.10).
Merge pull request #3 from jarib/fix-trailing-commas

Remove trailing commas for Puppet 2.7.1 compatibility
Remove $service_provider setting for ubuntu

Ubuntu's precise ships with init scripts, not with upstart service definitions. Declaring the provider to be upstart will cause service management on postgres to fail. Leaving it undefined will allow puppet to select the correct (init) provider.
Add a type for validating a postgres connection

This commit adds a new resource type that can be used to validate
that a successful postgres connection can be established from a
puppet node to a (potentially remote) postgres database instance.
Add changelog
Merge pull request #8 from haus/patch-1

Remove $service_provider setting for ubuntu
Merge pull request #9 from cprice-puppet/feature/master/connection-validator

Feature/master/connection validator
Advance version to 0.3.0
Give the persist-firewall Exec a more explicit name

The title I'd used for the persist-firewall resource
was too generic, and fairly likely to collide with
resources in other modules.  This commit simply
renames it to be a bit more explicit about belonging
to this module, to reduce the likelihood of a title
collision.
Update status for postgres service on Debian

The postgresql init script on debian/ubuntu returns 0 no matter whether postgresql is started or stopped, so puppet has no way of knowing whether to start postgresql when the service is set to 'ensure => running'. This commit adds a param to the params class called $service_status which is set to the status piped to an egrep on debian/ubuntu, which reliably returns 0 if there are clusters running and 1 if there are none. The output before and after this patch can be seen below. If the init script is fixed at some point, the logic would need to be revisited.

Before patch postgresql remains stopped after puppet run.

$ # service postgresql stop
$ #   * Stopping PostgreSQL 9.1 database server
$ # puppet apply -e "class {'postgresql::server':}"
$ #   notice: Finished catalog run in 0.15 seconds
$ # service postgresql status
$ #   Running clusters:

After patch postgresql is started after puppet run.

$ # service postgresql stop
$ #   * Stopping PostgreSQL 9.1 database server
$ # puppet apply -e "class {'postgresql::server':}"
$ #   notice: /Stage[main]/Postgresql::Server/Service[postgresqld]/ensure: ensure changed 'stopped' to 'running'
$ #   notice: Finished catalog run in 2.26 seconds
$ # service postgresql status
$ #   Running clusters: 9.1/main
Merge pull request #12 from haus/update_status_param_for_deb_ubuntu

Update status for postgres service on Debian
end of line comma not valid in versions < 2.8.7
missing 'default' selector case
$quoted_unless had extra $
mis-spelt param names
Add sample usage for postgresql::server class.

I had some issues trying to connect to the server, managed with
defaults:

  vagrant@precise32:~$ psql
  psql: FATAL:  role "vagrant" does not exist
  vagrant@precise32:~$ psql -U postgres
  psql: FATAL:  Peer authentication failed for user "postgres"
  vagrant@precise32:~$ psql -U postgres -h 127.0.0.1
  psql: FATAL:  pg_hba.conf rejects connection for host "127.0.0.1", user
  "postgres", database "postgres", SSL on
  FATAL:  pg_hba.conf rejects connection for host "127.0.0.1", user
  "postgres", database "postgres", SSL off
  vagrant@precise32:~$ psql -U postgres -h /var/run/postgresql
  psql: FATAL:  Peer authentication failed for user "postgres"

After some trial and error I found out that the reasons for this was
restrictive permissions on the unix socket (which isn't bad at all):

  vagrant@precise32:~$ ls -l /var/run/postgresql/
  total 4
  -rw------- 1 postgres postgres 5 Oct 16 20:16 9.1-main.pid

So I though I send some usage examples to help noops like myself to a
quicker start with your module :-)
Merge pull request #13 from haf/warnings-etc

Warnings etc
Add postgresql::devel for development dependencies
Merge pull request #11 from cprice-puppet/bug/master/better-title-for-persist-firewall-resource

Give the persist-firewall Exec a more explicit name
Merge pull request #17 from puppetlabs-operations/master

Add postgresql::devel for development dependencies