-
Notifications
You must be signed in to change notification settings - Fork 21
/
database.pp
32 lines (32 loc) · 1.32 KB
/
database.pp
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
# == Class: contrail::profile::database
# The puppet module to set up a Contrail database server
#
# === Parameters:
#
# [*enable_module*]
# Flag to indicate if profile is enabled. If true, the module is invoked.
# (optional) - Defaults to true.
#
# [*enable_ceilometer*]
# Flag to include or exclude ceilometer service as part of openstack module dynamically.
# (optional) - Defaults to false.
#
class contrail::profile::database (
$enable_module = $::contrail::params::enable_database,
$host_roles = $::contrail::params::host_roles,
$is_there_roles_to_delete = $::contrail::params::is_there_roles_to_delete,
$ansible_provision = $::contrail::params::ansible_provision,
$enable_ceilometer = $::contrail::params::enable_ceilometer
) {
if ($enable_module and "database" in $host_roles and $is_there_roles_to_delete == false) {
contain ::contrail::database
if ($enable_ceilometer) {
contain ::contrail::profile::mongodb
Class['::contrail::database']->Class['::contrail::profile::mongodb']
}
} elsif ((!("database" in $host_roles)) and ($contrail_roles["database"] == true) and ($ansible_provision == false)) {
contain ::contrail::uninstall_database
notify { "uninstalling database":; } ->
Class['::contrail::uninstall_database']
}
}