PR #75 follow-up: Move sysctl setup into separate task file.

This commit is contained in:
Jeff Geerling 2020-09-01 11:30:53 -05:00
parent c4b512fd26
commit 749d2869af
2 changed files with 14 additions and 13 deletions

View File

@ -18,19 +18,7 @@
notify: restart kubelet notify: restart kubelet
with_items: "{{ kubernetes_packages }}" with_items: "{{ kubernetes_packages }}"
# per the install doc, - include_tasks: sysctl-setup.yml
# https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/
- name: Set sysctl for IPv4 bridges
sysctl:
name: net.bridge.bridge-nf-call-iptables
value: '1'
state: present
- name: Set sysctl for IPv6 bridges
sysctl:
name: net.bridge.bridge-nf-call-ip6tables
value: '1'
state: present
- include_tasks: kubelet-setup.yml - include_tasks: kubelet-setup.yml

13
tasks/sysctl-setup.yml Normal file
View File

@ -0,0 +1,13 @@
---
# See: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#letting-iptables-see-bridged-traffic
- name: Set sysctl for IPv4 bridges
sysctl:
name: net.bridge.bridge-nf-call-iptables
value: '1'
state: present
- name: Set sysctl for IPv6 bridges
sysctl:
name: net.bridge.bridge-nf-call-ip6tables
value: '1'
state: present