forked from kubernetes-sigs/kubespray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install etcdutl file by default (kubernetes-sigs#10385)
- Loading branch information
1 parent
70ef25c
commit a2a531d
Showing
8 changed files
with
68 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
- name: Copy etcdctl and etcdutl binary from docker container | ||
command: sh -c "{{ docker_bin_dir }}/docker rm -f etcdxtl-binarycopy; | ||
{{ docker_bin_dir }}/docker create --name etcdxtl-binarycopy {{ etcd_image_repo }}:{{ etcd_image_tag }} && | ||
{{ docker_bin_dir }}/docker cp etcdxtl-binarycopy:/usr/local/bin/{{ item }} {{ bin_dir }}/{{ item }} && | ||
{{ docker_bin_dir }}/docker rm -f etcdxtl-binarycopy" | ||
with_items: | ||
- etcdctl | ||
- etcdutl | ||
register: etcdxtl_install_result | ||
until: etcdxtl_install_result.rc == 0 | ||
retries: "{{ etcd_retries }}" | ||
delay: "{{ retry_stagger | random + 3 }}" | ||
changed_when: false | ||
when: container_manager == "docker" | ||
|
||
- name: Download etcd binary | ||
include_tasks: "../../download/tasks/download_file.yml" | ||
vars: | ||
download: "{{ download_defaults | combine(downloads.etcd) }}" | ||
when: container_manager in ['crio', 'containerd'] | ||
|
||
- name: Copy etcd binary | ||
unarchive: | ||
src: "{{ downloads.etcd.dest }}" | ||
dest: "{{ local_release_dir }}/" | ||
remote_src: yes | ||
when: container_manager in ['crio', 'containerd'] | ||
|
||
- name: Copy etcdctl and etcdutl binary from download dir | ||
copy: | ||
src: "{{ local_release_dir }}/etcd-{{ etcd_version }}-linux-{{ host_architecture }}/{{ item }}" | ||
dest: "{{ bin_dir }}/{{ item }}" | ||
mode: 0755 | ||
remote_src: yes | ||
with_items: | ||
- etcdctl | ||
- etcdutl | ||
when: container_manager in ['crio', 'containerd'] | ||
|
||
- name: Create etcdctl wrapper script | ||
template: | ||
src: etcdctl.sh.j2 | ||
dest: "{{ bin_dir }}/etcdctl.sh" | ||
mode: 0755 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters