Initial ansible onboard

This commit is contained in:
2024-09-24 15:19:51 +02:00
parent 7366659355
commit f445996797
492 changed files with 2214589 additions and 0 deletions
@@ -0,0 +1,31 @@
- name: Loadbalancer | Setup '{{ lb_provider }}'
ansible.builtin.include_tasks: "loadbalancer/{{ lb_provider }}.yaml"
- name: Loadbalancer | Create Loadbalancer for Nginx ingress
environment:
PATH: "{{ k8s_venv }}/bin:{{ ansible_env.PATH }}"
vars:
ansible_python_interpreter: "{{ k8s_venv }}/bin/python"
kubernetes.core.k8s:
state: present
kubeconfig: "{{ k8s_kubeconfig }}"
wait: true
definition:
apiVersion: v1
kind: Service
metadata:
name: ingress
namespace: ingress
spec:
selector:
name: nginx-ingress-microk8s
type: LoadBalancer
ports:
- name: http
protocol: TCP
port: "{{ lb_http_port }}"
targetPort: 80
- name: https
protocol: TCP
port: "{{ lb_https_port }}"
targetPort: 443