##### SUMMARY
There are cases where you are using a role from inside a block, and the role itself uses a block, and you want to propagate errors from the inner block to be handled in a `rescue` in an outer block, and you want access to the `ansible_failed_result` (and `ansible_failed_task` - but see https://github.com/ansible/ansible/issues/57399) from the inner block.  This works fine if the inner block has no `rescue` or `always` clause - the error from the inner block is propagated to the outer block where it can be caught in a `rescue` clause with the expected information set in `ansible_failed_result`.

The problem arises when you want to use `always` or `rescue` in the inner block.  The outer `rescue` clause is still called, which means an error was detected by Ansible and handled, but the context information is gone and `ansible_failed_result` is undefined.  Same if a `rescue` is used in the inner block, with or without the `always`.  You can re-raise the error with the `ansible_failed_result` by using it as the only value for a `fail` module `msg` argument:
```yaml
        - block:
            ...
          rescue:
            - name: re-raise the error from the inner block
              fail:
                msg: "{{ ansible_failed_result }}"
```
This works in Ansible 2.9 and 2.10, but I don't know if it is "accidental" behavior or if this is the fully supported way to do this.  I would like to see if this is officially supported by Ansible core and, if this is the correct way to "catch" and "re-raise" errors, it should be documented in the block/rescue/always documentation.

See also https://richm.github.io/how-to-catch-and-reraise-errors-in-ansible

##### ISSUE TYPE
- Documentation Report

##### COMPONENT NAME
https://docs.ansible.com/ansible/latest/user_guide/playbooks_blocks.html#

##### ANSIBLE VERSION
```
ansible 2.9.14
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/rmeggins/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.8.6 (default, Sep 25 2020, 00:00:00) [GCC 10.2.1 20200723 (Red Hat 10.2.1-1)]
```

##### CONFIGURATION
```
no output?
```

##### OS / ENVIRONMENT
Fedora 32 - ansible 2.9 and 2.10

##### ADDITIONAL INFORMATION
https://richm.github.io/how-to-catch-and-reraise-errors-in-ansible

#
#
#
#
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import cmd
import functools
import os
import pprint
import queue
import sys
import threading
import time
from collections import deque
from multiprocessing import Lock
from jinja2.exceptions import UndefinedError
from ansible import constants as C
from ansible import context