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/glance/registry.pp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'manifests/profile/base/glance') diff --git a/manifests/profile/base/glance/registry.pp b/manifests/profile/base/glance/registry.pp index bed4a5e..c114c53 100644 --- a/manifests/profile/base/glance/registry.pp +++ b/manifests/profile/base/glance/registry.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 glance service @@ -40,14 +40,18 @@ # Defaults to downcase(hiera('glance_backend', 'swift')) # class tripleo::profile::base::glance::registry ( - $sync_db = undef, + $sync_db = true, $manage_service = undef, $enabled = undef, $step = hiera('step'), $glance_backend = downcase(hiera('glance_backend', 'swift')), ) { - if $step >= 4 { + if $step >= 2 and $sync_db { + include ::glance::db::mysql + } + + if $step >= 4 or ( $step >= 3 and $sync_db ) { # TODO: notifications, scrubber, etc. include ::glance include ::glance::config -- cgit 1.2.3-korg