Danny Bessems
8e2df51993
All checks were successful
continuous-integration/drone/push Build is passing
32 lines
772 B
YAML
32 lines
772 B
YAML
---
|
|
- name: Initialize tempfolder
|
|
ansible.builtin.tempfile:
|
|
state: directory
|
|
register: archive
|
|
|
|
- name: Download & extract archived static binary
|
|
ansible.builtin.unarchive:
|
|
src: "{{ item.url }}"
|
|
dest: "{{ archive.path }}"
|
|
remote_src: yes
|
|
extra_opts: "{{ item.extra_opts | default(omit) }}"
|
|
register: staticbinary_download
|
|
retries: 5
|
|
delay: 5
|
|
until: staticbinary_download is not failed
|
|
|
|
- name: Install extracted binary
|
|
ansible.builtin.copy:
|
|
src: "{{ archive.path }}/{{ item.filename }}"
|
|
dest: /usr/local/bin/{{ item.filename }}
|
|
remote_src: yes
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
|
|
- name: Cleanup tempfolder
|
|
ansible.builtin.file:
|
|
path: "{{ archive.path }}"
|
|
state: absent
|
|
when: archive.path is defined
|