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