Fix can't remove etcd node (#6363)

* add remove_node_ip

* move remove_node_ip to remove etcd part

* fix: remove tail space

* fix: handle ubuntu: focal
This commit is contained in:
Sam Lin
2020-07-04 04:02:48 -05:00
committed by GitHub
parent 57eefdd458
commit 6bb47d8adb
3 changed files with 14 additions and 15 deletions

View File

@@ -1,5 +1,4 @@
---
- name: reset | include file with pre-reset tasks specific to the network_plugin if exists
include_tasks: "{{ (role_path + '/../network_plugin/' + kube_network_plugin + '/tasks/pre-reset.yml') | realpath }}"
when:
@@ -142,7 +141,7 @@
- name: reset | unmount kubelet dirs
command: umount -f {{ item }}
with_items: '{{ mounted_dirs.stdout_lines }}'
with_items: "{{ mounted_dirs.stdout_lines }}"
register: umount_dir
retries: 4
until: umount_dir.rc == 0
@@ -296,7 +295,7 @@
{%- else -%}
network
{%- endif -%}
{%- elif ansible_distribution == "Ubuntu" and ansible_distribution_release == "bionic" -%}
{%- elif ansible_distribution == "Ubuntu" and ansible_distribution_release in ["bionic", "focal"] -%}
systemd-networkd
{%- elif ansible_os_family == "Debian" -%}
networking