forked from kubernetes-sigs/kubespray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Download crun using download_file.yml (kubernetes-sigs#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
- Loading branch information
Showing
3 changed files
with
36 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters