download_file for kata (#7393)

This commit is contained in:
Samuel Liu
2021-03-23 16:39:36 +08:00
committed by GitHub
parent efa180392b
commit 12873f916b
3 changed files with 38 additions and 12 deletions

View File

@@ -1,7 +1,4 @@
---
kata_containers_version: 1.11.3
kata_containers_release_url: https://github.com/kata-containers/runtime/releases/download/{{ kata_containers_version }}/kata-static-{{ kata_containers_version }}-{{ ansible_architecture }}.tar.xz
kata_containers_dir: /opt/kata
kata_containers_config_dir: /etc/kata-containers
kata_containers_containerd_bin_dir: /usr/local/bin

View File

@@ -1,24 +1,29 @@
---
- name: kata-containers | Download kata binary
include_tasks: "../../../download/tasks/download_file.yml"
vars:
download: "{{ download_defaults | combine(downloads.kata_containers) }}"
- name: Download artifacts
- name: kata-containers | Copy kata-containers binary
unarchive:
src: "{{ kata_containers_release_url }}"
dest: /
remote_src: true
src: "{{ local_release_dir }}/kata-static-{{ kata_containers_version }}-{{ image_arch }}.tar.xz"
dest: "/"
mode: 0755
remote_src: yes
- name: Create config directory
- name: kata-containers | Create config directory
file:
path: "{{ kata_containers_config_dir }}"
state: directory
- name: Set configuration
- name: kata-containers | Set configuration
template:
src: "{{ item }}.j2"
dest: "{{ kata_containers_config_dir }}/{{ item }}"
with_items:
- configuration-qemu.toml
- name: Set containerd bin
- name: kata-containers | Set containerd bin
vars:
shim: "{{ item }}"
template: