Skip to content

Commit

Permalink
Merge pull request #50 from layluke/Issue_49-NFS-controls-cause-autof…
Browse files Browse the repository at this point in the history
…s-filesystems-to-be-entered-into-fstab

excluding autofs filessytems, adding line to 231060
  • Loading branch information
uk-bolly authored Oct 8, 2024
2 parents 409b654 + 3c962eb commit 2ee393f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tasks/Cat2/RHEL-09-23xxxx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@
- name: "MEDIUM | RHEL-09-231060 | PATCH | RHEL 9 must be configured so that the Network File System (NFS) is configured to use RPCSEC_GSS."
when:
- rhel_09_231060
- ansible_facts['mounts']| selectattr('fstype', '==', 'nfs')
- "'nfs-utils' in ansible_facts.packages"
- rhel9stig_disruption_high
tags:
Expand All @@ -190,7 +189,7 @@
path: "{{ item.mount }}"
src: "{{ item.device }}"
state: present
loop: "{{ ansible_facts.mounts }}"
loop: "{{ ansible_facts.mounts | selectattr('fstype', 'contains', 'nfs') | rejectattr('fstype', 'equalto', 'autofs') | list }}"
loop_control:
label: "{{ item.device }}"

Expand All @@ -214,7 +213,7 @@
path: "{{ item.mount }}"
src: "{{ item.device }}"
state: present
loop: "{{ ansible_facts.mounts | selectattr('fstype', 'contains', 'nfs') | list }}"
loop: "{{ ansible_facts.mounts | selectattr('fstype', 'contains', 'nfs') | rejectattr('fstype', 'equalto', 'autofs') | list }}"
loop_control:
label: "{{ item.device }}"

Expand All @@ -238,7 +237,7 @@
path: "{{ item.mount }}"
src: "{{ item.device }}"
state: present
loop: "{{ ansible_facts.mounts | selectattr('fstype', 'contains', 'nfs') | list }}"
loop: "{{ ansible_facts.mounts | selectattr('fstype', 'contains', 'nfs') | rejectattr('fstype', 'equalto', 'autofs') | list }}"
loop_control:
label: "{{ item.device }}"

Expand All @@ -262,7 +261,7 @@
path: "{{ item.mount }}"
src: "{{ item.device }}"
state: present
loop: "{{ ansible_facts.mounts | selectattr('fstype', 'contains', 'nfs') | list }}"
loop: "{{ ansible_facts.mounts | selectattr('fstype', 'contains', 'nfs') | rejectattr('fstype', 'equalto', 'autofs') | list }}"
loop_control:
label: "{{ item.device }}"

Expand Down

0 comments on commit 2ee393f

Please sign in to comment.