36 lines
712 B
YAML
36 lines
712 B
YAML
---
|
|
# handlers file for borgmatic
|
|
|
|
- name: Apply installation
|
|
ansible.builtin.command:
|
|
argv:
|
|
- /usr/bin/rpm-ostree
|
|
- apply-live
|
|
become: true
|
|
|
|
- name: Initialize repository
|
|
ansible.builtin.command:
|
|
argv:
|
|
- "{{ which_borgmatic.stdout }}"
|
|
- init
|
|
- --encryption
|
|
- repokey
|
|
when: repo_infos | length == 0
|
|
become: true
|
|
loop: "{{ borgmatic_repositories }}"
|
|
|
|
- name: Restore repository
|
|
ansible.builtin.command:
|
|
argv:
|
|
- "{{ which_borgmatic.stdout }}"
|
|
- extract
|
|
- --archive
|
|
- latest
|
|
- --destination
|
|
- /
|
|
when:
|
|
- repo_infos | length > 0
|
|
- borgmatic_restore_first
|
|
become: true
|
|
loop: "{{ borgmatic_repositories }}"
|