4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 - name: template master kubelet config
18 src: master-config.yaml.j2
19 dest: /etc/kubernetes/kubeconfig/master-config.yaml
21 when: hostname in groups.caas_master
24 - name: template worker kubelet config
26 src: worker-config.yaml.j2
27 dest: /etc/kubernetes/kubeconfig/worker-config.yaml
29 when: hostname in groups.caas_worker
32 - name: assemble kubelet params for master
34 kubelet_params: "{{ common_kubelet_params + master_kubelet_params | default([], true) }}"
35 when: hostname in groups.caas_master
37 - name: assemble kubelet params for worker
39 kubelet_params: "{{ common_kubelet_params + worker_kubelet_params | default([], true) }}"
40 when: hostname in groups.caas_worker
42 - name: template kubelet scripts
45 dest: /usr/libexec/nokia/{{ item }}
49 - kubelet_healthcheck.sh
53 - name: template service file
56 dest: "{{ item.dest }}"
58 - src: kubelet.service
59 dest: /usr/lib/systemd/system/kubelet.service
60 - src: kubelet_healthcheck.service
61 dest: /usr/lib/systemd/system/kubelet_healthcheck.service
63 - name: create dummy kubeletc file for boostrapper nodes
65 path: "/etc/kubernetes/kubeconfig/kubeletc.yml"
67 when: hostname in groups.caas_worker