diff --git a/lib/ansible/modules/commands/telnet.py b/lib/ansible/modules/commands/telnet.py index 65842233fa..17530aa88d 100644 --- a/lib/ansible/modules/commands/telnet.py +++ b/lib/ansible/modules/commands/telnet.py @@ -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 diff --git a/lib/ansible/plugins/action/telnet.py b/lib/ansible/plugins/action/telnet.py index de89339b9e..eb3883a3df 100644 --- a/lib/ansible/plugins/action/telnet.py +++ b/lib/ansible/plugins/action/telnet.py @@ -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(',')