
特定のサーバーへの SSH アクセス権がありますが、そのサーバーのプレイブックを実行しようとしています。そのサーバーのデプロイメントを試みていますが、問題が発生しています。
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********************************************************************************\
[email protected]: Permission denied (publickey).\r\n", "unreachable": true}
誰かこれを修正するのを手伝ってくれませんか?
答え1
ansible-playbook -vvv
Verbosity 3 は、ssh コマンドラインを含む実行されたコマンドの出力を開始します。これを、対話的に動作していると主張する ssh コマンドと比較します。
IdentityFile
このホストに を設定する必要があるかどうかを確認しssh_config
、設定する場合はどの資格情報に設定するかを確認します。
Ansible のデフォルトでは、対話型 SSH オプションは使用されません。パスワードが必要な場合は、--ask-pass
コマンドラインでパスワードを入力するか、変数を設定しansible_password
てsshpass
プログラムをインストールする必要があります。これは、OpenSSH ではパスワードの自動化が望ましくないためです。