mirror of https://github.com/ceph/ceph-ansible.git
ceph-common: fix ceph options default path again
closes: #788 Signed-off-by: Sébastien Han <seb@redhat.com>pull/789/head
parent
5b354bac31
commit
e7aae27801
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue