[Ansible] error : 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.

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.

*****@@@@@@:~: ansible all -m ping
x.x.x.x | 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."
}

에러 발생시 아래 두가지중 선택해서 처리 필요

  • 환경변수 지정
export ANSIBLE_HOST_KEY_CHECKING=False
  • ~/.ansible.cfg 파일 에 해당 옵션 추가
[defaults]
host_key_checking = False

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다