This commit provides a working implementation of a ruby
type/provider (`postgresql_psql` for handling the PSQL
commands. This is a little more flexible than doing it
via Exec resources, which is what the `postgresql::psql`
type was doing.
The old type is still present but now includes a
deprecation notification, and all of the other types
that were using the `::psql` type have been ported over
to use the `postgresql_psql` type instead.
Prior to this commit, Inkling Systems was responsible for improving
and maintaining this module. The maintainer has moved on and Inkling
wished for Puppet Labs to continue with this modules maintenance.
This commit adjusts the README and Modulefile for this change in
ownership.
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 :-)