34 lines
930 B
YAML
34 lines
930 B
YAML
---
|
|
- name: Install fuse (to mount repositories)
|
|
apt:
|
|
name: fuse
|
|
|
|
- name: Install bzip2 (to install restic)
|
|
apt:
|
|
name: bzip2
|
|
|
|
- name: Install pigz (to compress db dumps)
|
|
apt:
|
|
name: pigz
|
|
|
|
- name: Download restic
|
|
ansible.builtin.get_url:
|
|
url: "https://github.com/restic/restic/releases/download/v{{ restic_version }}/restic_{{ restic_version }}_linux_{{ ansible_architecture }}.bz2"
|
|
dest: "/tmp/restic_{{ restic_version }}_linux_amd64.bz2"
|
|
|
|
- name: Extract restic
|
|
command: "bzip2 -d /tmp/restic_{{ restic_version }}_linux_amd64.bz2"
|
|
args:
|
|
creates: "/tmp/restic_{{ restic_version }}_linux_amd64"
|
|
|
|
- name: Install restic
|
|
ansible.builtin.copy:
|
|
remote_src: true
|
|
src: "/tmp/restic_{{ restic_version }}_linux_amd64"
|
|
dest: "{{ restic_path }}"
|
|
mode: 0755
|
|
|
|
- name: Remove downloaded file
|
|
ansible.builtin.file:
|
|
path: "/tmp/restic_{{ restic_version }}_linux_amd64"
|
|
state: absent
|