mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-30 06:13:29 -02:30
The lineinfile tasks that rewrite the server field in kubelet.conf replaced the whole line with a hard-coded indentation, corrupting the file when the existing entry was indented differently. Capture the original leading whitespace with a group regexp and restore it via backrefs so the rewrite preserves the surrounding YAML structure. Signed-off-by: longyuxiang <longyuxiang@kylinos.cn>