mirror of https://github.com/easzlab/kubeasz.git
adapt to ansible-core 2.14
parent
669334062e
commit
2f810e0985
|
@ -74,12 +74,8 @@
|
||||||
# lineinfile is inadequate to delete lines between some specific line range
|
# lineinfile is inadequate to delete lines between some specific line range
|
||||||
- name: remove the etcd's node entry in hosts
|
- name: remove the etcd's node entry in hosts
|
||||||
shell: 'sed -i "/^\[etcd/,/^\[kube_master/ {/^{{ ETCD_TO_DEL }}$/d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
shell: 'sed -i "/^\[etcd/,/^\[kube_master/ {/^{{ ETCD_TO_DEL }}$/d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
|
|
||||||
# lineinfile is inadequate to delete lines between some specific line range
|
# lineinfile is inadequate to delete lines between some specific line range
|
||||||
- name: remove the etcd's node entry in hosts
|
- name: remove the etcd's node entry in hosts
|
||||||
shell: 'sed -i "/^\[etcd/,/^\[kube_master/ {/^{{ ETCD_TO_DEL }} /d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
shell: 'sed -i "/^\[etcd/,/^\[kube_master/ {/^{{ ETCD_TO_DEL }} /d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
when: "groups['etcd']|length > 1 and ETCD_TO_DEL in groups['etcd']"
|
when: "groups['etcd']|length > 1 and ETCD_TO_DEL in groups['etcd']"
|
||||||
|
|
|
@ -48,11 +48,7 @@
|
||||||
# lineinfile is inadequate to delete lines between some specific line range
|
# lineinfile is inadequate to delete lines between some specific line range
|
||||||
- name: remove the node's entry in hosts
|
- name: remove the node's entry in hosts
|
||||||
shell: 'sed -i "/^\[kube_node/,/^\[harbor/ {/^{{ NODE_TO_DEL }}$/d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
shell: 'sed -i "/^\[kube_node/,/^\[harbor/ {/^{{ NODE_TO_DEL }}$/d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
|
|
||||||
# lineinfile is inadequate to delete lines between some specific line range
|
# lineinfile is inadequate to delete lines between some specific line range
|
||||||
- name: remove the node's entry in hosts
|
- name: remove the node's entry in hosts
|
||||||
shell: 'sed -i "/^\[kube_node/,/^\[harbor/ {/^{{ NODE_TO_DEL }} /d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
shell: 'sed -i "/^\[kube_node/,/^\[harbor/ {/^{{ NODE_TO_DEL }} /d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
|
|
|
@ -49,11 +49,7 @@
|
||||||
# lineinfile is inadequate to delete lines between some specific line range
|
# lineinfile is inadequate to delete lines between some specific line range
|
||||||
- name: remove the master's entry in hosts
|
- name: remove the master's entry in hosts
|
||||||
shell: 'sed -i "/^\[kube_master/,/^\[harbor/ {/^{{ NODE_TO_DEL }}$/d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
shell: 'sed -i "/^\[kube_master/,/^\[harbor/ {/^{{ NODE_TO_DEL }}$/d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
|
|
||||||
# lineinfile is inadequate to delete lines between some specific line range
|
# lineinfile is inadequate to delete lines between some specific line range
|
||||||
- name: remove the master's entry in hosts
|
- name: remove the master's entry in hosts
|
||||||
shell: 'sed -i "/^\[kube_master/,/^\[harbor/ {/^{{ NODE_TO_DEL }} /d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
shell: 'sed -i "/^\[kube_master/,/^\[harbor/ {/^{{ NODE_TO_DEL }} /d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
- name: yum 卸载 ntp
|
- name: yum 卸载 ntp
|
||||||
shell: 'yum remove -y ntp'
|
shell: 'yum remove -y ntp'
|
||||||
when: 'ansible_distribution in ["CentOS","RedHat","Amazon","Aliyun"]'
|
when: 'ansible_distribution in ["CentOS","RedHat","Amazon","Aliyun"]'
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: 下载二进制文件chronyd
|
- name: 下载二进制文件chronyd
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
|
|
||||||
- name: umount kubelet filesystems
|
- name: umount kubelet filesystems
|
||||||
shell: "mount | grep '/var/lib/kubelet'| awk '{print $3}'|xargs umount || exit 0"
|
shell: "mount | grep '/var/lib/kubelet'| awk '{print $3}'|xargs umount || exit 0"
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: remove files and dirs of 'kube_node' nodes
|
- name: remove files and dirs of 'kube_node' nodes
|
||||||
|
@ -50,20 +48,14 @@
|
||||||
|
|
||||||
- name: umount docker filesystem-3
|
- name: umount docker filesystem-3
|
||||||
shell: "echo /var/lib/docker/overlay2/*/merged|xargs umount || exit 0"
|
shell: "echo /var/lib/docker/overlay2/*/merged|xargs umount || exit 0"
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: umount docker filesystem-4
|
- name: umount docker filesystem-4
|
||||||
shell: "echo /var/lib/docker/containers/*/mounts/shm|xargs umount || exit 0"
|
shell: "echo /var/lib/docker/containers/*/mounts/shm|xargs umount || exit 0"
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: umount docker filesystem-5
|
- name: umount docker filesystem-5
|
||||||
shell: "echo /var/run/docker/netns/*|xargs umount || exit 0"
|
shell: "echo /var/run/docker/netns/*|xargs umount || exit 0"
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: remove files and dirs
|
- name: remove files and dirs
|
||||||
|
@ -92,8 +84,6 @@
|
||||||
|
|
||||||
- name: umount containerd filesystems
|
- name: umount containerd filesystems
|
||||||
shell: "mount | grep 'containerd/io.containerd'| awk '{print $3}'|xargs umount || exit 0"
|
shell: "mount | grep 'containerd/io.containerd'| awk '{print $3}'|xargs umount || exit 0"
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: remove files and dirs
|
- name: remove files and dirs
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
- firewalld
|
- firewalld
|
||||||
- python-firewall
|
- python-firewall
|
||||||
- firewalld-filesystem
|
- firewalld-filesystem
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: 安装基础软件包
|
- name: 安装基础软件包
|
||||||
|
|
Loading…
Reference in New Issue