ansible/ansible — pull request #1558 by sergevanginderachter (2012-11-08 08:46:08+00:00)
Title: Add ability to name the remote when initially cloning it.

Right now, when using the remote parameter to name the remote repo, it only gets used when switching to a version, but not at the initial clone.

say I have a task like this:

- git: repo=git://github.com/ansible/ansible.git dest=/opt/ansible/ansible-0.8/ version=release-0.8 force=yes remote=upstream

- First clone will have a remote 'origin'
- on the next run it will error on the not exisiting remote 'upstream'

I just tested that, and it fails:

TASK: [git repo=git://github.com/ansible/ansible.git dest=/opt/ansible/ansible-devel/ version=devel force=yes remote=upstream] *********************
failed: [ansible-pr-1] => {"failed": true, "msg": "fatal: 'upstream' does not appear to be a git repository\nfatal: The remote end hung up unexpectedly\n"}

See also:

https://groups.google.com/forum/?fromgroups=#!topic/ansible-project/55lVUxcV9Gk