summaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/glance
diff options
context:
space:
mode:
authorGiulio Fidente <gfidente@redhat.com>2016-04-22 16:45:56 +0200
committerGiulio Fidente <gfidente@redhat.com>2016-05-03 22:44:16 +0200
commite284e21405e9d50bfe114178a955918eddfbfaee (patch)
tree4448b29d791b67df2f06e002465118732a05d6d2 /manifests/profile/base/glance
parent1b13c573641fd5ab2355faa3ecb89ad7ce1a76d3 (diff)
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
Diffstat (limited to 'manifests/profile/base/glance')
-rw-r--r--manifests/profile/base/glance/registry.pp10
1 files changed, 7 insertions, 3 deletions
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