Files
puppet-nova/manifests/db/postgresql.pp
Takashi Kajinami 6699289978 Stop using absolute names for defined resource types
Since Puppet 4, names are always absolute. We already replaced usage of
absolute names for class inclusion, so can do the same for defined
resource types.

Change-Id: I6efcaa1a07781fb2ce7c08f6710be05b52edfc46
2025-02-18 02:07:13 +09:00

66 lines
1.5 KiB
Puppet

# == Class: nova::db::postgresql
#
# Class that configures postgresql for nova
# Requires the Puppetlabs postgresql module.
#
# === Parameters
#
# [*password*]
# (Required) Password to connect to the database.
#
# [*dbname*]
# (Optional) Name of the database.
# Defaults to 'nova'.
#
# [*user*]
# (Optional) User to connect to the database.
# Defaults to 'nova'.
#
# [*encoding*]
# (Optional) The charset to use for the database.
# Default to undef.
#
# [*privileges*]
# (Optional) Privileges given to the database user.
# Default to 'ALL'
#
# [*setup_cell0*]
# (Optional) Setup a cell0 for the cell_v2 functionality. This option will
# be set to true by default in Ocata when the cell v2 setup is mandatory.
# Defaults to true
#
class nova::db::postgresql(
String[1] $password,
$dbname = 'nova',
$user = 'nova',
$encoding = undef,
$privileges = 'ALL',
Boolean $setup_cell0 = true,
) {
include nova::deps
openstacklib::db::postgresql { 'nova':
password => $password,
dbname => $dbname,
user => $user,
encoding => $encoding,
privileges => $privileges,
}
if $setup_cell0 {
# need for cell_v2
openstacklib::db::postgresql { 'nova_cell0':
password => $password,
dbname => "${dbname}_cell0",
user => $user,
encoding => $encoding,
privileges => $privileges,
}
}
Anchor['nova::db::begin']
~> Class['nova::db::postgresql']
~> Anchor['nova::db::end']
}