Merge branch 'winrm_v2_fixes' of https://github.com/cchurch/ansible into cchurch-winrm_v2_fixes

This commit is contained in:
James Cammarata
2015-07-30 13:26:48 -04:00
25 changed files with 356 additions and 118 deletions

View File

@@ -127,6 +127,13 @@ class TaskExecutor:
return result
except AnsibleError, e:
return dict(failed=True, msg=to_unicode(e, nonstring='simplerepr'))
finally:
try:
self._connection.close()
except AttributeError:
pass
except Exception, e:
debug("error closing connection: %s" % to_unicode(e))
def _get_loop_items(self):
'''