From 876035c0b1d5f286d906ad48b4165d33de4e6b02 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Tue, 25 Feb 2014 11:18:06 -0500 Subject: [PATCH] Fixes #6161 Get the delegate host info properly from the hostvars object --- lib/ansible/runner/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 5cef4344cc3..aaf9c8b18c1 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -324,9 +324,9 @@ class Runner(object): this_host = delegate['host'] # get the vars for the delegate by it's name - if this_host in delegate['inject']['hostvars']: + try: this_info = delegate['inject']['hostvars'][this_host] - else: + except: # make sure the inject is empty for non-inventory hosts this_info = {}