Skip to content

slaac

Collection Note

This module is part of the ansible.utils collection. To install the collection, use:

ansible-galaxy collection install ansible.utils
Added in version 2.5.0.

Synopsis

  • This filter returns the SLAAC address within a network for a given HW/MAC address.
  • The filter slaac() generates an IPv6 address for a given network and a MAC Address in Stateless Configuration.

Parameters

Parameter Defaults / Choices Comments
query
str
nth host
value
str
required
The network address or range to test against.

Examples

#### examples
- name: The filter slaac() generates an IPv6 address for a given network and a MAC Address in Stateless Configuration.
  debug:
    msg: "{{ 'fdcf:1894:23b5:d38c:0000:0000:0000:0000' | slaac('c2:31:b3:83:bf:2b') }}"

# TASK [The filter slaac() generates an IPv6 address for a given network and a MAC Address in Stateless Configuration.] ***
# task path: /Users/amhatre/ansible-collections/playbooks/test_slaac.yaml:7
# Loading collection ansible.utils from /Users/amhatre/ansible-collections/collections/ansible_collections/ansible/utils
# ok: [localhost] => {
#     "msg": "fdcf:1894:23b5:d38c:c031:b3ff:fe83:bf2b"
# }

Return Values

Key Data Type Description Returned
data str Returns the SLAAC address within a network for a given HW/MAC address.

Authors

  • Ashwini Mhatre (@amhatre)