add an error when user tries to async something that can't be asynced
This commit is contained in:
parent
d9bc01f443
commit
8e9344eef7
1 changed files with 2 additions and 0 deletions
|
@ -355,6 +355,8 @@ class Runner(object):
|
||||||
|
|
||||||
handler = self.action_plugins.get(module_name, None)
|
handler = self.action_plugins.get(module_name, None)
|
||||||
if handler:
|
if handler:
|
||||||
|
if self.background != 0:
|
||||||
|
raise errors.AnsibleError("async mode is not supported with the %s module" % module_name)
|
||||||
result = handler.run(conn, tmp, module_name, module_args, inject)
|
result = handler.run(conn, tmp, module_name, module_args, inject)
|
||||||
else:
|
else:
|
||||||
if self.background == 0:
|
if self.background == 0:
|
||||||
|
|
Loading…
Reference in a new issue