MySQL: configure ::zaqar::db::mysql selectively

Adds the ability to create an empty MySQL database for Zaqar
if zaqar is enabled and settings for the mysql backend are
also available in hiera. This should allow Zaqar's database to
get created when needed, but skipped if MongoDB is used
instead (per overcloud defaults).

Change-Id: I3598e39c0a3cdf80b96e728d9aa8a7e6505e0690
This commit is contained in:
Dan Prince 2017-06-26 10:35:25 -04:00
parent 0aad4142be
commit 5097c9d6d1
1 changed files with 4 additions and 0 deletions

View File

@ -217,6 +217,10 @@ class tripleo::profile::base::database::mysql (
if hiera('ec2_api_enabled', false) {
include ::ec2api::db::mysql
}
if hiera('zaqar_enabled', false) and hiera('zaqar::db::mysql::user', '') == 'zaqar' {
# NOTE: by default zaqar uses mongodb
include ::zaqar::db::mysql
}
}
}