23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'manifests/web/vspheredb/database.pp', line 23
class icinga::web::vspheredb::database (
Enum['mysql'] $db_type,
Array[Stdlib::Host] $web_instances,
Icinga::Secret $db_pass,
String $db_name = 'vspheredb',
String $db_user = 'vspheredb',
Variant[Boolean,
Enum['password','cert']] $tls = false,
) {
if $db_type != 'mysql' {
$_encoding = 'UTF8'
$_collation = undef
} else {
$_encoding = 'utf8mb4'
$_collation = 'utf8mb4_bin'
}
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'],
encoding => $_encoding,
collation => $_collation,
tls => $tls,
}
}
|