Ниже мой хост-файл /etc/ansible/hosts
root@ubuntu:/home/dasitha# cat /etc/ansible/hosts
[web]
10.0.0.112 ansible_user=root
[local]
127.0.0.1 ansible_user=root
Когда я выполняю ansible all -m ping -vv
ниже, выдается ошибка.
ansible 2.5.3
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.6 (default, Jun 22 2015, 18:00:18) [GCC 4.8.2]
Using /etc/ansible/ansible.cfg as config file
META: ran handlers
10.0.0.112 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).\r\n",
"unreachable": true
}
127.0.0.1 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).\r\n",
"unreachable": true
}
ssh [email protected]
? - person tux   schedule 24.05.2018systemctl status sshd
- person ilias-sp   schedule 24.05.2018ssh [email protected] [email protected]'s password: Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-31-generic i686)
it подсказка для пароля. Когда я ввел пароль. работает отлично - person   schedule 24.05.2018May 24 17:32:35 ubuntuClient sshd[2389]: Connection closed by 10.0.0.111 [preauth]
- person   schedule 24.05.2018