Refactored

This commit is contained in:
Frank Dornheim 2023-03-10 18:14:40 +01:00
parent 03c9f4ff11
commit d992c83e49

23
tasks/05_configure.yml Executable file
View File

@ -0,0 +1,23 @@
---
- name: Configure borgbackup
when:
- install_backup is not defined or install_backup
tags:
- install_backup
block:
- name: Ensure /etc/borgmatic exists
ansible.builtin.file:
path: /etc/borgmatic
state: directory
mode: "0700"
owner: "{{ borgbackup_user }}"
group: "{{ borgbackup_group }}"
- name: Add Borgmatic configuration
ansible.builtin.template:
src: config.yaml.j2
dest: "/etc/borgmatic/{{ borgmatic_config_name }}"
mode: "0600"
owner: "{{ borgbackup_user }}"
group: "{{ borgbackup_group }}"
...