0
我想从两个使用Ansible我的Git回购的拉动,但我似乎得到这个错误:错误 - {无法找到所需的可执行的git}
failed: [app01] (item={u'dest': u'/etc/', u'repo': u'Vigorate'}) =>{"failed": true, "item": {"dest": "/etc/", "repo": "Vigorate"}, "msg": "Failed to find required executable git"}
failed: [app01] (item={u'dest': u'/etc/', u'repo': u'Paint-UI'}) => {"failed": true, "item": {"dest": "/etc/", "repo": "Paint-UI"}, "msg": "Failed to find required executable git"}
我的混帐.yml剧本是这样的:
编辑:
- hosts: app01
vars:
- destination: /home/vagrant/rep
tasks:
- name: Install dependencies
apt: name={{ item }} state=present
with_items:
- htop
- git-all
- name: Pull from Git
git: repo=http://[email protected]/*****/{{ item.repo }}.git
dest={{ item.dest }}
# accept_hostkey=yes
# force=yes
# recursive=no
with_items:
-
dest: "{{ destination }}"
repo: RepoEexample
# -
# dest: "{{ destination }}"
# repo: RepoExample
任何帮助,将不胜感激
好了就解决了! 但现在我似乎得到错误“致命的:库‘[email protected]/daniyalj/Vigorate.git’不存在\ n”个 感谢您的帮助@笑马 – firebolt
精彩! 你将要在那里仔细检查git-URL。确保你有正确的(不管是http还是ssh)。同样,我建议写代码,而不变量,以确保你得到看中之前已经明确了语法,然后抛回那些在 –
小的http://解决的伎俩!感谢@笑马 – firebolt