puppet-zaqar/manifests/db/postgresql.pp
ZhongShengping dc4aae5fc6 Cleanup documentation
Make sure documentation is the same and follow
the standard which we are trying to enforce on
all modules.

Change-Id: I04fb9ead983cc8f7df40093b6404cac15cc9ac07
2018-12-13 17:10:59 +08:00

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_hash => postgresql_password($user, $password),
dbname => $dbname,
user => $user,
encoding => $encoding,
privileges => $privileges,
}
Anchor['zaqar::db::begin']
~> Class['zaqar::db::postgresql']
~> Anchor['zaqar::db::end']
}