Merge branch '31-fix-ipv6-check' into 'development'

fix: kubernetes install failes when host with ipv6 disabled

Closes #31

See merge request nofusscomputing/projects/ansible/collections/kubernetes!69
This commit is contained in:
2024-06-27 07:26:27 +00:00

View File

@ -128,7 +128,14 @@
item.when | default(true)
- name: Add sysctl net.ipv4.ip_forward
- name: Check if IPv6 Enabled
ansible.builtin.stat:
path: /proc/sys/net/ipv6/conf/all/disable_ipv6
register: ipv6_file
failed_when: false
- name: Add sysctl settings
ansible.posix.sysctl:
name: "{{ item.name }}"
value: "{{ item.value }}"
@ -147,8 +154,11 @@
value: '512'
- name: net.ipv6.conf.all.disable_ipv6
value: '1'
when:
- ansible_os_family == 'Debian'
when: "{{ ipv6_file.stat.exists }}"
when: >
ansible_os_family == 'Debian'
and
item.when | default(true) | bool
- name: Check for Network Manager Directory