kolla-ansible/ansible/roles/glance/tasks/external_ceph.yml
Mark Goddard 2dbfe74fe4 Configure glance ceph during upgrade and genconfig
Previously the glance ceph backend was only being configured during
the deploy and reconfigure commands. This change ensures that it is
configured during the upgrade and genconfig commands as well.

Some of the related host/group selection logic has been cleaned up,
as it was a little tautolgous.

Change-Id: Ibfc2bfaaf2e24fb3a0697925e7723794046787fa
Closes-Bug: #1728060
2017-11-21 11:49:47 +00:00

28 lines
756 B
YAML

---
- name: Ensuring config directory exists
file:
path: "{{ node_config_directory }}/glance-api"
state: "directory"
mode: "0770"
when: inventory_hostname in groups['glance-api']
- name: Copy over ceph files
copy:
src: "{{ item }}"
dest: "{{ node_config_directory }}/glance-api/"
mode: "0660"
when: inventory_hostname in groups['glance-api']
with_fileglob:
- "{{ node_custom_config }}/glance/ceph*"
- name: Ensuring config directory has correct owner and permission
become: true
file:
path: "{{ node_config_directory }}/{{ item }}"
recurse: yes
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
when: inventory_hostname in groups['glance-api']
with_items:
- "glance-api"