From 3d0419969263c3ed18bf9cbc4f2e32451c80fcbe Mon Sep 17 00:00:00 2001 From: likui <likui@yovole.com> Date: Wed, 22 Jul 2020 19:08:24 +0800 Subject: [PATCH] Update glance configuration file for backend global file glance_backend_file parameters not take effect Closes-Bug: #1888501 Change-Id: I3afd117633a84d342effb6baadf16fa42c16776c --- ansible/roles/glance/defaults/main.yml | 2 +- ansible/roles/glance/templates/glance-api.conf.j2 | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/roles/glance/defaults/main.yml b/ansible/roles/glance/defaults/main.yml index 145fd5368..c6d401acb 100644 --- a/ansible/roles/glance/defaults/main.yml +++ b/ansible/roles/glance/defaults/main.yml @@ -156,7 +156,7 @@ glance_tls_proxy_extra_volumes: "{{ glance_extra_volumes }}" glance_backends: - name: file type: file - enabled: true + enabled: "{{ glance_backend_file | bool }}" - name: http type: http enabled: true diff --git a/ansible/roles/glance/templates/glance-api.conf.j2 b/ansible/roles/glance/templates/glance-api.conf.j2 index 50a47bf28..25ccaa72d 100644 --- a/ansible/roles/glance/templates/glance-api.conf.j2 +++ b/ansible/roles/glance/templates/glance-api.conf.j2 @@ -63,8 +63,10 @@ default_backend = swift default_backend = file {% endif %} +{% if glance_backend_file | bool %} [file] filesystem_store_datadir = /var/lib/glance/images/ +{% endif %} {% if glance_backend_ceph | bool %} [rbd] -- GitLab