Commit graph

7 commits

Author SHA1 Message Date
Nate Potter
82c6716d48 (MODULES-3247) Enable schema and database ownership change
Currently postgresql::server::schema, postgresql::server::db and
postgresql::server::database allow creating new schemas and
databases if they don't already exist and assigning owners to
them. This patch enables changing the owner of a schema or database
that already exists if the change_ownership variable is set to true.
2016-07-09 15:55:51 -07:00
Tom Hey
6a29636155 (MODULES-661) Remote DB support
Adds connection-settings (for remote DB support) when creating DB resources.

Connection-settings allows a hash of options that can be used
when connecting the a remote DB (such as PGHOST, PGPORT, PGPASSWORD
PGSSLKEY) and a special option DBVERSION indicating the version
of the remote database.

Including
- Puppet updates
- Documentation updates
- RSpec unit test updates
- RSpec acceptance test updates
- Some test coverage for connection-settings
- Working acceptance test...
    Basic vagrant setup:
    * Two boxes, server and client
    * Runs puppet code to on server to setup a postgres server that allows all connections and md5 connections, creates db puppet to look at
    * Runs puppet code on client to make a server that a psql command can be run against puppet db on other server
    * Does some fancy stuff to get the fact of the IP from the first server to connect to
- Backwards compatible, with deprecation warnings around old parameters
2015-08-27 11:03:18 +01:00
dirkweinhardt
d9cc161595 Made title of psql resource for schema creation unique. 2015-05-19 10:12:28 +02:00
Benoît Marcelin
d655024066 Add schema creator 2014-12-02 20:54:22 +00:00
Ashley Penney
bf10898759 Unfortunately this didn't work on > 9.3 in practice. 2014-08-29 16:39:34 -04:00
Oliver Bertuch
91fec92488 Fixed deprecation warning for class param in server.pp. Changed subclasses of server to use ::_version, which will be assigned the value from globals or (deprecated) class param. 2014-08-18 11:26:06 +02:00
Igor Galić
324c291b3f defined type for creating database schemas
This defined type helps create database schemas, and assign them to an
`owner`. It is closely modeled after Postgresql::Server::Tablespace.
It uses PostgreSQL's builtin IF NOT EXISTS to guarantee idempotency.
(>= 9.3, else it checks pg_namespace).

n.b.: This defined type *requires* that a `db` is passed. This is a
concious design decision, since we find it rather useless to create such
schemas in the default `postgres` database, and if *were* useful, one
can always "over-specify".

This addresses MODULES-1098.
2014-07-25 17:10:40 +02:00