7516fe142f
* Ansible: move to Ansible 3.4.0 which uses ansible-base 2.10.10 * Docs: add a note about ansible upgrade post 2.9.x * CI: ensure ansible is removed before ansible 3.x is installed to avoid pip failures * Ansible: use newer ansible-lint * Fix ansible-lint 5.0.11 found issues * syntax issues * risky-file-permissions * var-naming * role-name * molecule tests * Mitogen: use 0.3.0rc1 which adds support for ansible 2.10+ * Pin ansible-base to 2.10.11 to get package fix on RHEL8
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
---
|
|
- name: Make sure dynamic kubelet configuration directory is writeable
|
|
file:
|
|
path: "{{ dynamic_kubelet_configuration_dir }}"
|
|
mode: 0600
|
|
state: directory
|
|
when: dynamic_kubelet_configuration
|
|
|
|
- name: Set kubelet api version to v1beta1
|
|
set_fact:
|
|
kubeletConfig_api_version: v1beta1
|
|
tags:
|
|
- kubelet
|
|
- kubeadm
|
|
|
|
- name: Write kubelet environment config file (kubeadm)
|
|
template:
|
|
src: "kubelet.env.{{ kubeletConfig_api_version }}.j2"
|
|
dest: "{{ kube_config_dir }}/kubelet.env"
|
|
backup: yes
|
|
mode: 0640
|
|
notify: Node | restart kubelet
|
|
tags:
|
|
- kubelet
|
|
- kubeadm
|
|
|
|
- name: Write kubelet config file
|
|
template:
|
|
src: "kubelet-config.{{ kubeletConfig_api_version }}.yaml.j2"
|
|
dest: "{{ kube_config_dir }}/kubelet-config.yaml"
|
|
mode: 0640
|
|
notify: Kubelet | restart kubelet
|
|
tags:
|
|
- kubelet
|
|
- kubeadm
|
|
|
|
- name: Write kubelet systemd init file
|
|
template:
|
|
src: "kubelet.service.j2"
|
|
dest: "/etc/systemd/system/kubelet.service"
|
|
backup: "yes"
|
|
mode: 0644
|
|
notify: Node | restart kubelet
|
|
tags:
|
|
- kubelet
|
|
- kubeadm
|
|
|
|
- name: flush_handlers and reload-systemd
|
|
meta: flush_handlers
|
|
|
|
- name: Enable kubelet
|
|
service:
|
|
name: kubelet
|
|
enabled: yes
|
|
state: started
|
|
tags:
|
|
- kubelet
|
|
notify: Kubelet | restart kubelet
|