mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-04 07:30:20 -07:00
remove slice docs (#37946)
This commit is contained in:
parent
7881866db4
commit
b533ebe20d
1 changed files with 2 additions and 13 deletions
|
@ -955,17 +955,6 @@ To make use of one attribute from each item in a list of complex variables, use
|
|||
# get a comma-separated list of the mount points (e.g. "/,/mnt/stuff") on a host
|
||||
{{ ansible_mounts|map(attribute='mount')|join(',') }}
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
The `slice` filter can be used to extract the values of specific keys from a
|
||||
hash::
|
||||
|
||||
{{ {'x': 1, 'y': 2, 'z': 3 } | slice(['x', 'z']) }}
|
||||
|
||||
This will result in::
|
||||
|
||||
[1, 2]
|
||||
|
||||
To get date object from string use the `to_datetime` filter, (new in version in 2.2)::
|
||||
|
||||
# Get total amount of seconds between two dates. Default date format is %Y-%m-%d %H:%M:%S but you can pass your own format
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue