diff --git a/ansible/roles/iscsi/tasks/precheck.yml b/ansible/roles/iscsi/tasks/precheck.yml index d2811246e5..67afa5a7ed 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