2016-09-08 02:02:06 +08:00
|
|
|
---
|
2023-06-06 17:27:00 +08:00
|
|
|
- name: Helm | Gather os specific variables
|
|
|
|
include_vars: "{{ item }}"
|
|
|
|
with_first_found:
|
|
|
|
- files:
|
|
|
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version|lower|replace('/', '_') }}.yml"
|
|
|
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml"
|
|
|
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version|lower|replace('/', '_') }}.yml"
|
|
|
|
- "{{ ansible_distribution|lower }}.yml"
|
|
|
|
- "{{ ansible_os_family|lower }}.yml"
|
|
|
|
- defaults.yml
|
|
|
|
paths:
|
|
|
|
- ../vars
|
|
|
|
skip: true
|
|
|
|
|
|
|
|
- name: Helm | Install PyYaml
|
|
|
|
package:
|
|
|
|
name: "{{ pyyaml_package }}"
|
|
|
|
state: present
|
|
|
|
|
2020-12-02 16:20:50 +08:00
|
|
|
- name: Helm | Download helm
|
|
|
|
include_tasks: "../../../download/tasks/download_file.yml"
|
|
|
|
vars:
|
|
|
|
download: "{{ download_defaults | combine(downloads.helm) }}"
|
|
|
|
|
2021-04-11 15:37:59 +08:00
|
|
|
- name: Helm | Copy helm binary from download dir
|
2022-10-13 14:55:01 +08:00
|
|
|
copy:
|
2020-12-02 16:20:50 +08:00
|
|
|
src: "{{ local_release_dir }}/helm-{{ helm_version }}/linux-{{ image_arch }}/helm"
|
|
|
|
dest: "{{ bin_dir }}/helm"
|
2022-10-13 14:55:01 +08:00
|
|
|
mode: 0755
|
|
|
|
remote_src: true
|
2020-12-02 16:20:50 +08:00
|
|
|
|
2021-04-11 15:37:59 +08:00
|
|
|
- name: Helm | Get helm completion
|
2020-12-02 16:20:50 +08:00
|
|
|
command: "{{ bin_dir }}/helm completion bash"
|
|
|
|
changed_when: False
|
|
|
|
register: helm_completion
|
|
|
|
check_mode: False
|
|
|
|
|
2021-04-11 15:37:59 +08:00
|
|
|
- name: Helm | Install helm completion
|
2020-12-02 16:20:50 +08:00
|
|
|
copy:
|
|
|
|
dest: /etc/bash_completion.d/helm.sh
|
|
|
|
content: "{{ helm_completion.stdout }}"
|
2022-01-09 17:51:12 +08:00
|
|
|
mode: 0755
|
2020-12-02 16:20:50 +08:00
|
|
|
become: True
|