summaryrefslogtreecommitdiffstats
path: root/bin/ansible-connection
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ansible-connection')
-rwxr-xr-xbin/ansible-connection6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ansible-connection b/bin/ansible-connection
index 9109137..b1ed18c 100755
--- a/bin/ansible-connection
+++ b/bin/ansible-connection
@@ -6,7 +6,6 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
-import argparse
import fcntl
import hashlib
import io
@@ -24,12 +23,12 @@ from contextlib import contextmanager
from ansible import constants as C
from ansible.cli.arguments import option_helpers as opt_help
-from ansible.module_utils._text import to_bytes, to_text
+from ansible.module_utils.common.text.converters import to_bytes, to_text
from ansible.module_utils.connection import Connection, ConnectionError, send_data, recv_data
from ansible.module_utils.service import fork_process
from ansible.parsing.ajson import AnsibleJSONEncoder, AnsibleJSONDecoder
from ansible.playbook.play_context import PlayContext
-from ansible.plugins.loader import connection_loader
+from ansible.plugins.loader import connection_loader, init_plugin_loader
from ansible.utils.path import unfrackpath, makedirs_safe
from ansible.utils.display import Display
from ansible.utils.jsonrpc import JsonRpcServer
@@ -230,6 +229,7 @@ def main(args=None):
parser.add_argument('playbook_pid')
parser.add_argument('task_uuid')
args = parser.parse_args(args[1:] if args is not None else args)
+ init_plugin_loader()
# initialize verbosity
display.verbosity = args.verbosity