mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-01 01:28:11 -03:30
Download crun using download_file.yml (#7370)
* Add crun download_url and checksum * Change versioning format to crun native versioning * Download crun using download_file.yml * Get crun version from download defaults * Delegate crun binary copy task to crun role
This commit is contained in:
committed by
GitHub
parent
ead8a4e4de
commit
811f546ea6
@@ -1,5 +1,3 @@
|
||||
---
|
||||
|
||||
crun_version: 0.18
|
||||
crun_release_url: https://github.com/containers/crun/releases/download/{{ crun_version }}/crun-{{ crun_version }}-linux-{{ host_architecture }}
|
||||
crun_bin_dir: /usr/bin/
|
||||
|
||||
@@ -1,24 +1,12 @@
|
||||
---
|
||||
- name: crun | Download crun binary
|
||||
include_tasks: "../../../download/tasks/download_file.yml"
|
||||
vars:
|
||||
download: "{{ download_defaults | combine(downloads.crun) }}"
|
||||
|
||||
- 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"
|
||||
get_attributes: no
|
||||
get_checksum: no
|
||||
get_mime: no
|
||||
register: crun_stat
|
||||
|
||||
# TODO: use download_file.yml
|
||||
- name: Download binary
|
||||
get_url:
|
||||
url: "{{ crun_release_url }}"
|
||||
- name: Copy crun binary from download dir
|
||||
copy:
|
||||
src: "{{ local_release_dir }}/crun"
|
||||
dest: "{{ crun_bin_dir }}/crun"
|
||||
mode: '0755'
|
||||
when: not crun_stat.stat.exists
|
||||
environment: "{{ proxy_env }}"
|
||||
mode: 0755
|
||||
remote_src: true
|
||||
|
||||
Reference in New Issue
Block a user