我最近安裝ansibleansible沒有看到主機(不可到達)
[email protected]:~$ ansible --version
ansible 2.3.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
我已經添加2行到:的/ etc/ansible /主機
[local]
192.168.1.102
和改變未註釋1線在ansible.cfg:
# uncomment this to disable SSH key host checking
host_key_checking = False
不過當我這樣做:
ansible all -m ping
192.168.1.102 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Warning: Permanently added '192.168.1.102' (ECDSA) to the list of known hosts.\r\nPermission denied (publickey,password).\r\n",
"unreachable": true
}
1)爲什麼我的本地主機不可達
2)爲什麼這個計劃是非常聰明,它試圖通過ssh連接,即使該選項被禁用。