devolab-openshift/compress-logrotate.yml
2019-03-25 11:40:20 +01:00

12 lines
310 B
YAML

- hosts: all
become: true
tasks:
- name: decomment compress option in logrotate
lineinfile:
path: /etc/logrotate.conf
regexp: "^#compress"
line: "compress"
notify: force rotation
handlers:
- name: force rotation
command: logrotate -f /etc/logrotate.conf