mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
fix: Change offline package directory. (#2392)
Signed-off-by: joyceliu <joyceliu@yunify.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
parent
658023cc8c
commit
7eba91a70e
|
|
@ -9,4 +9,4 @@
|
|||
when: .image_manifests | default list | len | lt 0
|
||||
- name: Export artifact
|
||||
command: |
|
||||
cd {{ .work_dir }} && tar -czvf kubekey-artifact.tar.gz kubekey/
|
||||
cd {{ .work_dir }}/kubekey && tar -czvf ../kubekey-artifact.tar.gz *
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@
|
|||
|
||||
- name: Check binaries for calicoctl
|
||||
command: |
|
||||
artifact_name={{ get .artifact.artifact_url.calicoctl .item | splitList "/" | last }}
|
||||
artifact_name=calicoctl
|
||||
artifact_path={{ .work_dir }}/kubekey/cni/{{ .calico_version }}/{{ .item }}
|
||||
if [ ! -f $artifact_path/$artifact_name ]; then
|
||||
mkdir -p $artifact_path
|
||||
|
|
|
|||
|
|
@ -9,8 +9,9 @@
|
|||
- name: Extract artifact to work_dir
|
||||
tags: ["always"]
|
||||
command: |
|
||||
if [ ! -f "{{ .artifact_file }}" ]; then
|
||||
tar -zxvf {{ .artifact_file }} -C {{ .work_dir }}
|
||||
if [ -f "{{ .artifact_file }}" ]; then
|
||||
mkdir -p {{ .work_dir }}/kubekey
|
||||
tar -zxvf {{ .artifact_file }} -C {{ .work_dir }}/kubekey
|
||||
fi
|
||||
when: and .artifact_file (ne .artifact_file "")
|
||||
|
||||
|
|
|
|||
|
|
@ -63,3 +63,30 @@
|
|||
dest: /etc/systemd/system/kubelet.service
|
||||
- name: Register kubelet service
|
||||
command: systemctl daemon-reload && systemctl enable kubelet.service
|
||||
|
||||
- name: Check if calicoctl is installed
|
||||
ignore_errors: true
|
||||
command: calicoctl --version
|
||||
register: calicoctl_install_version
|
||||
- name: Install calicoctl
|
||||
when:
|
||||
- and .calico_version (ne .calico_version "")
|
||||
- |
|
||||
or (.calicoctl_install_version.stderr | ne "") (.calicoctl_install_version.stdout | contains (printf "Client Version: %s" .calico_version) | not)
|
||||
block:
|
||||
- name: Sync calicoctl to remote
|
||||
copy:
|
||||
src: |
|
||||
{{ .work_dir }}/kubekey/cni/{{ .calico_version }}/{{ .binary_type.stdout }}/calicoctl
|
||||
dest: /usr/local/bin/calicoctl
|
||||
mode: 0755
|
||||
- name: Sync kubelet env to remote
|
||||
template:
|
||||
src: kubeadm/kubelet.env
|
||||
dest: /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
|
||||
- name: Sync kubelet service to remote
|
||||
copy:
|
||||
src: kubelet.service
|
||||
dest: /etc/systemd/system/kubelet.service
|
||||
- name: Register kubelet service
|
||||
command: systemctl daemon-reload && systemctl enable kubelet.service
|
||||
|
|
|
|||
Loading…
Reference in New Issue