From: Oleg Broytman Date: Tue, 2 Jul 2019 13:10:12 +0000 (+0300) Subject: Feat: Truncate Linux logs monthly X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=90d6b6e399de8b9fa0248c3395ee50b1edd5102f;p=ansible.git Feat: Truncate Linux logs monthly Add monthly-truncate-logs.yml playbook. --- 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']