1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_restic_archiver.git synced 2024-08-16 10:09:49 +02:00
ansible_role_restic_archiver/tasks/logs.yml
2020-12-14 15:50:39 +01:00

27 lines
618 B
YAML

---
- name: create /var/log/restic/
become: true
file:
path: /var/log/restic
state: directory
recurse: true
group: "{{ restic_archiver__owner }}"
owner: "{{ restic_archiver__group }}"
mode: 0750
- name: install logrotate
become: true
package:
name: logrotate
state: present
when: restic_archiver__logrotate | bool
- name: create logrotate config
become: true
copy:
src: files/logrotate.conf
dest: /etc/logrotate.d/restic
group: "{{ restic_archiver__owner }}"
owner: "{{ restic_archiver__group }}"
mode: 0644
when: restic_archiver__logrotate | bool