Files
cluster-init/ansible/playbooks/02-hosts.yml
2026-06-14 14:21:09 +07:00

16 lines
367 B
YAML

---
- name: Configure /etc/hosts for all nodes
hosts: k8s
become: true
tasks:
- name: Add cluster nodes to /etc/hosts
blockinfile:
path: /etc/hosts
marker: "# {mark} k8s cluster nodes"
block: |
192.168.1.31 master01
192.168.1.35 worker01
192.168.1.36 worker02
192.168.1.37 worker03