From 30d06dbceaf3a240d80bae60a60a72936f59ed4f Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Wed, 18 Apr 2012 22:23:33 -0400 Subject: [PATCH] Don't force down ansible facts back to setup, the setup module won't like parsing them on input and that data is already there. --- lib/ansible/runner.py | 2 +- test/TestRunner.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/runner.py b/lib/ansible/runner.py index f5a6de3f2a3..883c18860df 100755 --- a/lib/ansible/runner.py +++ b/lib/ansible/runner.py @@ -229,7 +229,7 @@ class Runner(object): # TODO: keep this as a dict through the whole path to simplify this code for (k,v) in inject.iteritems(): - if not k.startswith('facter_') and not k.startswith('ohai_'): + if not k.startswith('facter_') and not k.startswith('ohai_') and not k.startswith('ansible_'): if not is_dict: if str(v).find(" ") != -1: v = "\"%s\"" % v diff --git a/test/TestRunner.py b/test/TestRunner.py index 529b4a6965a..aac8c41b06b 100644 --- a/test/TestRunner.py +++ b/test/TestRunner.py @@ -178,6 +178,7 @@ class TestRunner(unittest.TestCase): # almost every time so changed is always true, this just tests that # rewriting the file is ok result = self._run('setup', [ "metadata=%s" % output, "a=2", "b=3", "c=4" ]) + print "RAW RESULT=%s" % result assert 'md5sum' in result def test_async(self):