From 90d6b6e399de8b9fa0248c3395ee50b1edd5102f Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 2 Jul 2019 16:10:12 +0300 Subject: [PATCH] Feat: Truncate Linux logs monthly Add monthly-truncate-logs.yml playbook. --- playbooks/monthly-truncate-logs.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 playbooks/monthly-truncate-logs.yml diff --git a/playbooks/monthly-truncate-logs.yml b/playbooks/monthly-truncate-logs.yml new file mode 100644 index 0000000..ad80bfe --- /dev/null +++ b/playbooks/monthly-truncate-logs.yml @@ -0,0 +1,7 @@ +- name: Truncate Linux logs monthly + hosts: "{{ hosts | default('all') }}" + gather_facts: false + tasks: + - name: Truncate mail logs + copy: dst="{{ item }}" content='' force=yes + loop: ['mail/procmail.log', 'mail/sent-mail'] -- 2.39.5