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

**URL:** <https://forum.ansible.com/t/rescue-not-being-executed-if-failed-inside-an-include-in-development-branch/20287>\
**Category:** Ansible Developer\
**Created:** [January 20, 2016, 10:15am UTC](https://forum.ansible.com/t/rescue-not-being-executed-if-failed-inside-an-include-in-development-branch/20287 "2016-01-20T10:15:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcodix](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dcodix](https://forum.ansible.com/u/dcodix)\
**Post date:** [January 20, 2016, 10:15am UTC](https://forum.ansible.com/t/rescue-not-being-executed-if-failed-inside-an-include-in-development-branch/20287/1 "2016-01-20T10:15:41Z")

</div>

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.
