ansible/roles/logrotate/tasks/main.yml

29 lines
507 B
YAML
Raw Normal View History

2021-01-23 14:25:35 +01:00
---
2021-01-23 14:41:25 +01:00
- name: Install logrotate
apt:
2021-03-30 07:45:52 +02:00
name: logrotate
state: present
- name: Create rsyslog configuration directory
file:
path: /etc/rsyslog.d
owner: root
group: root
mode: u=rwx,g=rx,o=rx
2021-01-23 14:25:35 +01:00
- name: Configure logrotate
template:
src: logrotate.conf
dest: /etc/logrotate.conf
2021-01-23 14:25:35 +01:00
owner: root
2021-01-23 15:59:03 +01:00
group: root
mode: u=rwx,g=r,o=r
notify: Reload logrotate
2021-01-23 14:25:35 +01:00
- name: Enable logrotate service
systemd:
name: logrotate.service
2021-01-23 14:25:35 +01:00
enabled: true
state: started
...