ansible.netcommon.telnet – Executes a low-down and dirty telnet command¶
Note
This plugin is part of the ansible.netcommon collection (version 1.5.0).
To install it use: ansible-galaxy collection install ansible.netcommon
.
To use it in a playbook, specify: ansible.netcommon.telnet
.
New in version 1.0.0: of ansible.netcommon
Synopsis¶
Executes a low-down and dirty telnet command, not going through the module subsystem.
This is mostly to be used for enabling ssh on devices that only have telnet enabled by default.
Note
This module has a corresponding action plugin.
Parameters¶
Examples¶
- name: send configuration commands to IOS
ansible.netcommon.telnet:
user: cisco
password: cisco
login_prompt: 'Username: '
prompts:
- '[>#]'
command:
- terminal length 0
- configure terminal
- hostname ios01
- name: run show commands
ansible.netcommon.telnet:
user: cisco
password: cisco
login_prompt: 'Username: '
prompts:
- '[>#]'
command:
- terminal length 0
- show version
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
output
list
/ elements=string
|
always |
output of each command is an element in this list
Sample:
['success', 'success', '', 'warning .. something']
|
Authors¶
Ansible Core Team