ansible-role-borgbackup/tasks/05_configure.yml
SebClem d1219b63fb
Some checks failed
Test / test (push) Failing after 1m55s
Add validate to config
2024-05-17 10:05:08 +02:00

20 lines
562 B
YAML
Executable File

---
- name: Add Borgmatic config file
block:
- name: Ensure /etc/borgmatic exists
ansible.builtin.file:
path: /etc/borgmatic
state: directory
mode: "0700"
owner: "{{ borg_user }}"
group: "{{ borg_group }}"
- name: Add Borgmatic configuration
ansible.builtin.template:
src: config.yaml.j2
dest: "/etc/borgmatic/{{ borgmatic_config_name }}"
mode: "0600"
owner: "{{ borg_user }}"
group: "{{ borg_group }}"
validate: borgmatic config validate --config %s