Dan Prince 1598196ae7 Add glance::db::postgresql class.
This allows Glance to be used with PostgreSQL.

Requires the puppetlabs/postgresql module. NOTE: I did add this
dependency to fixtures but did not add it to the Modulefile due
to the fact that the postgresql::python module hasn't been
released to puppetforge yet (although it is committed and tests
pass).

Change-Id: I3522d50935c81c8859c9f597df64aa0af6ca4e71
2013-04-23 12:58:39 -04:00

22 lines
467 B
Puppet

#
# Class that configures postgresql for glance
#
# Requires the Puppetlabs postgresql module.
class glance::db::postgresql(
$password,
$dbname = 'glance',
$user = 'glance'
) {
require 'postgresql::python'
Postgresql::Db[$dbname] ~> Exec<| title == 'glance-manage db_sync' |>
Package['python-psycopg2'] -> Exec<| title == 'glance-manage db_sync' |>
postgresql::db { "${dbname}":
user => "${user}",
password => "${password}",
}
}