borgmatic_config: Initialize repos

This commit is contained in:
uumas
2025-09-14 02:58:15 +03:00
parent e4c8a2343a
commit 7617edfdde
2 changed files with 7 additions and 0 deletions

View File

@@ -1,4 +1,10 @@
---
- name: Initialize borgmatic
ansible.builtin.command:
cmd: borgmatic init --encryption repokey
register: _borgmatic_init_out
changed_when: _borgmatic_init_out.stdout | length > 0
- name: Restart borgmatic timer {{ borgmatic_config_name }}
ansible.builtin.systemd_service:
name: "borgmatic@{{ borgmatic_config_name }}.timer"

View File

@@ -18,6 +18,7 @@
dest: /etc/borgmatic.d/{{ borgmatic_config_name }}.yaml
mode: "0600"
no_log: true
notify: Initialize borgmatic
- name: Add systemd timer for borgmatic {{ borgmatic_config_name }}
ansible.builtin.template: