Commit graph

20 commits

Author SHA1 Message Date
Kamil Szymanski
7a8f7ace59 fix pg_hba_rule for postgres local access 2013-02-27 12:14:13 +01:00
Karel Brezina
5ef164b1a6 Generalization to provide more flexibility in postgresql configuration 2013-02-25 17:50:34 +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
Erik Dalén
23368ffb03 fix lots of style issues 2013-02-15 17:22:52 +01: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
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
fhrbek
10cb81468e Coding style fixes 2013-02-06 18:51:58 +01:00
Chris Price
a4ec366811 WIP - adding support for an 'included' config file 2013-01-31 15:56:48 +01:00
Etienne Pelletier
d1025e90ef Removed references to postgresql::paths in class params. 2012-12-02 20:56:36 -08:00
Etienne Pelletier
1fe9559bbe Refactored multi-version support. 2012-12-02 20:54:33 -08:00
Andreas Ntaflos
19a512b06d Add new exec 'reload_postgresql' and have the pg_hba.conf file resource
notify that exec after changes to pg_hba.conf. This avoids restarting
the whole postgresql cluster for configuration changes in pg_hba.conf
which only need a reload.
2012-11-09 23:46:16 +01:00
William Van Hevelingen
bdf6c0b84c Puppet lint fixes
- left longer than 80 char warnings
 - left inherits params class warnings
2012-11-03 02:37:20 +00:00
Chris Price
c3c4d32267 Merge pull request #19 from jarib/fix-path-for-cat
Fix path for `/bin/cat`
2012-10-29 10:47:03 -07:00
dharwood
b8389d19ad ACLs functioning, added examples in README and test, comments in config manifests 2012-10-22 12:34:24 -07:00
stormcrow
399709a483 first commit of acls 2012-10-21 23:46:54 -07:00
Jari Bakken
1fe7a87923 Fix path for /bin/cat 2012-10-21 18:52:02 +02:00
Chris Price
f221c8a6a4 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.
2012-09-21 09:02:59 -07:00
Jari Bakken
f9dbf4a9c9 Remove trailing commas.
This makes the module work on Puppet 2.7.1 (from Ubuntu 11.10).
2012-08-25 03:20:27 +02:00
Chris Price
1175ea20d6 Add postgresql::db convenience type, improve security
This commit adds a postgresql::db type for convenience;
it mirrors the 'db' type from the mysql module, which
allows you to create a database instance and user plus
grant privileges to that user all in one succint
resource.

This commit also improves security in the following ways:

* Revoke "CONNECT" privilege from the 'public' role for
  newly created databases; without this, any database
  created via this module will allow connections from
  any database user, and will allow them to do things
  like create tables.

* Change to a 'reject'-based policy for dealing with
  remote connections by the postgres user in pg_hba.conf.
  Prior to this commit, if you tried to restrict access
  to the postgres user by IP, the rule would simply not
  match for disallowed IPs; then it would fall through
  to the rule for "all" users, which could still match
  and thus allow the postgres user to connect remotely.
2012-06-09 09:23:11 -07:00
Chris Price
ba802475ff Improve configuration for initial postgres install
This commit adds some configuration management for
postgres, to allow users to get a more complete
setup from their initial install.  Prior to this
commit, we were basically only ensuring that the
package was installed and the service was running.

Now, we support limited configuration for the
pg_hba.conf file to enable md5 authentication for
remote hosts, and for the postgresql.conf file
to specify the listener addresses where TCP
connections should be accepted.  Without these
two changes the initial postgres configuration
doesn't allow *any* connections from outside of the
local host.

This commit also adds an option for opening up the
postgres port in the firewall on redhat-based systems,
and an option to allow setting the password for the
'postgres' database user.

As of this commit, this module now has dependencies
on puppetlabs-stdlib (version > 2.3.4, which includes
the new 'match' parameter for the 'file_line' resource
type), and on puppetlabs-firewall.
2012-06-08 14:00:24 -07:00