lae / ansible-role-travis-lxc

Ansible role that prepares a Travis CI environment and creates LXC containers for testing roles.
MIT License
4 stars 2 forks source link

Unable to connect to containers at deploy #31

Closed SebTM closed 5 years ago

SebTM commented 6 years ago

Hello,

I get the following error after the install-tasks with some profiles get throught without errors:

TASK [Gathering Facts] *********************************************************
Sunday 06 May 2018  21:18:11 +0000 (0:00:00.042)       0:00:00.042 ************ 
fatal: [debian-stretch-01]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added the ECDSA host key for IP address '10.0.3.142' to the list of known hosts.\r\nPermission denied (publickey,password).\r\n", "unreachable": true}
fatal: [debian-jessie-01]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added the ECDSA host key for IP address '10.0.3.71' to the list of known hosts.\r\nPermission denied (publickey,password).\r\n", "unreachable": true}
fatal: [ubuntu-trusty-01]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added the ECDSA host key for IP address '10.0.3.151' to the list of known hosts.\r\nPermission denied (publickey,password).\r\n", "unreachable": true}
fatal: [ubuntu-xenial-01]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added the ECDSA host key for IP address '10.0.3.148' to the list of known hosts.\r\nPermission denied (publickey,password).\r\n", "unreachable": true}

How can this be solved? Isn't it auto configured?

Best Regards

lae commented 6 years ago

This role currently requires you to login as root, which I forgot to document (i.e. set ansible_ssh_user: root in your inventory/vars, like here).

I have a local feature branch for making it possible to stick with the local user but it's not a trivial change. I'll leave this open until that branch is merged.

SebTM commented 6 years ago

Thx for you fast response, this solves my issue :) 👍 Fee free to close when you are ready to