2017-05-10 4 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 : ~ $ susible an-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\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 = pasword 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/ansible/group_vars/servers 파일에 편집했습니다 : ansible_ssh_user : user. 그래서, 충분하지 않을 수있는 것은 무엇입니까? 감사 – Edvinas

0

'화이버'와 다른 다른 모듈을 사용하여 화웨이 설비에 액세스 할 수 있습니다. here을 보면 일부 Cloud Engine 모듈이 표시됩니다. 셸 모듈은 스위치가 아닌 서버용입니다.

그래서, 다음처럼 작성할 수 있습니다 : ansible -m ce_command -a '디스플레이 버전'서버

관련 문제