forked from kubernetes-sigs/kubespray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tasks to undo changes to hosts /etc/resolv.conf and dhclient configs
- Loading branch information
Showing
3 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
|
||
# These tasks will undo changes done by kargo in the past if needed (e.g. when upgrading from kargo 2.0.x | ||
# or when changing resolvconf_mode) | ||
|
||
- name: Remove kargo specific config from dhclient config | ||
blockinfile: | ||
dest: "{{dhclientconffile}}" | ||
state: absent | ||
backup: yes | ||
follow: yes | ||
marker: "# Ansible entries {mark}" | ||
notify: Preinstall | restart network | ||
|
||
- name: Remove kargo specific dhclient hook | ||
file: path="{{ dhclienthookfile }}" state=absent | ||
notify: Preinstall | restart network | ||
when: ansible_os_family != "RedHat" | ||
|
||
# We need to make sure the network is restarted early enough so that docker can later pick up the correct system | ||
# nameservers and search domains | ||
- meta: flush_handlers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters