2017-05-10 16 views
-1

デフォルトコンフィグレーションでは他のベンダーと連携できますか?例えばHuawei?デフォルトの設定可能なテンプレートがエラーを返します

sudoのansible -m

10.46.1.1 | UNREACHABLE! => { 
    "changed": false, 
    "msg": "Failed to connect to the host via ssh: \r\n**********************************************************************\r\n* Jus esate prisijunge prie privacios irangos. Visi veiksmai,vykdomi *\r\n* su sia iranga, yra fiksuojami. Tam, kad prieiti prie sios irangos *\r\n* ir (ar) atlikti irangos konfiguracija ar kitus veiksmus, jus turite*\r\n* tureti atitinkama leidima.           *\r\n* Uz neteiseta prisijungima bei neteisetus veiksmus su iranga taikoma*\r\n* istatymuose numatyta atsakomybe,iskaitant ir baudziamaja atsakomybe*\r\n* Prasome atsijungti.Jeigu jus esate autorizuotas vartotojas, *\r\n* prisijungdamas, jus atsakote uz teisingai atlikta konfiguracija ir *\r\n* kitus savo vardu atliktus veiksmus.        *\r\n**********************************************************************\r\n* You are connected to private equipment. All the actions performed *\r\n* with the equipment are recorded. In order to access this equipment *\r\n* and (or) perform its configuration or other actions, you must have*\r\n* an appropriate permission. Illegal connection and illegal actions *\r\n* with the equipment.            *\r\n* Will be subject to liability, including criminal liability, as  *\r\n* provided for in the laws of the Republic of Lithuania. Please  *\r\n* disconnect immediately. If you are an authorized user, by   *\r\n* connecting to the equipment, you assume liability for performing *\r\n* correct configuration and other actions under your behalf.   *\r\n**********************************************************************\r\nUser Authentication\r\npacket_write_wait: Connection to 10.46.1.1 port 22: Broken pipe\r\n", 
    "unreachable": true 
} 

または

osboxes -a '表示バージョン' サーバシェル@:

私はいくつかのテストを実行している場合は、次のようにコマンドosboxes:〜$ supending anonymous-ping servers

10.46.1.1 | UNREACHABLE! => { 
    "changed": false, 
    "msg": "Failed to connect to the host via ssh: \r\n**********************************************************************\r\n* Jus esate prisijunge prie privacios irangos. Visi veiksmai,vykdomi *\r\n* su sia iranga, yra fiksuojami. Tam, kad prieiti prie sios irangos *\r\n* ir (ar) atlikti irangos konfiguracija ar kitus veiksmus, jus turite*\r\n* tureti atitinkama leidima.           *\r\n* Uz neteiseta prisijungima bei neteisetus veiksmus su iranga taikoma*\r\n* istatymuose numatyta atsakomybe,iskaitant ir baudziamaja atsakomybe*\r\n* Prasome atsijungti.Jeigu jus esate autorizuotas vartotojas, *\r\n* prisijungdamas, jus atsakote uz teisingai atlikta konfiguracija ir *\r\n* kitus savo vardu atliktus veiksmus.        *\r\n**********************************************************************\r\n* You are connected to private equipment. All the actions performed *\r\n* with the equipment are recorded. In order to access this equipment *\r\n* and (or) perform its configuration or other actions, you must have*\r\n* an appropriate permission. Illegal connection and illegal actions *\r\n* with the equipment.            *\r\n* Will be subject to liability, including criminal liability, as  *\r\n* provided for in the laws of the Republic of Lithuania. Please  *\r\n* disconnect immediately. If you are an authorized user, by   *\r\n* connecting to the equipment, you assume liability for performing *\r\n* correct configuration and other actions under your behalf.   *\r\n**********************************************************************\r\nUser Authentication\r\nchannel_by_id: 2: bad id: channel free\r\nDisconnecting: Received data for nonexistent channel 2.\r\n", 
    "unreachable": true 
} 

"display version"のようなコマンドを入力しなくても、接続してすぐに切断するだけです。シスコのデバイスではなく、他のベンダーで実行しているからでしょうか?たぶんいくつかの特別なモジュールが必要でしょうか?

ありがとうございました

答えて

0

あなたはこれらのマシンに通常ssh経由で接続できることを確認しましたか?接続しようとしているマシンに無理なアカウントを作成しましたか? あなたのホスト上で実行しようとしているユーザーアカウントのように聞こえますが、おそらくホスト上にsshキーがありません。あなたは

ssh-copy-id [email protected] 

を試してみましたが、あなたがそのホストキーを持つ

ssh [email protected] 

にログインすることができます確認していますか?

+0

ユーザーが「ansible」以外です。したがって、ssh user @ hostが動作します。私はetc/ansible/hostsファイルを編集しました:[サーバー] 10.46.1.1 ansible_ssh_user =ユーザーansible_ssh_pass =パスワードansible_ssh_common_arg = " - o HostKeyAlgorithms = ssh-rsa -o KexAlgorithms = diffie-hellman-group1-sha1 -o暗号= aes256-cbc、3des-cbc -o MACs = hmac-md5、hmac-sha2-512 "また、/ etc/anonymous/group_vars/serversファイルを編集して、これを入力します:ansible_ssh_user:user。それでは、何が足りないでしょうか?ありがとう – Edvinas

0

「シェル」とは別のモジュールを使用して、Huaweiの機器にアクセスすることができます。 hereを見ると、いくつかのCloud Engineモジュールが表示されます。シェルモジュールはサーバ用であり、スイッチ用ではありません。

だから、私はこのような何かを記述します:ansible -m ce_command -a「表示バージョン」サーバ

関連する問題