puppetlabs/puppetlabs-postgresql — pull request #391 by geoffgarside (2014-03-10 09:35:08+00:00)
Title: Fix FreeBSD support

In trying to use this module to install PostgreSQL for PuppetDB under FreeBSD I came across a couple of issues which I've resolved in the attached commits

1. FreeBSD postgresql user is 'pgsql' rather than 'postgres'
2. Configuration files are under the $datadir rather than '/usr/local/share/postgresql'
3. The "validate_postgresql_connection.sh" which uses "/usr/bin/env bash" couldn't find bash with an environment PATH of "/bin" as it lives under "/usr/local/bin".
4. server::database, server::role and server::grant assume the 'postgres' database name matches the $user which as of point 1 is not true under FreeBSD. The default_database parameter already exists with the 'postgres' value and seemed to match the requirements where $user was being used.

Aside from these changes successfully installing and configuring PostgreSQL on a FreeBSD VM I've done no further testing of this module.