/
crontab.yml
57 lines (51 loc) · 978 Bytes
/
crontab.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
# CIS 1.4.1
# STIG 020030
# STIG 020040
- name: Ensure AIDE is installed
package:
name: '{{ aide_package }}'
state: present
# CIS 5.1.1
- name: "Ensure cron daemon is enabled"
service:
name: crond
enabled: yes
# CIS 1.4.2
- name: Configure Periodic Execution of AIDE
cron:
name: run AIDE check
minute: "5"
hour: "4"
weekday: "0"
user: root
job: /usr/sbin/aide --check
# CIS 5.1.2
# CIS 5.1.3
# CIS 5.1.4
# CIS 5.1.5
# CIS 5.1.6
# CIS 5.1.7
- name: Find cron files and directories
find:
paths:
- /etc
patterns:
- cron.hourly
- cron.daily
- cron.weekly
- cron.monthly
- cron.d
- crontab
- anacrontab
file_type: any
register: cron_directories
# CIS 5.1.8
- name: Ensure permissions on cron files and directories are configured
file:
path: "{{ item.path }}"
owner: root
group: root
mode: og-rwx
with_items: "{{ cron_directories.files }}"
...