我正在使用 ansible-galaxy (v2.0.0.2) 通过 requirements.yml 文件安装具有 Bitbucket 源代码的 ansible 角色。但我无法使用私钥从 bitbucket.org 签出代码。这是错误消息,也是我的requirements.yml
内容。
有人知道requirements.yml
ansible-galaxy 2.0.0.2的正确文件格式是什么吗?
+ ansible-galaxy -vvv install --force --role-file ansible/requirements.yml --roles-path ./ansible/roles
Using /etc/ansible/ansible.cfg as config file
Opened /tmp/.ansible_galaxy
found role {'scm': 'git', 'src': 'git@bitbucket.org:myrepo/nginx.git', 'version': 'latest', 'name': 'nginx'} in yaml file
Installing role nginx
[WARNING]: - nginx was NOT installed successfully: - command git checkout
latest failed in directory /tmp/tmpQRZc8j (rc=1)
ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.
[需求.yml]
- name: nginx
src: git@bitbucket.org:myrepo/nginx.git
scm: git
version: latest
accept_hostkey: yes
key_file: /tmp/.ssh/id_rsa