Multiple blocks, meta: end_play and undefined variables #68939
Labels
affects_2.9
This issue/PR affects Ansible v2.9
bug
This issue/PR relates to a bug.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
SUMMARY
Mutiple blocks and meta: end_play triggering undefined variable errors
ISSUE TYPE
COMPONENT NAME
block
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 18.04 LTS WSL
STEPS TO REPRODUCE
Gist here.
EXPECTED RESULTS
Be able to run block using tag
create_folder
, without errors pointing to undefined variables onmeta: end_play
task from the first block.ACTUAL RESULTS
Undefined variable error is seen, only pointing to
meta: end_play
task. The same variable is used indebug
(line 20) task and no error is triggered.Commenting lines 30 and 31 and rerun the playbook, finishes sucessfully.
Workaround is to add
- file_check is defined
to debug (Line 28) and meta (line 33)when
conditionsThe text was updated successfully, but these errors were encountered: