711769db4f
* fix set_fact/include_vars looping
* tests for all behaviours affected
* add tests with injection off/on
(cherry picked from commit 2afb1090b1
)
19 lines
473 B
YAML
19 lines
473 B
YAML
- name: test set_fact incremental https://github.com/ansible/ansible/issues/38271
|
|
hosts: testhost
|
|
gather_facts: no
|
|
tasks:
|
|
- name: Generate inline loop for set_fact
|
|
set_fact:
|
|
dig_list: "{{ dig_list + [ item ] }}"
|
|
loop:
|
|
- two
|
|
- three
|
|
- four
|
|
vars:
|
|
dig_list:
|
|
- one
|
|
|
|
- name: verify cumulative set fact worked
|
|
assert:
|
|
that:
|
|
- dig_list == ['one', 'two', 'three', 'four']
|