aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/manila/api.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base/manila/api.pp')
-rw-r--r--manifests/profile/base/manila/api.pp30
1 files changed, 19 insertions, 11 deletions
diff --git a/manifests/profile/base/manila/api.pp b/manifests/profile/base/manila/api.pp
index 89ff810..ca5455f 100644
--- a/manifests/profile/base/manila/api.pp
+++ b/manifests/profile/base/manila/api.pp
@@ -18,24 +18,32 @@
#
# === Parameters
#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
-#
-# [*rabbit_hosts*]
-# list of the rabbbit host IPs
-# Defaults to hiera('rabbitmq_node_ips')
class tripleo::profile::base::manila::api (
- $step = hiera('step'),
- $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $step = hiera('step'),
) {
- if $step >= 4 {
- class { '::manila' :
- rabbit_hosts => $rabbit_hosts,
- }
+ if $::hostname == downcase($bootstrap_node) {
+ $sync_db = true
+ } else {
+ $sync_db = false
+ }
+
+ include ::tripleo::profile::base::manila
+
+ if $step >= 3 and $sync_db {
+ include ::manila::db::mysql
+ }
+
+ if $step >= 4 or ($step >= 3 and $sync_db) {
include ::manila::api
}
}
-