f562e27069
... and migrate it to openstacklib so that all logics about database configuration are implemented in one common place. Depends-on: https://review.opendev.org/#/c/728595/ Change-Id: I6a46e45b8af4c8c1cdf7913bc625b57e49a79687
49 lines
1.1 KiB
Puppet
49 lines
1.1 KiB
Puppet
# == Class: ceilometer::db::postgresql
|
|
#
|
|
# Class that configures postgresql for ceilometer
|
|
# Requires the Puppetlabs postgresql module.
|
|
#
|
|
# === Parameters:
|
|
#
|
|
# [*password*]
|
|
# (Required) Password to connect to the database.
|
|
#
|
|
# [*dbname*]
|
|
# (Optional) Name of the database.
|
|
# Defaults to 'ceilometer'.
|
|
#
|
|
# [*user*]
|
|
# (Optional) User to connect to the database.
|
|
# Defaults to 'ceilometer'.
|
|
#
|
|
# [*encoding*]
|
|
# (Optional) The charset to use for the database.
|
|
# Default to undef.
|
|
#
|
|
# [*privileges*]
|
|
# (Optional) Privileges given to the database user.
|
|
# Default to 'ALL'.
|
|
#
|
|
class ceilometer::db::postgresql(
|
|
$password,
|
|
$dbname = 'ceilometer',
|
|
$user = 'ceilometer',
|
|
$encoding = undef,
|
|
$privileges = 'ALL',
|
|
) {
|
|
|
|
include ceilometer::deps
|
|
|
|
openstacklib::db::postgresql { 'ceilometer':
|
|
password => $password,
|
|
dbname => $dbname,
|
|
user => $user,
|
|
encoding => $encoding,
|
|
privileges => $privileges,
|
|
}
|
|
|
|
Anchor['ceilometer::db::begin']
|
|
~> Class['ceilometer::db::postgresql']
|
|
~> Anchor['ceilometer::db::end']
|
|
}
|