forked from ansible-lockdown/RHEL9-CIS
v1.0.0 updates
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
4e004e7d88
commit
2634fabd41
18 changed files with 288 additions and 329 deletions
|
|
@ -3,7 +3,7 @@
|
|||
- name: "1.1.7.1 | AUDIT | Ensure separate partition exists for /home"
|
||||
block:
|
||||
- name: "1.1.7.1 | AUDIT | Ensure separate partition exists for /home | Absent"
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: "Warning!! {{ required_mount }} doesn't exist. This is a manual task"
|
||||
register: home_mount_absent
|
||||
changed_when: home_mount_absent.skipped is undefined
|
||||
|
|
@ -11,14 +11,14 @@
|
|||
- required_mount not in mount_names
|
||||
|
||||
- name: "1.1.7.1 | AUDIT | Ensure separate partition exists for /home | Warn Count"
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
control_number: "{{ control_number }} + [ 'rule_1.1.7.1' ]"
|
||||
warn_count: "{{ warn_count | int + 1 }}"
|
||||
when:
|
||||
- required_mount not in mount_names
|
||||
|
||||
- name: "1.1.7.1 | AUDIT | Ensure separate partition exists for /home | Present"
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: "Congratulations: {{ required_mount }} exists."
|
||||
register: home_mount_present
|
||||
when:
|
||||
|
|
@ -30,7 +30,6 @@
|
|||
tags:
|
||||
- level2-server
|
||||
- level2-workstation
|
||||
- automated
|
||||
- audit
|
||||
- mounts
|
||||
- rule_1.1.7.1
|
||||
|
|
@ -38,15 +37,13 @@
|
|||
|
||||
- name: |
|
||||
"1.1.7.2 | PATCH | Ensure nodev option set on /home partition
|
||||
1.1.7.3 | PATCH | Ensure nosuid option set on /home partition
|
||||
1.1.7.4 | PATCH | Ensure usrquota option set on /home partition
|
||||
1.1.7.5 | PATCH | Ensure grpquota option set on /home partition"
|
||||
mount:
|
||||
1.1.7.3 | PATCH | Ensure nosuid option set on /home partition"
|
||||
ansible.builtin.mount:
|
||||
name: /home
|
||||
src: "{{ item.device }}"
|
||||
fstype: "{{ item.fstype }}"
|
||||
state: present
|
||||
opts: defaults,{% if rhel9cis_rule_1_1_7_2 %}nodev,{% endif %}{% if rhel9cis_rule_1_1_7_3 %}nosuid,{% endif %}{% if rhel9cis_rule_1_1_7_4 %}usrquota,{% endif %}{% if rhel9cis_rule_1_1_7_5 %}grpquota{% endif %}
|
||||
opts: defaults,{% if rhel9cis_rule_1_1_7_2 %}nodev,{% endif %}{% if rhel9cis_rule_1_1_7_3 %}nosuid,{% endif %}
|
||||
with_items:
|
||||
- "{{ ansible_mounts }}"
|
||||
loop_control:
|
||||
|
|
@ -57,13 +54,10 @@
|
|||
- item.mount == "/home"
|
||||
- rhel9cis_rule_1_1_7_1
|
||||
- rhel9cis_rule_1_1_7_2 or
|
||||
rhel9cis_rule_1_1_7_3 or
|
||||
rhel9cis_rule_1_1_7_4 or
|
||||
rhel9cis_rule_1_1_7_5
|
||||
rhel9cis_rule_1_1_7_3
|
||||
tags:
|
||||
- level1-server
|
||||
- level1-workstation
|
||||
- automated
|
||||
- patch
|
||||
- mounts
|
||||
- rule_1.1.7.2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue