ansible/ansible — pull request #3503 by bradleyy (2013-07-11 19:14:20+00:00)
Title: Don't produce Cartesian Product

This should take the nth element of all the arrays, and construct arrays with them.

Useful if you're attempting to do something like:

- name: put DB filenames in file
shell: ls {{download_dir}}/*.sql | sort
register: sql_files

- name: put DB names in var
shell: ls *.sql | sort | sed -e 's/.sql//' chdir={{download_dir}}
register: db_names

- name: install DBs
action: mysql_db db={{ item[0] }} state=import target={{ item[1] }}
with_nested: "{{ db_names.stdout_lines }}, {{ sql_files.stdout_lines }}"