1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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:
- 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

View file

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