2020-12-02 03:00:50 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Create binary destination folder
|
|
|
|
file:
|
|
|
|
mode: '0755'
|
|
|
|
state: directory
|
|
|
|
path: "{{ crun_bin_dir }}"
|
|
|
|
|
|
|
|
- name: Check if binary exists
|
|
|
|
stat:
|
|
|
|
path: "{{ crun_bin_dir }}/crun"
|
2021-02-10 21:36:59 +08:00
|
|
|
get_attributes: no
|
|
|
|
get_checksum: no
|
|
|
|
get_mime: no
|
2020-12-02 03:00:50 +08:00
|
|
|
register: crun_stat
|
|
|
|
|
2021-01-11 23:21:08 +08:00
|
|
|
# TODO: use download_file.yml
|
2020-12-02 03:00:50 +08:00
|
|
|
- name: Download binary
|
|
|
|
get_url:
|
|
|
|
url: "{{ crun_release_url }}"
|
|
|
|
dest: "{{ crun_bin_dir }}/crun"
|
|
|
|
mode: '0755'
|
|
|
|
when: not crun_stat.stat.exists
|
2021-01-11 23:21:08 +08:00
|
|
|
environment: "{{ proxy_env }}"
|