0

I have SSH access for a particular server, but when I am trying to run the playbook for that server. I am trying to do the deployment for that server but I'm facing an issue.

fatal: [lapp999.corp.com]]: UNREACHABLE! => {"changed": false, "msg": "Data could not be sent to remote host \"lapp999.corp.com\". Make sure this host can be reached over ssh: ********************************************************************************\n                             
!!!WARNING!!!\n********************************************************************************\nThis system is a restricted access system. All activity on this system is\nsubject to monitoring. Information collected that is malicious, unauthorized or\nunlawful, may be provided to the relevant authorities for further action. By\ncontinuing past this point, you expressly consent to this monitoring.\n********************************************************************************\
kmv@lapp999.corp.com: Permission denied (publickey).\r\n", "unreachable": true}

Can someone please assist to fix this one?

Arrow Root
  • 102
  • 11
Varun K M
  • 13
  • 4

1 Answers1

0

ansible-playbook -vvv Verbosity 3 starts printing commands run, including the ssh command line. Compare this to the ssh command you claim is working interactively.

Check if IdentityFile should be set for this host in ssh_config and if so to which credential.

Ansible's default is to not use interactive ssh options. If you were to need a password, would need to provide that via --ask-pass on the command line, or set variable ansible_password And have the sshpass program installed, because OpenSSH really doesn't want you to automate passwords.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34