Skip to content

Commit

Permalink
fix 内核4.19加载nf_conntrack #366
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmzj committed Nov 10, 2018
1 parent 43c48e0 commit 313d111
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions roles/prepare/tasks/common.yml
Expand Up @@ -21,6 +21,11 @@
- nf_conntrack_ipv4
ignore_errors: true

- name: 加载nf_conntrack for kernel 4.19
modprobe: name=nf_conntrack state=present
ignore_errors: true
when: '"4.19" in ansible_kernel'

# 设置系统参数for k8s
# 消除docker info 警告WARNING: bridge-nf-call-ip[6]tables is disabled
- name: 设置系统参数
Expand Down

1 comment on commit 313d111

@vivisidea
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以直接把上面的数组写成

- "{% if '4.19' in ansible_kernel %}nf_conntrack{% else %}nf_conntrack_ipv4{% endif %}"

Please sign in to comment.