From 8e9344eef77ae4b4aa3c456e902a7a93cade53e5 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sun, 30 Sep 2012 20:06:55 -0400 Subject: [PATCH] add an error when user tries to async something that can't be asynced --- lib/ansible/runner/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 5d231b0370..e0bd167453 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -355,6 +355,8 @@ class Runner(object): handler = self.action_plugins.get(module_name, None) 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) else: if self.background == 0: