kolla-ansible/ansible/roles/gnocchi/tasks/external_ceph.yml
Mark Goddard a4bb8567da Fix up config file permissions on the host
Several config file permissions are incorrect on the host. In general,
files should be 0660, and directories and executables 0770.

Change-Id: Id276ac1864f280554e98b937f2845bb424d521de
Closes-Bug: #1821579
2019-04-02 17:23:31 +01:00

46 lines
1.3 KiB
YAML

---
- name: Copy over ceph.conf file
template:
src: "{{ node_custom_config }}/gnocchi/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
mode: "0660"
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"
mode: "0660"
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"