ansible-roles/ubuntu-deb-general/tasks/manage-ipv6-status.yml

29 lines
829 B
YAML
Raw Normal View History

---
- 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
- 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
- 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