puppet-cloudkitty/manifests/db/postgresql.pp
Takashi Kajinami fe9792826c 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: I1457fdeba6cdbba29c4104b638c1ebf125556a2f
2020-05-19 23:23:16 +09:00

50 lines
1.1 KiB
Puppet

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