ansible / ipv6 addresses / without link local

ansible / ipv6 addresses / without link local

  • Written by
    Walter Doekes
  • Published on

Trying to get the IPv6 addresses as ansible fact, but getting unwanted link_local scope addresses?

Maybe you're landing here because you did not see a solution at “all_ipv6_addresses includes link local addresses”. (I find it most odd that they locked the GitHub ticket, eliminating the possibility for anyone to reply with a fix.)

The ansible_all_ipv6_addresses | reject("ansible.utils.in_network", "fe80::/10") construct works for me. For example:

local-address=, ::1, {{ (
  ansible_all_ipv4_addresses + (
  )|join(", ") }}

Back to overview Newer post: netplan / docker0 / bind on Older post: zabbix server / jammy upgrade / missing font