kubekey/builtin/core/roles/download/tasks/main.yaml
liujian 3885b443ac
fix: change builtin/core architectures (#2718)
Signed-off-by: redscholar <blacktiledhouse@gmail.com>
2025-08-22 21:59:40 +08:00

28 lines
873 B
YAML

---
- name: Artifact | Extract artifact archive to working directory
tags: ["always"]
command: |
if [ -f "{{ .download.artifact_file }}" ]; then
mkdir -p {{ .binary_dir }}
tar -zxvf {{ .artifact_file }} -C {{ .binary_dir }}
fi
when: .download.artifact_file | empty | not
- name: Artifact | Download required binaries and images
when: .download.artifact_file | empty
block:
# Download core binaries
- include_tasks: binary.yaml
# Download Helm and CNI binaries
- include_tasks: helm.yaml
tags: ["kubernetes"]
# Download remote images to the local images directory
- include_tasks: images.yaml
tags: ["kubernetes", "image_registry"]
- name: Artifact | Set ownership of working directory to sudo user
tags: ["always"]
ignore_errors: true
command: |
chown -R ${SUDO_UID}:${SUDO_GID} {{ .work_dir }}