46 lines
988 B
YAML
46 lines
988 B
YAML
---
|
|
- 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
|