Merge pull request #759 from lorin/error-feedback
If task action is invalid, output the name in error messagepull/4420/head
commit
38ed7ca7df
|
@ -71,7 +71,7 @@ class Task(object):
|
||||||
# split the action line into a module name + arguments
|
# split the action line into a module name + arguments
|
||||||
tokens = self.action.split(None, 1)
|
tokens = self.action.split(None, 1)
|
||||||
if len(tokens) < 1:
|
if len(tokens) < 1:
|
||||||
raise errors.AnsibleError("invalid/missing action in task")
|
raise errors.AnsibleError("invalid/missing action in task. name: %s" % self.name)
|
||||||
self.module_name = tokens[0]
|
self.module_name = tokens[0]
|
||||||
self.module_args = ''
|
self.module_args = ''
|
||||||
if len(tokens) > 1:
|
if len(tokens) > 1:
|
||||||
|
|
Loading…
Reference in New Issue