blob: 12a92f59c3874dbdf803f22447c7d810899bf329 (
plain) (
blame)
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
|
- name: Install atop
ansible.builtin.package:
name:
- atop
state: present
- name: Setup per-minute atop snapshot
ansible.builtin.lineinfile:
dest: /etc/default/atop
state: present
regexp: '^#?LOGINTERVAL='
line: 'LOGINTERVAL=60'
owner: root
group: root
mode: u+rw,g+r,o+r
notify:
- Restart atop
- name: Setup logrotate to save 7 days of logs for atop
ansible.builtin.lineinfile:
dest: /etc/default/atop
state: present
regexp: '^#?LOGGENERATIONS='
line: 'LOGGENERATIONS=7'
owner: root
group: root
mode: u+rw,g+r,o+r
notify:
- Restart atop
- name: Enable atop systemd service and logrotate timer
ansible.builtin.service:
name: '{{ item }}'
enabled: true
state: started
loop:
- atop
- atop-rotate.timer
|