From d3d26d0cd6d2200f6e2a97aa95bfe4c8636c39af Mon Sep 17 00:00:00 2001 From: Jeroen Hoekx Date: Tue, 24 Apr 2012 16:57:04 +0200 Subject: [PATCH 1/2] Ohai and facter modules should not use the ansible_facts API. --- library/facter | 2 -- library/ohai | 2 -- 2 files changed, 4 deletions(-) diff --git a/library/facter b/library/facter index 7a60021a69..a9cbf3006a 100755 --- a/library/facter +++ b/library/facter @@ -22,6 +22,4 @@ # facter # ruby-json -echo '{ "ansible_facts":' /usr/bin/facter --json -echo '}' diff --git a/library/ohai b/library/ohai index 68c0b8acfe..3b6f3ae144 100755 --- a/library/ohai +++ b/library/ohai @@ -18,6 +18,4 @@ # along with Ansible. If not, see . # -echo '{ "ansible_facts":' /usr/bin/ohai -echo '}' \ No newline at end of file From cc579a8aa2f7721d5feb75ac03964b6b0862a9c3 Mon Sep 17 00:00:00 2001 From: Jeroen Hoekx Date: Tue, 24 Apr 2012 17:01:48 +0200 Subject: [PATCH 2/2] Fix tests for facter and the ansible_facts API. --- test/TestRunner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/TestRunner.py b/test/TestRunner.py index 96c88ee4b3..74e7952e86 100644 --- a/test/TestRunner.py +++ b/test/TestRunner.py @@ -85,7 +85,7 @@ class TestRunner(unittest.TestCase): if not get_binary("facter"): raise SkipTest result = self._run('facter',[]) - assert "hostname" in result['ansible_facts'] + assert "hostname" in result # temporarily disbabled since it occasionally hangs # ohai's fault, setup module doesn't actually run this @@ -95,7 +95,7 @@ class TestRunner(unittest.TestCase): # if not get_binary("facter"): # raise SkipTest # result = self._run('ohai',[]) - # assert "hostname" in result['ansible_facts'] + # assert "hostname" in result def test_copy(self): # test copy module, change trigger, etc