Wednesday, October 28, 2026
HomeiOS Developmentios - Passing port: 23 in ios_command module the place default is...

ios – Passing port: 23 in ios_command module the place default is (22)

[ad_1]

I’m constructing a workflow the place i attempt to ssh a tool if that doesnt work i’ll telnet to the system, If telnet is succesful i’ll proceed my workflow,
Now when SSH is working my play is operating succesfully that’s ios_command module works, however when i make the connection through telnet, ios_command doesnt work as as a result of the default port is 22,

I’m ready run cisco ios instructions utilizing this

however it will be loads simpler if i may simply use ios_command module.
within the ansible docs i discovered the port possibility however its not talked about the place ought to i take advantage of it
https://docs.ansible.com/ansible/newest/collections/cisco/ios/ios_command_module.html#parameter-provider/port

 - title: testing port 23
   ios_command:
     instructions:
       - present model
   register: x
 - debug: var=x 

On this code snippet the place ought to i take advantage of port , i’ve tried to cross port: in vars.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments