puppet-heat/manifests/db/postgresql.pp
Takashi Kajinami 1de8cdd7a4 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: I1e0061aea6782bd61e745bb39683589794231a5f
2020-05-19 20:00:03 +09:00

49 lines
1011 B
Puppet

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