diff --git a/tasks/main.yml b/tasks/main.yml index ef1cef5..843850c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,10 +2,11 @@ # tasks file for RHEL9-CIS - name: Check OS version and family fail: - msg: "This role can only be run against RHEL 8. {{ ansible_distribution }} {{ ansible_distribution_major_version }} is not supported." + msg: "This role can only be run against RHEL 8 or 9. {{ ansible_distribution }} {{ ansible_distribution_major_version }} is not supported." when: - ansible_os_family == 'RedHat' - - ansible_distribution_major_version is version_compare('9', '!=') + - ansible_distribution_major_version == 8 or + ansible_distribution_major_version == 9 tags: - always