]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
igw: Add check for missing iqn
authorMike Christie <mchristi@redhat.com>
Thu, 30 May 2019 16:17:09 +0000 (11:17 -0500)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 3 Jul 2019 20:13:19 +0000 (22:13 +0200)
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>
roles/ceph-validate/tasks/check_iscsi.yml

index b067b6259aac7a1c7deebfe9673287b804a95d61..6233a3d347478e9e1c078bdfcd3359efa770bd08 100644 (file)
     - not containerized_deployment | 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
   fail:
     msg: "Mixing clients with CHAP enabled and disabled is not supported."