mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-29 22:03:22 -02:30
Splits the definitions into two dicts, while joining then for now to preserve the downloads dict. Update all consumers of the variables, which are roughly: - manual includes of the download role (which will be removed in the short future) - install tasks using the resolved 'dest' to find the artefacts This will make further division of the downloads role easier.
50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
---
|
|
- name: Helm | Gather os specific variables
|
|
include_vars: "{{ item }}"
|
|
with_first_found:
|
|
- files:
|
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower | replace('/', '_') }}.yml"
|
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_release'] }}.yml"
|
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower | replace('/', '_') }}.yml"
|
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
|
- defaults.yml
|
|
paths:
|
|
- ../vars
|
|
skip: true
|
|
|
|
- name: Helm | Install PyYaml
|
|
package:
|
|
name: "{{ pyyaml_package }}"
|
|
state: present
|
|
when: pyyaml_package is defined
|
|
|
|
- name: Helm | Install PyYaml [flatcar]
|
|
include_tasks: pyyaml-flatcar.yml
|
|
when: ansible_facts['os_family'] == "Flatcar"
|
|
|
|
- name: Helm | Download helm
|
|
include_tasks: "../../../download/tasks/download_file.yml"
|
|
vars:
|
|
download: "{{ download_defaults | combine(downloads_file.helm) }}"
|
|
|
|
- name: Helm | Copy helm binary from download dir
|
|
copy:
|
|
src: "{{ local_release_dir }}/helm-{{ helm_version }}/linux-{{ image_arch }}/helm"
|
|
dest: "{{ bin_dir }}/helm"
|
|
mode: "0755"
|
|
remote_src: true
|
|
|
|
- name: Helm | Get helm completion
|
|
command: "{{ bin_dir }}/helm completion bash"
|
|
changed_when: false
|
|
register: helm_completion
|
|
check_mode: false
|
|
|
|
- name: Helm | Install helm completion
|
|
copy:
|
|
dest: /etc/bash_completion.d/helm.sh
|
|
content: "{{ helm_completion.stdout }}"
|
|
mode: "0755"
|
|
become: true
|