main.yaml 419 B

1234567891011
  1. ---
  2. # Disable ipv6 on RHEL7
  3. - name: Disable all ipv6
  4. sysctl: name="net.ipv6.conf.all.disable_ipv6" value=1 sysctl_set=yes state=present reload=yes
  5. - name: Disable default ipv6
  6. sysctl: name="net.ipv6.conf.default.disable_ipv6" value=1 sysctl_set=yes state=present reload=yes
  7. - name: Remove ipv6 localhost from /etc/hosts
  8. lineinfile: dest='/etc/hosts' regexp='^::1 ' state=absent owner=root group=root mode=0644