mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Update filter documentation (#52575)
Added documentation for ip4_hexr filter
This commit is contained in:
parent
27af6367d4
commit
da77057566
1 changed files with 7 additions and 0 deletions
|
@ -369,6 +369,13 @@ integers into IP addresses::
|
||||||
# {{ test_list | ipaddr('address') | ipaddr('int') }}
|
# {{ test_list | ipaddr('address') | ipaddr('int') }}
|
||||||
[3222798849, 1, '3232243712/24', '338288524927261089654018896841347694848/10', '42540766412265424405338506004571095040/64']
|
[3222798849, 1, '3232243712/24', '338288524927261089654018896841347694848/10', '42540766412265424405338506004571095040/64']
|
||||||
|
|
||||||
|
You can convert IPv4 address to `Hexadecimal notation <https://en.wikipedia.org/wiki/Hexadecimal>`_ with optional delimiter::
|
||||||
|
|
||||||
|
# {{ '192.168.1.5' | ip4_hex }}
|
||||||
|
c0a80105
|
||||||
|
# {{ '192.168.1.5' | ip4_hex(':') }}
|
||||||
|
c0:a8:01:05
|
||||||
|
|
||||||
You can convert IP addresses to PTR records::
|
You can convert IP addresses to PTR records::
|
||||||
|
|
||||||
# {% for address in test_list | ipaddr %}
|
# {% for address in test_list | ipaddr %}
|
||||||
|
|
Loading…
Reference in a new issue