added downloading binary

This commit is contained in:
tolerryan
2024-10-18 13:19:17 -05:00
parent b0950e39df
commit 2f10b3f875
3 changed files with 26 additions and 0 deletions

View File

@@ -50,6 +50,9 @@
- name: Install-docker.yml - setting up docker
include: ../lib/install-docker.yml
- name: Install Restic and setup
include: ../lib/setup-restic.yml
- name: Write docker-compose.yml
ansible.builtin.copy:
content: "{{ docker_compose_definition }}"

View File

View File

@@ -126,3 +126,26 @@
group: users
mode: '0644'
- name: Download restic bz2 file
get_url:
url: "https://github.com/restic/restic/releases/download/v0.17.1/restic_0.17.1_linux_amd64.bz2"
dest: "/tmp/restic.bz2"
mode: '0755'
- name: Extract restic bz2 file
unarchive:
src: "/tmp/restic.bz2"
dest: "/tmp"
remote_src: yes
extra_opts: ["--strip-components=1"]
- name: Move restic to /usr/bin/
copy:
src: "/tmp/restic"
dest: "/usr/bin/restic"
remote_src: yes
- name: Make restic executable
command: chmod +x /usr/bin/restic
args:
creates: /usr/bin/restic