Fix restic download links (#10)

Co-authored-by: Christian Scheb <christian.scheb@stackfuel.com>
This commit is contained in:
Christian Scheb 2024-02-20 18:28:36 +01:00 committed by GitHub
parent e17443ad10
commit fd989a95b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 6 deletions

View file

@ -25,3 +25,8 @@ restic_ssh_private_key_path: "/root/.ssh/backup"
restic_systemd_timer_on_calender: "*-*-* 03:00:00" restic_systemd_timer_on_calender: "*-*-* 03:00:00"
restic_systemd_timer_randomized_delay_sec: 0 restic_systemd_timer_randomized_delay_sec: 0
restic_arch_map:
i386: '386'
x86_64: 'amd64'
aarch64: 'arm64'

View file

@ -13,23 +13,23 @@
- name: Download restic - name: Download restic
ansible.builtin.get_url: ansible.builtin.get_url:
url: "https://github.com/restic/restic/releases/download/v{{ restic_version }}/restic_{{ restic_version }}_linux_{{ ansible_architecture }}.bz2" url: "https://github.com/restic/restic/releases/download/v{{ restic_version }}/restic_{{ restic_version }}_linux_{{ restic_arch_map[ansible_architecture] | default(ansible_architecture) }}.bz2"
dest: "/tmp/restic_{{ restic_version }}_linux_amd64.bz2" dest: "/tmp/restic_{{ restic_version }}_linux_{{ restic_arch_map[ansible_architecture] | default(ansible_architecture) }}.bz2"
mode: "0644" mode: "0644"
- name: Extract restic - name: Extract restic
ansible.builtin.command: "bzip2 -d /tmp/restic_{{ restic_version }}_linux_amd64.bz2" ansible.builtin.command: "bzip2 -d /tmp/restic_{{ restic_version }}_linux_{{ restic_arch_map[ansible_architecture] | default(ansible_architecture) }}.bz2"
args: args:
creates: "/tmp/restic_{{ restic_version }}_linux_amd64" creates: "/tmp/restic_{{ restic_version }}_linux_{{ restic_arch_map[ansible_architecture] | default(ansible_architecture) }}"
- name: Install restic - name: Install restic
ansible.builtin.copy: ansible.builtin.copy:
remote_src: true remote_src: true
src: "/tmp/restic_{{ restic_version }}_linux_amd64" src: "/tmp/restic_{{ restic_version }}_linux_{{ restic_arch_map[ansible_architecture] | default(ansible_architecture) }}"
dest: "{{ restic_path }}" dest: "{{ restic_path }}"
mode: "0755" mode: "0755"
- name: Remove downloaded file - name: Remove downloaded file
ansible.builtin.file: ansible.builtin.file:
path: "/tmp/restic_{{ restic_version }}_linux_amd64" path: "/tmp/restic_{{ restic_version }}_linux_{{ restic_arch_map[ansible_architecture] | default(ansible_architecture) }}"
state: absent state: absent