Commit 8e9344ee by Michael DeHaan

add an error when user tries to async something that can't be asynced

parent d9bc01f4
...@@ -355,6 +355,8 @@ class Runner(object): ...@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment