From: Christian Zunker Date: Wed, 15 Mar 2017 12:32:30 +0000 (+0100) Subject: Make ceph-common aware of osd config fragments X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a388fa5a7b374dfe2cc2274295aee0721d4976ec;p=ceph-ansible.git Make ceph-common aware of osd config fragments This removes the implicit order requirement when using OSD fragments. When you use OSD fragments and ceph-osd role is not the last one, the fragments get removed from ceph.conf by ceph-common. It is not nice to have this code at two locations, but this is necessary to prevent problems, when ceph-osd is the last role as ceph-common gets executed before ceph-osd. This could be prevented when ceph-common would be explicitly called at the end of the playbook. This is a backport of commit 349b9ab3e72f188c50b5f84f3ce5ee2fddcfbf80 onto Stable-2.1. That commit was by Christian Zunker Signed-off-by: Matthew Vernon --- diff --git a/roles/ceph-common/tasks/generate_ceph_conf.yml b/roles/ceph-common/tasks/generate_ceph_conf.yml index dc929c736..6a2c68ec7 100644 --- a/roles/ceph-common/tasks/generate_ceph_conf.yml +++ b/roles/ceph-common/tasks/generate_ceph_conf.yml @@ -1,22 +1,33 @@ --- -- name: create ceph conf directory +- name: create ceph conf directory and assemble directory file: - path: /etc/ceph + path: "{{ item }}" state: directory owner: "{{ dir_owner }}" group: "{{ dir_group }}" mode: "{{ dir_mode }}" + with_items: + - /etc/ceph/ + - /etc/ceph/ceph.d/ - name: "generate ceph configuration file: {{ cluster }}.conf" action: config_template args: src: ceph.conf.j2 - dest: /etc/ceph/{{ cluster }}.conf + dest: /etc/ceph/ceph.d/{{ cluster }}.conf owner: "{{ dir_owner }}" group: "{{ dir_group }}" mode: "{{ activate_file_mode }}" config_overrides: "{{ ceph_conf_overrides }}" config_type: ini + +- name: assemble {{ cluster }}.conf and fragments + assemble: + src: /etc/ceph/ceph.d/ + dest: /etc/ceph/{{ cluster }}.conf + owner: "ceph" + group: "ceph" + mode: "0644" notify: - restart ceph mons - restart ceph osds