Forge Home


PostgreSQL defined resource types


11,912 latest version


Version information

  • 0.3.0 (latest)
  • 0.2.0
  • 0.0.1
released Sep 17th 2012

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'inkling-postgresql', '0.3.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add inkling-postgresql
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install inkling-postgresql --version 0.3.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



inkling/postgresql — version 0.3.0 Sep 17th 2012

Puppet module for PostgreSQL resources

This module provides the following defined resource types for managing postgres:

  • postgresql::initdb
  • postgresql::db
  • postgresql::role
  • postgresql::user (just for clarity; users are roles in postgres)
  • postgresql::grant

And the fallback, analogous to exec resources, only for SQL statements:

  • postgresql::psql

Basic usage

    password => 'foo',

postgresql::grant{'grant select to marmot':
   grantee   => 'marmot',
   on_object => 'my_table',
   perm      => 'select',
   require   => Postgresql::User['marmot'],

etc, etc.

Automated testing

Install and setup an RVM with vagrant, sahara, and rspec

$ curl -L | bash -s stable
$ rvm install 1.9.3
$ rvm use --create 1.9.3@puppet-postgresql
$ gem install vagrant sahara rspec

Run the tests like so:

$ (cd spec; vagrant up)
$ rspec -f -d -c

The test suite will snapshot the VM and rollback between each test.

Next, take a look at the manifests used for the automated tests.



Copyright and License

Copyright 2012 Inkling Systems, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.