7224590e4c
... 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: I14c7305e36a0d72215da987a7cd0d0207be6d1d0
50 lines
1.0 KiB
Puppet
50 lines
1.0 KiB
Puppet
# == Class: zaqar::db::postgresql
|
|
#
|
|
# Class that configures postgresql for zaqar
|
|
# Requires the Puppetlabs postgresql module.
|
|
#
|
|
# === Parameters
|
|
#
|
|
# [*password*]
|
|
# (Required) Password to connect to the database.
|
|
#
|
|
# [*dbname*]
|
|
# (Optional) Name of the database.
|
|
# Defaults to 'zaqar'.
|
|
#
|
|
# [*user*]
|
|
# (Optional) User to connect to the database.
|
|
# Defaults to 'zaqar'.
|
|
#
|
|
# [*encoding*]
|
|
# (Optional) The charset to use for the database.
|
|
# Default to undef.
|
|
#
|
|
# [*privileges*]
|
|
# (Optional) Privileges given to the database user.
|
|
# Default to 'ALL'
|
|
#
|
|
class zaqar::db::postgresql(
|
|
$password,
|
|
$dbname = 'zaqar',
|
|
$user = 'zaqar',
|
|
$encoding = undef,
|
|
$privileges = 'ALL',
|
|
) {
|
|
|
|
include zaqar::deps
|
|
|
|
::openstacklib::db::postgresql { 'zaqar':
|
|
password => $password,
|
|
dbname => $dbname,
|
|
user => $user,
|
|
encoding => $encoding,
|
|
privileges => $privileges,
|
|
}
|
|
|
|
Anchor['zaqar::db::begin']
|
|
~> Class['zaqar::db::postgresql']
|
|
~> Anchor['zaqar::db::end']
|
|
|
|
}
|