kolla-ansible/ansible/roles/gnocchi/tasks/external_ceph.yml
Mark Goddard 242625dff4 Generate Ceph configuration during upgrade
If upgrading the nova, cinder or manila services via 'kolla-ansible
upgrade', the Ceph config files are not generated. Users will expect
that these files are generated, to pull in any changes from their
configuration or the base kolla configuration.

This change moves Ceph tasks inside config.yml to ensure that they are
performed during deploy, reconfigure and upgrade. This has been done for
nova, cinder, gnocchi and manila - glance already does this.

Change-Id: Ic75692c2bcba9b81dee922ff6fbbccd160e7fa19
Closes-Bug: #1794275
2018-10-10 10:48:55 +01:00

44 lines
1.2 KiB
YAML

---
- name: Copy over ceph.conf file
template:
src: "{{ node_custom_config }}/gnocchi/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
become: true
when: inventory_hostname in groups[item]
with_items:
- "gnocchi-api"
- "gnocchi-metricd"
- "gnocchi-statsd"
notify:
- Restart gnocchi-api container
- Restart gnocchi-metricd container
- Restart gnocchi-statsd container
- name: Copy over ceph gnocchi keyring
copy:
src: "{{ node_custom_config }}/gnocchi/ceph.client.gnocchi.keyring"
dest: "{{ node_config_directory }}/{{ item }}/ceph.client.gnocchi.keyring"
become: true
when: inventory_hostname in groups[item]
with_items:
- "gnocchi-api"
- "gnocchi-metricd"
- "gnocchi-statsd"
notify:
- Restart gnocchi-api container
- Restart gnocchi-metricd container
- Restart gnocchi-statsd container
- 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[item]
with_items:
- "gnocchi-api"
- "gnocchi-metricd"
- "gnocchi-statsd"