working on configuring a k3s cluster
This commit is contained in:
34
ansible-5/roles/k3s/tasks/install_helm.yml
Normal file
34
ansible-5/roles/k3s/tasks/install_helm.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
#$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
|
||||
#$ chmod 700 get_helm.sh
|
||||
#$ ./get_helm.sh
|
||||
|
||||
- name: Install required packages
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600
|
||||
state: latest
|
||||
with_items:
|
||||
- curl
|
||||
- bash-completion
|
||||
|
||||
- name: Fetch helm install script
|
||||
ansible.builtin.uri:
|
||||
url: https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
|
||||
return_content: yes
|
||||
creates: /usr/local/bin/helm
|
||||
register: helm_installer
|
||||
|
||||
- debug:
|
||||
var: helm_installer
|
||||
|
||||
- name: Run installer
|
||||
async: 300
|
||||
poll: 10
|
||||
ansible.builtin.shell:
|
||||
cmd: bash -s --
|
||||
stdin: "{{ helm_installer.content }}"
|
||||
# creates: /usr/local/bin/helm
|
||||
when: helm_installer.changed
|
||||
|
||||
Reference in New Issue
Block a user