我想从使用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