Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用ansible创建docker swarm_Docker_Github_Ansible_Swarm - Fatal编程技术网

使用ansible创建docker swarm

使用ansible创建docker swarm,docker,github,ansible,swarm,Docker,Github,Ansible,Swarm,我使用github的以下内容来了解docker swarm如何通过ansible工作 我不确定我是否可以在github上提出问题的情况下提出这个疑问,所以我来了。我遵循了README.md中的步骤 在github上找到几种可能的解决方案后,我还更改了我的主机文件: [admin] IP_ADDRESS ansible_ssh_pass=vagrant ansible_ssh_user=vagrant [admin:vars] ansible_password=vagrant IP_地址是我在d

我使用github的以下内容来了解docker swarm如何通过ansible工作

我不确定我是否可以在github上提出问题的情况下提出这个疑问,所以我来了。我遵循了README.md中的步骤 在github上找到几种可能的解决方案后,我还更改了我的主机文件:

[admin]
IP_ADDRESS ansible_ssh_pass=vagrant ansible_ssh_user=vagrant
[admin:vars]
ansible_password=vagrant
IP_地址是我在digitalocean上创建的水滴的地址。我继续得到这个错误:

UNREACHABLE! => {"changed": false, "msg": "Authentication failed.", "unreachable": true}
我正在使用适当的API访问令牌执行README.md中给出的命令


有人能帮忙吗?提前感谢。

看起来您正在尝试使用用户“vagrant”和密码“vagrant”在主机管理员上与SSH连接。
我认为这不是Digital Ocean的默认凭证(更多的是流浪者凭证)。
使用
-vvvv
选项启动playbook,以获得有关身份验证问题的更多输出

ansible\u ssh\u user
ansible\u ssh\u pass
使用正确的值

您只需尝试直接与SSH连接即可检查它们:

ssh <SSH_USER>@<IP_ADDRESS>
ssh@
顺便说一句,自从ansible 2.0以来,
ssh\u部分在
ansible\u ssh\u用户
()
您还应该使用
ansible\u ssh\u pass
ansible\u password
中的一种,而不是两者都使用