mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Ensure loop with delegate_to can short circuit the same as without delegate_to. Fixes #45189 (#45231)
This commit is contained in:
@@ -233,3 +233,22 @@
|
||||
- assert:
|
||||
that:
|
||||
- ansible_search_path == loop_search_path.results.0.item
|
||||
|
||||
# https://github.com/ansible/ansible/issues/45189
|
||||
- name: with_X conditional delegate_to shortcircuit on templating error
|
||||
debug:
|
||||
msg: "loop"
|
||||
when: false
|
||||
delegate_to: localhost
|
||||
with_list: "{{ fake_var }}"
|
||||
register: result
|
||||
failed_when: result is not skipped
|
||||
|
||||
- name: loop conditional delegate_to shortcircuit on templating error
|
||||
debug:
|
||||
msg: "loop"
|
||||
when: false
|
||||
delegate_to: localhost
|
||||
loop: "{{ fake_var }}"
|
||||
register: result
|
||||
failed_when: result is not skipped
|
||||
|
||||
Reference in New Issue
Block a user