igw: Add check for missing iqn

If the user is still using the older packages and does not setup
the target iqn you will just get a vague error message later on.
This adds a check during the validate task, so it is clear to the
user.

Signed-off-by: Mike Christie <mchristi@redhat.com>
(cherry picked from commit 08a6d10c32)
pull/4199/head
Mike Christie 2019-05-30 11:17:09 -05:00 committed by mergify[bot]
parent dd4d12662b
commit ce62ac7beb
1 changed files with 8 additions and 0 deletions

View File

@ -11,6 +11,14 @@
- not containerized_deployment | bool - not containerized_deployment | bool
- not use_new_ceph_iscsi | bool - not use_new_ceph_iscsi | bool
- name: make sure gateway_iqn is configured
fail:
msg: "you must set a iqn for the iSCSI target"
when:
- "gateway_iqn | default('') | length == 0"
- not containerized_deployment | bool
- not use_new_ceph_iscsi | bool
- name: fail if unsupported chap configuration - name: fail if unsupported chap configuration
fail: fail:
msg: "Mixing clients with CHAP enabled and disabled is not supported." msg: "Mixing clients with CHAP enabled and disabled is not supported."