Add alias to command option in telnet (#30825)

*  Add commands alias to telnet option
pull/21898/merge
Ganesh Nalawade 7 years ago committed by GitHub
parent b86eea9a52
commit 97858d91ac

@ -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(',')

Loading…
Cancel
Save