From bb74804590d6bfed76ed63d9dae8c7c86966bae1 Mon Sep 17 00:00:00 2001
From: goldyfruit <gaetan.trellu@incloudus.com>
Date: Wed, 11 Oct 2017 17:02:38 -0400
Subject: [PATCH] Disable glance file backend with external Ceph

When using external Ceph cluster, glance_api container is only running
on one controller instead of running on all of them.

But when an external Ceph cluster is used, enable_ceph is false so
glance_backend_file is true

Using "not glance_backend_ceph | bool" instead of "not enable_ceph |
bool" should be enough.

Change-Id: I191e5ea7a0d51b0e19ed58a819c3ade5070f623d
Closes-Bug: #1722905
---
 ansible/group_vars/all.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml
index 438e68d949..c7f63300d8 100644
--- a/ansible/group_vars/all.yml
+++ b/ansible/group_vars/all.yml
@@ -510,7 +510,10 @@ keystone_default_user_role: "_member_"
 #######################
 # Glance options
 #######################
-glance_backend_file: "{{ not enable_ceph | bool }}"
+# Using glance_backend_ceph rather than enable_ceph to determine whether to
+# use the file backend, as this allows for the external ceph case, where
+# enable_ceph is False.
+glance_backend_file: "{{ not glance_backend_ceph | bool }}"
 glance_backend_ceph: "{{ enable_ceph }}"
 glance_backend_vmware: "no"
 glance_backend_swift: "no"