admin 发表于 2023-3-28 15:00:16

Using a SSH password instead of a key is not possible because Host Key checking

172.24.110.164 | FAILED! => {
    "msg": "Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.Please add this host's fingerprint to your known_hosts file to manage this host."
}

# vim /etc/ansible/ansible.cfg
# mkdir /etc/ansible/
# vim /etc/ansible/ansible.cfg

host_key_checking=False
pipelining=True
forks=100



# ansible -i inventory -m ping all
/usr/local/lib/python3.6/site-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography will remove support for Python 3.6.
from cryptography.exceptions import InvalidSignature
172.24.110.164 | SUCCESS => {
    "ansible_facts": {
      "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "ping": "pong"
}

页: [1]
查看完整版本: Using a SSH password instead of a key is not possible because Host Key checking