Files
ansible/roles/restic/tasks/install.yml
2025-01-22 17:09:03 +01:00

26 lines
570 B
YAML

---
- name: Install prerequisites
ansible.builtin.package:
name: fuse
state: present
update_cache: true
- name: Download restic
ansible.builtin.get_url:
url: "{{ restic_download_url }}"
dest: "/tmp"
mode: "0o644"
- name: Uncompress restic
ansible.builtin.shell:
cmd: "bzip2 -dc /tmp/restic_{{ restic_version }}_{{ restic_system }}_{{ restic_architecture }}.bz2 > {{ restic_path }}"
changed_when: true
- name: Check restic exe
ansible.builtin.file:
path: "{{ restic_path }}"
mode: "0o755"
owner: root
group: root