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

This commit is contained in:
Michael DeHaan 2012-09-30 20:06:55 -04:00
parent d9bc01f443
commit 8e9344eef7

View file

@ -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: