From e284e21405e9d50bfe114178a955918eddfbfaee Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Fri, 22 Apr 2016 16:45:56 +0200 Subject: Move databases creation and sync with the role This change moves the database creation and sync with the role profile, so that it's only executed when the role is enabled and by the role itself. It also calls the non-pacemaker profiles out of the 'step' conditional because the non-pacemaker profiles know how to deal with 'step' already. Change-Id: I6c752cb53090e7ef8e0319bade462f2453ed7660 Related-Bug: 1572952 --- manifests/profile/base/keystone.pp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'manifests/profile/base/keystone.pp') diff --git a/manifests/profile/base/keystone.pp b/manifests/profile/base/keystone.pp index f17bf30..f7674df 100644 --- a/manifests/profile/base/keystone.pp +++ b/manifests/profile/base/keystone.pp @@ -20,7 +20,7 @@ # # [*sync_db*] # (Optional) Whether to run db sync -# Defaults to undef +# Defaults to true # # [*manage_service*] # (Optional) Whether to manage the keystone service @@ -52,7 +52,7 @@ # Defaults to hiera('step') # class tripleo::profile::base::keystone ( - $sync_db = undef, + $sync_db = true, $manage_service = undef, $enabled = undef, $bootstrap_master = undef, @@ -62,7 +62,11 @@ class tripleo::profile::base::keystone ( $step = hiera('step'), ) { - if $step >= 4 { + if $step >= 2 and $sync_db { + include ::keystone::db::mysql + } + + if $step >= 4 or ( $step >= 3 and $sync_db ) { class { '::keystone': sync_db => $sync_db, manage_service => $manage_service, -- cgit 1.2.3-korg