2015-05-28 11:32:57 +02:00
|
|
|
---
|
|
|
|
- name: Ensure that the /etc/sysctl.d directory exists
|
|
|
|
file: path=/etc/sysctl.d state=directory
|
|
|
|
when: is_not_debian_less_than_6
|
|
|
|
tags: ipv6
|
|
|
|
|
2016-08-08 18:17:52 +02:00
|
|
|
- name: Disable the in kernel ipv6 support
|
|
|
|
sysctl: name={{ item }} value=1 sysctl_file={{ ipv6_sysctl_file }} reload=yes state=present
|
2015-05-28 11:32:57 +02:00
|
|
|
with_items:
|
|
|
|
- net.ipv6.conf.all.disable_ipv6
|
|
|
|
- net.ipv6.conf.default.disable_ipv6
|
|
|
|
- net.ipv6.conf.lo.disable_ipv6
|
2016-08-08 18:17:52 +02:00
|
|
|
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
|
2015-05-28 11:32:57 +02:00
|
|
|
tags: ipv6
|
|
|
|
|