【发布时间】:2017-06-01 09:48:27
【问题描述】:
我正在尝试使用 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
我不确定我在哪里做错了。
【问题讨论】: