mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 14:23:05 +00:00
updated idempotency thanks to feedback from @Thulium-Drake
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
13ab9d5440
commit
b7963f7c11
1 changed files with 3 additions and 3 deletions
|
|
@ -24,8 +24,8 @@
|
|||
file: warning_facts.yml
|
||||
|
||||
- name: |
|
||||
"1.1.2.3.2 | PATCH | Ensure nodev option set on /home partition
|
||||
1.1.2.3.3 | PATCH | Ensure nosuid option set on /home partition"
|
||||
"1.1.2.3.2 | PATCH | Ensure nodev option set on /home partition
|
||||
1.1.2.3.3 | PATCH | Ensure nosuid option set on /home partition"
|
||||
when:
|
||||
- item.mount == "/home"
|
||||
- rhel9cis_rule_1_1_2_3_2 or
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
src: "{{ item.device }}"
|
||||
fstype: "{{ item.fstype }}"
|
||||
state: present
|
||||
opts: defaults,{% if rhel9cis_rule_1_1_2_3_2 %}nodev,{% endif %}{% if rhel9cis_rule_1_1_2_3_3 %}nosuid{% endif %}
|
||||
opts: "{{ item.options }}{% if ('nodev' not in item.options and rhel9cis_rule_1_1_2_3_2) %},nodev{% endif %}{% if ('nosuid' not in item.options and rhel9cis_rule_1_1_2_3_3) %},nosuid{% endif %}"
|
||||
loop: "{{ ansible_facts.mounts }}"
|
||||
loop_control:
|
||||
label: "{{ item.device }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue