|
1 | 1 | ---
|
2 |
| -- name: Check ansible version |
3 |
| - import_playbook: ansible_version.yml |
4 |
| - |
5 |
| -- name: Ensure compatibility with old groups |
6 |
| - import_playbook: legacy_groups.yml |
7 |
| - |
8 |
| -- hosts: bastion[0] |
9 |
| - gather_facts: False |
10 |
| - environment: "{{ proxy_disable_env }}" |
11 |
| - roles: |
12 |
| - - { role: kubespray-defaults } |
13 |
| - - { role: bastion-ssh-config, tags: ["localhost", "bastion"] } |
14 |
| - |
15 |
| -- hosts: k8s_cluster:etcd |
16 |
| - strategy: linear |
17 |
| - any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
18 |
| - gather_facts: false |
19 |
| - environment: "{{ proxy_disable_env }}" |
20 |
| - roles: |
21 |
| - - { role: kubespray-defaults } |
22 |
| - - { role: bootstrap-os, tags: bootstrap-os} |
23 |
| - |
24 |
| -- name: Gather facts |
25 |
| - tags: always |
26 |
| - import_playbook: facts.yml |
27 |
| - |
28 |
| -- hosts: k8s_cluster:etcd |
29 |
| - gather_facts: False |
30 |
| - any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
31 |
| - environment: "{{ proxy_disable_env }}" |
32 |
| - roles: |
33 |
| - - { role: kubespray-defaults } |
34 |
| - - { role: kubernetes/preinstall, tags: preinstall } |
35 |
| - - { role: "container-engine", tags: "container-engine", when: deploy_container_engine } |
36 |
| - - { role: download, tags: download, when: "not skip_downloads" } |
37 |
| - |
38 |
| -- hosts: etcd:kube_control_plane |
39 |
| - gather_facts: False |
40 |
| - any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
41 |
| - environment: "{{ proxy_disable_env }}" |
42 |
| - roles: |
43 |
| - - { role: kubespray-defaults } |
44 |
| - - role: etcd |
45 |
| - tags: etcd |
46 |
| - vars: |
47 |
| - etcd_cluster_setup: true |
48 |
| - etcd_events_cluster_setup: "{{ etcd_events_cluster_enabled }}" |
49 |
| - when: etcd_deployment_type != "kubeadm" |
50 |
| - |
51 |
| -- hosts: k8s_cluster |
52 |
| - gather_facts: False |
53 |
| - any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
54 |
| - environment: "{{ proxy_disable_env }}" |
55 |
| - roles: |
56 |
| - - { role: kubespray-defaults } |
57 |
| - - role: etcd |
58 |
| - tags: etcd |
59 |
| - vars: |
60 |
| - etcd_cluster_setup: false |
61 |
| - etcd_events_cluster_setup: false |
62 |
| - when: |
63 |
| - - etcd_deployment_type != "kubeadm" |
64 |
| - - kube_network_plugin in ["calico", "flannel", "canal", "cilium"] or cilium_deploy_additionally | default(false) | bool |
65 |
| - - kube_network_plugin != "calico" or calico_datastore == "etcd" |
66 |
| - |
67 |
| -- hosts: k8s_cluster |
68 |
| - gather_facts: False |
69 |
| - any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
70 |
| - environment: "{{ proxy_disable_env }}" |
71 |
| - roles: |
72 |
| - - { role: kubespray-defaults } |
73 |
| - - { role: kubernetes/node, tags: node } |
74 |
| - |
75 |
| -- hosts: kube_control_plane |
76 |
| - gather_facts: False |
77 |
| - any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
78 |
| - environment: "{{ proxy_disable_env }}" |
79 |
| - roles: |
80 |
| - - { role: kubespray-defaults } |
81 |
| - - { role: kubernetes/control-plane, tags: master } |
82 |
| - - { role: kubernetes/client, tags: client } |
83 |
| - - { role: kubernetes-apps/cluster_roles, tags: cluster-roles } |
84 |
| - |
85 |
| -- hosts: k8s_cluster |
86 |
| - gather_facts: False |
87 |
| - any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
88 |
| - environment: "{{ proxy_disable_env }}" |
89 |
| - roles: |
90 |
| - - { role: kubespray-defaults } |
91 |
| - - { role: kubernetes/kubeadm, tags: kubeadm} |
92 |
| - - { role: kubernetes/node-label, tags: node-label } |
93 |
| - - { role: network_plugin, tags: network } |
94 |
| - |
95 |
| -- hosts: calico_rr |
96 |
| - gather_facts: False |
97 |
| - any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
98 |
| - environment: "{{ proxy_disable_env }}" |
99 |
| - roles: |
100 |
| - - { role: kubespray-defaults } |
101 |
| - - { role: network_plugin/calico/rr, tags: ['network', 'calico_rr'] } |
102 |
| - |
103 |
| -- hosts: kube_control_plane[0] |
104 |
| - gather_facts: False |
105 |
| - any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
106 |
| - environment: "{{ proxy_disable_env }}" |
107 |
| - roles: |
108 |
| - - { role: kubespray-defaults } |
109 |
| - - { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] } |
110 |
| - |
111 |
| -- hosts: kube_control_plane |
112 |
| - gather_facts: False |
113 |
| - any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
114 |
| - environment: "{{ proxy_disable_env }}" |
115 |
| - roles: |
116 |
| - - { role: kubespray-defaults } |
117 |
| - - { role: kubernetes-apps/external_cloud_controller, tags: external-cloud-controller } |
118 |
| - - { role: kubernetes-apps/network_plugin, tags: network } |
119 |
| - - { role: kubernetes-apps/policy_controller, tags: policy-controller } |
120 |
| - - { role: kubernetes-apps/ingress_controller, tags: ingress-controller } |
121 |
| - - { role: kubernetes-apps/external_provisioner, tags: external-provisioner } |
122 |
| - - { role: kubernetes-apps, tags: apps } |
123 |
| - |
124 |
| -- name: Apply resolv.conf changes now that cluster DNS is up |
125 |
| - hosts: k8s_cluster |
126 |
| - gather_facts: False |
127 |
| - any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
128 |
| - environment: "{{ proxy_disable_env }}" |
129 |
| - roles: |
130 |
| - - { role: kubespray-defaults } |
131 |
| - - { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf, dns_late: true } |
| 2 | +- name: Install Kubernetes |
| 3 | + ansible.builtin.import_playbook: playbooks/cluster.yml |
0 commit comments