0

I am using the following from github to understand how docker swarm works via ansible https://github.com/patocox/ansible-swarm-do

I'm not sure if I can ask this doubt without raising an issue on github, so here I am. I followed the steps in README.md I also changed my hosts file after finding several possible solutions on github:

[admin]
IP_ADDRESS ansible_ssh_pass=vagrant ansible_ssh_user=vagrant
[admin:vars]
ansible_password=vagrant

IP_ADDRESS is of the droplet I created on digitalocean. I continue to get this error:

UNREACHABLE! => {"changed": false, "msg": "Authentication failed.", "unreachable": true}

I am executing the command as given in README.md with appropriate API access token.

Can someone help? Thanks in advance.

Sreenidhi
  • 245
  • 3
  • 11

1 Answers1

1

Looks like you are trying to connect with SSH on your host admin with user 'vagrant' and password 'vagrant'.
I don't think it's the default Digital Ocean's credentials (more the vagrant ones).
Launch the playbook with the -vvvv option to get more output about authentication problem.

Use the right values for ansible_ssh_user and ansible_ssh_pass.

You can check them by simply trying to connect directly with SSH:

ssh <SSH_USER>@<IP_ADDRESS>

BTW, since ansible 2.0 the ssh_ part is deprecated in ansible_ssh_user (Behavioral Inventory Parameters)
You should also use one of ansible_ssh_pass or ansible_password, not both.

zigarn
  • 10,892
  • 2
  • 31
  • 45