borgmatic_config: Initialize repos
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user