Add krew auto completion (#8171)

This commit is contained in:
zhengtianbao 2021-11-09 04:43:39 -06:00 committed by GitHub
parent 4a8757161e
commit 46c536d261
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

@ -19,3 +19,15 @@
environment: environment:
KREW_ROOT: "{{ krew_root_dir }}" KREW_ROOT: "{{ krew_root_dir }}"
KREW_DEFAULT_INDEX_URI: "{{ krew_default_index_uri | default('') }}" KREW_DEFAULT_INDEX_URI: "{{ krew_default_index_uri | default('') }}"
- name: Krew | Get krew completion
command: "{{ local_release_dir }}/krew-{{ host_os }}_{{ image_arch }} completion bash"
changed_when: False
register: krew_completion
check_mode: False
- name: Krew | Install krew completion
copy:
dest: /etc/bash_completion.d/krew.sh
content: "{{ krew_completion.stdout }}"
become: True

View file

@ -322,6 +322,7 @@
- /etc/bash_completion.d/crictl - /etc/bash_completion.d/crictl
- /etc/bash_completion.d/nerdctl - /etc/bash_completion.d/nerdctl
- /etc/bash_completion.d/krew - /etc/bash_completion.d/krew
- /etc/bash_completion.d/krew.sh
- "{{ krew_root_dir | default('/usr/local/krew') }}" - "{{ krew_root_dir | default('/usr/local/krew') }}"
- /etc/modules-load.d/kube_proxy-ipvs.conf - /etc/modules-load.d/kube_proxy-ipvs.conf
- /etc/modules-load.d/kubespray-br_netfilter.conf - /etc/modules-load.d/kubespray-br_netfilter.conf