2022-06-25 21:32:29 +00:00
|
|
|
---
|
|
|
|
- name: Initialize tempfolder
|
|
|
|
ansible.builtin.tempfile:
|
|
|
|
state: directory
|
|
|
|
register: archive
|
|
|
|
|
2022-06-26 19:20:16 +00:00
|
|
|
- name: Download & extract archived static binary
|
2022-06-25 21:32:29 +00:00
|
|
|
ansible.builtin.unarchive:
|
|
|
|
src: "{{ item.url }}"
|
|
|
|
dest: "{{ archive.path }}"
|
|
|
|
remote_src: yes
|
|
|
|
extra_opts: "{{ item.extra_opts | default(omit) }}"
|
|
|
|
|
|
|
|
- name: Install extracted binary
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: "{{ archive.path }}/{{ item.filename }}"
|
|
|
|
dest: /usr/local/bin/{{ item.filename }}
|
2022-06-25 21:57:55 +00:00
|
|
|
remote_src: yes
|
2022-06-25 21:32:29 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0755
|
|
|
|
|
|
|
|
- name: Cleanup tempfolder
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ archive.path }}"
|
|
|
|
state: absent
|
|
|
|
when: archive.path is defined
|