From 54859cb81415519e4d4833baf4dfe21c84f16a19 Mon Sep 17 00:00:00 2001 From: ERIK Date: Fri, 16 Jun 2023 19:18:19 +0800 Subject: [PATCH] Fix etcdctl copy operation (#10230) Signed-off-by: bo.jiang --- roles/etcdctl/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/etcdctl/tasks/main.yml b/roles/etcdctl/tasks/main.yml index fca078c4e..d046c9fb2 100644 --- a/roles/etcdctl/tasks/main.yml +++ b/roles/etcdctl/tasks/main.yml @@ -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 }}