Skip to content

Commit

Permalink
add: helm installation to all nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
pasiol committed Dec 26, 2024
1 parent 142247d commit e7367ec
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
46 changes: 46 additions & 0 deletions roles/cluster_node_set_up/tasks/install_helm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
- name: Copy the helm signing key to node
ansible.builtin.copy:
src: helm-signing.asc
dest: /tmp/helm-signing.asc
mode: '0644'

- name: Import Helm GPG key
become: true
changed_when: true
args:
executable: /bin/bash
ansible.builtin.shell: |
set -o pipefail
cat /tmp/helm-signing.asc | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null
- name: Install apt-transport-https
become: true
ansible.builtin.apt:
name: apt-transport-https
state: present
update_cache: true

- name: Add Helm repository
become: true
ansible.builtin.apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/helm.gpg]
https://baltocdn.com/helm/stable/debian/ all main"
state: present
filename: helm-stable-debian

- name: Update apt cache
become: true
ansible.builtin.apt:
update_cache: true

- name: Install Helm
become: true
ansible.builtin.apt:
name: helm
state: present

- name: Clean up temporary files
ansible.builtin.file:
path: /tmp/helm-signing.asc
state: absent
4 changes: 4 additions & 0 deletions roles/cluster_node_set_up/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
delay: 10
ansible.builtin.command: "kubeadm config images pull --kubernetes-version=v{{ kubernetes_minor_version }}"

- name: Include task install_helm
ansible.builtin.include_tasks:
file: install_helm.yaml

- name: Unconditionally reboot the machine with all defaults
become: true
ansible.builtin.reboot:

0 comments on commit e7367ec

Please sign in to comment.