diff --git a/tasks/main.yml b/tasks/main.yml index ca9b9f4..aa853ac 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -28,3 +28,18 @@ path: /usr/local/bin/helm src: /opt/helm/{{ helm_version }}/helm state: link + +- name: generate completions + command: + cmd: /opt/helm/{{ helm_version }}/helm completion bash + register: completion + +- name: copy completions to filesystem + copy: + content: "{{ completion.stdout }}" + dest: /etc/bash_completion.d/helm + +- name: delete archive + file: + path: /tmp/helm.tar.gz + state: absent