<div>list of subnets or individual address or any other values input. Example. ['192.24.2.1', 'host.fqdn', '::1', '192.168.32.0/24', 'fe80::100/10', True, '', '42540766412265424405338506004571095040/64']</div>
</td>
</tr>
</table>
<br/>
Examples
--------
..code-block:: yaml
#### examples
# Ipwrap filter plugin o Wrap IPv6 addresses in [ ] brackets.
- name: Set value as input list
ansible.builtin.set_fact:
value:
- 192.24.2.1
- host.fqdn
- ::1
- ''
- 192.168.32.0/24
- fe80::100/10
- 42540766412265424405338506004571095040/64
- True
- debug:
msg: "{{ value|ansible.utils.ipwrap }}"
- name: |
ipwrap() did not filter out non-IP address values, which is usually what you want when for example
you are mixing IP addresses with hostnames. If you still want to filter out all non-IP address values,
# TASK [ipwrap() did not filter out non-IP address values, which is usually what you want when for example
# you are mixing IP addresses with hostnames. If you still want to filter out all non-IP address values,
# you can chain both filters together.] ***
# ok: [localhost] => {
# "msg": [
# "192.24.2.1",
# "[::1]",
# "192.168.32.0/24",
# "[fe80::100]/10",
# "[2001:db8:32c:faad::]/64"
# ]
# }
Return Values
-------------
Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this filter:
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.