diff --git a/01.prepare.yml b/01.prepare.yml index b35e32b0e..5560d1495 100644 --- a/01.prepare.yml +++ b/01.prepare.yml @@ -1,17 +1,14 @@ # 在deploy节点生成CA相关证书,以供整个集群使用 - hosts: deploy - gather_facts: False roles: - ca # 集群节点的公共配置任务 - hosts: kube-cluster - gather_facts: False roles: - prepare # 可选,多master部署时的负载均衡配置 - hosts: lb - gather_facts: False roles: - lb diff --git a/02.etcd.yml b/02.etcd.yml index 57d5858d5..b130fb9b0 100644 --- a/02.etcd.yml +++ b/02.etcd.yml @@ -1,4 +1,3 @@ - hosts: etcd - gather_facts: False roles: - etcd diff --git a/03.kubectl.yml b/03.kubectl.yml index 56c3d2942..24076e296 100644 --- a/03.kubectl.yml +++ b/03.kubectl.yml @@ -1,4 +1,3 @@ - hosts: kube-cluster - gather_facts: False roles: - kubectl diff --git a/04.docker.yml b/04.docker.yml index dd7fb11af..7d5b2ed0b 100644 --- a/04.docker.yml +++ b/04.docker.yml @@ -1,4 +1,3 @@ - hosts: kube-cluster - gather_facts: False roles: - docker diff --git a/05.calico.yml b/05.calico.yml index 45bfee502..4719379e7 100644 --- a/05.calico.yml +++ b/05.calico.yml @@ -1,4 +1,3 @@ - hosts: kube-cluster - gather_facts: False roles: - calico diff --git a/06.kube-master.yml b/06.kube-master.yml index b946f8653..349016aea 100644 --- a/06.kube-master.yml +++ b/06.kube-master.yml @@ -1,4 +1,3 @@ - hosts: kube-master - gather_facts: False roles: - kube-master diff --git a/07.kube-node.yml b/07.kube-node.yml index bb47e27a7..f8cccdcec 100644 --- a/07.kube-node.yml +++ b/07.kube-node.yml @@ -1,4 +1,3 @@ - hosts: kube-node - gather_facts: False roles: - kube-node diff --git a/90.setup.yml b/90.setup.yml index f29697bc2..ae86b8aef 100644 --- a/90.setup.yml +++ b/90.setup.yml @@ -1,39 +1,32 @@ # 在deploy节点生成CA相关证书,以供整个集群使用 - hosts: deploy - gather_facts: False roles: - ca # 集群节点的公共配置任务 - hosts: kube-cluster - gather_facts: False roles: - prepare # 可选,多master部署时的负载均衡配置 - hosts: lb - gather_facts: False roles: - lb - hosts: etcd - gather_facts: False roles: - etcd - hosts: kube-cluster - gather_facts: False roles: - kubectl - docker - calico - hosts: kube-master - gather_facts: False roles: - kube-master - hosts: kube-node - gather_facts: False roles: - kube-node diff --git a/95.clean.yml b/95.clean.yml index 6d88f5823..cc84af13d 100644 --- a/95.clean.yml +++ b/95.clean.yml @@ -1,5 +1,4 @@ - hosts: kube-cluster - gather_facts: False tasks: - name: stop calico-node service shell: "systemctl stop calico-node docker" @@ -33,7 +32,6 @@ ignore_errors: true - hosts: kube-node - gather_facts: False tasks: - name: stop kube-node service shell: "systemctl stop kubelet kube-proxy" @@ -53,7 +51,6 @@ # - "/root/local/bin/" - hosts: kube-master - gather_facts: False tasks: - name: stop kube-master service shell: "systemctl stop kube-apiserver kube-controller-manager kube-scheduler" @@ -69,7 +66,6 @@ - "/etc/kubernetes/" - hosts: etcd - gather_facts: False tasks: - name: stop etcd service shell: systemctl stop etcd @@ -83,7 +79,6 @@ - "/etc/systemd/system/etcd.service" - hosts: lb - gather_facts: False tasks: - name: stop keepalived service shell: systemctl disable keepalived && systemctl stop keepalived diff --git a/ansible.cfg b/ansible.cfg index b00802625..86261b1df 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -29,7 +29,7 @@ # smart - gather by default, but don't regather if already gathered # implicit - gather by default, turn off with gather_facts: False # explicit - do not gather by default, must say gather_facts: True -#gathering = implicit +gathering = explicit # additional paths to search for roles in, colon separated roles_path = /etc/ansible/roles