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 }}
|
- name: Restart borgmatic timer {{ borgmatic_config_name }}
|
||||||
ansible.builtin.systemd_service:
|
ansible.builtin.systemd_service:
|
||||||
name: "borgmatic@{{ borgmatic_config_name }}.timer"
|
name: "borgmatic@{{ borgmatic_config_name }}.timer"
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
dest: /etc/borgmatic.d/{{ borgmatic_config_name }}.yaml
|
dest: /etc/borgmatic.d/{{ borgmatic_config_name }}.yaml
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
notify: Initialize borgmatic
|
||||||
|
|
||||||
- name: Add systemd timer for borgmatic {{ borgmatic_config_name }}
|
- name: Add systemd timer for borgmatic {{ borgmatic_config_name }}
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
|||||||
Reference in New Issue
Block a user