diff --git a/library/git b/library/git index 505209ec3f..a8806c704c 100755 --- a/library/git +++ b/library/git @@ -163,24 +163,24 @@ def main(): if not os.path.exists(gitconfig): (rc, out, err) = clone(repo, dest) if rc != 0: - module.fail_json(out=out, err=err, rc=rc) + module.fail_json(msg=err) else: # else do a pull before = get_version(dest) (rc, out, err) = reset(dest) if rc != 0: - module.fail_json(out=out, err=err, rc=rc) + module.fail_json(msg=err) (rc, out, err) = pull(module, repo, dest, version) # handle errors from clone or pull if out.find('error') != -1 or err.find('ERROR') != -1: - module.fail_json(out=out, err=err) + module.fail_json(msg=err) # switch to version specified regardless of whether # we cloned or pulled (rc, out, err) = switch_version(module, dest, remote, version) if err.find('error') != -1: - module.fail_json(out=out, err=err) + module.fail_json(msg=err) # determine if we changed anything after = get_version(dest) diff --git a/test/TestRunner.py b/test/TestRunner.py index f3506886ae..a29c36009e 100644 --- a/test/TestRunner.py +++ b/test/TestRunner.py @@ -191,7 +191,7 @@ class TestRunner(unittest.TestCase): def test_git(self): if not get_binary("yum"): raise SkipTest - repo = 'git://github.com/ansible/ansible.git' + repo = 'http://github.com/ansible/ansible.git' dest = tempfile.mkdtemp() result = self._run('git', ['repo=%s' % repo, 'dest=%s' % dest]) assert 'failed' not in result