2025-03-25 21:26:44 +01:00

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 }}"