Fix etcdctl copy operation (#10230)

Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
pull/10176/head
ERIK 2023-06-16 19:18:19 +08:00 committed by GitHub
parent 0f0991b145
commit 54859cb814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -38,11 +38,11 @@
- block:
- name: Copy etcdctl script to host
shell: "{{ docker_bin_dir }}/docker exec \"$({{ docker_bin_dir }}/docker ps -qf ancestor={{ etcd_image_repo }}:{{ etcd_image_tag }})\" cp /usr/local/bin/etcdctl {{ etcd_data_dir }}/etcdctl"
shell: "{{ docker_bin_dir }}/docker cp \"$({{ docker_bin_dir }}/docker ps -qf ancestor={{ etcd_image_repo }}:{{ etcd_image_tag }})\":/usr/local/bin/etcdctl {{ etcd_data_dir }}/etcdctl"
when: container_manager == "docker"
- name: Copy etcdctl script to host
shell: "{{ bin_dir }}/crictl exec \"$({{ bin_dir }}/crictl ps -q --image {{ etcd_image_repo }}:{{ etcd_image_tag }})\" cp /usr/local/bin/etcdctl {{ etcd_data_dir }}/etcdctl"
shell: "{{ bin_dir }}/nerdctl cp \"$({{ bin_dir }}/crictl ps -q --image {{ etcd_image_repo }}:{{ etcd_image_tag }})\":/usr/local/bin/etcdctl {{ etcd_data_dir }}/etcdctl"
when: container_manager in ['crio', 'containerd']
- name: Copy etcdctl to {{ bin_dir }}