Ansible 需要一个可靠的库存文件详细信息
有人能帮我写一个ansible清单文件连接到bitbucket吗?克隆一个文件并放入ansible机器 剧本Ansible 需要一个可靠的库存文件详细信息,ansible,Ansible,有人能帮我写一个ansible清单文件连接到bitbucket吗?克隆一个文件并放入ansible机器 剧本 --- - hosts: bitbucketURL tasks: - git: repo: https://p-bitbucket.com:5999/projects/VIT/repos/sample-playbooks/browse/hello.txt dest: /home/xxx/demo/output/ 库存文件 [bitbucket
---
- hosts: bitbucketURL
tasks:
- git:
repo: https://p-bitbucket.com:5999/projects/VIT/repos/sample-playbooks/browse/hello.txt
dest: /home/xxx/demo/output/
库存文件
[bitbucketURL]
p-bitbucket.com:5999
[bitbucketURL:vars]
ansible_connection=winrm
ansible_user=xxx
ansible_pass=<passwd>
-bash-4.2$ ansible-playbook -i inv demo_draft1.yml
PLAY [bitbucketURL] *****************************************************************************************************************************************
TASK [Gathering Facts] **************************************************************************************************************************************
fatal: [p-bitbucket.nl.eu.abnamro.com]: UNREACHABLE! => {"changed": false, "msg": "ssl: auth method ssl requires a password", "unreachable": true}
to retry, use: --limit @/home/c55016a/demo/demo_draft1.retry
PLAY RECAP **************************************************************************************************************************************************
p-bitbucket.nl.eu.abnamro.com : ok=0 changed=0 unreachable=1 failed=0
请帮助我用正确的参数编写正确的库存文件您根本不需要库存。您只需将播放设置为在
localhost
上执行:
---
- hosts: localhost
connection: local
gather_facts: false
tasks:
- git:
repo: https://p-bitbucket.com:5999/projects/VIT/repos/sample-playbooks/browse/hello.txt
dest: /home/xxx/demo/output/
也就是说,URL应该指向Git存储库,而不是单个文件(如果
hello.txt
是单个文件)。错误消息表明bitbucket需要密码。