diff --git a/lib/ansible/plugins/connection/__init__.py b/lib/ansible/plugins/connection/__init__.py index 8528a2e75d9..315293163b5 100644 --- a/lib/ansible/plugins/connection/__init__.py +++ b/lib/ansible/plugins/connection/__init__.py @@ -42,6 +42,8 @@ except ImportError: __all__ = ['ConnectionBase', 'ensure_connect'] +BUFSIZE = 65536 + def ensure_connect(func): @wraps(func) diff --git a/lib/ansible/plugins/connection/chroot.py b/lib/ansible/plugins/connection/chroot.py index 7918ac5602c..65c37a08417 100644 --- a/lib/ansible/plugins/connection/chroot.py +++ b/lib/ansible/plugins/connection/chroot.py @@ -28,7 +28,7 @@ import traceback from ansible import constants as C from ansible.errors import AnsibleError -from ansible.plugins.connection import ConnectionBase +from ansible.plugins.connection import ConnectionBase, BUFSIZE from ansible.module_utils.basic import is_executable from ansible.utils.unicode import to_bytes @@ -38,8 +38,6 @@ except ImportError: from ansible.utils.display import Display display = Display() -BUFSIZE = 65536 - class Connection(ConnectionBase): ''' Local chroot based connections ''' diff --git a/lib/ansible/plugins/connection/docker.py b/lib/ansible/plugins/connection/docker.py index b1c499ed725..13c6d8dc90b 100644 --- a/lib/ansible/plugins/connection/docker.py +++ b/lib/ansible/plugins/connection/docker.py @@ -35,7 +35,7 @@ from distutils.version import LooseVersion import ansible.constants as C from ansible.errors import AnsibleError, AnsibleFileNotFound -from ansible.plugins.connection import ConnectionBase +from ansible.plugins.connection import ConnectionBase, BUFSIZE from ansible.utils.unicode import to_bytes try: @@ -44,8 +44,6 @@ except ImportError: from ansible.utils.display import Display display = Display() -BUFSIZE = 65536 - class Connection(ConnectionBase): ''' Local docker based connections ''' diff --git a/lib/ansible/plugins/connection/jail.py b/lib/ansible/plugins/connection/jail.py index d44213f439b..f5cd6d2ef1e 100644 --- a/lib/ansible/plugins/connection/jail.py +++ b/lib/ansible/plugins/connection/jail.py @@ -29,7 +29,7 @@ import traceback from ansible import constants as C from ansible.errors import AnsibleError -from ansible.plugins.connection import ConnectionBase +from ansible.plugins.connection import ConnectionBase, BUFSIZE from ansible.utils.unicode import to_bytes try: @@ -38,8 +38,6 @@ except ImportError: from ansible.utils.display import Display display = Display() -BUFSIZE = 65536 - class Connection(ConnectionBase): ''' Local BSD Jail based connections ''' diff --git a/lib/ansible/plugins/connection/libvirt_lxc.py b/lib/ansible/plugins/connection/libvirt_lxc.py index 9c4d6eac27c..2b92e9c9dc7 100644 --- a/lib/ansible/plugins/connection/libvirt_lxc.py +++ b/lib/ansible/plugins/connection/libvirt_lxc.py @@ -29,7 +29,7 @@ import traceback from ansible import constants as C from ansible.errors import AnsibleError -from ansible.plugins.connection import ConnectionBase +from ansible.plugins.connection import ConnectionBase, BUFSIZE from ansible.utils.unicode import to_bytes try: @@ -38,8 +38,6 @@ except ImportError: from ansible.utils.display import Display display = Display() -BUFSIZE = 65536 - class Connection(ConnectionBase): ''' Local lxc based connections ''' diff --git a/lib/ansible/plugins/connection/zone.py b/lib/ansible/plugins/connection/zone.py index b65c80b73fb..2bd49a5249f 100644 --- a/lib/ansible/plugins/connection/zone.py +++ b/lib/ansible/plugins/connection/zone.py @@ -30,7 +30,7 @@ import traceback from ansible import constants as C from ansible.errors import AnsibleError -from ansible.plugins.connection import ConnectionBase +from ansible.plugins.connection import ConnectionBase, BUFSIZE from ansible.utils import to_bytes try: @@ -39,8 +39,6 @@ except ImportError: from ansible.utils.display import Display display = Display() -BUFSIZE = 65536 - class Connection(ConnectionBase): ''' Local zone based connections '''