ansible/ansible — pull request #3559 by sergevanginderachter (2013-07-17 12:28:54+00:00)
Title: Introduce flat_list lookup plugin

# note: main list or list (sub)items can also be set as a variable, which is the main idea for this plugin

- hosts: localhost
gather_facts: False
tasks:
- debug: msg="{{item}}"
with_flat_list:
- a
- - b
- c
- d
- - e
- f
- - g
- h
- i
- j
- - k
- l

TASK: [debug msg="{{item}}"] **************************************************
ok: [localhost] => (item=a) => {"item": "a", "msg": "a"}
ok: [localhost] => (item=b) => {"item": "b", "msg": "b"}
ok: [localhost] => (item=c) => {"item": "c", "msg": "c"}
ok: [localhost] => (item=d) => {"item": "d", "msg": "d"}
ok: [localhost] => (item=e) => {"item": "e", "msg": "e"}
ok: [localhost] => (item=f) => {"item": "f", "msg": "f"}
ok: [localhost] => (item=g) => {"item": "g", "msg": "g"}
ok: [localhost] => (item=h) => {"item": "h", "msg": "h"}
ok: [localhost] => (item=i) => {"item": "i", "msg": "i"}
ok: [localhost] => (item=j) => {"item": "j", "msg": "j"}
ok: [localhost] => (item=k) => {"item": "k", "msg": "k"}
ok: [localhost] => (item=l) => {"item": "l", "msg": "l"}