We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
maximum recursion depth exceeded -- related to callback/default.py
Running the `ansible-playbook -b --become-user root -i ansible-ose-inventory  /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml`

i am getting

```
statically included: /usr/share/ansible/openshift-ansible/roles/openshift_hosted/tasks/registry/registry.yml
statically included: /usr/share/ansible/openshift-ansible/roles/openshift_metrics/tasks/install.yml
ERROR! Unexpected Exception: maximum recursion depth exceeded while calling a Python object
the full traceback was:

Traceback (most recent call last):
  File "/bin/ansible-playbook", line 103, in <module>
    exit_code = cli.run()
  File "/usr/lib/python2.7/site-packages/ansible/cli/playbook.py", line 159, in run
    results = pbex.run()
  File "/usr/lib/python2.7/site-packages/ansible/executor/playbook_executor.py", line 89, in run
    self._tqm.load_callbacks()
  File "/usr/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py", line 172, in load_callbacks
    self._stdout_callback = callback_loader.get(self._stdout_callback)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/__init__.py", line 358, in get
    obj = obj(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py", line 41, in __init__
    super(CallbackModule, self).__init__()
...
    super(CallbackModule, self).__init__()
  File "/usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py", line 41, in __init__
    super(CallbackModule, self).__init__()
  File "/usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py", line 41, in __init__
    super(CallbackModule, self).__init__()
RuntimeError: maximum recursion depth exceeded while calling a Python object
```
##### Version

```
atomic-openshift-utils-3.3.37-1.git.0.10ff25b.el7.noarch
openshift-ansible-3.3.37-1.git.0.10ff25b.el7.noarch
```

The playbooks are installed from AtomicOpenShift/3.3/2016-10-18.2
The 3.4 has same problem. 3.2 Doesn't

```
openshift-ansible.noarch                  3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle
openshift-ansible-callback-plugins.noarch 3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle
openshift-ansible-docs.noarch             3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle
openshift-ansible-filter-plugins.noarch   3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle
openshift-ansible-lookup-plugins.noarch   3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle
openshift-ansible-playbooks.noarch        3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle
openshift-ansible-roles.noarch            3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle

ansible-playbook 2.2.0.0
  config file = /root/ansible.cfg
  configured module search path = Default w/o overrides
```
##### Steps To Reproduce

In description
##### Current Result

Infinite recursion with ansible 2.2.0.0
No problem with ansible 2.1.2.0

 The difference seems to be that the 2.1.2.0 do not have the `__init__` in  the

```
   /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py
```

```
class CallbackModule(CallbackBase):
...
    def __init__(self):

        self._play = None
        self._last_task_banner = None
        super(CallbackModule, self).__init__()
```

If I remove it from the same file on the old ansible, deployment seems
to work. Though I have no idea why it get's to the infinite recursion.
It doesn't make sense to me.
##### Expected Result

No problems with the infinite recursion
##### Additional Information

Red Hat Enterprise Linux Server release 7.2 (Maipo)

The inventory file

