代码拉取完成,页面将自动刷新
---
- hosts: k8s
gather_facts: False
tasks:
- name: 移除k8s集群配置
ignore_errors: yes
shell: "kubeadm reset -f"
- name: 卸载相关软件
package:
name:
- kubelet
- kubeadm
- kubectl
- docker-ce
- docker-ce-cli
- containerd.io
- keepalived
state: absent
- name: 开启swap
replace:
path: /etc/fstab
regexp: '^#/(.*) swap (.*)'
replace: '/\1 swap \2'
- hosts: lvs
gather_facts: false
tasks:
- name: 移出lvs软件
package:
name:
- ipvsadm
- keepalived
state: absent
- hosts: master
gather_facts: false
tasks:
- name: 关闭回环地址
ignore_errors: yes
shell: "/bin/bash /usr/local/bin/rsrip.sh stop >/dev/null 2>&1"
- name: 关闭回环地址自启
ignore_errors: yes
lineinfile:
dest: /etc/rc.d/rc.local
regexp: "^/(.*)/rsrip.sh"
state: absent
- name: 去除kubectl补全
ignore_errors: yes
lineinfile:
dest: ~/.bashrc
regexp: "kubectl"
state: absent
- hosts: k8s
gather_facts: false
tasks:
- name: 1分钟后重启k8s服务器
shell: "shutdown -r 1"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。