我想從使用Ansible的遠程服務器克隆git存儲庫。這是我正在嘗試:無法在我的本地使用Ansible克隆git存儲庫
---
# - name: '<some name>'
- hosts: localhost
#vars:
# - destination: /home/atul/Workplace/test-ansible
# - http_port: 80
# - max_clients: 200
- gather_facts: true
- tasks:
- git:
repo: http://<my git url>/test/test.git
dest: /home/atul/Workplace/test-ansible
version: master
我在我的終端得到這個。
PLAY [localhost] ******************************************************************************************************************************
TASK [Gathering Facts] ************************************************************************************************************************
ok: [127.0.0.1]
ERROR! the field 'hosts' is required but was not set
我不知道我在做錯的地方。
約1.5年前,這可能是一個有效的建議(雖然不是真的回答這個問題)。 – techraf