c12s-kubespray/roles/kubernetes-apps/helm/tasks/main.yml
Etienne Champetier de1d9df787
Only use stat get_checksum: yes when needed (#7270)
By default Ansible stat module compute checksum, list extended attributes and find mime type
To find all stat invocations that really use one of those:
git grep -F stat. | grep -vE 'stat.(islnk|exists|lnk_source|writeable)'

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
2021-02-10 05:36:59 -08:00

37 lines
990 B
YAML

---
- name: Helm | Download helm
include_tasks: "../../../download/tasks/download_file.yml"
vars:
download: "{{ download_defaults | combine(downloads.helm) }}"
- name: Copy helm binary from download dir
synchronize:
src: "{{ local_release_dir }}/helm-{{ helm_version }}/linux-{{ image_arch }}/helm"
dest: "{{ bin_dir }}/helm"
compress: no
perms: yes
owner: no
group: no
delegate_to: "{{ inventory_hostname }}"
- name: Check if bash_completion.d folder exists # noqa 503
stat:
path: "/etc/bash_completion.d/"
get_attributes: no
get_checksum: no
get_mime: no
register: stat_result
- name: Get helm completion
command: "{{ bin_dir }}/helm completion bash"
changed_when: False
register: helm_completion
check_mode: False
when: stat_result.stat.exists
- name: Install helm completion
copy:
dest: /etc/bash_completion.d/helm.sh
content: "{{ helm_completion.stdout }}"
become: True
when: stat_result.stat.exists