2020-02-12 03:00:01 +01:00
|
|
|
- name: test with_items
|
|
|
|
set_fact: "{{ item }}=moo"
|
|
|
|
with_items:
|
|
|
|
- 'foo'
|
|
|
|
- 'bar'
|
|
|
|
|
2020-10-02 23:56:31 +02:00
|
|
|
- name: Undefined var, skipped
|
|
|
|
debug:
|
|
|
|
with_items:
|
|
|
|
- '{{ baz }}'
|
|
|
|
when: false
|
|
|
|
|
2020-02-12 03:00:01 +01:00
|
|
|
- debug: var=foo
|
|
|
|
- debug: var=bar
|
|
|
|
|
|
|
|
- name: verify with_items results
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "foo == 'moo'"
|
|
|
|
- "bar == 'moo'"
|