set selinux type t_etc if selinux state is enforcing (#7791)

This commit is contained in:
spaced 2021-07-13 15:34:29 +02:00 committed by GitHub
parent 3ff7bc1f64
commit bf54dc082b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,6 +17,7 @@
template:
src: "kubelet.env.{{ kubeletConfig_api_version }}.j2"
dest: "{{ kube_config_dir }}/kubelet.env"
setype: "{{ (preinstall_selinux_state == 'enforcing') | ternary('t_etc', omit) }}"
backup: yes
mode: 0640
notify: Node | restart kubelet