
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
22 lines
467 B
Puppet
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}",
|
|
}
|
|
|
|
}
|