Puppet Class: icinga::web::database

Defined in:
manifests/web/database.pp

Summary

Setup Icinga Web 2 database for user settings.

Overview

Parameters:

  • db_type (Enum['mysql','pgsql'])

    What kind of database type to use.

  • web_instances (Array[Stdlib::Host])

    List of Hosts to allow write access to the database. Usually an Icinga Web 2 instance.

  • db_pass (String)

    Password to connect the database.

  • db_name (String) (defaults to: 'icingaweb2')

    Name of the database.

  • db_user (String) (defaults to: 'icingaweb2')

    Database user name.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'manifests/web/database.pp', line 19

class icinga::web::database(
  Enum['mysql','pgsql']  $db_type,
  Array[Stdlib::Host]    $web_instances,
  String                 $db_pass,
  String                 $db_name = 'icingaweb2',
  String                 $db_user = 'icingaweb2',
) {

  ::icinga::database { "${db_type}-${db_name}":
    db_type          => $db_type,
    db_name          => $db_name,
    db_user          => $db_user,
    db_pass          => $db_pass,
    access_instances => $web_instances,
    mysql_privileges => ['ALL'],
  }
}