You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ansible_distribution variable for Oracle Linux is OracleLinux (no space). See ansible/lib/ansible/module_utils/facts/system/distribution.pyODIST_LIST
prelim task is checking for Oracle Linux (with a space in distribution name)
- name: "PRELIM | set fact if UEFI boot | Oracle Linux"
ansible.builtin.set_fact:
rhel8stig_bootloader_path: /boot/efi/EFI/redhat
rhel8stig_legacy_boot: false
when:
- rhel8_efi_boot.stat.exists
- ansible_distribution == 'Oracle Linux' # <-- Here
This causes a downstream failure of the make grub2 config handler as the rhel8stig_bootloader_path for Oracle Linux is interpreted as /boot/efi/EFI/oraclelinux/ instead of /boot/efi/EFI/redhat which causes the make grub2 config to fail.
- name: make grub2 config
ansible.builtin.shell: /usr/sbin/grub2-mkconfig --output={{ rhel8stig_bootloader_path }}/grub.cfg
when:
- rhel8stig_grub2_user_cfg.stat.exists
- not rhel8stig_skip_for_travis
- not system_is_container
Error Observed:
FAILED! => {"changed": true, "cmd": "/usr/sbin/grub2-mkconfig --output=/boot/efi/EFI/oraclelinux/grub.cfg",
"delta": "0:00:20.741084", "end": "2023-11-29 08:32:42.667555",
"msg": "non-zero return code", "rc": 1, "start": "2023-11-29 08:32:21.926471",
"stderr": "/usr/sbin/grub2-mkconfig: line 274: /boot/efi/EFI/oraclelinux/grub.cfg.new: No such file or directory",
"stderr_lines": ["/usr/sbin/grub2-mkconfig: line 274: /boot/efi/EFI/oraclelinux/grub.cfg.new: No such file or directory"],
"stdout": "", "stdout_lines": []}
Proposed fix
Change ansible_distribuition check to OracleLinux in prelim.yml
Update prelim.yml
Addressing Oracle Linux distribution identification issue ansible-lockdown#239
Signed-off-by: William Golembieski <william@armoryanalytics.com>
Environment
Project Version:
latest
Ansible Version:
latest
OS:
Oracle Linux 8.8
Identified in the prelim task
ansible_distribution
variable for Oracle Linux isOracleLinux
(no space). Seeansible/lib/ansible/module_utils/facts/system/distribution.py
ODIST_LISTOracle Linux
(with a space in distribution name)This causes a downstream failure of the
make grub2 config
handler as therhel8stig_bootloader_path
for Oracle Linux is interpreted as/boot/efi/EFI/oraclelinux/
instead of/boot/efi/EFI/redhat
which causes themake grub2 config
to fail.Error Observed:
Proposed fix
Change
ansible_distribuition
check toOracleLinux
in prelim.ymlThe text was updated successfully, but these errors were encountered: