-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yaml
30 lines (26 loc) · 853 Bytes
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- name: Configure Kubernetes Nodes
become: True
hosts: nodes
gather_facts: no
vars_files:
- defaults/main.yaml
remote_user: "{{ username }}"
tasks:
- name: Configure nodes
ansible.builtin.include_tasks:
file: tasks/configure_nodes.yml
- name: Configure first Control Plane and Etcd node
ansible.builtin.include_tasks:
file: tasks/configure_control_plane.yml
when: inventory_hostname in groups['control_plane']
- name: Configure Workers nodes
ansible.builtin.include_tasks:
file: tasks/join_workers.yml
when: "'workers' in group_names"
- name: Install features
ansible.builtin.include_tasks:
file: tasks/install_features.yml
when:
- groups['control_plane'][0] == inventory_hostname
with_items: "{{ feature }}"