From 978af89175f8235b767f90f9e4be5522b41da4e0 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 21 Aug 2013 16:43:12 -0500 Subject: [PATCH] Disallow running async tasks with lookup plugins Fixes #2897 --- lib/ansible/runner/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 7f9e18aa1c..8f8c3276d1 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -458,6 +458,9 @@ class Runner(object): # executing using with_items, so make multiple calls # TODO: refactor + if self.background > 0: + raise errors.AnsibleError("lookup plugins (with_*) cannot be used with async tasks") + aggregrate = {} all_comm_ok = True all_changed = False