Errors in block never trigger rescue or always in plays included from a handler #40130
Labels
affects_2.5
This issue/PR affects Ansible v2.5
bug
This issue/PR relates to a bug.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
ISSUE TYPE
COMPONENT NAME
Core
ANSIBLE VERSION
CONFIGURATION
ANSIBLE_PIPELINING(/home/ops/projects/ng/miles_ops/ansible/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/home/ops/projects/ng/miles_ops/ansible/ansible.cfg) = -q -o ControlPersist=15m -o ControlMaster=auto -o PreferredAuthentications=publickey -o GSSAPIAuthentication=no
ANSIBLE_SSH_CONTROL_PATH(/home/ops/projects/ng/miles_ops/ansible/ansible.cfg) = ~/.ssh/mux-%%r@%%h:%%p
ANSIBLE_SSH_RETRIES(/home/ops/projects/ng/miles_ops/ansible/ansible.cfg) = 10
CACHE_PLUGIN(/home/ops/projects/ng/miles_ops/ansible/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/home/ops/projects/ng/miles_ops/ansible/ansible.cfg) = /tmp
CACHE_PLUGIN_TIMEOUT(/home/ops/projects/ng/miles_ops/ansible/ansible.cfg) = 2592000
COMMAND_WARNINGS(/home/ops/projects/ng/miles_ops/ansible/ansible.cfg) = False
DEFAULT_FORKS(/home/ops/projects/ng/miles_ops/ansible/ansible.cfg) = 500
DEFAULT_SCP_IF_SSH(/home/ops/projects/ng/miles_ops/ansible/ansible.cfg) = True
DEPRECATION_WARNINGS(/home/ops/projects/ng/miles_ops/ansible/ansible.cfg) = False
RETRY_FILES_ENABLED(/home/ops/projects/ng/miles_ops/ansible/ansible.cfg) = False
OS / ENVIRONMENT
Ubuntu 14.04.5 LTS
SUMMARY
In plays included from a handler,
rescue
andalways
block sections are never called. This is important because this appears to be the only workaround (as described in the first comment here: #14270) for ansible not having any way to run a task when a handler fails.STEPS TO REPRODUCE
EXPECTED RESULTS
The output of the block should be the same as if it were run in main.yml, i.e.
ACTUAL RESULTS
Only the tasks in block: are run. At level -vvvv this looks like:
The text was updated successfully, but these errors were encountered: