Add alias to command option in telnet (#30825)

*  Add commands alias to telnet option
This commit is contained in:
Ganesh Nalawade 2017-09-28 18:07:37 +05:30 committed by GitHub
parent b86eea9a52
commit 97858d91ac
2 changed files with 2 additions and 1 deletions

View file

@ -22,6 +22,7 @@ options:
description: description:
- List of commands to be executed in the telnet session. - List of commands to be executed in the telnet session.
required: True required: True
aliases: ['commands']
host: host:
description: description:
- The host/target on which to execute the command - The host/target on which to execute the command

View file

@ -43,7 +43,7 @@ class ActionModule(ActionBase):
login_prompt = self._task.args.get('login_prompt', "login: ") login_prompt = self._task.args.get('login_prompt', "login: ")
password_prompt = self._task.args.get('password_prompt', "Password: ") password_prompt = self._task.args.get('password_prompt', "Password: ")
prompts = self._task.args.get('prompts', "$ ") 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): if isinstance(commands, text_type):
commands = commands.split(',') commands = commands.split(',')