Don't fail if missing

This commit is contained in:
Pünkösd Marcell 2021-11-10 00:50:55 +01:00
parent 54bdce08b2
commit 02b1abc371
1 changed files with 6 additions and 0 deletions

View File

@ -23,9 +23,15 @@
mode: 644
owner: root
- name: check if rules file exists
stat:
path: /etc/kubernetes/kubelet-config.yaml
register: kubelet_config
- name: fix kubelet wrong resolver
lineinfile:
path: /etc/kubernetes/kubelet-config.yaml
regexp: '^resolvConf:'
line: 'resolvConf: "/etc/resolv.conf"'
notify: restartkubelet
when: kubelet_config.stat.exists == True