mirror of https://github.com/ansible/ansible.git
allow incremental update for vars in loop for set_fact/include_vars (#38302)
* fix set_fact/include_vars looping * tests for all behaviours affected * add tests with injection off/onpull/38369/head
parent
1b9879ccbf
commit
2afb1090b1
@ -0,0 +1,19 @@
|
||||
- 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']
|
@ -0,0 +1,7 @@
|
||||
- name: Test no warnings ref "http://github.com/ansible/ansible/issues/37535"
|
||||
hosts: testhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: set ssh jump host args
|
||||
set_fact:
|
||||
ansible_ssh_common_args: "-o ProxyCommand='ssh -W %h:%p -q root@localhost'"
|
Loading…
Reference in New Issue