调整部分系统参数

pull/49/merge
jmgao 2017-12-28 14:34:04 +08:00
parent 0ac66bed26
commit 470f0d4f29
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,4 @@
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-arptables = 1

View File

@ -56,3 +56,11 @@
shell: "setenforce 0 && echo SELINUX=disabled > /etc/selinux/config"
when: ansible_distribution == "CentOS"
ignore_errors: true
# 设置系统参数for k8s
# 消除docker info 警告WARNING: bridge-nf-call-ip[6]tables is disabled
- name: 设置系统参数
copy: src=95-k8s-sysctl.conf dest=/etc/sysctl.d/95-k8s-sysctl.conf
- name: 生效系统参数
shell: "sysctl -p /etc/sysctl.d/95-k8s-sysctl.conf"