Install MetalLB into cluster

This commit is contained in:
2025-08-16 17:01:02 -04:00
parent 907cfef01b
commit 29fd3d3c0f
4 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
---
# deployment tasks for MetalLB
# https://metallb.io/installation/
#- name: Create a namespace for funkwhale
# k8s:
# kubeconfig: "/etc/rancher/k3s/k3s.yaml"
# name: "{{apps.funkwhale.namespace}}"
# api_version: v1
# kind: Namespace
# state: "{{apps.funkwhale.state}}"
# become: true
#
#- name: create persistent volume resources
# kubernetes.core.k8s:
# kubeconfig: "/etc/rancher/k3s/k3s.yaml"
# state: "{{apps.funkwhale.state}}"
# definition: "{{ lookup('template', item) | from_yaml }}"
# loop:
# - funkwhale/pv.yaml
# - funkwhale/pv-claim.yaml
# become: true
- name: Install MetalLB chart
block:
- name: Add MetaLB chart helm repo
local_action:
module: kubernetes.core.helm_repository
name: metallb
repo_url: https://metallb.github.io/metallb
- name: load variables files/metallb/values.yaml
ansible.builtin.include_vars:
file: files/metallb/values.yaml
name: release_values
- name: Install MetalLB Release
local_action:
module: kubernetes.core.helm
release_state: "{{apps.metallb.state}}"
name: funkwhale
namespace: "{{apps.metallb.namespace}}"
create_namespace: yes
update_repo_cache: True
chart_ref: metallb/metallb
values: "{{release_values}}"
wait: true