Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify return value of the sequence lookup #53275

Merged
merged 2 commits into from
Mar 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/ansible/plugins/lookup/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
- '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).'
- 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 }}``.
mkrizek marked this conversation as resolved.
Show resolved Hide resolved
- See also Jinja2 ``range`` filter as an alternative.
options:
start:
description: number at which to start the sequence
Expand Down Expand Up @@ -62,7 +64,9 @@

RETURN = """
_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
Expand Down