mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-02 11:22:47 +00:00
Add alias to command option in telnet (#30825)
* Add commands alias to telnet option
This commit is contained in:
@@ -22,6 +22,7 @@ options:
|
||||
description:
|
||||
- List of commands to be executed in the telnet session.
|
||||
required: True
|
||||
aliases: ['commands']
|
||||
host:
|
||||
description:
|
||||
- The host/target on which to execute the command
|
||||
|
||||
@@ -43,7 +43,7 @@ class ActionModule(ActionBase):
|
||||
login_prompt = self._task.args.get('login_prompt', "login: ")
|
||||
password_prompt = self._task.args.get('password_prompt', "Password: ")
|
||||
prompts = self._task.args.get('prompts', "$ ")
|
||||
commands = self._task.args.get('command')
|
||||
commands = self._task.args.get('command') or self._task.args.get('commands')
|
||||
|
||||
if isinstance(commands, text_type):
|
||||
commands = commands.split(',')
|
||||
|
||||
Reference in New Issue
Block a user