diff --git a/ubuntu-deb-general/tasks/manage-ipv6-status.yml b/ubuntu-deb-general/tasks/manage-ipv6-status.yml index 5c0164f4..26b6a20e 100644 --- a/ubuntu-deb-general/tasks/manage-ipv6-status.yml +++ b/ubuntu-deb-general/tasks/manage-ipv6-status.yml @@ -4,12 +4,25 @@ when: is_not_debian_less_than_6 tags: ipv6 -- name: Manage the in kernel ipv6 support - sysctl: name={{ item }} value={{ ipv6_sysctl_value }} sysctl_file={{ ipv6_sysctl_file }} reload=yes state=present +- name: Disable the in kernel ipv6 support + sysctl: name={{ item }} value=1 sysctl_file={{ ipv6_sysctl_file }} reload=yes state=present with_items: - net.ipv6.conf.all.disable_ipv6 - net.ipv6.conf.default.disable_ipv6 - net.ipv6.conf.lo.disable_ipv6 - when: is_not_debian_less_than_6 + when: + - is_not_debian_less_than_6 + - disable_ipv6 + tags: ipv6 + +- name: enable the in kernel ipv6 support + sysctl: name={{ item }} value=0 sysctl_file={{ ipv6_sysctl_file }} reload=yes state=present + with_items: + - net.ipv6.conf.all.disable_ipv6 + - net.ipv6.conf.default.disable_ipv6 + - net.ipv6.conf.lo.disable_ipv6 + when: + - is_not_debian_less_than_6 + - not disable_ipv6 tags: ipv6