puppet-barbican/manifests/db/postgresql.pp
Takashi Kajinami 5e5ced641f Remove password hash generation in each puppet modules
... 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: Ia676438c5c91da73a9fe196baaff9170991c487a
2020-05-20 09:13:05 +09:00

50 lines
1.0 KiB
Puppet

# == Class: barbican::db::postgresql
#
# Class that configures postgresql for barbican
# Requires the Puppetlabs postgresql module.
#
# === Parameters
#
# [*password*]
# (Required) Password to connect to the database.
#
# [*dbname*]
# (Optional) Name of the database.
# Defaults to 'barbican'.
#
# [*user*]
# (Optional) User to connect to the database.
# Defaults to 'barbican'.
#
# [*encoding*]
# (Optional) The charset to use for the database.
# Default to undef.
#
# [*privileges*]
# (Optional) Privileges given to the database user.
# Default to 'ALL'
#
class barbican::db::postgresql(
$password,
$dbname = 'barbican',
$user = 'barbican',
$encoding = undef,
$privileges = 'ALL',
) {
include barbican::deps
openstacklib::db::postgresql { 'barbican':
password => $password,
dbname => $dbname,
user => $user,
encoding => $encoding,
privileges => $privileges,
}
Anchor['barbican::db::begin']
~> Class['barbican::db::postgresql']
~> Anchor['barbican::db::end']
}