"rescue" not being executed if failed inside an "include" in development branch

Hi there,

I am not sure if it changed as a feature or if it is a bug so I am not opening an issue on github.

The thing is:

main.yml

`

  • name: deploy
    hosts: all
    gather_facts: True
    tasks:
  • block:
  • include: file_to_fail.yml
    #- file: path=/tmp/file1 state=directory
  • file: path=/tmp/file3 state=directory
    rescue:
  • file: path=/tmp/file2 state=directory
    #any_errors_fatal: yes
    `

file_to_fail.yml

`

  • file: path=/tmp/file1 state=directory
    `

I am testing making the “/tmp/file1” file creation fail.

So, the thing is that in current version (2.0.0) if it fails in the include the rescue part is called and the “tmp/file2” is created. But, with “devel” branch it does not. It works if instead of include I specify the task there (see commented line), but not with the include.