mirror of
https://github.com/roles-ansible/ansible_role_restic_archiver.git
synced 2024-08-16 10:09:49 +02:00
27 lines
666 B
YAML
27 lines
666 B
YAML
---
|
|
- name: Create /var/log/restic/
|
|
become: true
|
|
ansible.builtin.file:
|
|
path: /var/log/restic
|
|
state: directory
|
|
recurse: true
|
|
group: "{{ restic_archiver__owner }}"
|
|
owner: "{{ restic_archiver__group }}"
|
|
mode: 0750
|
|
|
|
- name: Install logrotate
|
|
become: true
|
|
ansible.builtin.package:
|
|
name: logrotate
|
|
state: present
|
|
when: restic_archiver__logrotate | bool
|
|
|
|
- name: Create logrotate config
|
|
become: true
|
|
ansible.builtin.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
|