add ansible for complete cluster setup with multipass

This commit is contained in:
Bartal Læarsson
2025-02-24 22:45:11 +00:00
parent 4670946ef6
commit e0609e7d3a
14 changed files with 887 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
---
- name: Common configuration for all nodes
hosts: k8s_cluster
become: yes
tags:
- common
tasks:
- name: Include hosts setup
include_tasks: tasks/setup-hosts.yml
- name: Include DNS setup
include_tasks: tasks/update-dns.yml
- name: Include SSH setup
include_tasks: tasks/ssh.yml
- name: Include kernel setup
include_tasks: tasks/setup-kernel.yml
- name: Kubernetes setup for all nodes
hosts: k8s_cluster
become: yes
tags:
- k8s-setup
tasks:
- name: Include Kubernetes node setup
include_tasks: tasks/node-setup.yml
- name: Initialize Kubernetes control plane
hosts: control_plane
become: yes
tags:
- control-plane
tasks:
- name: Initialize control plane
include_tasks: tasks/control-plane-init.yml
- name: Join worker nodes to cluster
hosts: workers
become: yes
tags:
- workers
tasks:
- name: Join worker nodes
include_tasks: tasks/worker-join.yml