From 222adde00e0ac2e73addd23be77c5afbd7ae6291 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Mon, 4 Mar 2019 14:49:32 +0100 Subject: [PATCH] Clarify return value of the sequence lookup Fixes #17852 --- lib/ansible/plugins/lookup/sequence.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/lookup/sequence.py b/lib/ansible/plugins/lookup/sequence.py index cfd3389549e7e6..2b8ce100660e0b 100644 --- a/lib/ansible/plugins/lookup/sequence.py +++ b/lib/ansible/plugins/lookup/sequence.py @@ -15,6 +15,7 @@ - '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 }}``. options: start: description: number at which to start the sequence @@ -62,7 +63,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