Thanks , I have solved.

 �

BR

Sandy

 �

From: [email protected] <[email protected]> On 
Behalf Of Srinivas Naram
Sent: Tuesday, July 7, 2020 6:01 PM
To: [email protected]
Subject: Re: [ansible-project] cisco ios connect ssh error

 �

Username, Password is null. How are you passing user credentials ?

 �

Would it be possible �to share playbook ?

 �

On Tue, Jul 7, 2020 at 2:50 PM <[email protected] 
<mailto:[email protected]> > wrote:

Yes , I can connect ssh,but still show error 

 �

 �

“ssh sandy@xxxx

Password:

 �

 � � � � � � � � � � � � � � --- xxxx Global Limited ---

 �

 � � � � **** Unauthorized access is strictly prohibited *** tpesw-01#

tpesw-01#  � �“

 �

 �

fatal: [tpesw-01]: FAILED! => {

 � � � "ansible_facts": {},

 � � � "changed": false,

 � � � "failed_modules": {

 � � � � � � � "ios_facts": {

 � � � � � � � � � � � "exception": "WARNING: The below traceback may *not* be 
related to t � � � � � � � � � � � � � � � � � � � � � � � � he actual 
failure.\n � File \"/tmp/ansible_ios_facts_payload_NZrxLz/ansible_ios_f � � � � 
� � � � � � � � � � � � � � � � � � � � 
acts_payload.zip/ansible/module_utils/network/common/network.py\", line 229, in 
� � � � � � � � � � � � � � � � � � � � � � � � � get_capabilities\n � � � 
capabilities = Connection(module._socket_path).get_capabil � � � � � � � � � � 
� � � � � � � � � � � � � � ities()\n � File 
\"/tmp/ansible_ios_facts_payload_NZrxLz/ansible_ios_facts_payloa � � � � � � � 
� � � �  � � � � � � � � � � � � �d.zip/ansible/module_utils/connection.py\", 
line 185, in __rpc__\n � � � raise Conn � � � � � � � � � � � � � � � � � � � � 
� � � � ectionError(to_text(msg, errors='surrogate_then_replace'), 
code=code)\n",

 � � � � � � � � � � � "failed": true,

 � � � � � � � � � � � "invocation": {

 � � � � � � �  � � � � � � � �"module_args": {

 � � � � � � � � � � � � � � � � � � � "auth_pass": null,

 � � � � � � � � � � � � � � � � � � � "authorize": null,

 � � � � � � � � � � � � � � � � � � � "gather_network_resources": null,

 � � � � � � � � � � � � � � � � � � � "gather_subset": [

 � � � � � � � � � � � � � � � � � � � � � � � "all"

 � � � � � � � � � � � � � � � � � � � ],

 � � � � � �  � � � � � � � � � � � � �"host": null,

 � � � � � � � � � � � � � � � � � � � "password": null,

 � � � � � � � � � � � � � � � � � � � "port": null,

 � � � � � � � � � � � � � � � � � � � "provider": null,

 � � � � � � � � � � � � � � � � � � � "ssh_keyfile": null,

 � � � � � � � � � � � � � � � � � � � "timeout": null,

 � � � � � � � � � � � � � � � � � � � "username": null

 � � �  � � � � � � � � � � � �}

 � � � � � � � � � � � },

 � � � � � � � � � � � "msg": "[Errno -2] Name or service not known"

 � � � � � � � }

 � � � },

 � � � "msg": "The following modules failed to execute: ios_facts\n"

}

BR

 �

 �

Sandy

 �

From: [email protected] 
<mailto:[email protected]>  <[email protected] 
<mailto:[email protected]> > On Behalf Of Srinivas Naram
Sent: Tuesday, July 7, 2020 3:49 PM
To: [email protected] <mailto:[email protected]> 
Subject: Re: [ansible-project] cisco ios connect ssh error

 �

Are you able to connect to Cisco Switch from Ansible server via ssh ? The error 
says 'Connection Error'.

 �

