fdf2385f14
This patch is adding a feature for an option to copy different ceph configuration files and corresponding keyrings for cinder, glance, manila, gnocchi and nova services. This is especially useful when the deployment uses availability zones as below example. - Individual compute can read/write to individual ceph cluster in same AZ. - Cinder can write to several ceph clusters in several AZs. - Glance can use multistore and upload images to several ceph clusters in several AZs at once. Change-Id: Ie4d8ab5a3df748137835cae1c943b9180cd10eb1
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
---
|
|
- name: Ensuring glance service ceph config subdir exists
|
|
vars:
|
|
service: "{{ glance_services['glance-api'] }}"
|
|
file:
|
|
path: "{{ node_config_directory }}/glance-api/ceph"
|
|
state: "directory"
|
|
owner: "{{ config_owner_user }}"
|
|
group: "{{ config_owner_group }}"
|
|
mode: "0770"
|
|
become: true
|
|
when:
|
|
- inventory_hostname in groups[service.group]
|
|
- service.enabled | bool
|
|
|
|
- name: Copy over multiple ceph configs for Glance
|
|
merge_configs:
|
|
sources:
|
|
- "{{ node_custom_config }}/glance/{{ item.cluster }}.conf"
|
|
- "{{ node_custom_config }}/glance/glance-api/{{ item.cluster }}.conf"
|
|
dest: "{{ node_config_directory }}/glance-api/ceph/{{ item.cluster }}.conf"
|
|
mode: "0660"
|
|
become: true
|
|
when: inventory_hostname in groups['glance-api']
|
|
with_items: "{{ glance_ceph_backends }}"
|
|
notify:
|
|
- Restart glance-api container
|
|
|
|
- name: Copy over ceph Glance keyrings
|
|
template:
|
|
src: "{{ node_custom_config }}/glance/{{ item.cluster }}.{{ ceph_glance_keyring }}"
|
|
dest: "{{ node_config_directory }}/glance-api/ceph/{{ item.cluster }}.{{ ceph_glance_keyring }}"
|
|
mode: "0660"
|
|
become: true
|
|
with_items: "{{ glance_ceph_backends }}"
|
|
when: inventory_hostname in groups['glance-api']
|
|
notify:
|
|
- Restart glance-api container
|
|
|
|
- name: Ensuring config directory has correct owner and permission
|
|
file:
|
|
path: "{{ node_config_directory }}/glance-api"
|
|
recurse: yes
|
|
owner: "{{ config_owner_user }}"
|
|
group: "{{ config_owner_group }}"
|
|
become: true
|
|
when: inventory_hostname in groups['glance-api']
|