修改ansible配置默认不进行gather_facts

pull/275/head
jmgao 2017-11-12 19:18:39 +08:00
parent d68e1f260e
commit 18a3ad4571
10 changed files with 1 additions and 22 deletions

View File

@ -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

View File

@ -1,4 +1,3 @@
- hosts: etcd
gather_facts: False
roles:
- etcd

View File

@ -1,4 +1,3 @@
- hosts: kube-cluster
gather_facts: False
roles:
- kubectl

View File

@ -1,4 +1,3 @@
- hosts: kube-cluster
gather_facts: False
roles:
- docker

View File

@ -1,4 +1,3 @@
- hosts: kube-cluster
gather_facts: False
roles:
- calico

View File

@ -1,4 +1,3 @@
- hosts: kube-master
gather_facts: False
roles:
- kube-master

View File

@ -1,4 +1,3 @@
- hosts: kube-node
gather_facts: False
roles:
- kube-node

View File

@ -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

View File

@ -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

View File

@ -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