Skip to content

Commit

Permalink
Updated with changes to search for everything contianing nfs
Browse files Browse the repository at this point in the history
Signed-off-by: layluke <[email protected]>
  • Loading branch information
layluke committed Sep 30, 2024
1 parent 8af2759 commit 32fb1a2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tasks/Cat2/RHEL-09-23xxxx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@
- name: "MEDIUM | RHEL-09-231065 | PATCH | RHEL 9 must prevent special devices on file systems that are imported via Network File System (NFS)."
when:
- rhel_09_231065
- ansible_facts['mounts']| selectattr('fstype', '==', 'nfs')
- "'nfs-utils' in ansible_facts.packages"
- "'nodev' not in item.options"
- rhel9stig_disruption_high
Expand All @@ -215,14 +214,13 @@
path: "{{ item.mount }}"
src: "{{ item.device }}"
state: present
loop: "{{ ansible_facts.mounts | selectattr('fstype', 'equalto', 'nfs') | list }}"
loop: "{{ ansible_facts.mounts | selectattr('fstype', 'contains', 'nfs') | list }}"
loop_control:
label: "{{ item.device }}"

- name: "MEDIUM | RHEL-09-231070 | PATCH | RHEL 9 must prevent code from being executed on file systems that are imported via Network File System (NFS)."
when:
- rhel_09_231070
- ansible_facts['mounts']| selectattr('fstype', '==', 'nfs')
- "'nfs-utils' in ansible_facts.packages"
- "'noexec' not in item.options"
- rhel9stig_disruption_high
Expand All @@ -240,14 +238,13 @@
path: "{{ item.mount }}"
src: "{{ item.device }}"
state: present
loop: "{{ ansible_facts.mounts | selectattr('fstype', 'equalto', 'nfs') | list }}"
loop: "{{ ansible_facts.mounts | selectattr('fstype', 'contains', 'nfs') | list }}"
loop_control:
label: "{{ item.device }}"

- name: "MEDIUM | RHEL-09-231075 | PATCH | RHEL 9 must prevent files with the setuid and setgid bit set from being executed on file systems that are imported via Network File System (NFS)."
when:
- rhel_09_231075
- ansible_facts['mounts']| selectattr('fstype', '==', 'nfs')
- "'nfs-utils' in ansible_facts.packages"
- "'nosuid' not in item.options"
- rhel9stig_disruption_high
Expand All @@ -265,7 +262,7 @@
path: "{{ item.mount }}"
src: "{{ item.device }}"
state: present
loop: "{{ ansible_facts.mounts | selectattr('fstype', 'equalto', 'nfs') | list }}"
loop: "{{ ansible_facts.mounts | selectattr('fstype', 'contains', 'nfs') | list }}"
loop_control:
label: "{{ item.device }}"

Expand Down

0 comments on commit 32fb1a2

Please sign in to comment.