second commit
This commit is contained in:
36
ansible/roles/os_hardening/tasks/cron_at.yml
Normal file
36
ansible/roles/os_hardening/tasks/cron_at.yml
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
# CIS 2.4.1.x: cron/at auf autorisierte Nutzer beschraenken.
|
||||
|
||||
- name: cron.deny/at.deny entfernen (deny-Listen sind fehleranfaelliger als allow-Listen)
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- /etc/cron.deny
|
||||
- /etc/at.deny
|
||||
|
||||
- name: cron.allow / at.allow auf root und den Jumphost-Service-User beschraenken
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
content: |
|
||||
root
|
||||
loop:
|
||||
- /etc/cron.allow
|
||||
- /etc/at.allow
|
||||
|
||||
- name: Berechtigungen der cron-Verzeichnisse absichern (CIS 2.4.1.7-2.4.1.11)
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0700"
|
||||
loop:
|
||||
- /etc/cron.d
|
||||
- /etc/cron.daily
|
||||
- /etc/cron.hourly
|
||||
- /etc/cron.monthly
|
||||
- /etc/cron.weekly
|
||||
ignore_errors: true # nicht jedes Basis-Image legt alle Verzeichnisse an
|
||||
Reference in New Issue
Block a user