mirror of
https://github.com/ansible/ansible.git
synced 2026-08-02 08:03:18 +02:00
Parser errors from within includes should not be rescueable (#73722)
* Parser errors from within includes should not be rescueable * Also fixes unit tests Fixes #73657
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
- hosts: localhost
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- block:
|
||||
- include_tasks: issue73657_tasks.yml
|
||||
rescue:
|
||||
- debug:
|
||||
msg: SHOULD_NOT_EXECUTE
|
||||
@@ -0,0 +1,2 @@
|
||||
- wrong.wrong.wrong:
|
||||
parser: error
|
||||
@@ -135,3 +135,7 @@ cat out.txt
|
||||
test "$(grep out.txt -ce 'In imported playbook')" = 2
|
||||
test "$(grep out.txt -ce 'In imported tasks')" = 3
|
||||
test "$(grep out.txt -ce 'In imported role')" = 3
|
||||
|
||||
# https://github.com/ansible/ansible/issues/73657
|
||||
ansible-playbook issue73657.yml 2>&1 | tee issue73657.out
|
||||
test "$(grep -c 'SHOULD_NOT_EXECUTE' issue73657.out)" = 0
|
||||
|
||||
Reference in New Issue
Block a user