Resolved bug about block/rescue does not seem solved to me

Hi,

I opened an issue on github: https://github.com/ansible/ansible/issues/14324

Now it has been closed and it did not seem solved to me.

I am testing with:

ansible 2.2.0 (devel 48d01f63ca) last updated 2016/04/28 14:11:12 (GMT +000)
lib/ansible/modules/core: (detached HEAD f3fef24e49) last updated 2016/04/28 14:12:06 (GMT +000)
lib/ansible/modules/extras: (detached HEAD 0b66156f25) last updated 2016/04/28 14:12:54 (GMT +000)
config file = /home/dani.codina/.ansible.cfg
configured module search path = Default w/o overrides

Maybe I am doing something wrong, but it seems to me that the original issue yet persist. When the “fail” is provoked inside another file the “rescue” is not called, but when it is directly called on the block it is.

The issue is closed, but it does not seem to me that it is, at least on that version.

dcodix, based on this gist everything seems to be working as expected: https://gist.github.com/jimi-c/835975f9d4f081161d1085dd82656470

Perhaps my follow-up fix in 15715 corrected the problem you were still seeing? If not, could you please share a gist containing a sample playbook/includes which reproduce the issue?

Hi James,

I just tested it again with:

$ ansible --version /usr/lib64/python2.6/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability. _warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning) ansible 2.2.0 (devel 161388226b) last updated 2016/05/11 15:10:41 (GMT +000) lib/ansible/modules/core: (detached HEAD 9dfed7c849) last updated 2016/05/11 15:11:40 (GMT +000) lib/ansible/modules/extras: (detached HEAD 2665acb257) last updated 2016/05/11 15:12:21 (GMT +000) config file = /home/here/.ansible.cfg configured module search path = Default w/o overrides

And it seems to be working. Don’t know if something changed since last time I tested it or if I got confused when I did.
Now it seems to be executing the rescue block in both cases (directly on the block or included), so it seems ok to me.

Thanks!