2020-12-14 15:50:39 +01:00
|
|
|
---
|
2023-10-22 20:33:44 +02:00
|
|
|
- name: Create /var/log/restic/
|
2020-12-14 15:50:39 +01:00
|
|
|
become: true
|
2021-05-11 00:14:17 +02:00
|
|
|
ansible.builtin.file:
|
2020-12-14 15:50:39 +01:00
|
|
|
path: /var/log/restic
|
|
|
|
state: directory
|
|
|
|
recurse: true
|
|
|
|
group: "{{ restic_archiver__owner }}"
|
|
|
|
owner: "{{ restic_archiver__group }}"
|
|
|
|
mode: 0750
|
|
|
|
|
2023-10-22 20:33:44 +02:00
|
|
|
- name: Install logrotate
|
2020-12-14 15:50:39 +01:00
|
|
|
become: true
|
2021-05-11 00:14:17 +02:00
|
|
|
ansible.builtin.package:
|
2020-12-14 15:50:39 +01:00
|
|
|
name: logrotate
|
|
|
|
state: present
|
|
|
|
when: restic_archiver__logrotate | bool
|
|
|
|
|
2023-10-22 20:33:44 +02:00
|
|
|
- name: Create logrotate config
|
2020-12-14 15:50:39 +01:00
|
|
|
become: true
|
2021-05-11 00:14:17 +02:00
|
|
|
ansible.builtin.copy:
|
2020-12-14 15:50:39 +01:00
|
|
|
src: files/logrotate.conf
|
|
|
|
dest: /etc/logrotate.d/restic
|
|
|
|
group: "{{ restic_archiver__owner }}"
|
|
|
|
owner: "{{ restic_archiver__group }}"
|
|
|
|
mode: 0644
|
|
|
|
when: restic_archiver__logrotate | bool
|