Adding more fixes for integration testing under v2

This commit is contained in:
James Cammarata 2015-01-19 16:18:18 -06:00
commit c60c295ada
10 changed files with 317 additions and 23 deletions

View file

@ -267,6 +267,10 @@ class ModuleArgsParser:
# if we didn't see any module in the task at all, it's not a task really
if action is None:
raise AnsibleParserError("no action detected in task", obj=self._task_ds)
# FIXME: disabled for now, as there are other places besides the shell/script modules where
# having variables as the sole param for the module is valid (include_vars, add_host, and group_by?)
#elif args.get('_raw_params', '') != '' and action not in ('command', 'shell', 'script', 'include_vars'):
# raise AnsibleParserError("this task has extra params, which is only allowed in the command, shell or script module.", obj=self._task_ds)
# shell modules require special handling
(action, args) = self._handle_shell_weirdness(action, args)