mirror of https://github.com/ansible/ansible.git
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.
20 lines
473 B
YAML
20 lines
473 B
YAML
7 years ago
|
- 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']
|