MySQL: configure ::zaqar::db::mysql selectively
authorDan Prince <dprince@redhat.com>
Mon, 26 Jun 2017 14:35:25 +0000 (10:35 -0400)
committerDan Prince <dprince@redhat.com>
Mon, 26 Jun 2017 14:35:25 +0000 (10:35 -0400)
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

manifests/profile/base/database/mysql.pp

index 8eb6079..b71b476 100644 (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
+    }
   }
 
 }