Fix Conditional Check for CephStorage plugin
This patch fixes the condition, so that fsid is fetched only when ceph plugin is enabled. Change-Id: I84ed3d8aa0c59b70b15ecf11cb15bc317daa7ec0
This commit is contained in:
parent
8485df3535
commit
675c130c7a
@ -339,19 +339,20 @@
|
|||||||
shell: ls /var/run/ceph/ceph-osd.*.asok | head -n 1 | egrep -o '[0-9]+'
|
shell: ls /var/run/ceph/ceph-osd.*.asok | head -n 1 | egrep -o '[0-9]+'
|
||||||
register: cephstorage_osd_socket
|
register: cephstorage_osd_socket
|
||||||
become: true
|
become: true
|
||||||
when: "('CephStorage' in group_names and ceph_storage_collectd_plugin)"
|
when: "(rhosp_version is version('17.0', '<')) and ('CephStorage' in group_names and ceph_storage_collectd_plugin)"
|
||||||
# End CephStorage OSD monitoring
|
# End CephStorage OSD monitoring
|
||||||
|
|
||||||
|
- block:
|
||||||
- name: Get Ceph cluster fsid
|
- name: Get Ceph cluster fsid
|
||||||
shell: ls /var/run/ceph/
|
shell: ls /var/run/ceph/
|
||||||
register: ceph_cluster_fsid
|
register: ceph_cluster_fsid
|
||||||
become: true
|
become: true
|
||||||
when: "rhosp_version is version('17.0', '>=')"
|
|
||||||
delegate_to: controller-0
|
delegate_to: controller-0
|
||||||
|
|
||||||
- name: set fact for ceph cluster id
|
- name: set fact for ceph cluster id
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_cluster_fsid: "{{ ceph_cluster_fsid.stdout }}"
|
ceph_cluster_fsid: "{{ ceph_cluster_fsid.stdout }}"
|
||||||
|
when: "(rhosp_version is version('17.0', '>=')) and ('CephStorage' in group_names and ceph_storage_collectd_plugin)"
|
||||||
|
|
||||||
- name: Configure collectd.conf
|
- name: Configure collectd.conf
|
||||||
template:
|
template:
|
||||||
|
@ -165,11 +165,11 @@
|
|||||||
when: "('CephStorage' in group_names and ceph_storage_collectd_plugin) and (rhosp_version is version('17.0', '<'))"
|
when: "('CephStorage' in group_names and ceph_storage_collectd_plugin) and (rhosp_version is version('17.0', '<'))"
|
||||||
# End CephStorage OSD monitoring
|
# End CephStorage OSD monitoring
|
||||||
|
|
||||||
|
- block:
|
||||||
- name: Get Ceph cluster fsid
|
- name: Get Ceph cluster fsid
|
||||||
shell: ls /var/run/ceph/
|
shell: ls /var/run/ceph/
|
||||||
register: ceph_cluster_fsid
|
register: ceph_cluster_fsid
|
||||||
become: true
|
become: true
|
||||||
when: "rhosp_version is version('17.0', '>=')"
|
|
||||||
delegate_to: controller-0
|
delegate_to: controller-0
|
||||||
|
|
||||||
- name: set fact for ceph cluster id
|
- name: set fact for ceph cluster id
|
||||||
@ -180,7 +180,7 @@
|
|||||||
shell: cephadm shell -- ls /var/run/ceph/ | head -n 1 | egrep -o '[0-9]+'
|
shell: cephadm shell -- ls /var/run/ceph/ | head -n 1 | egrep -o '[0-9]+'
|
||||||
register: cephstorage_osd_socket
|
register: cephstorage_osd_socket
|
||||||
become: true
|
become: true
|
||||||
when: "('CephStorage' in group_names and ceph_storage_collectd_plugin) and (rhosp_version is version('17.0', '>='))"
|
when: "(rhosp_version is version('17.0', '>=')) and ('CephStorage' in group_names and ceph_storage_collectd_plugin)"
|
||||||
|
|
||||||
- name: Create configuration directory
|
- name: Create configuration directory
|
||||||
file:
|
file:
|
||||||
|
Loading…
Reference in New Issue
Block a user