From 68921be0b2aad58462ec31f0457453d8af356d09 Mon Sep 17 00:00:00 2001 From: Mark Bolwell Date: Tue, 22 Oct 2024 10:38:26 +0100 Subject: [PATCH] updated for gui discovery and dconf install Signed-off-by: Mark Bolwell --- defaults/main.yml | 2 +- tasks/prelim.yml | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 9f64850..7fee3af 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -569,7 +569,7 @@ rhel9cis_warning_banner: Authorized uses only. All activity may be monitored and ## Control 1.8.x - Settings for GDM ## 1.8 GDM graphical interface -rhel9cis_gui: false +rhel9cis_gui: "{{ prelim_gnome_present.stat.exists | default(false) }}" # This variable specifies the GNOME configuration database file to which configurations are written. # (See "https://help.gnome.org/admin/system-admin-guide/stable/dconf-keyfiles.html.en") # The default database is 'local'. diff --git a/tasks/prelim.yml b/tasks/prelim.yml index 78d1771..1ec5ace 100644 --- a/tasks/prelim.yml +++ b/tasks/prelim.yml @@ -159,6 +159,22 @@ ansible.builtin.set_fact: grub2_path: /etc/grub2-efi.cfg +- name: "PRELIM | Discover Gnome Desktop Environment" + tags: + - always + ansible.builtin.stat: + path: /usr/share/gnome/gnome-version.xml + register: prelim_gnome_present + +- name: "PRELIM | Install dconf if gui installed" + when: + - rhel9cis_gui + tags: + - always + ansible.builtin.package: + name: dconf + state: present + - name: "PRELIM | AUDIT | Wireless adapter pre-requisites" when: - rhel9cis_rule_3_1_2