From cf6e08c3903e881c1a555ef8505659fe424913c0 Mon Sep 17 00:00:00 2001 From: Mark Bolwell Date: Tue, 21 Jun 2022 14:16:58 +0100 Subject: [PATCH] added legacy mount check again Signed-off-by: Mark Bolwell --- tasks/prelim.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tasks/prelim.yml b/tasks/prelim.yml index 53b1350..2646e98 100644 --- a/tasks/prelim.yml +++ b/tasks/prelim.yml @@ -90,6 +90,24 @@ when: - '"python3-libselinux" not in ansible_facts.packages' +- name: "PRELIM | Set facts based on boot type" + block: + - name: "PRELIM | Check whether machine is UEFI-based" + stat: + path: /sys/firmware/efi + register: rhel_09_efi_boot + + - name: "PRELIM | AUDIT | set legacy boot and grub path | Bios" + set_fact: + rhel9cis_legacy_boot: true + grub2_path: /etc/grub2.cfg + when: not rhel_09_efi_boot.stat.exists + + - name: "PRELIM | set grub fact | UEFI" + set_fact: + grub2_path: /etc/grub2-efi.cfg + when: rhel_09_efi_boot.stat.exists + - name: "PRELIM | Section 4.1 | Configure System Accounting (auditd)" package: name: audit