diff --git a/ansible/roles/iscsi/tasks/precheck.yml b/ansible/roles/iscsi/tasks/precheck.yml index d2811246e5aefd7ed080aa0ab8774a60a4cf9436..67afa5a7edc9cc5b7c131fe058dd6f289055e04a 100644 --- a/ansible/roles/iscsi/tasks/precheck.yml +++ b/ansible/roles/iscsi/tasks/precheck.yml @@ -27,9 +27,9 @@ - iscsi_services.iscsid.enabled | bool - name: Check supported platforms for tgtd - fail: - msg: - The SCSI target daemon tgtd is not supported on CentOS/RHEL 8 and later + assert: + that: ansible_facts.os_family != 'RedHat' + fail_msg: > + The SCSI target daemon tgtd is not supported on CentOS/RHEL when: - - ansible_facts.os_family == 'RedHat' - enable_tgtd | bool