ansible/ansible — pull request #628 by pas256 (2012-07-19 22:51:47+00:00)
Title: Pass through error message when repo not found

When the repository does not exist, the current Git module returns

failed: [localhost] => {"failed": true, "msg": "", "parsed": false}

With this PR, it catches the error and returns

failed: [localhost] => {"err": "ERROR: Repository not found.\nfatal: The remote end hung up
unexpectedly\n", "failed": true, "out": "Cloning into '/usr/share/admobius/git/admosible'...\n"}

This probably isn't the best way of catching errors, but git writes to stderr for non-errors like

Switched to a new branch 'feature1'

which is annoying, so not sure we can get around it.