From fb6f4fefa384b9538cbf582ab485c4f5eab520de Mon Sep 17 00:00:00 2001 From: layluke Date: Wed, 18 Oct 2023 17:44:53 -0400 Subject: [PATCH] Adding additional condition for rhel7stig_grub2_user_cfg for task Signed-off-by: layluke --- handlers/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index c414bd4c..88fb8027 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -27,7 +27,7 @@ - name: make grub2 config ansible.builtin.shell: /usr/sbin/grub2-mkconfig --output={{ rhel7stig_bootloader_path }}grub.cfg when: - - rhel7stig_grub2_user_cfg.stat.exists + - (rhel7stig_grub2_user_cfg is defined) and (rhel7stig_grub2_user_cfg.stat.exists) - not rhel7stig_skip_for_travis - not rhel7stig_system_is_container @@ -42,7 +42,7 @@ - grub.cfg - user.cfg when: - - rhel7stig_grub2_user_cfg.stat.exists + - (rhel7stig_grub2_user_cfg is defined) and (rhel7stig_grub2_user_cfg.stat.exists) - rhel7stig_workaround_for_disa_benchmark - not rhel7stig_skip_for_travis - not rhel7stig_system_is_container