de085305c4
This replaces the existing logic in the gnocchi::db class by the common logic in oslo::db, to use the single logic to manage backend packages. Depends-on: https://review.opendev.org/889374 Change-Id: Icd916df0b3463128df5b2ed3b49c2cdbee871504
32 lines
782 B
Puppet
32 lines
782 B
Puppet
# == Class: gnocchi::db
|
|
#
|
|
# Configure the Gnocchi database
|
|
#
|
|
# === Parameters
|
|
#
|
|
# [*database_connection*]
|
|
# Url used to connect to database.
|
|
# (Optional) Defaults to 'sqlite:////var/lib/gnocchi/gnocchi.sqlite'.
|
|
#
|
|
# [*package_ensure*]
|
|
# (optional) The state of gnocchi packages
|
|
# Defaults to 'present'
|
|
#
|
|
class gnocchi::db (
|
|
Oslo::DBconn $database_connection = 'sqlite:////var/lib/gnocchi/gnocchi.sqlite',
|
|
$package_ensure = 'present',
|
|
) inherits gnocchi::params {
|
|
|
|
include gnocchi::deps
|
|
|
|
oslo::db { 'gnocchi_config':
|
|
connection => $database_connection,
|
|
backend_package_ensure => $package_ensure,
|
|
manage_config => false,
|
|
}
|
|
|
|
gnocchi_config {
|
|
'indexer/url': value => $database_connection, secret => true;
|
|
}
|
|
}
|