On Tue, Jul 7, 2020 at 1:03 PM Sandy Hung <[email protected] 
<mailto:[email protected]> > wrote:

I connect cisco switch run playbook show error msg

please help thanks.

fatal: [tpesw-01]: FAILED! => {

 �  � "ansible_facts": {},

 �  � "changed": false,

 �  � "failed_modules": {

 �  �  �  � "ios_facts": {

 �  �  �  �  �  � "exception": "WARNING: The below traceback may *not* be 
related to the actual failure.\n � File 
\"/tmp/ansible_ios_facts_payload_8veYSP/ansible_ios_facts_payload.zip/ansible/module_utils/network/common/network.py\",
 line 229, in get_capabilities\n �  � capabilities = 
Connection(module._socket_path).get_capabilities()\n � File 
\"/tmp/ansible_ios_facts_payload_8veYSP/ansible_ios_facts_payload.zip/ansible/module_utils/connection.py\",
 line 185, in __rpc__\n �  � raise ConnectionError(to_text(msg, 
errors='surrogate_then_replace'), code=code)\n",

 �  �  �  �  �  � "failed": true,

 �  �  �  �  �  � "invocation": {

 �  �  �  �  �  �  �  � "module_args": {

 �  �  �  �  �  �  �  �  �  � "auth_pass": null,

 �  �  �  �  �  �  �  �  �  � "authorize": null,

 �  �  �  �  �  �  �  �  �  � "gather_network_resources": null,

 �  �  �  �  �  �  �  �  �  � "gather_subset": [

 �  �  �  �  �  �  �  �  �  �  �  � "all"

 �  �  �  �  �  �  �  �  �  � ],

 �  �  �  �  �  �  �  �  �  � "host": null,

 �  �  �  �  �  �  �  �  �  � "password": null,

 �  �  �  �  �  �  �  �  �  � "port": null,

 �  �  �  �  �  �  �  �  �  � "provider": null,

 �  �  �  �  �  �  �  �  �  � "ssh_keyfile": null,

 �  �  �  �  �  �  �  �  �  � "timeout": null,

 �  �  �  �  �  �  �  �  �  � "username": null

 �  �  �  �  �  �  �  � }

 �  �  �  �  �  � },

 �  �  �  �  �  � "msg": "[Errno -2] Name or service not known"

 �  �  �  � }

 �  � },

 �  � "msg": "The following modules failed to execute: ios_facts\n"

}

 �

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected] 
<mailto:[email protected]> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7bf542cc-2a7a-45ba-b94d-9332327f7e6bn%40googlegroups.com
 
<https://groups.google.com/d/msgid/ansible-project/7bf542cc-2a7a-45ba-b94d-9332327f7e6bn%40googlegroups.com?utm_medium=email&utm_source=footer>
 .

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected] 
<mailto:[email protected]> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAG-N3P4jR8-OoF80TbjoYo42F7BgFUaZ7cTCvRLevRXudjiT2Q%40mail.gmail.com
 
<https://groups.google.com/d/msgid/ansible-project/CAG-N3P4jR8-OoF80TbjoYo42F7BgFUaZ7cTCvRLevRXudjiT2Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
 .

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected] 
<mailto:[email protected]> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/006701d6543f%24d7211270%2485633750%24%40abagile.com
 
<https://groups.google.com/d/msgid/ansible-project/006701d6543f%24d7211270%2485633750%24%40abagile.com?utm_medium=email&utm_source=footer>
 .

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected] 
<mailto:[email protected]> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAG-N3P6O6nMSA8xDwYoB3yjLzQfsCO4i3pDNudjJFuUPtcT1dw%40mail.gmail.com
 
<https://groups.google.com/d/msgid/ansible-project/CAG-N3P6O6nMSA8xDwYoB3yjLzQfsCO4i3pDNudjJFuUPtcT1dw%40mail.gmail.com?utm_medium=email&utm_source=footer>
 .

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/011301d655d3%244c7e14c0%24e57a3e40%24%40abagile.com.

Reply via email to