【发布时间】:2016-08-24 16:00:20
【问题描述】:
您好,我正在尝试使用 ansible 克隆一个项目,但我不断收到以下错误
ERROR! this task 'git' has extra params, which is only allowed in the following modules: command, shell, script, include, include_vars, add_host, group_by, set_fact, raw, meta
The error appears to have been in '/vagrant/ansible/roles/rolename/tasks/main.yml': line 67, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- git: repo=ssh://git@git.example.sample.net:/component/exact/repo.git
^ here
The error appears to have been in '/vagrant/ansible/roles/rolename/tasks/main.yml': line 67, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- git: repo=ssh://git@git.example.sample.net:/component/exact/repo.git
^ here
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
我的 Ansible 任务是
- git: repo=ssh://git@git.example.sample.net:/component/exact/repo.git
dest=/home/
accept_hostkey = true
version= {{someversion}}
accept_hostkey = true
我的剧本中还有其他任务,但这些工作正常,但每当我包含 git 时它都会失败。
【问题讨论】:
标签: git ansible ansible-playbook ansible-2.x