-
Notifications
You must be signed in to change notification settings - Fork 49
/
main.yml
29 lines (25 loc) · 907 Bytes
/
main.yml
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
- name: pre-install-common
include_role:
name: pre-install-common
when:
- ansible_connection is defined
- ansible_connection == "ssh"
- name: TCP Configuration
include_role:
name: tcp
- name: construct k8s_controlplane_host
set_fact:
k8s_controlplane_host: "{{groups['primary_master_node'][0]}}"
when:
k8s_controlplane_host is not defined or k8s_controlplane_host|length == 0
- name: Add controlplane host
add_host:
hostname: '{{ k8s_controlplane_host }}'
ansible_host: '{{ k8s_controlplane_host }}'
ansible_ssh_host: '{{ k8s_controlplane_host }}'
ansible_user: '{{ ansible_user }}'
ansible_ssh_user: '{{ ansible_user }}'
ansible_port: '{{ k8s_controlplane_ssh_port | default(22) }}'
ansible_ssh_port: '{{ k8s_controlplane_ssh_port | default(22) }}'
- name: Include {{ k8s_or_k3s }} Master node job
include_tasks: "{{ k8s_or_k3s }}.yml"