Error Connecting to Cisco Switch

60 views
Skip to first unread message

Hossein Malakooti

unread,
Jun 24, 2022, 10:45:08 AM6/24/22
to Ansible Project
Hello Dear Gurus
I am trying to just simply connect to my Cisco switch. I've red previous topic about this issue but non of them helped me figure out how to fix this , your help is much appreciated

here is my inventory file
Capture.PNG
and here is the ping command I use
Capture1.PNG
I am using:
Ansible version 2.9.27
CENTOS 7.9.2009
Python 2.7.5

Thank you in advance

Parth Patel

unread,
Jun 24, 2022, 11:22:16 AM6/24/22
to ansible...@googlegroups.com
Please provide verbose output using -vvvv

--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9edf4c43-f53d-4949-8bbb-be728921c03cn%40googlegroups.com.

Ashish Sagar

unread,
Jun 24, 2022, 11:26:36 AM6/24/22
to ansible...@googlegroups.com
Are you able to connect to the Switch using SSH from the terminal ?

-Ashish

--

Parth Patel

unread,
Jun 24, 2022, 11:36:33 AM6/24/22
to ansible...@googlegroups.com
Also provide output of ansible conf file

Hossein Malakooti

unread,
Jun 24, 2022, 11:40:58 AM6/24/22
to ansible...@googlegroups.com
yes I can do SSH

Regards,

Hossein Malakooti
Network Administrator
Technical Services. I.T

TST-CF Express
5200 Maingate Drive
Mississauga, Ontario  L4W 1G5


You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/hNBqHSBth4o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CADa6Y5ZS2TxbNtAMPU_zFqLCsjvuvfymZQ8mn1Gg8agx2ikQwA%40mail.gmail.com.

Hossein Malakooti

unread,
Jun 24, 2022, 11:41:20 AM6/24/22
to ansible...@googlegroups.com
Sure -vvv
image.png

Regards,

Hossein Malakooti
Network Administrator
Technical Services. I.T

TST-CF Express
5200 Maingate Drive
Mississauga, Ontario  L4W 1G5

You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/hNBqHSBth4o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAEMGyLLVwxPmokE-KuTfmkRtFPN1nNVPDZSR4F1JHTifOAk_RA%40mail.gmail.com.

Hossein Malakooti

unread,
Jun 24, 2022, 11:49:59 AM6/24/22
to ansible...@googlegroups.com
sorry I am new to ansible  ,My ansible.cfg file is the default one. I haven't changed anything in there , do I need to put any entry on this file ?

Regards,

Hossein Malakooti
Network Administrator
Technical Services. I.T

TST-CF Express
5200 Maingate Drive
Mississauga, Ontario  L4W 1G5


You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/hNBqHSBth4o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAEMGyL%2Bk633-K54umBtLovctfqiu%3D3w6Eoa5exkNuT9GUEWdkg%40mail.gmail.com.

Sagar Paul

unread,
Jun 27, 2022, 1:24:24 AM6/27/22
to Ansible Project
Hey,
Can you please upgrade to Python 3.8+ and check if you are facing the same issue.

Regards,
Sagar Paul

Ashish Sagar

unread,
Jun 27, 2022, 2:28:11 AM6/27/22
to ansible...@googlegroups.com
Can you please try to change the incorrect ansible parameter (absible_user) to ansible_user=cisco and let me know.

Thanks
Ashish

On Fri, Jun 24, 2022 at 8:15 PM Hossein Malakooti <hmala...@tst-cfexpress.com> wrote:
--

Dick Visser

unread,
Jun 27, 2022, 5:50:28 AM6/27/22
to ansible...@googlegroups.com
Also "ansbile_network_os" is misspelled



On 2022-06-27 (Mon) 08:27, Ashish Sagar wrote:
> Can you please try to change the incorrect ansible parameter
> (a*b*sible_user) to ansible_user=cisco and let me know.
>
> Thanks
> Ashish
>
> On Fri, Jun 24, 2022 at 8:15 PM Hossein Malakooti
> <hmala...@tst-cfexpress.com <mailto:hmala...@tst-cfexpress.com>> wrote:
>
> Hello Dear Gurus
> I am trying to just simply connect to my Cisco switch. I've red
> previous topic about this issue but non of them helped me figure out
> how to fix this , your help is much appreciated
>
> here is my inventory file
> Capture.PNG
> and here is the ping command I use
> Capture1.PNG
> I am using:
> Ansible version 2.9.27
> CENTOS 7.9.2009
> Python 2.7.5
>
> Thank you in advance
>
> --
> 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 ansible-proje...@googlegroups.com
> <mailto:ansible-proje...@googlegroups.com>.
> <https://groups.google.com/d/msgid/ansible-project/9edf4c43-f53d-4949-8bbb-be728921c03cn%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 ansible-proje...@googlegroups.com
> <mailto:ansible-proje...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CADa6Y5YjvnRVH9%3Dy3aCdAe%2Bfp-EK%2B6cmxBabS%3DX2qVsyZwQgDQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CADa6Y5YjvnRVH9%3Dy3aCdAe%2Bfp-EK%2B6cmxBabS%3DX2qVsyZwQgDQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
OpenPGP_0x266713D4E6EF488D.asc
OpenPGP_signature

Mahdi Idriss

unread,
Jun 27, 2022, 11:08:52 AM6/27/22
to ansible...@googlegroups.com
Hey, i can see a mistyping issue (ansible-user=cisco) plz check it


--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c42fa0a8-6dee-4366-82a3-657102a9ccd6n%40googlegroups.com.

Hossein Malakooti

unread,
Jun 28, 2022, 9:56:52 AM6/28/22
to ansible...@googlegroups.com
Hi Ashish
Thanks for your reply you are right I've corrected that bit is didn't fix the actual problem :-(

Regards,

Hossein Malakooti
Network Administrator
Technical Services. I.T

TST-CF Express
5200 Maingate Drive
Mississauga, Ontario  L4W 1G5


You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/hNBqHSBth4o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CADa6Y5YjvnRVH9%3Dy3aCdAe%2Bfp-EK%2B6cmxBabS%3DX2qVsyZwQgDQ%40mail.gmail.com.

Hossein Malakooti

unread,
Jun 28, 2022, 11:07:03 AM6/28/22
to Ansible Project
Inventory.txt
Capture.PNG
Playbook: playbook-1.yml
Capture3.PNG

ansible.cfg:

[default]
export ANSIBLE_PARAMIKO_LOOK_FOR_KEYS=false
[paramiko_connection]
look_for_keys=false
[persistant_connection]
command_timeout=60

Command:
Capture2.PNG

Result:
Capture.PNG


Thanks in advance :-)

Parth Patel

unread,
Jun 28, 2022, 11:08:08 AM6/28/22
to ansible...@googlegroups.com
Try renaming inventory.txt file and keep simply “inventory”

Reply all
Reply to author
Forward
0 new messages