diff --git a/playbooks/31.deletcd.yml b/playbooks/31.deletcd.yml index 818e030..beae40f 100644 --- a/playbooks/31.deletcd.yml +++ b/playbooks/31.deletcd.yml @@ -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']" diff --git a/playbooks/32.delnode.yml b/playbooks/32.delnode.yml index e8d5309..bb4844b 100644 --- a/playbooks/32.delnode.yml +++ b/playbooks/32.delnode.yml @@ -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 diff --git a/playbooks/33.delmaster.yml b/playbooks/33.delmaster.yml index 7c57b97..1e69bfd 100644 --- a/playbooks/33.delmaster.yml +++ b/playbooks/33.delmaster.yml @@ -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 diff --git a/roles/chrony/tasks/main.yml b/roles/chrony/tasks/main.yml index 855e436..357d554 100644 --- a/roles/chrony/tasks/main.yml +++ b/roles/chrony/tasks/main.yml @@ -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 diff --git a/roles/clean/tasks/clean_node.yml b/roles/clean/tasks/clean_node.yml index e64a4f1..bea9515 100644 --- a/roles/clean/tasks/clean_node.yml +++ b/roles/clean/tasks/clean_node.yml @@ -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 diff --git a/roles/prepare/tasks/centos.yml b/roles/prepare/tasks/centos.yml index a330c03..803b184 100644 --- a/roles/prepare/tasks/centos.yml +++ b/roles/prepare/tasks/centos.yml @@ -4,8 +4,6 @@ - firewalld - python-firewall - firewalld-filesystem - args: - warn: false ignore_errors: true - name: 安装基础软件包