mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
add info about hwaddr conversion formats (#57491)
This commit is contained in:
parent
72297db686
commit
152202ceb0
1 changed files with 18 additions and 8 deletions
|
@ -368,7 +368,7 @@ integers into IP addresses::
|
|||
|
||||
# {{ test_list | ipaddr('address') | ipaddr('int') }}
|
||||
[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 }}
|
||||
|
@ -614,21 +614,31 @@ convert it between various formats. Examples::
|
|||
# {{ macaddress | hwaddr('cisco') }}
|
||||
1a2b.3c4d.5e6f
|
||||
|
||||
The supported formats result in the following conversions for the ``1a:2b:3c:4d:5e:6f`` MAC address::
|
||||
|
||||
bare: 1A2B3C4D5E6F
|
||||
bool: True
|
||||
int: 28772997619311
|
||||
cisco: 1a2b.3c4d.5e6f
|
||||
eui48 or win: 1A-2B-3C-4D-5E-6F
|
||||
linux or unix: 1a:2b:3c:4d:5e:6f:
|
||||
pgsql, postgresql, or psql: 1a2b3c:4d5e6f
|
||||
|
||||
.. seealso::
|
||||
|
||||
:doc:`playbooks`
|
||||
:ref:`about_playbooks`
|
||||
An introduction to playbooks
|
||||
:doc:`playbooks_filters`
|
||||
:ref:`playbooks_filters`
|
||||
Introduction to Jinja2 filters and their uses
|
||||
:doc:`playbooks_conditionals`
|
||||
:ref:`playbooks_conditionals`
|
||||
Conditional statements in playbooks
|
||||
:doc:`playbooks_variables`
|
||||
:ref:`playbooks_variables`
|
||||
All about variables
|
||||
:doc:`playbooks_loops`
|
||||
:ref:`playbooks_loops`
|
||||
Looping in playbooks
|
||||
:doc:`playbooks_reuse_roles`
|
||||
:ref:`playbooks_reuse_roles`
|
||||
Playbook organization by roles
|
||||
:doc:`playbooks_best_practices`
|
||||
:ref:`playbooks_best_practices`
|
||||
Best practices in playbooks
|
||||
`User Mailing List <https://groups.google.com/group/ansible-devel>`_
|
||||
Have a question? Stop by the google group!
|
||||
|
|
Loading…
Reference in a new issue