k8s-sig-cluster-lifecycleawskubesprayhigh-availabilityansiblekubernetes-clustergcekubernetesbare-metal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.2 KiB
38 lines
1.2 KiB
---
|
|
- name: Krew | Download krew
|
|
include_tasks: "../../../download/tasks/download_file.yml"
|
|
vars:
|
|
download: "{{ download_defaults | combine(downloads.krew) }}"
|
|
|
|
- name: Krew | krew env
|
|
template:
|
|
src: krew.j2
|
|
dest: /etc/bash_completion.d/krew
|
|
mode: "0644"
|
|
|
|
- name: Krew | Copy krew manifest
|
|
template:
|
|
src: krew.yml.j2
|
|
dest: "{{ local_release_dir }}/krew.yml"
|
|
mode: "0644"
|
|
|
|
- name: Krew | Install krew # noqa command-instead-of-shell
|
|
shell: "{{ local_release_dir }}/krew-{{ host_os }}_{{ image_arch }} install --archive={{ local_release_dir }}/krew-{{ host_os }}_{{ image_arch }}.tar.gz --manifest={{ local_release_dir }}/krew.yml"
|
|
environment:
|
|
KREW_ROOT: "{{ krew_root_dir }}"
|
|
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
|
|
ignore_errors: true # noqa ignore-errors
|
|
|
|
- name: Krew | Install krew completion
|
|
copy:
|
|
dest: /etc/bash_completion.d/krew.sh
|
|
content: "{{ krew_completion.stdout }}"
|
|
mode: "0755"
|
|
become: true
|
|
when: krew_completion.rc == 0
|