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 (Icinga::Secret)

    Password to connect the database.

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

    Name of the database.

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

    Database user name.

  • tls (Variant[Boolean, Enum['password','cert']]) (defaults to: false)

    Access only for TLS encrypted connections. Authentication via ‘password` or `cert`, value `true` means password auth.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'manifests/web/database.pp', line 23

class icinga::web::database (
  Enum['mysql','pgsql']      $db_type,
  Array[Stdlib::Host]        $web_instances,
  Icinga::Secret             $db_pass,
  String                     $db_name = 'icingaweb2',
  String                     $db_user = 'icingaweb2',
  Variant[Boolean,
  Enum['password','cert']]   $tls      = false,
) {
  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'],
    tls              => $tls,
  }
}