mirror of https://github.com/ceph/ceph-ansible.git
ceph-validate: use kernel validation for iscsi
Ceph iSCSI gateway requires Red Hat Enterprise Linux or CentOS 7.5 or later. Because we can not check the ansible_distribution_version fact for CentOS with ansible 2.8 (returns only the major version) we can fallback by checking the kernel option. - CONFIG_TARGET_CORE=m - CONFIG_TCM_USER2=m - CONFIG_ISCSI_TARGET=m http://docs.ceph.com/docs/master/rbd/iscsi-target-cli-manual-install/ Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>pull/4013/head
parent
72d8315299
commit
0c7fd79865
|
@ -78,10 +78,14 @@
|
|||
when: ansible_distribution not in ['RedHat', 'CentOS', 'Fedora']
|
||||
|
||||
- name: fail on unsupported distribution version for iscsi gateways
|
||||
fail:
|
||||
msg: "iSCSI gateways can only be deployed on Red Hat Enterprise Linux or CentOS >= 7.4"
|
||||
when:
|
||||
- ansible_distribution_version < '7.4'
|
||||
- ansible_distribution in ['RedHat', 'CentOS']
|
||||
command: 'grep -q {{ item }}=m {% if is_atomic|bool %}/usr/lib/ostree-boot{% else %}/boot{% endif %}/config-{{ ansible_kernel }}'
|
||||
register: iscsi_kernel
|
||||
changed_when: false
|
||||
failed_when: iscsi_kernel.rc != 0
|
||||
loop:
|
||||
- CONFIG_TARGET_CORE
|
||||
- CONFIG_TCM_USER2
|
||||
- CONFIG_ISCSI_TARGET
|
||||
when: ansible_distribution in ['RedHat', 'CentOS']
|
||||
when: iscsi_gw_group_name in group_names
|
||||
|
||||
|
|
Loading…
Reference in New Issue