Merge pull request #41 from ansible-lockdown/May_25_updates
May 25 updates
This commit is contained in:
commit
ffba24432a
|
@ -24,6 +24,7 @@
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
[](https://github.com/pre-commit/pre-commit)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
listen: "Remount /tmp"
|
listen: "Remount /tmp"
|
||||||
|
|
||||||
- name: "Remounting /tmp systemd"
|
- name: "Remounting /tmp systemd"
|
||||||
|
when: ubtu24cis_tmp_svc
|
||||||
vars:
|
vars:
|
||||||
mount_point: '/tmp'
|
mount_point: '/tmp'
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
|
|
|
@ -38,7 +38,9 @@
|
||||||
sudo_password_rule: ubtu24cis_rule_5_2_4 # pragma: allowlist secret
|
sudo_password_rule: ubtu24cis_rule_5_2_4 # pragma: allowlist secret
|
||||||
|
|
||||||
- name: Ensure root password is set
|
- name: Ensure root password is set
|
||||||
when: ubtu24cis_rule_5_4_2_4
|
when:
|
||||||
|
- ubtu24cis_section5
|
||||||
|
- ubtu24cis_rule_5_4_2_4
|
||||||
tags: always
|
tags: always
|
||||||
block:
|
block:
|
||||||
- name: Ensure root password is set
|
- name: Ensure root password is set
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
register: discovered_var_mount
|
register: discovered_var_mount
|
||||||
|
|
||||||
- name: "1.1.2.4.1 | AUDIT | Ensure /var is a separate partition | Absent"
|
- name: "1.1.2.4.1 | AUDIT | Ensure /var is a separate partition | Absent"
|
||||||
when: discovered_dev_shm_mount is undefined
|
when: discovered_var_mount is undefined
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "Warning!! {{ required_mount }} is not mounted on a separate partition"
|
msg: "Warning!! {{ required_mount }} is not mounted on a separate partition"
|
||||||
|
|
||||||
- name: "1.1.2.4.1 | AUDIT | Ensure /var is a separate partition | Present"
|
- name: "1.1.2.4.1 | AUDIT | Ensure /var is a separate partition | Present"
|
||||||
when: discovered_dev_shm_mount is undefined
|
when: discovered_var_mount is undefined
|
||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: warning_facts.yml
|
file: warning_facts.yml
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
- NIST800-53R5_SI-2
|
- NIST800-53R5_SI-2
|
||||||
- patch
|
- patch
|
||||||
block:
|
block:
|
||||||
- name: "1.2.2.1 | PATCH | Ensure updates, patches, and additional security software are installedi | Update"
|
- name: "1.2.2.1 | PATCH | Ensure updates, patches, and additional security software are installed | Update"
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "*"
|
name: "*"
|
||||||
state: latest
|
state: latest
|
||||||
|
|
|
@ -672,7 +672,7 @@
|
||||||
- rule_2.1.21
|
- rule_2.1.21
|
||||||
- NIST800-53R5_CM-7
|
- NIST800-53R5_CM-7
|
||||||
vars:
|
vars:
|
||||||
warn_control_id: '2.2.21'
|
warn_control_id: '2.1.21'
|
||||||
block:
|
block:
|
||||||
- name: "2.1.21 | PATCH | Ensure mail transfer agents are configured for local-only mode | Make changes if exim4 installed"
|
- name: "2.1.21 | PATCH | Ensure mail transfer agents are configured for local-only mode | Make changes if exim4 installed"
|
||||||
when: "'exim4' in ansible_facts.packages"
|
when: "'exim4' in ansible_facts.packages"
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item }}.j2"
|
src: "{{ item }}.j2"
|
||||||
dest: "/{{ item }}"
|
dest: "/{{ item }}"
|
||||||
mode: 'go-r'
|
mode: 'g=r,o-rwx'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: "{% if ubtu24cis_rule_2_3_3_2 %}_chrony{% else %}root{% endif %}"
|
||||||
loop:
|
loop:
|
||||||
- etc/chrony/sources.d/pool.sources
|
- etc/chrony/sources.d/pool.sources
|
||||||
- etc/chrony/sources.d/server.sources
|
- etc/chrony/sources.d/server.sources
|
||||||
|
|
|
@ -154,5 +154,5 @@
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /etc/cron.allow
|
path: /etc/cron.allow
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: '{{ (discovered_cron_allow_status.stat.gr_name == "crontab") | ternary(omit,"root") }}'
|
||||||
mode: 'u-x,g-wx,o-rwx'
|
mode: 'u-x,g-wx,o-rwx'
|
||||||
|
|
Loading…
Reference in New Issue