Compare commits

...

1 Commits

Author SHA1 Message Date
JamesAllenby c132c24145 feat: add kubernetes roles 2026-06-23 23:28:40 +01:00
9 changed files with 55 additions and 8 deletions
+3
View File
@@ -3,3 +3,6 @@ plugin: community.general.incus
strict: true
remotes:
- local:home-infrastructure
groups:
control_planes: "'master' in inventory_hostname"
workers: "'worker' in inventory_hostname"
+1 -1
View File
@@ -1,3 +1,3 @@
---
- name: Install required provision packages
- name: Install required packages
ansible.builtin.import_tasks: packages.yaml
+5 -4
View File
@@ -1,5 +1,6 @@
---
- name: Upgrade all packages
ansible.builtin.package:
name: '*'
state: latest
- name: Install Python 3 Dependencies
ansible.builtin.apt:
pkg:
- python3-debian
state: present
@@ -0,0 +1,9 @@
---
- name: Install Kubernetes APT repository
ansible.builtin.import_tasks: repo.yaml
- name: Install Kubernetes packages
ansible.builtin.import_tasks: packages.yaml
- name: Configure networking
ansible.builtin.import_tasks: networking.yaml
@@ -0,0 +1,6 @@
---
- name: Enable sysctl 'net.ipv4.ip_forward'
ansible.posix.sysctl:
name: net.ipv4.ip_forward
value: 1
sysctl_set: true
@@ -0,0 +1,14 @@
---
- name: Install Kubernetes packages
ansible.builtin.apt:
pkg:
- kubeadm
- kubelet
- containerd
update_cache: true
- name: Activate containerd service
ansible.builtin.service:
name: containerd
enabled: true
state: started
@@ -0,0 +1,9 @@
---
- name: Add Kubernetes APT repository
ansible.builtin.deb822_repository:
name: kubernetes
types: deb
uris: https://pkgs.k8s.io/core:/stable:/v1.36/deb/
suites: /
signed_by: https://pkgs.k8s.io/core:/stable:/v1.36/deb/Release.key
state: present
+6 -1
View File
@@ -1,5 +1,10 @@
---
- name: Common
- name: Bootstrap
hosts: all
roles:
- common
- name: Setup Kubernetes nodes
hosts: all
roles:
- kubernetes_node
+2 -2
View File
@@ -7,8 +7,8 @@ locals {
ext_disk_size = "16GiB"
network_cidr = "10.150.0.1/24"
master_count = 2
worker_count = 0
master_count = 1
worker_count = 1
image = "ubuntu/26.04"
}