mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Fix triggering parent's always with run_once set (#35464)
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
tasks_run_after_failure: false
|
||||
rescue_run_after_failure: false
|
||||
always_run_after_failure: false
|
||||
nested_block_fail_always: false
|
||||
tasks:
|
||||
- block:
|
||||
- name: set block tasks run flag
|
||||
@@ -46,6 +47,18 @@
|
||||
# always_run_after_failure: true
|
||||
- meta: clear_host_errors
|
||||
|
||||
# https://github.com/ansible/ansible/issues/35148
|
||||
- block:
|
||||
- block:
|
||||
- name: EXPECTED FAILURE test triggering always by failing in nested block with run_once set
|
||||
fail:
|
||||
run_once: true
|
||||
always:
|
||||
- name: set block fail always run flag
|
||||
set_fact:
|
||||
nested_block_fail_always: true
|
||||
- meta: clear_host_errors
|
||||
|
||||
post_tasks:
|
||||
- assert:
|
||||
that:
|
||||
@@ -56,6 +69,7 @@
|
||||
- not tasks_run_after_failure
|
||||
- not rescue_run_after_failure
|
||||
- not always_run_after_failure
|
||||
- nested_block_fail_always
|
||||
- debug: msg="TEST COMPLETE"
|
||||
|
||||
- name: block with includes
|
||||
|
||||
Reference in New Issue
Block a user