make better condition for applying nf_conntrack kernel tweak (#6267)

* MINOR: Check kernel version before enable modprobe nf_conntrack

* CLEANUP: no more need to ignore error of this task

* MINOR: Fixing yaml and ansible lint error - remove trailling-space
This commit is contained in:
mohsen 2020-06-16 12:04:06 +04:30 committed by GitHub
parent a8740c6e13
commit 10e54eca26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,8 +108,9 @@
name: nf_conntrack_ipv4
state: present
register: enable_nf_conntrack
ignore_errors: yes
when: kube_proxy_mode == 'ipvs'
when:
- ansible_kernel.split('.')[0:3] | join('.') < '4.19'
- kube_proxy_mode == 'ipvs'
tags:
- kube-proxy
@ -118,7 +119,7 @@
name: nf_conntrack
state: present
when:
- enable_nf_conntrack is failed
- ansible_kernel.split('.')[0:3] | join('.') >= '4.19'
- kube_proxy_mode == 'ipvs'
tags:
- kube-proxy