Skip to content

Commit

Permalink
Merge pull request #445 from ansible-lockdown/fix_021350
Browse files Browse the repository at this point in the history
rhel7stig_boot_part variable now discovered
  • Loading branch information
uk-bolly authored Nov 21, 2023
2 parents 9943f97 + 6e7329b commit 212f524
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ rhel7stig_auditd_failure_flag: "{{ rhel7stig_availability_override | ternary(1,

rhel7stig_audit_part: "{{ rhel_07_audit_part.stdout }}"

rhel7stig_boot_part: "{{ rhel_07_boot_part.stdout }}"
rhel7stig_boot_part: /boot

rhel7stig_legacy_boot_path: '/boot/grub2/'
rhel7stig_efi_boot_path: '/boot/efi/EFI/'
Expand Down
7 changes: 4 additions & 3 deletions tasks/fix-cat1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@
insert: true
when:
- rhel7stig_boot_part not in ['/', '']
- item.uuid is defined
- not ansible_check_mode or
rhel7_stig_grub_template is not changed
notify: confirm grub2 user cfg
Expand All @@ -474,9 +475,9 @@
- ansible_check_mode
- rhel_07_021350_audit is failed
failed_when:
- rhel_07_021350_audit is failed
- not ansible_check_mode or
rhel_07_021350_audit.rc > 1
- rhel_07_021350_audit.rc not in [ 0, 1 ]
- not ansible_check_mode

when:
- not ansible_check_mode or
rhel7_stig_grub_template is not changed
Expand Down
2 changes: 1 addition & 1 deletion tasks/fix-cat2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@
label: "{{ rhel7stig_passwd_label }}"
when:
- rhel_07_020620
- rhel7stig_interactive_uid_start | int <= item.uid
- item.uid >= rhel7stig_interactive_uid_start | int
tags:
- RHEL-07-020620
- CAT2
Expand Down
12 changes: 0 additions & 12 deletions tasks/prelim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,18 +300,6 @@
- RHEL-07-031000
- RHEL-07-031010

- name: "PRELIM | RHEL-07-021350 | Check if /boot or /boot/efi reside on separate partitions"
ansible.builtin.shell: df --output=target /boot | tail -n 1
changed_when: false
check_mode: false
register: rhel_07_boot_part
when:
- rhel_07_021350
tags:
- cat1
- high
- RHEL-07-021350

- name: "PRELIM | RHEL-07-030300 | RHEL-07-030310 | RHEL-07-030320 | RHEL-07-030321 | Install audit remote plugin."
ansible.builtin.package:
name: audispd-plugins
Expand Down

0 comments on commit 212f524

Please sign in to comment.