aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/glance/api.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base/glance/api.pp')
-rw-r--r--manifests/profile/base/glance/api.pp21
1 files changed, 15 insertions, 6 deletions
diff --git a/manifests/profile/base/glance/api.pp b/manifests/profile/base/glance/api.pp
index f3db396..af3b0ac 100644
--- a/manifests/profile/base/glance/api.pp
+++ b/manifests/profile/base/glance/api.pp
@@ -22,6 +22,10 @@
# (Optional) Glance backend(s) to use.
# Defaults to downcase(hiera('glance_backend', 'swift'))
#
+# [*glance_nfs_enabled*]
+# (Optional) Whether to use NFS mount as 'file' backend storage location.
+# Defaults to false
+#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
@@ -36,12 +40,17 @@
# Defaults to hiera('glance::notify::rabbitmq::rabbit_port', 5672)
class tripleo::profile::base::glance::api (
- $glance_backend = downcase(hiera('glance_backend', 'swift')),
- $step = hiera('step'),
- $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
- $rabbit_port = hiera('glance::notify::rabbitmq::rabbit_port', 5672),
+ $glance_backend = downcase(hiera('glance_backend', 'swift')),
+ $glance_nfs_enabled = false,
+ $step = hiera('step'),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $rabbit_port = hiera('glance::notify::rabbitmq::rabbit_port', 5672),
) {
+ if $step >= 1 and $glance_nfs_enabled {
+ include ::tripleo::glance::nfs_mount
+ }
+
if $step >= 4 {
case $glance_backend {
'swift': { $backend_store = 'glance.store.swift.Store' }
@@ -58,9 +67,9 @@ class tripleo::profile::base::glance::api (
class { '::glance::api':
stores => $glance_store,
}
-
+ $rabbit_endpoints = suffix(any2array(normalize_ip_for_uri($rabbit_hosts)), ":${rabbit_port}")
class { '::glance::notify::rabbitmq' :
- rabbit_hosts => suffix($rabbit_hosts, ":${rabbit_port}")
+ rabbit_hosts => $rabbit_endpoints,
}
include join(['::glance::backend::', $glance_backend])
}