2024-07-19 17:01:23 +01:00
---
# Skips if mount is absent
- name : "1.1.2.5.1 | AUDIT | Ensure separate partition exists for /var/tmp"
when :
- required_mount not in mount_names
- rhel9cis_rule_1_1_2_5_1
tags :
- level2-server
- level2-workstation
- audit
- mounts
- rule_1_1_2.5.1
2024-07-22 12:42:39 +01:00
- NIST800-53R5_CM-7
2024-07-19 17:01:23 +01:00
vars :
warn_control_id : '1.1.2.5.1'
required_mount : '/var/tmp'
block :
- name : "1.1.2.5.1 | AUDIT | Ensure separate partition exists for /var/tmp | Absent"
ansible.builtin.debug :
2024-12-04 08:01:16 +00:00
msg : "Warning!! {{ required_mount }} doesn't exist. Please investigate this manual task"
2024-07-19 17:01:23 +01:00
- name : "1.1.2.5.1 | AUDIT | Ensure separate partition exists for /var/tmp | Present"
ansible.builtin.import_tasks :
file : warning_facts.yml
# skips if mount is absent
- name : |
2024-07-24 14:00:00 +01:00
"1.1.2.5.2 | PATCH | Ensure nodev option set on /var/tmp partition
1.1 .2 .5 .3 | PATCH | Ensure nosuid option set on /var/tmp partition
1.1 .2 .5 .4 | PATCH | Ensure noexec option set on /var/tmp partition"
2024-07-19 17:01:23 +01:00
when :
- item.mount == "/var/tmp"
- rhel9cis_rule_1_1_2_5_2 or
rhel9cis_rule_1_1_2_5_3 or
rhel9cis_rule_1_1_2_5_4
tags :
- level1-server
- level1-workstation
- patch
- mounts
2024-08-07 12:37:43 +01:00
- rule_1.1.2.5.2
- rule_1.1.2.5.3
- rule_1.1.2.5.4
2024-07-22 12:42:39 +01:00
- NIST800-53R5_AC-3
- NIST800-53R5_MP-2
2024-07-24 14:00:00 +01:00
ansible.posix.mount :
2024-07-19 17:01:23 +01:00
name : /var/tmp
src : "{{ item.device }}"
fstype : "{{ item.fstype }}"
state : present
2024-11-11 16:04:14 +00:00
opts : "{{ item.options }}{% if ('nodev' not in item.options and rhel9cis_rule_1_1_2_5_2) %},nodev{% endif %}{% if ('nosuid' not in item.options and rhel9cis_rule_1_1_2_5_3) %},nosuid{% endif %}{% if ('noexec' not in item.options and rhel9cis_rule_1_1_2_5_4) %},noexec{% endif %}"
2024-07-19 17:01:23 +01:00
loop : "{{ ansible_facts.mounts }}"
loop_control :
label : "{{ item.device }}"
notify : Change_requires_reboot