0

How to ignore below ansible SSH authentication checking for ansible playbooks?

Are you sure you want to continue connecting (yes/no)?

I tried below 3 options but it doesn't work.

ansible-playbook play.yml --ssh-common-args='-o StrictHostKeyChecking=no'

Env variable: 
export ANSIBLE_HOST_KEY_CHECKING=False

ansible.cfg file: host_key_checking = False

  • 1
    Since the mentioned options are the right way to do it, see also [How to set `host_key_checking=false` in Ansible inventory file?](https://stackoverflow.com/questions/23074412/), for me this issue isn't reproducible without much more information. – U880D Nov 20 '22 at 07:01
  • Thanks. actually, ansible is issueing "copy run scp" command on host device and I want that host device to ignore ssh authentication checking with scp server. how to do that? – code.coderpy Nov 20 '22 at 23:00
  • is it possible to have if else statement for prompt? – code.coderpy Nov 21 '22 at 01:31
  • Regarding "_Ansible is issueing `copy run scp` command on host device and I want that host device to ignore ssh authentication checking with scp server. How to do that?_" and because this seems to be new information, can you provide your Ansible task and more details regarding the host device by editing your initial question? – U880D Nov 21 '22 at 15:05

0 Answers0