You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
786 B

  1. ---
  2. - name: Enable IPv6 networking
  3. blockinfile:
  4. path: /etc/network/interfaces
  5. block: |
  6. iface {{ ipv6_device }} inet6 static
  7. address {{ ipv6_address }}
  8. netmask 64
  9. post-up sleep 5; /sbin/ip -family inet6 route add {{ ipv6_gateway }} dev {{ ipv6_device }}
  10. post-up sleep 5; /sbin/ip -family inet6 route add default via {{ ipv6_gateway }}
  11. pre-down /sbin/ip -family inet6 route del default via {{ ipv6_gateway }}
  12. pre-down /sbin/ip -family inet6 route del {{ ipv6_gateway }} dev {{ ipv6_device }}
  13. # apt seems to hang a lot when using IPv6
  14. - name: Force apt not to use IPv6
  15. lineinfile:
  16. path: /etc/apt/apt.conf.d/99force-ipv4
  17. line: Acquire::ForceIPv4 "true";
  18. create: true
  19. owner: root
  20. group: root
  21. mode: 0644