* fix 'sequence' lookup shortcut syntax and documentation
* Update playbooks_loops.rst
Minor edits for grammar and clarity.
* Update playbooks_loops.rst
Another tweak for clarity.
pull/23099/head
Konstantin Suvorov9 years agocommitted byBrian Coca
@ -277,10 +277,12 @@ The authorized_key pattern is exactly where it comes up most.
Looping over Integer Sequences
``````````````````````````````
``with_sequence`` generates a sequence of items in ascending numerical order. You
can specify a start, end, and an optional step value.
``with_sequence`` generates a sequence of items. You
can specify a start value, an end value, an optional "stride" value that specifies the number of steps to increment the sequence, and an optional printf-style format string.
Arguments should be specified in key=value pairs. If supplied, the 'format' is a printf style string.
Arguments should be specified as key=value pair strings.
A simple 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).
Negative numbers are not supported. This works as follows::
@ -303,27 +305,20 @@ Negative numbers are not supported. This works as follows::
name: "{{ item }}"
state: present
groups: "evens"
with_sequence:
- start: 0
- end: 32
- format: testuser%02x
with_sequence: start=0 end=32 format=testuser%02x
# create a series of directories with even numbers for some reason