c12s-kubespray/roles/kubernetes/preinstall/tasks/0110-dhclient-hooks-undo.yml
Erwan Miran 87193fd270 Fix ansible syntax to avoid ansible warnings (one more) (#3536)
* warning on meta flush_handlers

* avoid rm

* avoid "Module remote_tmp /root/.ansible/tmp did not exist and was created with a mode of 0700, this may cause issues when running as another user. To avoid this, create the remote_tmp dir with the correct permissions manually" warning on subsequent tasks using blockinfile

* is match
2018-10-17 12:27:11 -07:00

21 lines
615 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:
dest: "{{dhclientconffile}}"
state: absent
backup: yes
follow: yes
marker: "# Ansible entries {mark}"
when: dhclientconffile is defined
notify: Preinstall | restart network
- name: Remove kubespray specific dhclient hook
file:
path: "{{ dhclienthookfile }}"
state: absent
when: dhclienthookfile is defined
notify: Preinstall | restart network