c12s-kubespray/roles/kubernetes/preinstall/tasks/0110-dhclient-hooks-undo.yml
Matthew Mosesohn 1c25ed669c Remove unnecessary and risky reload network for resolvconf propagation (#5322)
Change-Id: I54d706f7941b4b86c4c6cd45340295577155b884
2019-11-06 10:11:52 -08:00

21 lines
647 B
YAML

---
# These tasks will undo changes done by kubespray in the past if needed (e.g. when upgrading from kubespray 2.0.x
# or when changing resolvconf_mode)
- name: Remove kubespray specific config from dhclient config
blockinfile:
path: "{{ dhclientconffile }}"
state: absent
backup: yes
marker: "# Ansible entries {mark}"
when: dhclientconffile is defined
notify: Preinstall | propagate resolvconf to k8s components
- name: Remove kubespray specific dhclient hook
file:
path: "{{ dhclienthookfile }}"
state: absent
when: dhclienthookfile is defined
notify: Preinstall | propagate resolvconf to k8s components