adapt to ansible-core 2.14

v3.4
gjmzj 2023-04-16 10:28:35 +08:00
parent 13b0cc0b4a
commit 3695ec1842
6 changed files with 0 additions and 26 deletions

View File

@ -74,12 +74,8 @@
# lineinfile is inadequate to delete lines between some specific line range
- name: remove the etcd's node entry in 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
- name: remove the etcd's node entry in 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']"

View File

@ -48,11 +48,7 @@
# lineinfile is inadequate to delete lines between some specific line range
- name: remove the node's entry in 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
- name: remove the node's entry in hosts
shell: 'sed -i "/^\[kube_node/,/^\[harbor/ {/^{{ NODE_TO_DEL }} /d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
args:
warn: false

View File

@ -49,11 +49,7 @@
# lineinfile is inadequate to delete lines between some specific line range
- name: remove the master's entry in 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
- name: remove the master's entry in hosts
shell: 'sed -i "/^\[kube_master/,/^\[harbor/ {/^{{ NODE_TO_DEL }} /d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
args:
warn: false

View File

@ -13,8 +13,6 @@
- name: yum 卸载 ntp
shell: 'yum remove -y ntp'
when: 'ansible_distribution in ["CentOS","RedHat","Amazon","Aliyun"]'
args:
warn: false
ignore_errors: true
- name: 下载二进制文件chronyd

View File

@ -10,8 +10,6 @@
- name: umount kubelet filesystems
shell: "mount | grep '/var/lib/kubelet'| awk '{print $3}'|xargs umount || exit 0"
args:
warn: false
ignore_errors: true
- name: remove files and dirs of 'kube_node' nodes
@ -50,20 +48,14 @@
- name: umount docker filesystem-3
shell: "echo /var/lib/docker/overlay2/*/merged|xargs umount || exit 0"
args:
warn: false
ignore_errors: true
- name: umount docker filesystem-4
shell: "echo /var/lib/docker/containers/*/mounts/shm|xargs umount || exit 0"
args:
warn: false
ignore_errors: true
- name: umount docker filesystem-5
shell: "echo /var/run/docker/netns/*|xargs umount || exit 0"
args:
warn: false
ignore_errors: true
- name: remove files and dirs
@ -92,8 +84,6 @@
- name: umount containerd filesystems
shell: "mount | grep 'containerd/io.containerd'| awk '{print $3}'|xargs umount || exit 0"
args:
warn: false
ignore_errors: true
- name: remove files and dirs

View File

@ -4,8 +4,6 @@
- firewalld
- python-firewall
- firewalld-filesystem
args:
warn: false
ignore_errors: true
- name: 安装基础软件包