kolla-ansible/ansible/roles/ceph/tasks/config.yml
wu.chunyang d35f9a4b70 repair ceph_nfs container start failed
when enable ceph_nfs,it deploy failed, because no ganesha config
file, and the 'ganesha.nfs' command need root privilege to run.
i will modify ceph_nfs dockerfile,please review. thanks

https://review.openstack.org/#/c/630510/

Change-Id: I347107bc33733061ad043bffe38ecc1d16770afc
Closes-Bug: #1811581
2019-01-17 23:43:03 +08:00

71 lines
1.7 KiB
YAML

---
- name: Ensuring config directories exist
file:
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
mode: "0770"
become: true
with_items:
- "ceph-mon"
- "ceph-osd"
- "ceph-rgw"
- "ceph-mgr"
- "ceph-mds"
- "ceph-nfs"
- name: Copying over config.json files for services
template:
src: "{{ item.name }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.name }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.group]
with_items:
- name: "ceph-mon"
group: ceph-mon
- name: "ceph-osd"
group: ceph-osd
- name: "ceph-rgw"
group: ceph-rgw
- name: "ceph-mgr"
group: ceph-mgr
- name: "ceph-mds"
group: ceph-mds
- name: "ceph-nfs"
group: ceph-nfs
- name: Copying over ceph.conf
vars:
service_name: "{{ item }}"
merge_configs:
sources:
- "{{ role_path }}/templates/ceph.conf.j2"
- "{{ node_custom_config }}/ceph.conf"
- "{{ node_custom_config }}/ceph/{{ inventory_hostname }}/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
mode: "0660"
become: true
with_items:
- "ceph-mon"
- "ceph-osd"
- "ceph-rgw"
- "ceph-mgr"
- "ceph-mds"
- "ceph-nfs"
- name: Copying over ganesha.conf for ceph-nfs
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/ceph-nfs/ganesha.conf"
mode: 0600
become: true
when:
- inventory_hostname in groups['ceph-nfs']
with_first_found:
- "{{ node_custom_config }}/ganesha.conf"
- "{{ node_custom_config }}/ceph-nfs/ganesha.conf"
- "ganesha.conf.j2"