From 3cba437a157a5ab48ef04ae0e45d0da895c4460f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Thu, 28 Oct 2021 15:02:38 -0400 Subject: [PATCH] enable-fips: Fedora also support FIPS Fedora supports FIPS. There is no version check because the feature is available on all the supported Fedora releases. Change-Id: I924fb565a4d70e7c93a215e9e0a5b2b80bced52a --- roles/enable-fips/tasks/main.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/enable-fips/tasks/main.yaml b/roles/enable-fips/tasks/main.yaml index aebdb9497..bc62b05f0 100644 --- a/roles/enable-fips/tasks/main.yaml +++ b/roles/enable-fips/tasks/main.yaml @@ -1,10 +1,11 @@ --- - name: Make sure this role is run on RHEL/CentOS 8 systems fail: - msg: This role supports RHEL/CentOS 8 systems only + msg: This role supports RHEL/CentOS 8 systems and Fedora only when: - - (ansible_distribution != 'CentOS' and ansible_distribution != 'Red Hat Enterprise Linux') or - ansible_distribution_major_version != '8' + - not (ansible_distribution == 'CentOS' and ansible_distribution_major_version|int >= 8) + - not (ansible_distribution == 'Red Hat Enterprise Linux' and ansible_distribution_major_version|int >= 8) + - not ansible_distribution == 'Fedora' - name: Install fips-mode-setup become: true