52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
---
|
|
#####################################################################
|
|
#
|
|
# metallb_deploy role
|
|
#
|
|
# - requires that the 'devpath' and 'metallb_ver' variables be set
|
|
#
|
|
#####################################################################
|
|
# tasks file for metallb_deploy role
|
|
|
|
- debug: msg="Deploying metallb load-balancer."
|
|
|
|
- name: Retrieve the metallb 'namespace.yaml' manifest
|
|
ansible.builtin.get_url:
|
|
url: "https://raw.githubusercontent.com/metallb/metallb/{{ metallb_ver }}/manifests/namespace.yaml"
|
|
dest: "/tmp/namespace.yaml"
|
|
mode: '0644'
|
|
|
|
- name: Apply metallb 'namespace.yaml' manifest
|
|
community.kubernetes.k8s:
|
|
state: present
|
|
src: "/tmp/namespace.yaml"
|
|
|
|
- name: Delete retrieved 'namespace.yaml' manifest file
|
|
ansible.builtin.file:
|
|
path: "/tmp/namespace.yaml"
|
|
state: absent
|
|
|
|
- name: Retrieve the metallb 'metallb.yaml' manifest
|
|
ansible.builtin.get_url:
|
|
url: "https://raw.githubusercontent.com/metallb/metallb/{{ metallb_ver }}/manifests/metallb.yaml"
|
|
dest: "/tmp/metallb.yaml"
|
|
mode: '0644'
|
|
|
|
- name: Apply metallb 'metallb.yaml' manifest
|
|
community.kubernetes.k8s:
|
|
state: present
|
|
src: "/tmp/metallb.yaml"
|
|
|
|
- name: Delete retrieved 'metallb.yaml' manifest file
|
|
ansible.builtin.file:
|
|
path: "/tmp/metallb.yaml"
|
|
state: absent
|
|
|
|
- name: Create metallb configmap object
|
|
community.kubernetes.k8s:
|
|
state: present
|
|
namespace: metallb-system
|
|
src: "{{ devpath }}/k8s_metallb/metallb_configmap.yml"
|
|
|
|
# EOF
|