Don't fail if missing
This commit is contained in:
parent
abcd07666c
commit
53a79c083c
@ -23,9 +23,15 @@
|
|||||||
mode: 644
|
mode: 644
|
||||||
owner: root
|
owner: root
|
||||||
|
|
||||||
|
- name: check if rules file exists
|
||||||
|
stat:
|
||||||
|
path: /etc/kubernetes/kubelet-config.yaml
|
||||||
|
register: kubelet_config
|
||||||
|
|
||||||
- name: fix kubelet wrong resolver
|
- name: fix kubelet wrong resolver
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/kubernetes/kubelet-config.yaml
|
path: /etc/kubernetes/kubelet-config.yaml
|
||||||
regexp: '^resolvConf:'
|
regexp: '^resolvConf:'
|
||||||
line: 'resolvConf: "/etc/resolv.conf"'
|
line: 'resolvConf: "/etc/resolv.conf"'
|
||||||
notify: restartkubelet
|
notify: restartkubelet
|
||||||
|
when: kubelet_config.stat.exists == True
|
Loading…
Reference in New Issue
Block a user