kolla-ansible/ansible/roles/gnocchi/tasks/external_ceph.yml
Jeffrey Zhang dfb5ddaad6 Fix copy external ceph files from custome/gnocchi in gnocchi
There is no need to load custom ceph.conf and keyring from different
folder for gnocchi components. Just load the files from
node_custom_config/gnocchi folder.

Depends-On: I379ff17856509c9321b86c13a72eacc18f5c1202
Change-Id: Id553dff274a29d82fb1b743437e3656d6f817e52
2018-06-12 11:02:44 +08:00

52 lines
1.4 KiB
YAML

---
- name: Ensuring config directory exists
file:
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
when: inventory_hostname in groups[item]
with_items:
- "gnocchi-api"
- "gnocchi-metricd"
- "gnocchi-statsd"
- name: Copy over ceph.conf file
template:
src: "{{ node_custom_config }}/gnocchi/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
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"
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"