mirror of https://github.com/ansible/ansible.git
* dont clobber facts in loop
fixes #71031
(cherry picked from commit f9af27c631
)
pull/71192/head
parent
6e8adc0526
commit
4a6a9acea8
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- avoid clobbering existing facts inside loop when task also returns ansible_facts.
|
@ -0,0 +1,8 @@
|
||||
- name: Verify existing facts don't go undefined on unrelated new facts in loop
|
||||
hosts: localhost
|
||||
gather_facts: True
|
||||
tasks:
|
||||
- name: Ensure that 'virtualization_type' is not undefined after first loop iteration
|
||||
bogus_facts:
|
||||
loop: [1, 2, 3]
|
||||
when: ansible_facts['virtualization_type'] != 'NotDocker'
|
Loading…
Reference in New Issue