Skip to content

Commit

Permalink
Fix etcdctl copy operation (kubernetes-sigs#10230)
Browse files Browse the repository at this point in the history
Signed-off-by: bo.jiang <[email protected]>
  • Loading branch information
ErikJiang authored and maciej-markowski committed Jun 23, 2023
1 parent cbb7294 commit 89ae49c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/etcdctl/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 89ae49c

Please sign in to comment.