ceph-common: fix ceph options default path again

closes: #788

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/789/head
Sébastien Han 2016-05-16 18:37:28 +02:00
parent 5b354bac31
commit e7aae27801
1 changed files with 21 additions and 1 deletions

View File

@ -231,10 +231,30 @@
line: "CLUSTER={{ cluster }}"
when: ansible_os_family == "RedHat"
- name: check /etc/default/ceph exist
stat:
path: /etc/default/ceph
register: etc_default_ceph
when: ansible_os_family == "Debian"
- name: configure cluster name
lineinfile:
dest: /etc/default/ceph
insertafter: EOF
create: yes
line: "CLUSTER={{ cluster }}"
when: ansible_os_family == "Debian"
when:
- ansible_os_family == "Debian"
- etc_default_ceph.stat.exists
- not etc_default_ceph.stat.isdir
- name: configure cluster name
lineinfile:
dest: /etc/default/ceph/ceph
insertafter: EOF
create: yes
line: "CLUSTER={{ cluster }}"
when:
- ansible_os_family == "Debian"
- etc_default_ceph.stat.exists
- etc_default_ceph.stat.isdir