```
[OSEv3:children]
masters
nodes

[OSEv3:vars]
deployment_type=openshift-enterprise
ansible_ssh_user=cloud-user
ansible_sudo=true
ansible_sudo_user=root
openshift_use_manageiq=True
#use_cluster_metrics=true

openshift_additional_repos=[{'id': 'ose-devel', 'name': 'ose-devel', 'baseurl': 'http://download.xxx.redhat.com/rcm-guest/puddles/RHAOS/AtomicOpenShift-errata/3.3/latest/RH7-RHAOS-3.3/x86_64/os/', 'enabled': 1, 'gpgcheck': 0, 'skip_if_unavailable': 1}, {'id':'rhel-extras-candidate','name':'rhel-extras-candidate','baseurl':'http://download.xxx..redhat.com/brewroot/repos/extras-rhel-7.2-candidate/latest/x86_64/', 'enabled': 1, 'gpgcheck': 0, 'skip_if_unavailable': 1}]
openshift_docker_additional_registries=brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888
openshift_docker_insecure_registries=brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888

[masters]
ose3-master-08w85 openshift_scheduleable=True openshift_hostname=ose3-master-08w85 openshift_public_hostname=ose3-master-08w85

[nodes]
ose3-master-08w85 openshift_node_labels="{'region':'infra','zone':'default'}" openshift_hostname=ose3-master-08w85 openshift_public_hostname=ose3-master-08w85

ose3-node0-08w85 openshift_node_labels="{'region':'primary','zone':'east'}" openshift_hostname=ose3-node0-08w85 openshift_public_hostname=ose3-node0-08w85
ose3-node1-08w85 openshift_node_labels="{'region':'primary','zone':'west'}" openshift_hostname=ose3-node1-08w85 openshift_public_hostname=ose3-node1-08w85
```


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `callback_plugins/default.py`
Content:
```
1 '''Plugin to override the default output logic.'''
2 
3 # upstream: https://gist.github.com/cliffano/9868180
4 
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 
18 
19 # For some reason this has to be done
20 import imp
21 import os
22 
23 ANSIBLE_PATH = imp.find_module('ansible')[1]
24 DEFAULT_PATH = os.path.join(ANSIBLE_PATH, 'plugins/callback/default.py')
25 DEFAULT_MODULE = imp.load_source(
26     'ansible.plugins.callback.default',
27     DEFAULT_PATH
28 )
29 
30 try:
31     from ansible.plugins.callback import CallbackBase
32     BASECLASS = CallbackBase
33 except ImportError: # < ansible 2.1
34     BASECLASS = DEFAULT_MODULE.CallbackModule
35 
36 
37 class CallbackModule(DEFAULT_MODULE.CallbackModule):  # pylint: disable=too-few-public-methods,no-init
38     '''
39     Override for the default callback module.
40 
41     Render std err/out outside of the rest of the result which it prints with
42     indentation.
43     '''
44     CALLBACK_VERSION = 2.0
45     CALLBACK_TYPE = 'stdout'
46     CALLBACK_NAME = 'default'
47 
48     def _dump_results(self, result):
49         '''Return the text to output for a result.'''
50         result['_ansible_verbose_always'] = True
51 
52         save = {}
53         for key in ['stdout', 'stdout_lines', 'stderr', 'stderr_lines', 'msg']:
54             if key in result:
55                 save[key] = result.pop(key)
56 
57         output = BASECLASS._dump_results(self, result) # pylint: disable=protected-access
58 
59         for key in ['stdout', 'stderr', 'msg']:
60             if key in save and save[key]:
61                 output += '\n\n%s:\n\n%s\n' % (key.upper(), save[key])
62 
63         for key, value in save.items():
64             result[key] = value
65 
66         return output
67
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/callback_plugins/default.py b/callback_plugins/default.py
--- a/callback_plugins/default.py
+++ b/callback_plugins/default.py
@@ -45,6 +45,9 @@
     CALLBACK_TYPE = 'stdout'
     CALLBACK_NAME = 'default'
 
+    def __init__(self, *args, **kwargs):
+        BASECLASS.__init__(self, *args, **kwargs)
+
     def _dump_results(self, result):
         '''Return the text to output for a result.'''
         result['_ansible_verbose_always'] = True

{"golden_diff": "diff --git a/callback_plugins/default.py b/callback_plugins/default.py\n--- a/callback_plugins/default.py\n+++ b/callback_plugins/default.py\n@@ -45,6 +45,9 @@\n     CALLBACK_TYPE = 'stdout'\n     CALLBACK_NAME = 'default'\n \n+    def __init__(self, *args, **kwargs):\n+        BASECLASS.__init__(self, *args, **kwargs)\n+\n     def _dump_results(self, result):\n         '''Return the text to output for a result.'''\n         result['_ansible_verbose_always'] = True\n", "issue": "maximum recursion depth exceeded -- related to callback/default.py\nRunning the `ansible-playbook -b --become-user root -i ansible-ose-inventory  /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml`\n\ni am getting\n\n```\nstatically included: /usr/share/ansible/openshift-ansible/roles/openshift_hosted/tasks/registry/registry.yml\nstatically included: /usr/share/ansible/openshift-ansible/roles/openshift_metrics/tasks/install.yml\nERROR! Unexpected Exception: maximum recursion depth exceeded while calling a Python object\nthe full traceback was:\n\nTraceback (most recent call last):\n  File \"/bin/ansible-playbook\", line 103, in <module>\n    exit_code = cli.run()\n  File \"/usr/lib/python2.7/site-packages/ansible/cli/playbook.py\", line 159, in run\n    results = pbex.run()\n  File \"/usr/lib/python2.7/site-packages/ansible/executor/playbook_executor.py\", line 89, in run\n    self._tqm.load_callbacks()\n  File \"/usr/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py\", line 172, in load_callbacks\n    self._stdout_callback = callback_loader.get(self._stdout_callback)\n  File \"/usr/lib/python2.7/site-packages/ansible/plugins/__init__.py\", line 358, in get\n    obj = obj(*args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py\", line 41, in __init__\n    super(CallbackModule, self).__init__()\n...\n    super(CallbackModule, self).__init__()\n  File \"/usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py\", line 41, in __init__\n    super(CallbackModule, self).__init__()\n  File \"/usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py\", line 41, in __init__\n    super(CallbackModule, self).__init__()\nRuntimeError: maximum recursion depth exceeded while calling a Python object\n```\n##### Version\n\n```\natomic-openshift-utils-3.3.37-1.git.0.10ff25b.el7.noarch\nopenshift-ansible-3.3.37-1.git.0.10ff25b.el7.noarch\n```\n\nThe playbooks are installed from AtomicOpenShift/3.3/2016-10-18.2\nThe 3.4 has same problem. 3.2 Doesn't\n\n```\nopenshift-ansible.noarch                  3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle\nopenshift-ansible-callback-plugins.noarch 3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle\nopenshift-ansible-docs.noarch             3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle\nopenshift-ansible-filter-plugins.noarch   3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle\nopenshift-ansible-lookup-plugins.noarch   3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle\nopenshift-ansible-playbooks.noarch        3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle\nopenshift-ansible-roles.noarch            3.3.37-1.git.0.10ff25b.el7 @AtomicOpenShift-3.3-Puddle\n\nansible-playbook 2.2.0.0\n  config file = /root/ansible.cfg\n  configured module search path = Default w/o overrides\n```\n##### Steps To Reproduce\n\nIn description\n##### Current Result\n\nInfinite recursion with ansible 2.2.0.0\nNo problem with ansible 2.1.2.0\n\n The difference seems to be that the 2.1.2.0 do not have the `__init__` in  the\n\n```\n   /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py\n```\n\n```\nclass CallbackModule(CallbackBase):\n...\n    def __init__(self):\n\n        self._play = None\n        self._last_task_banner = None\n        super(CallbackModule, self).__init__()\n```\n\nIf I remove it from the same file on the old ansible, deployment seems\nto work. Though I have no idea why it get's to the infinite recursion.\nIt doesn't make sense to me.\n##### Expected Result\n\nNo problems with the infinite recursion\n##### Additional Information\n\nRed Hat Enterprise Linux Server release 7.2 (Maipo)\n\nThe inventory file\n\n```\n[OSEv3:children]\nmasters\nnodes\n\n[OSEv3:vars]\ndeployment_type=openshift-enterprise\nansible_ssh_user=cloud-user\nansible_sudo=true\nansible_sudo_user=root\nopenshift_use_manageiq=True\n#use_cluster_metrics=true\n\nopenshift_additional_repos=[{'id': 'ose-devel', 'name': 'ose-devel', 'baseurl': 'http://download.xxx.redhat.com/rcm-guest/puddles/RHAOS/AtomicOpenShift-errata/3.3/latest/RH7-RHAOS-3.3/x86_64/os/', 'enabled': 1, 'gpgcheck': 0, 'skip_if_unavailable': 1}, {'id':'rhel-extras-candidate','name':'rhel-extras-candidate','baseurl':'http://download.xxx..redhat.com/brewroot/repos/extras-rhel-7.2-candidate/latest/x86_64/', 'enabled': 1, 'gpgcheck': 0, 'skip_if_unavailable': 1}]\nopenshift_docker_additional_registries=brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888\nopenshift_docker_insecure_registries=brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888\n\n[masters]\nose3-master-08w85 openshift_scheduleable=True openshift_hostname=ose3-master-08w85 openshift_public_hostname=ose3-master-08w85\n\n[nodes]\nose3-master-08w85 openshift_node_labels=\"{'region':'infra','zone':'default'}\" openshift_hostname=ose3-master-08w85 openshift_public_hostname=ose3-master-08w85\n\nose3-node0-08w85 openshift_node_labels=\"{'region':'primary','zone':'east'}\" openshift_hostname=ose3-node0-08w85 openshift_public_hostname=ose3-node0-08w85\nose3-node1-08w85 openshift_node_labels=\"{'region':'primary','zone':'west'}\" openshift_hostname=ose3-node1-08w85 openshift_public_hostname=ose3-node1-08w85\n```\n\n", "before_files": [{"content": "'''Plugin to override the default output logic.'''\n\n# upstream: https://gist.github.com/cliffano/9868180\n\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n\n# For some reason this has to be done\nimport imp\nimport os\n\nANSIBLE_PATH = imp.find_module('ansible')[1]\nDEFAULT_PATH = os.path.join(ANSIBLE_PATH, 'plugins/callback/default.py')\nDEFAULT_MODULE = imp.load_source(\n    'ansible.plugins.callback.default',\n    DEFAULT_PATH\n)\n\ntry:\n    from ansible.plugins.callback import CallbackBase\n    BASECLASS = CallbackBase\nexcept ImportError: # < ansible 2.1\n    BASECLASS = DEFAULT_MODULE.CallbackModule\n\n\nclass CallbackModule(DEFAULT_MODULE.CallbackModule):  # pylint: disable=too-few-public-methods,no-init\n    '''\n    Override for the default callback module.\n\n    Render std err/out outside of the rest of the result which it prints with\n    indentation.\n    '''\n    CALLBACK_VERSION = 2.0\n    CALLBACK_TYPE = 'stdout'\n    CALLBACK_NAME = 'default'\n\n    def _dump_results(self, result):\n        '''Return the text to output for a result.'''\n        result['_ansible_verbose_always'] = True\n\n        save = {}\n        for key in ['stdout', 'stdout_lines', 'stderr', 'stderr_lines', 'msg']:\n            if key in result:\n                save[key] = result.pop(key)\n\n        output = BASECLASS._dump_results(self, result) # pylint: disable=protected-access\n\n        for key in ['stdout', 'stderr', 'msg']:\n            if key in save and save[key]:\n                output += '\\n\\n%s:\\n\\n%s\\n' % (key.upper(), save[key])\n\n        for key, value in save.items():\n            result[key] = value\n\n        return output\n", "path": "callback_plugins/default.py"}], "after_files": [{"content": "'''Plugin to override the default output logic.'''\n\n# upstream: https://gist.github.com/cliffano/9868180\n\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n\n# For some reason this has to be done\nimport imp\nimport os\n\nANSIBLE_PATH = imp.find_module('ansible')[1]\nDEFAULT_PATH = os.path.join(ANSIBLE_PATH, 'plugins/callback/default.py')\nDEFAULT_MODULE = imp.load_source(\n    'ansible.plugins.callback.default',\n    DEFAULT_PATH\n)\n\ntry:\n    from ansible.plugins.callback import CallbackBase\n    BASECLASS = CallbackBase\nexcept ImportError: # < ansible 2.1\n    BASECLASS = DEFAULT_MODULE.CallbackModule\n\n\nclass CallbackModule(DEFAULT_MODULE.CallbackModule):  # pylint: disable=too-few-public-methods,no-init\n    '''\n    Override for the default callback module.\n\n    Render std err/out outside of the rest of the result which it prints with\n    indentation.\n    '''\n    CALLBACK_VERSION = 2.0\n    CALLBACK_TYPE = 'stdout'\n    CALLBACK_NAME = 'default'\n\n    def __init__(self, *args, **kwargs):\n        BASECLASS.__init__(self, *args, **kwargs)\n\n    def _dump_results(self, result):\n        '''Return the text to output for a result.'''\n        result['_ansible_verbose_always'] = True\n\n        save = {}\n        for key in ['stdout', 'stdout_lines', 'stderr', 'stderr_lines', 'msg']:\n            if key in result:\n                save[key] = result.pop(key)\n\n        output = BASECLASS._dump_results(self, result) # pylint: disable=protected-access\n\n        for key in ['stdout', 'stderr', 'msg']:\n            if key in save and save[key]:\n                output += '\\n\\n%s:\\n\\n%s\\n' % (key.upper(), save[key])\n\n        for key, value in save.items():\n            result[key] = value\n\n        return output\n", "path": "callback_plugins/default.py"}]}