2022-03-30 11:02:30 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# Skips if mount is absent
|
2023-01-12 13:38:14 +00:00
|
|
|
- name: "1.1.8.1 | AUDIT | Ensure /dev/shm is a separate partition"
|
2022-03-30 11:02:30 +01:00
|
|
|
block:
|
2023-09-18 09:51:56 +01:00
|
|
|
- name: "1.1.8.1 | AUDIT | Ensure /dev/shm is a separate partition | check exists"
|
|
|
|
|
ansible.builtin.shell: mount -l | grep -w /dev/shm
|
|
|
|
|
changed_when: false
|
|
|
|
|
register: rhel9cis_1_8_1_1_mount_check
|
2022-03-30 11:02:30 +01:00
|
|
|
|
2023-09-21 14:55:00 +01:00
|
|
|
- name: "1.1.8.1 | AUDIT | Ensure /dev/shm is a separate partition"
|
|
|
|
|
block:
|
2023-09-18 09:51:56 +01:00
|
|
|
- name: "1.1.8.1 | AUDIT | Ensure /dev/shm is a separate partition | Absent"
|
|
|
|
|
ansible.builtin.debug:
|
|
|
|
|
msg: "Warning!! {{ required_mount }} doesn't exist. This is a manual task"
|
|
|
|
|
|
|
|
|
|
- name: "1.1.8.1 | AUDIT | Ensure separate partition exists for /home | Present"
|
2023-09-21 15:07:52 +01:00
|
|
|
ansible.builtin.import_tasks:
|
2023-09-21 15:35:35 +01:00
|
|
|
file: warning_facts.yml
|
2023-09-18 09:51:56 +01:00
|
|
|
when: rhel9cis_1_8_1_1_mount_check.rc == 1
|
2023-01-13 11:05:25 +00:00
|
|
|
|
2023-01-09 16:29:47 +00:00
|
|
|
vars:
|
2023-01-13 11:05:25 +00:00
|
|
|
warn_control_id: '1.1.8.1'
|
2022-03-30 11:02:30 +01:00
|
|
|
when:
|
2023-01-09 16:29:47 +00:00
|
|
|
- rhel9cis_rule_1_1_8_1
|
2022-03-30 11:02:30 +01:00
|
|
|
tags:
|
|
|
|
|
- level1-server
|
|
|
|
|
- level1-workstation
|
2023-01-09 16:29:47 +00:00
|
|
|
- audit
|
2022-03-30 11:02:30 +01:00
|
|
|
- mounts
|
|
|
|
|
- rule_1.1.8.1
|
2023-01-09 16:29:47 +00:00
|
|
|
- skip_ansible_lint
|
|
|
|
|
|
|
|
|
|
- name: |
|
|
|
|
|
"1.1.8.2 | PATCH | Ensure nodev option set on /dev/shm partition | Set nodev option
|
|
|
|
|
1.1.8.3 | PATCH | Ensure noexec option set on /dev/shm partition | Set nosuid option
|
|
|
|
|
1.1.8.4 | PATCH | Ensure nosuid option set on /dev/shm partition | Set noexec option"
|
2023-04-10 13:48:47 -04:00
|
|
|
ansible.posix.mount:
|
2023-01-09 16:29:47 +00:00
|
|
|
name: /dev/shm
|
|
|
|
|
src: tmpfs
|
|
|
|
|
fstype: tmpfs
|
|
|
|
|
state: mounted
|
|
|
|
|
opts: defaults,{% if rhel9cis_rule_1_1_8_2 %}nodev,{% endif %}{% if rhel9cis_rule_1_1_8_3 %}noexec,{% endif %}{% if rhel9cis_rule_1_1_8_4 %}nosuid{% endif %}
|
2023-01-13 12:10:18 +00:00
|
|
|
notify: Change_requires_reboot
|
2023-01-09 16:29:47 +00:00
|
|
|
when:
|
|
|
|
|
- rhel9cis_rule_1_1_8_2 or
|
|
|
|
|
rhel9cis_rule_1_1_8_3 or
|
|
|
|
|
rhel9cis_rule_1_1_8_4
|
|
|
|
|
tags:
|
|
|
|
|
- level1-server
|
|
|
|
|
- level1-workstation
|
|
|
|
|
- patch
|
|
|
|
|
- mounts
|
2022-03-30 11:02:30 +01:00
|
|
|
- rule_1.1.8.2
|
|
|
|
|
- rule_1.1.8.3
|
2023-01-09 16:29:47 +00:00
|
|
|
- rule_1.1.8.4
|