ansible-restic/tasks/install.yml
angristan 5462e8dee5 feat(systemd): use service only for backups
And other cleanup/var improvements
2019-03-21 10:33:44 +01:00

31 lines
795 B
YAML

---
- name: Install fuse (to mount repositories)
apt:
name: fuse
- name: Install bzip2 (to install restic)
apt:
name: bzip2
- name: Download restic
get_url:
url: 'https://github.com/restic/restic/releases/download/v{{ restic_version }}/restic_{{ restic_version }}_linux_amd64.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
copy:
remote_src: true
src: '/tmp/restic_{{ restic_version }}_linux_amd64'
dest: "{{ restic_path }}"
mode: 0755
- name: Remove downloaded file
file:
path: '/tmp/restic_{{ restic_version }}_linux_amd64'
state: absent