Merge pull request #41 from ansible-lockdown/May_25_updates

May 25 updates
This commit is contained in:
uk-bolly 2025-05-13 13:35:37 +01:00 committed by GitHub
commit ffba24432a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 12 additions and 8 deletions

View File

@ -24,6 +24,7 @@
![Issues Open](https://img.shields.io/github/issues-raw/ansible-lockdown/UBUNTU24-CIS?label=Open%20Issues) ![Issues Open](https://img.shields.io/github/issues-raw/ansible-lockdown/UBUNTU24-CIS?label=Open%20Issues)
![Issues Closed](https://img.shields.io/github/issues-closed-raw/ansible-lockdown/UBUNTU24-CIS?label=Closed%20Issues&&color=success) ![Issues Closed](https://img.shields.io/github/issues-closed-raw/ansible-lockdown/UBUNTU24-CIS?label=Closed%20Issues&&color=success)
![Pull Requests](https://img.shields.io/github/issues-pr/ansible-lockdown/UBUNTU24-CIS?label=Pull%20Requests) ![Pull Requests](https://img.shields.io/github/issues-pr/ansible-lockdown/UBUNTU24-CIS?label=Pull%20Requests)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
![License](https://img.shields.io/github/license/ansible-lockdown/UBUNTU24-CIS?label=License) ![License](https://img.shields.io/github/license/ansible-lockdown/UBUNTU24-CIS?label=License)

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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'