修改默认gather_facts: smart

pull/215/head
gjmzj 2018-05-28 23:25:45 +08:00
parent 84e63d3ed0
commit 54652adfa2
5 changed files with 2 additions and 13 deletions

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 = explicit
gathering = smart
# additional paths to search for roles in, colon separated
roles_path = /etc/ansible/roles

View File

@ -84,7 +84,7 @@ roles/calico/
### 安装calico 网络
+ 安装前检查主机名不能有大写字母,只能由`小写字母` `-` `.` 组成 (name must consist of lower case alphanumeric characters, '-' or '.' (regex: [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*))(calico-node v3.0.6以上已经解决主机大写字母问题)
+ **前必须确保各节点主机名不重复** calico node name 由节点主机名决定如果重复那么重复节点在etcd中只存储一份那么肯定出问题BGP 邻居也不会建立
+ **前必须确保各节点主机名不重复** calico node name 由节点主机名决定如果重复那么重复节点在etcd中只存储一份配置BGP 邻居也不会建立。
+ 安装之前必须确保`kube-master`和`kube-node`节点已经成功部署
+ 只需要在任意装有kubectl客户端的节点运行 `kubectl create `安装即可
+ 等待15s后(视网络拉取calico相关镜像速度)calico 网络插件安装完成删除之前kube-node安装时默认cni网络配置

View File

@ -1,7 +1,3 @@
# 先拉取下节点的ansible setup信息起到缓存效果否则后续when 判断可能失败
- name: 缓存ansilbe setup信息
setup: gather_subset=min
- name: apt更新缓存刷新
apt: update_cache=yes cache_valid_time=72000
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16"

View File

@ -1,7 +1,4 @@
---
- name: 缓存ansilbe setup信息
setup: gather_subset=all
- name: apt更新缓存刷新
apt: update_cache=yes cache_valid_time=72000
when: ansible_os_family == 'Debian'

View File

@ -33,10 +33,6 @@
- ca.csr
- ca-config.json
# 先拉取下节点的ansible setup信息起到缓存效果否则后续when 判断可能失败
- name: 缓存ansilbe setup信息
setup: gather_subset=min
# 删除默认安装
- name: 删除ubuntu默认安装
when: ansible_distribution == "Ubuntu"