Common: Avoid duplicate section in ceph.conf

See:
 - https://github.com/ceph/ceph-ansible/pull/1018#issuecomment-253491094
 - https://github.com/ceph/ceph-ansible/pull/1018#issuecomment-260276588

The workaround here is rendering `ceph_conf_overrides` before passing it
to `config_template` to be sure we won't have a section added twice in
ceph.conf

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/1018/head
Guillaume Abrioux 2017-06-02 10:06:19 +02:00
parent fcba2c801a
commit 894df4b8c8
1 changed files with 9 additions and 1 deletions

View File

@ -10,6 +10,14 @@
- /etc/ceph/
- /etc/ceph/ceph.d/
- name: template ceph_conf_overrides
local_action: copy content="{{ ceph_conf_overrides }}" dest=/tmp/ceph_conf_overrides_temp
run_once: true
- name: get rendered ceph_conf_overrides
local_action: set_fact ceph_conf_overrides_rendered="{{ lookup('template', '/tmp/ceph_conf_overrides_temp') | from_yaml }}"
run_once: true
- name: "generate ceph configuration file: {{ cluster }}.conf"
action: config_template
args:
@ -18,7 +26,7 @@
owner: "ceph"
group: "ceph"
mode: "0644"
config_overrides: "{{ ceph_conf_overrides }}"
config_overrides: "{{ ceph_conf_overrides_rendered }}"
config_type: ini
- name: assemble {{ cluster }}.conf and fragments