Ansible has not git_win module (see here: https://groups.google.com/forum/#!searchin/ansible-project/git$20windows|sort:relevance/ansible-project/-uSBtqDPg0s/gPWlTlw3BwAJ )
I use msysgit to clone git repository under windows. Something like:
- name: clone repositories
raw: C:\OpenServer\modules\git\cmd\git.exe clone {{ item.repo }} C:\OPenserver\domains{{ sp.name }}{{ item.path }}version: “{{ item.version | default(‘HEAD’) }}”
with_items: “{{ sp.repositories }}”
tags:
- repo
So, there’is an issue: no way to clone repo via SSH protocol.
This works:
- name: clone repositories test1
raw: C:\OpenServer\modules\git\cmd\git.exe clone https://github.com/OpenCorpora/opencorpora.git C:\OPenserver\domains\opencorpora.local\www
``
But this fails:
- name: clone repositories``` test2``
raw: C:\OpenServer\modules\git\cmd\git.exe clone ```ssh://git@mydomain.tld/myproject.gitC:\OPenserver\domains\testwebsite.local\www
I’ve got sshd-agent on my server running with appopriate key (works fine on every linux server, no issues to clone repositories on these servers)
Is there an way to clone repos via SSH forwarding ssh-agent?