RETIRED: A Puppet module for managing postgres. Please see my other module which is far more widely used.
Puppet Augeas Shell Pascal
Pull request Compare This branch is 37 commits ahead, 4 commits behind dcsobral:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
files
manifests
templates
.gitignore
Copyright
README.mkd

README.mkd

postgres puppet module

Manages postgres configuration.

Classes

  • postgres

postgres

Ensures virtual package is installed, and that the service is running and starts at boot.

Will ensure that the database is in UTF-8 and allows you to specify the version of postgres you would like to use.

Also contains a simple backup script too.

Examples

$pgversion = 8.4
include postgres
include postgres::backup

postgres::role { "role":
    ensure => present,
    password => "password",
    require => Service["postgresql"],
}

postgres::database { "database":
    ensure => present,
    owner => "role",
    require => Postres::Role["role"],
}

This will ensure that everything is created in the correct dependancy order.

Or, if you are using Ubuntu 10.04 LTS and would like to use the Postgres 9.0 backport:

apt::source { "pitti-postgresql-lucid":
    location => "http://ppa.launchpad.net/pitti/postgresql/ubuntu",
    release => "lucid",
    include_src => false,
    key => "8683D8A2"
}

$pgversion = "9.0"

And proceed as above.

The apt module being used is http://github.com/akumria/puppet-apt.

Definitions

  • postgres::role
  • postgres::database

postgres::role

postgres::role { "rolename":
    ensure   => present, # or absent
    password => "passtext",
}

postgres::database

postgres::database { "database":
    ensure => present, # or absent
    owner  => "role",
    require => Postgres::Role["role"],
}