29 lines
689 B
YAML
29 lines
689 B
YAML
---
|
|
|
|
- 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: "{{ restic_exe_group }}"
|
|
|
|
- name: Create cache dir
|
|
ansible.builtin.file:
|
|
name: "{{ restic_cache_dir }}"
|
|
state: directory
|
|
owner: root
|
|
group: "{{ restic_exe_group }}"
|
|
mode: "0o700"
|
|
when: restic_cache_dir | length > 0
|