mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Clarify return value of the sequence lookup (#53275)
* Clarify return value of the sequence lookup Fixes #17852 * Mention range filter
This commit is contained in:
parent
4cf7854ca3
commit
5734b4e69e
1 changed files with 5 additions and 1 deletions
|
@ -15,6 +15,8 @@ DOCUMENTATION = """
|
||||||
- 'Arguments can be specified as key=value pair strings or as a shortcut form of the arguments string is also accepted: [start-]end[/stride][:format].'
|
- 'Arguments can be specified as key=value pair strings or as a shortcut form of the arguments string is also accepted: [start-]end[/stride][:format].'
|
||||||
- 'Numerical values can be specified in decimal, hexadecimal (0x3f8) or octal (0600).'
|
- 'Numerical values can be specified in decimal, hexadecimal (0x3f8) or octal (0600).'
|
||||||
- Starting at version 1.9.2, negative strides are allowed.
|
- Starting at version 1.9.2, negative strides are allowed.
|
||||||
|
- Generated items are strings. Use Jinja2 filters to convert items to preferred type, e.g. ``{{ 1 + item|int }}``.
|
||||||
|
- See also Jinja2 ``range`` filter as an alternative.
|
||||||
options:
|
options:
|
||||||
start:
|
start:
|
||||||
description: number at which to start the sequence
|
description: number at which to start the sequence
|
||||||
|
@ -62,7 +64,9 @@ EXAMPLES = """
|
||||||
|
|
||||||
RETURN = """
|
RETURN = """
|
||||||
_list:
|
_list:
|
||||||
description: generated sequence of numbers or strings
|
description:
|
||||||
|
- A list containing generated sequence of items
|
||||||
|
type: list
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from re import compile as re_compile, IGNORECASE
|
from re import compile as re_compile, IGNORECASE
|
||||||
|
|
Loading…
Reference in a new issue