File: db.pp

package info (click to toggle)
puppet-module-gnocchi 25.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,096 kB
  • sloc: ruby: 2,339; python: 38; makefile: 10; sh: 10
file content (35 lines) | stat: -rw-r--r-- 948 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# == 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;
  }

  # all db settings should be applied and all packages should be installed
  # before dbsync starts
  Oslo::Db['gnocchi_config'] -> Anchor['gnocchi::dbsync::begin']
}