33c0956a92
This is the initial commit for puppet-zaqar. It has been automatically generated using cookiecutter[1] and msync[2] [1] https://github.com/openstack/puppet-openstack-cookiecutter [2] https://github.com/openstack/puppet-modulesync-configs Change-Id: Iaca8f89dd22320ec0e08bfb8ec9b5912ad68c9fb Co-Authored-By: yguenane@redhat.com
56 lines
1.1 KiB
Puppet
56 lines
1.1 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'
|
|
#
|
|
# == Dependencies
|
|
#
|
|
# == Examples
|
|
#
|
|
# == Authors
|
|
#
|
|
# == Copyright
|
|
#
|
|
class zaqar::db::postgresql(
|
|
$password,
|
|
$dbname = 'zaqar',
|
|
$user = 'zaqar',
|
|
$encoding = undef,
|
|
$privileges = 'ALL',
|
|
) {
|
|
|
|
Class['zaqar::db::postgresql'] -> Service<| title == 'zaqar' |>
|
|
|
|
::openstacklib::db::postgresql { 'zaqar':
|
|
password_hash => postgresql_password($user, $password),
|
|
dbname => $dbname,
|
|
user => $user,
|
|
encoding => $encoding,
|
|
privileges => $privileges,
|
|
}
|
|
|
|
::Openstacklib::Db::Postgresql['zaqar'] ~> Exec<| title == 'zaqar-manage db_sync' |>
|
|
|
|
}
|