ansible/ansible — pull request #1838 by jvantuyl (2013-01-09 03:34:56+00:00)
Title: add with_sequence lookup plugin

Plugin allows you to do easy counts for items. Used as follows:

```yaml
----
- hosts: all

tasks:

# create groups
- group: name=evens state=present

- group: name=odds state=present

# create 20 test users
- user: name=$item state=present groups=odds
with_sequence: testuser%02d 1 19 2

- user: name=$item state=present groups=evens
with_sequence: testuser%02d 2 20 2
```

You can optionally leave out the stride or format string.