ansible/lib/ansible
Will Thames c9b212c5bd task_result _check_key should handle empty results (#16766)
When a task result has an empty results list, the
list should be ignored when determining the results
of `_check_key`. Here the empty list is treated the
same as a non-existent list.

This fixes a bug that manifests itself with squashed
items - namely the task result contains the correct
value for the key, but an empty results list. The
empty results list was treated as zero failures
when deciding which handler to call - so the task
show as a success in the output, but is deemed to
have failed when deciding whether to continue.

This also demonstrates a mismatch between task
result processing and play iteration.

A test is also added for this case, but it would not
have caught the bug - because the bug is really in
the display, and not the success/failure of the
task (visually the test is more accurate).

Fixes ansible/ansible-modules-core#4214
(cherry picked from commit eb2a3a91a8)
2016-08-29 08:40:38 -07:00
..
cli correctly set become value in console 2016-07-07 10:43:19 -04:00
compat Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version. 2015-10-16 08:21:28 -07:00
config Making the switch to v2 2015-05-03 21:47:26 -05:00
errors Add options to make includes 'static' 2016-03-24 10:12:51 -04:00
executor task_result _check_key should handle empty results (#16766) 2016-08-29 08:40:38 -07:00
galaxy moved validate info from vvv to debug 2016-05-27 09:44:42 -04:00
inventory The former match for a section header included hosts that began with a range. (#17225) 2016-08-24 10:59:32 -07:00
module_utils Relicense netcfg.py to BSD (#17110) 2016-08-16 16:35:07 -04:00
modules New release v2.1.2.0-0.1.rc1 2016-08-22 16:15:56 -05:00
new_inventory fix some warning of undefined name. 2015-10-09 12:43:42 +08:00
parsing Fix tmpfile misspelled as tmplfile (#17183) 2016-08-22 11:32:40 -07:00
playbook Force remote_user to be the currently user for connection=local 2016-07-06 23:10:47 -05:00
plugins Do not convert Nonetype to "None" (#17261) 2016-08-26 09:53:29 -07:00
template allow spaces before the filter string (#16312) 2016-06-15 14:17:56 -04:00
utils * Fix race in creating temp directories pre-fork (#16965) 2016-08-04 16:43:22 -07:00
vars Backport of f722d41 to the stable-2.1 branch 2016-08-22 10:21:45 -05:00
__init__.py Removing __version__ from __init__.py since it belongs in release.py 2016-06-04 11:00:08 -05:00
constants.py * Fix race in creating temp directories pre-fork (#16965) 2016-08-04 16:43:22 -07:00
release.py New release v2.1.2.0-0.1.rc1 2016-08-22 16:15:56 -05:00
test-requirements.txt Making the switch to v2 2015-05-03 21:47:26 -05:00