diff --git a/tasks/boot.yml b/tasks/boot.yml index 3b0ee0ce..57d8b2ae 100644 --- a/tasks/boot.yml +++ b/tasks/boot.yml @@ -15,13 +15,13 @@ - name: Check to see if grub.cfg exists stat: - path: /boot/grub/grub.cfg + path: "{{ grub_conf_file }}" register: grub_cfg always_run: True - name: V-38579 - Bootloader configuration files must be owned by root file: - path: /boot/grub/grub.cfg + path: "{{ grub_conf_file }}" owner: root tags: - boot @@ -31,7 +31,7 @@ - name: V-38581 - Bootloader configuration files must be group-owned by root file: - path: /boot/grub/grub.cfg + path: "{{ grub_conf_file }}" group: root tags: - boot @@ -41,7 +41,7 @@ - name: V-38582 - Bootloader configuration files must have mode 0644 or less file: - path: /boot/grub/grub.cfg + path: "{{ grub_conf_file }}" mode: 0644 tags: - boot diff --git a/vars/redhat.yml b/vars/redhat.yml index 2db5a1b4..3b8ba6c2 100644 --- a/vars/redhat.yml +++ b/vars/redhat.yml @@ -17,6 +17,7 @@ pam_auth_file: /etc/pam.d/system-auth pam_password_file: /etc/pam.d/password-auth vsftpd_conf_file: /etc/vsftpd/vsftpd.conf +grub_conf_file: /boot/grub2/grub.cfg # Package names auditd_pkg: audit diff --git a/vars/ubuntu.yml b/vars/ubuntu.yml index 0ce42281..984dc412 100644 --- a/vars/ubuntu.yml +++ b/vars/ubuntu.yml @@ -20,6 +20,7 @@ cache_timeout: 600 pam_auth_file: /etc/pam.d/common-auth pam_password_file: /etc/pam.d/common-password vsftpd_conf_file: /etc/vsftpd.conf +grub_conf_file: /boot/grub/grub.cfg # Package names auditd_pkg: auditd