Skip to content

Commit

Permalink
修改默认gather_facts: smart
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmzj committed May 28, 2018
1 parent 84e63d3 commit 54652ad
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/06-安装calico网络组件.md
Original file line number Diff line number Diff line change
Expand Up @@ -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网络配置
Expand Down
4 changes: 0 additions & 4 deletions roles/lb/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
3 changes: 0 additions & 3 deletions roles/os-harden/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
4 changes: 0 additions & 4 deletions roles/prepare/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 54652ad

Please sign in to comment.