2016-12-09 21:51:35 +08:00
|
|
|
---
|
|
|
|
- name: configure cluster name
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/sysconfig/ceph
|
|
|
|
insertafter: EOF
|
|
|
|
create: yes
|
|
|
|
line: "CLUSTER={{ cluster }}"
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- ansible_os_family == "RedHat"
|
2016-12-09 21:51:35 +08:00
|
|
|
|
|
|
|
# NOTE(leseb): we are performing the following check
|
|
|
|
# to ensure any Jewel installation will not fail.
|
|
|
|
# The following commit https://github.com/ceph/ceph/commit/791eba81a5467dd5de4f1680ed0deb647eb3fb8b
|
|
|
|
# fixed a package issue where the path was the wrong.
|
|
|
|
# This bug is not yet on all the distros package so we are working around it
|
|
|
|
# Impacted versions:
|
|
|
|
# - Jewel from UCA: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1582773
|
|
|
|
# - Jewel from latest Canonical 16.04 distro
|
|
|
|
# - All previous versions from Canonical
|
|
|
|
# - Infernalis from ceph.com
|
|
|
|
- name: check /etc/default/ceph exist
|
|
|
|
stat:
|
|
|
|
path: /etc/default/ceph
|
|
|
|
register: etc_default_ceph
|
|
|
|
always_run: true
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- ansible_os_family == "Debian"
|
2016-12-09 21:51:35 +08:00
|
|
|
|
|
|
|
- name: configure cluster name
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/default/ceph
|
|
|
|
insertafter: EOF
|
|
|
|
create: yes
|
|
|
|
line: "CLUSTER={{ cluster }}"
|
|
|
|
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
|