diff --git a/tasks/main.yml b/tasks/main.yml index 0c3443c..1227585 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -18,19 +18,7 @@ notify: restart kubelet with_items: "{{ kubernetes_packages }}" -# per the install doc, -# 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: sysctl-setup.yml - include_tasks: kubelet-setup.yml diff --git a/tasks/sysctl-setup.yml b/tasks/sysctl-setup.yml new file mode 100644 index 0000000..f6332fd --- /dev/null +++ b/tasks/sysctl-setup.yml @@ -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