You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/v2/samples/with_indexed_items.yml

12 lines
226 B
YAML

- hosts: localhost
connection: local
gather_facts: no
vars:
some_list:
- a
- b
- c
tasks:
- debug: msg="at array position {{ item.0 }} there is a value {{ item.1 }}"
with_indexed_items: some_list