initial commit
This commit is contained in:
15
ansible/playbooks/02-hosts.yml
Normal file
15
ansible/playbooks/02-hosts.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- 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
|
||||
Reference in New Issue
Block a user