PR #75 follow-up: Make sure proper package is present and only run on older Debian and other OSes.

This commit is contained in:
Jeff Geerling 2020-09-01 12:22:54 -05:00
parent 749d2869af
commit 690166af9a
3 changed files with 17 additions and 7 deletions

View File

@ -1,13 +1,21 @@
--- ---
# See: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#letting-iptables-see-bridged-traffic - name: Ensure procps is installed.
- name: Set sysctl for IPv4 bridges package:
sysctl: name: "{{ procps_package }}"
name: net.bridge.bridge-nf-call-iptables
value: '1'
state: present state: present
when: >
ansible_distribution != 'Debian'
or ansible_distribution_major_version | int < 10
- name: Set sysctl for IPv6 bridges # See: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#letting-iptables-see-bridged-traffic
- name: Let iptables see bridged traffic.
sysctl: sysctl:
name: net.bridge.bridge-nf-call-ip6tables name: "{{ item }}"
value: '1' value: '1'
state: present state: present
loop:
- net.bridge.bridge-nf-call-iptables
- net.bridge.bridge-nf-call-ip6tables
when: >
ansible_distribution != 'Debian'
or ansible_distribution_major_version | int < 10

View File

@ -1,2 +1,3 @@
--- ---
procps_package: procps
kubelet_environment_file_path: /etc/default/kubelet kubelet_environment_file_path: /etc/default/kubelet

View File

@ -1,4 +1,5 @@
--- ---
procps_package: procps-ng
kubelet_environment_file_path: /etc/sysconfig/kubelet kubelet_environment_file_path: /etc/sysconfig/kubelet
kubernetes_packages: kubernetes_packages:
- name: kubelet-{{ kubernetes_version_rhel_package }}-0 - name: kubelet-{{ kubernetes_version_rhel_package }}-0