mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 21:57:00 +01:00
29 lines
679 B
YAML
29 lines
679 B
YAML
---
|
|
# generating the kubeadm config file only on master nodes
|
|
- name: Creating kubeadm_config file
|
|
template:
|
|
src: kubeadm-config.j2
|
|
dest: /tmp/kubeadm_config
|
|
when:
|
|
- groups.k8s_masters | length > 1
|
|
- "'k8s_masters' in group_names"
|
|
|
|
# KUBELET_EXTRA_ARGS
|
|
- name: Additional configuration
|
|
template:
|
|
src: local-extras.conf.j2
|
|
dest: /etc/systemd/system/kubelet.service.d/90-local-extras.conf
|
|
mode: 0640
|
|
when:
|
|
- "kubelet_fail_swap_on == False"
|
|
notify:
|
|
- reload systemd
|
|
- restart kubelet
|
|
|
|
- meta: flush_handlers
|
|
|
|
- name: Creating .kube file in $HOME
|
|
file:
|
|
path: ~/.kube
|
|
state: directory
|
|
when: "'k8s_masters' in group_names"
|