kolla-ansible/ansible/roles/glance/tasks/external_ceph.yml
Mark Goddard 602f89baa6 Fix glance with file backend
Since https://review.opendev.org/647699/, we lost the logic to only
deploy glance-api on a single host when using the file backend.

This code was always a bit custom, and would be better supported by
using the 'host_in_groups' pattern we have in a few other places where a
single group name does not describe the placement of containers for a
service.

Change-Id: I21ce4a3b0beee0009ac69fecd0ce24efebaf158d
Closes-Bug: #1836151
2019-07-11 09:25:46 +01:00

28 lines
740 B
YAML

---
- name: Copy over ceph files
copy:
src: "{{ item }}"
dest: "{{ node_config_directory }}/glance-api/"
mode: "0660"
become: true
when:
- glance_services['glance-api'].host_in_groups | bool
- glance_services['glance-api'].enabled | bool
with_fileglob:
- "{{ node_custom_config }}/glance/ceph*"
notify:
- Restart glance-api container
- name: Ensuring config directory has correct owner and permission
file:
path: "{{ node_config_directory }}/{{ item }}"
recurse: yes
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
become: true
when:
- glance_services[item].host_in_groups | bool
- glance_services[item].enabled | bool
with_items:
- "glance-api"