fix集群清理相关

pull/29/head
jmgao 2017-12-15 21:20:26 +08:00
parent 49993180fb
commit b3daae9c97
3 changed files with 24 additions and 4 deletions

View File

@ -72,7 +72,7 @@
&& iptables -F -t mangle && iptables -X -t mangle"
- name: 清理网络
shell: "ip link del docker0; ip link del tunl0; systemctl restart networking"
shell: "ip link del docker0; ip link del tunl0; systemctl restart networking; systemctl restart network"
ignore_errors: true
- hosts: etcd

View File

@ -14,7 +14,7 @@ metadata:
name: kube-dns
namespace: kube-system
labels:
kubernetes.io/cluster-service: "true"
#kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
---
@ -25,7 +25,7 @@ metadata:
namespace: kube-system
labels:
k8s-app: kube-dns
kubernetes.io/cluster-service: "true"
#kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
kubernetes.io/name: "KubeDNS"
spec:
@ -48,7 +48,7 @@ metadata:
namespace: kube-system
labels:
k8s-app: kube-dns
kubernetes.io/cluster-service: "true"
#kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
# replicas: not specified here:

View File

@ -32,6 +32,26 @@
- name: 缓存ansilbe setup信息
setup: gather_subset=min
# 删除默认安装
- name: 删除ubuntu默认安装
when: ansible_distribution == "Ubuntu"
apt: name={{ item }} state=absent
with_items:
- ufw
- lxd
- lxd-client
- lxcfs
- lxc-common
# 删除默认安装
- name: 删除centos默认安装
when: ansible_distribution == "CentOS"
yum: name={{ item }} state=absent
with_items:
- firewalld
- firewalld-filesystem
- python-firewall
- name: 关闭 selinux
shell: "setenforce 0 && echo SELINUX=disabled > /etc/selinux/config"
when: ansible_distribution == "CentOS"