From 6ca5fb49c303c4543e4fa498fe9aef52ab1f8ffb Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 2 Feb 2017 13:46:16 -0500 Subject: [PATCH] allow debug to be 'changed' (#20957) * allow debug to be 'changed' fixes #14430 * removed test that checked against this --- lib/ansible/plugins/callback/__init__.py | 2 -- test/units/plugins/callback/test_callback.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/lib/ansible/plugins/callback/__init__.py b/lib/ansible/plugins/callback/__init__.py index 56cd067996..76bf50322a 100644 --- a/lib/ansible/plugins/callback/__init__.py +++ b/lib/ansible/plugins/callback/__init__.py @@ -192,8 +192,6 @@ class CallbackBase: del result._result['results'] def _clean_results(self, result, task_name): - if 'changed' in result and task_name in ['debug']: - del result['changed'] if 'invocation' in result and task_name in ['debug']: del result['invocation'] diff --git a/test/units/plugins/callback/test_callback.py b/test/units/plugins/callback/test_callback.py index 87cbf3cd52..c793bc5995 100644 --- a/test/units/plugins/callback/test_callback.py +++ b/test/units/plugins/callback/test_callback.py @@ -76,8 +76,6 @@ class TestCallbackResults(unittest.TestCase): self.assertTrue('changed' in result) self.assertTrue('invocation' in result) cb._clean_results(result, 'debug') - self.assertFalse('changed' in result) - self.assertFalse('invocation' in result) class TestCallbackDumpResults(unittest.TestCase):