diff --git a/changelogs/fragments/ansible-core-_text.yml b/changelogs/fragments/ansible-core-_text.yml new file mode 100644 index 0000000000..fae6391582 --- /dev/null +++ b/changelogs/fragments/ansible-core-_text.yml @@ -0,0 +1,2 @@ +minor_changes: +- "Avoid internal ansible-core module_utils in favor of equivalent public API available since at least Ansible 2.9 (https://github.com/ansible-collections/community.general/pull/2877)." diff --git a/plugins/action/system/shutdown.py b/plugins/action/system/shutdown.py index e36397ffe7..953b73778b 100644 --- a/plugins/action/system/shutdown.py +++ b/plugins/action/system/shutdown.py @@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.errors import AnsibleError, AnsibleConnectionFailure -from ansible.module_utils._text import to_native, to_text +from ansible.module_utils.common.text.converters import to_native, to_text from ansible.module_utils.common.collections import is_string from ansible.plugins.action import ActionBase from ansible.utils.display import Display diff --git a/plugins/become/doas.py b/plugins/become/doas.py index ec660bb763..431e33cd6d 100644 --- a/plugins/become/doas.py +++ b/plugins/become/doas.py @@ -81,7 +81,7 @@ DOCUMENTATION = ''' import re -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.plugins.become import BecomeBase diff --git a/plugins/become/ksu.py b/plugins/become/ksu.py index dad2663639..f5600c1d70 100644 --- a/plugins/become/ksu.py +++ b/plugins/become/ksu.py @@ -82,7 +82,7 @@ DOCUMENTATION = ''' import re -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.plugins.become import BecomeBase diff --git a/plugins/cache/redis.py b/plugins/cache/redis.py index 6af7c731e4..20616096ae 100644 --- a/plugins/cache/redis.py +++ b/plugins/cache/redis.py @@ -67,7 +67,7 @@ import json from ansible import constants as C from ansible.errors import AnsibleError -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.parsing.ajson import AnsibleJSONEncoder, AnsibleJSONDecoder from ansible.plugins.cache import BaseCacheModule from ansible.release import __version__ as ansible_base_version diff --git a/plugins/callback/diy.py b/plugins/callback/diy.py index dfed68b791..b288ee4b97 100644 --- a/plugins/callback/diy.py +++ b/plugins/callback/diy.py @@ -792,7 +792,7 @@ from ansible.utils.color import colorize, hostcolor from ansible.template import Templar from ansible.vars.manager import VariableManager from ansible.plugins.callback.default import CallbackModule as Default -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text class DummyStdout(object): diff --git a/plugins/callback/log_plays.py b/plugins/callback/log_plays.py index 7383313482..df3482f483 100644 --- a/plugins/callback/log_plays.py +++ b/plugins/callback/log_plays.py @@ -31,7 +31,7 @@ import time import json from ansible.utils.path import makedirs_safe -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.module_utils.common._collections_compat import MutableMapping from ansible.parsing.ajson import AnsibleJSONEncoder from ansible.plugins.callback import CallbackBase diff --git a/plugins/callback/logentries.py b/plugins/callback/logentries.py index e4a8b51e79..d78bff331c 100644 --- a/plugins/callback/logentries.py +++ b/plugins/callback/logentries.py @@ -111,7 +111,7 @@ try: except ImportError: HAS_FLATDICT = False -from ansible.module_utils._text import to_bytes, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_text from ansible.plugins.callback import CallbackBase # Todo: diff --git a/plugins/callback/mail.py b/plugins/callback/mail.py index 6964528da6..e48e2de98e 100644 --- a/plugins/callback/mail.py +++ b/plugins/callback/mail.py @@ -62,7 +62,7 @@ import re import smtplib from ansible.module_utils.six import string_types -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.parsing.ajson import AnsibleJSONEncoder from ansible.plugins.callback import CallbackBase diff --git a/plugins/callback/selective.py b/plugins/callback/selective.py index 23813b0e3c..8d882d89bd 100644 --- a/plugins/callback/selective.py +++ b/plugins/callback/selective.py @@ -40,7 +40,7 @@ import difflib from ansible import constants as C from ansible.plugins.callback import CallbackBase -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text try: codeCodes = C.COLOR_CODES diff --git a/plugins/callback/slack.py b/plugins/callback/slack.py index 5974c41a71..74d338dbcc 100644 --- a/plugins/callback/slack.py +++ b/plugins/callback/slack.py @@ -58,7 +58,7 @@ import os import uuid from ansible import context -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text from ansible.module_utils.urls import open_url from ansible.plugins.callback import CallbackBase diff --git a/plugins/callback/unixy.py b/plugins/callback/unixy.py index 783729916f..aaca1bd8cc 100644 --- a/plugins/callback/unixy.py +++ b/plugins/callback/unixy.py @@ -22,7 +22,7 @@ DOCUMENTATION = ''' from os.path import basename from ansible import constants as C from ansible import context -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text from ansible.utils.color import colorize, hostcolor from ansible.plugins.callback.default import CallbackModule as CallbackModule_default diff --git a/plugins/callback/yaml.py b/plugins/callback/yaml.py index 9aa8488807..da931d6b73 100644 --- a/plugins/callback/yaml.py +++ b/plugins/callback/yaml.py @@ -25,7 +25,7 @@ import re import string import sys -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.six import string_types from ansible.parsing.yaml.dumper import AnsibleDumper from ansible.plugins.callback import CallbackBase, strip_internal_keys, module_response_deepcopy diff --git a/plugins/connection/chroot.py b/plugins/connection/chroot.py index a18506cb80..c4c427aa0a 100644 --- a/plugins/connection/chroot.py +++ b/plugins/connection/chroot.py @@ -54,7 +54,7 @@ from ansible.errors import AnsibleError from ansible.module_utils.basic import is_executable from ansible.module_utils.common.process import get_bin_path from ansible.module_utils.six.moves import shlex_quote -from ansible.module_utils._text import to_bytes, to_native +from ansible.module_utils.common.text.converters import to_bytes, to_native from ansible.plugins.connection import ConnectionBase, BUFSIZE from ansible.utils.display import Display diff --git a/plugins/connection/iocage.py b/plugins/connection/iocage.py index beb440eae3..e97867e58f 100644 --- a/plugins/connection/iocage.py +++ b/plugins/connection/iocage.py @@ -32,7 +32,7 @@ DOCUMENTATION = ''' import subprocess from ansible_collections.community.general.plugins.connection.jail import Connection as Jail -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.errors import AnsibleError from ansible.utils.display import Display diff --git a/plugins/connection/jail.py b/plugins/connection/jail.py index f5d787b62f..cee08ed8fd 100644 --- a/plugins/connection/jail.py +++ b/plugins/connection/jail.py @@ -38,7 +38,7 @@ import traceback from ansible.errors import AnsibleError from ansible.module_utils.six.moves import shlex_quote -from ansible.module_utils._text import to_bytes, to_native, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text from ansible.plugins.connection import ConnectionBase, BUFSIZE from ansible.utils.display import Display diff --git a/plugins/connection/lxc.py b/plugins/connection/lxc.py index 6512a87c6d..b18919efd3 100644 --- a/plugins/connection/lxc.py +++ b/plugins/connection/lxc.py @@ -43,7 +43,7 @@ except ImportError: pass from ansible import errors -from ansible.module_utils._text import to_bytes, to_native +from ansible.module_utils.common.text.converters import to_bytes, to_native from ansible.plugins.connection import ConnectionBase diff --git a/plugins/connection/lxd.py b/plugins/connection/lxd.py index 58bb09906e..d523234449 100644 --- a/plugins/connection/lxd.py +++ b/plugins/connection/lxd.py @@ -46,7 +46,7 @@ from distutils.spawn import find_executable from subprocess import Popen, PIPE from ansible.errors import AnsibleError, AnsibleConnectionFailure, AnsibleFileNotFound -from ansible.module_utils._text import to_bytes, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_text from ansible.plugins.connection import ConnectionBase diff --git a/plugins/connection/qubes.py b/plugins/connection/qubes.py index d3f934b601..ca221a7fac 100644 --- a/plugins/connection/qubes.py +++ b/plugins/connection/qubes.py @@ -39,7 +39,7 @@ DOCUMENTATION = ''' import subprocess -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.plugins.connection import ConnectionBase, ensure_connect from ansible.errors import AnsibleConnectionFailure from ansible.utils.display import Display diff --git a/plugins/connection/zone.py b/plugins/connection/zone.py index b101ec5cf3..b12cffe28d 100644 --- a/plugins/connection/zone.py +++ b/plugins/connection/zone.py @@ -33,7 +33,7 @@ import traceback from ansible.errors import AnsibleError from ansible.module_utils.six.moves import shlex_quote -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.plugins.connection import ConnectionBase, BUFSIZE from ansible.utils.display import Display diff --git a/plugins/filter/from_csv.py b/plugins/filter/from_csv.py index 13a18aa88a..b66d47699b 100644 --- a/plugins/filter/from_csv.py +++ b/plugins/filter/from_csv.py @@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible.errors import AnsibleFilterError -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.csv import (initialize_dialect, read_csv, CSVError, DialectNotAvailableError, diff --git a/plugins/inventory/cobbler.py b/plugins/inventory/cobbler.py index 1550c41a4f..d9bc549ed6 100644 --- a/plugins/inventory/cobbler.py +++ b/plugins/inventory/cobbler.py @@ -72,7 +72,7 @@ from distutils.version import LooseVersion import socket from ansible.errors import AnsibleError -from ansible.module_utils._text import to_bytes, to_native, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text from ansible.module_utils.common._collections_compat import MutableMapping from ansible.module_utils.six import iteritems from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, to_safe_group_name diff --git a/plugins/inventory/gitlab_runners.py b/plugins/inventory/gitlab_runners.py index daa3755875..ddf64cd626 100644 --- a/plugins/inventory/gitlab_runners.py +++ b/plugins/inventory/gitlab_runners.py @@ -82,7 +82,7 @@ keyed_groups: ''' from ansible.errors import AnsibleError, AnsibleParserError -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.plugins.inventory import BaseInventoryPlugin, Constructable try: diff --git a/plugins/inventory/lxd.py b/plugins/inventory/lxd.py index 06c620ac60..59bb8845ff 100644 --- a/plugins/inventory/lxd.py +++ b/plugins/inventory/lxd.py @@ -124,7 +124,7 @@ import time import os import socket from ansible.plugins.inventory import BaseInventoryPlugin -from ansible.module_utils._text import to_native, to_text +from ansible.module_utils.common.text.converters import to_native, to_text from ansible.module_utils.common.dict_transformations import dict_merge from ansible.module_utils.six import raise_from from ansible.errors import AnsibleError, AnsibleParserError diff --git a/plugins/inventory/nmap.py b/plugins/inventory/nmap.py index 39a6ff3a67..05a83367af 100644 --- a/plugins/inventory/nmap.py +++ b/plugins/inventory/nmap.py @@ -56,7 +56,7 @@ from subprocess import Popen, PIPE from ansible import constants as C from ansible.errors import AnsibleParserError -from ansible.module_utils._text import to_native, to_text +from ansible.module_utils.common.text.converters import to_native, to_text from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable from ansible.module_utils.common.process import get_bin_path diff --git a/plugins/inventory/online.py b/plugins/inventory/online.py index f5a939b69d..2d305bb8d6 100644 --- a/plugins/inventory/online.py +++ b/plugins/inventory/online.py @@ -61,7 +61,7 @@ from sys import version as python_version from ansible.errors import AnsibleError from ansible.module_utils.urls import open_url from ansible.plugins.inventory import BaseInventoryPlugin -from ansible.module_utils._text import to_native, to_text +from ansible.module_utils.common.text.converters import to_native, to_text from ansible.module_utils.ansible_release import __version__ as ansible_version from ansible.module_utils.six.moves.urllib.parse import urljoin diff --git a/plugins/inventory/scaleway.py b/plugins/inventory/scaleway.py index 843a006738..2e863a2531 100644 --- a/plugins/inventory/scaleway.py +++ b/plugins/inventory/scaleway.py @@ -100,7 +100,7 @@ from ansible.errors import AnsibleError from ansible.plugins.inventory import BaseInventoryPlugin, Constructable from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, parse_pagination_link from ansible.module_utils.urls import open_url -from ansible.module_utils._text import to_native, to_text +from ansible.module_utils.common.text.converters import to_native, to_text import ansible.module_utils.six.moves.urllib.parse as urllib_parse diff --git a/plugins/inventory/virtualbox.py b/plugins/inventory/virtualbox.py index 3827aa0d1a..827618131a 100644 --- a/plugins/inventory/virtualbox.py +++ b/plugins/inventory/virtualbox.py @@ -56,7 +56,7 @@ import os from subprocess import Popen, PIPE from ansible.errors import AnsibleParserError -from ansible.module_utils._text import to_bytes, to_native, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text from ansible.module_utils.common._collections_compat import MutableMapping from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable from ansible.module_utils.common.process import get_bin_path diff --git a/plugins/lookup/consul_kv.py b/plugins/lookup/consul_kv.py index d567b7f687..8b9e4e9102 100644 --- a/plugins/lookup/consul_kv.py +++ b/plugins/lookup/consul_kv.py @@ -106,7 +106,7 @@ import os from ansible.module_utils.six.moves.urllib.parse import urlparse from ansible.errors import AnsibleError, AnsibleAssertionError from ansible.plugins.lookup import LookupBase -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text try: import consul diff --git a/plugins/lookup/cyberarkpassword.py b/plugins/lookup/cyberarkpassword.py index f2a720a042..ec6e6fcb56 100644 --- a/plugins/lookup/cyberarkpassword.py +++ b/plugins/lookup/cyberarkpassword.py @@ -74,7 +74,7 @@ from subprocess import Popen from ansible.errors import AnsibleError from ansible.plugins.lookup import LookupBase from ansible.parsing.splitter import parse_kv -from ansible.module_utils._text import to_bytes, to_text, to_native +from ansible.module_utils.common.text.converters import to_bytes, to_text, to_native from ansible.utils.display import Display display = Display() diff --git a/plugins/lookup/dig.py b/plugins/lookup/dig.py index 16e6bf4f69..b6c71954f0 100644 --- a/plugins/lookup/dig.py +++ b/plugins/lookup/dig.py @@ -152,7 +152,7 @@ RETURN = """ from ansible.errors import AnsibleError from ansible.plugins.lookup import LookupBase -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native import socket try: diff --git a/plugins/lookup/dnstxt.py b/plugins/lookup/dnstxt.py index 5252991c72..d52301e7fb 100644 --- a/plugins/lookup/dnstxt.py +++ b/plugins/lookup/dnstxt.py @@ -54,7 +54,7 @@ except ImportError: pass from ansible.errors import AnsibleError -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.plugins.lookup import LookupBase # ============================================================== diff --git a/plugins/lookup/etcd3.py b/plugins/lookup/etcd3.py index 333b8889d8..5b2c334c41 100644 --- a/plugins/lookup/etcd3.py +++ b/plugins/lookup/etcd3.py @@ -138,7 +138,7 @@ import re from ansible.plugins.lookup import LookupBase from ansible.utils.display import Display from ansible.module_utils.basic import missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.plugins.lookup import LookupBase from ansible.errors import AnsibleError, AnsibleLookupError diff --git a/plugins/lookup/filetree.py b/plugins/lookup/filetree.py index 40e449e600..06b89bf396 100644 --- a/plugins/lookup/filetree.py +++ b/plugins/lookup/filetree.py @@ -124,7 +124,7 @@ except ImportError: pass from ansible.plugins.lookup import LookupBase -from ansible.module_utils._text import to_native, to_text +from ansible.module_utils.common.text.converters import to_native, to_text from ansible.utils.display import Display display = Display() diff --git a/plugins/lookup/hiera.py b/plugins/lookup/hiera.py index 899820191a..a4358f7b1e 100644 --- a/plugins/lookup/hiera.py +++ b/plugins/lookup/hiera.py @@ -63,7 +63,7 @@ import os from ansible.plugins.lookup import LookupBase from ansible.utils.cmd_functions import run_cmd -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text ANSIBLE_HIERA_CFG = os.getenv('ANSIBLE_HIERA_CFG', '/etc/hiera.yaml') ANSIBLE_HIERA_BIN = os.getenv('ANSIBLE_HIERA_BIN', '/usr/bin/hiera') diff --git a/plugins/lookup/lastpass.py b/plugins/lookup/lastpass.py index e6137f4080..5e9f9907bd 100644 --- a/plugins/lookup/lastpass.py +++ b/plugins/lookup/lastpass.py @@ -39,7 +39,7 @@ RETURN = """ from subprocess import Popen, PIPE from ansible.errors import AnsibleError -from ansible.module_utils._text import to_bytes, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_text from ansible.plugins.lookup import LookupBase diff --git a/plugins/lookup/lmdb_kv.py b/plugins/lookup/lmdb_kv.py index 18a6a2ceac..a417874898 100644 --- a/plugins/lookup/lmdb_kv.py +++ b/plugins/lookup/lmdb_kv.py @@ -55,7 +55,7 @@ _raw: from ansible.errors import AnsibleError from ansible.plugins.lookup import LookupBase -from ansible.module_utils._text import to_native, to_text +from ansible.module_utils.common.text.converters import to_native, to_text HAVE_LMDB = True try: import lmdb diff --git a/plugins/lookup/nios_next_ip.py b/plugins/lookup/nios_next_ip.py index 21773cb53e..58e95c7d13 100644 --- a/plugins/lookup/nios_next_ip.py +++ b/plugins/lookup/nios_next_ip.py @@ -74,7 +74,7 @@ _list: from ansible.plugins.lookup import LookupBase from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import WapiLookup -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text from ansible.errors import AnsibleError diff --git a/plugins/lookup/nios_next_network.py b/plugins/lookup/nios_next_network.py index 2aa22ab704..c18c6ae993 100644 --- a/plugins/lookup/nios_next_network.py +++ b/plugins/lookup/nios_next_network.py @@ -84,7 +84,7 @@ _list: from ansible.plugins.lookup import LookupBase from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import WapiLookup -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text from ansible.errors import AnsibleError diff --git a/plugins/lookup/onepassword.py b/plugins/lookup/onepassword.py index 715c337ffd..9f97a90e71 100644 --- a/plugins/lookup/onepassword.py +++ b/plugins/lookup/onepassword.py @@ -103,7 +103,7 @@ from subprocess import Popen, PIPE from ansible.plugins.lookup import LookupBase from ansible.errors import AnsibleLookupError -from ansible.module_utils._text import to_bytes, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_text class OnePass(object): diff --git a/plugins/lookup/passwordstore.py b/plugins/lookup/passwordstore.py index 976dfb837e..9c545a1cb0 100644 --- a/plugins/lookup/passwordstore.py +++ b/plugins/lookup/passwordstore.py @@ -142,7 +142,7 @@ import yaml from distutils import util from ansible.errors import AnsibleError, AnsibleAssertionError -from ansible.module_utils._text import to_bytes, to_native, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text from ansible.utils.display import Display from ansible.utils.encrypt import random_password from ansible.plugins.lookup import LookupBase diff --git a/plugins/lookup/random_string.py b/plugins/lookup/random_string.py index 6a05cfd041..d67a75ed99 100644 --- a/plugins/lookup/random_string.py +++ b/plugins/lookup/random_string.py @@ -138,7 +138,7 @@ import string from ansible.errors import AnsibleLookupError from ansible.plugins.lookup import LookupBase -from ansible.module_utils._text import to_bytes, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_text class LookupModule(LookupBase): diff --git a/plugins/lookup/redis.py b/plugins/lookup/redis.py index 074b9490bf..a1d5a381b2 100644 --- a/plugins/lookup/redis.py +++ b/plugins/lookup/redis.py @@ -80,7 +80,7 @@ try: except ImportError: pass -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text from ansible.errors import AnsibleError from ansible.plugins.lookup import LookupBase diff --git a/plugins/lookup/shelvefile.py b/plugins/lookup/shelvefile.py index 808bb942b0..0067472513 100644 --- a/plugins/lookup/shelvefile.py +++ b/plugins/lookup/shelvefile.py @@ -36,7 +36,7 @@ import shelve from ansible.errors import AnsibleError, AnsibleAssertionError from ansible.plugins.lookup import LookupBase -from ansible.module_utils._text import to_bytes, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_text class LookupModule(LookupBase): diff --git a/plugins/module_utils/_netapp.py b/plugins/module_utils/_netapp.py index d80506bb9a..81a50a336d 100644 --- a/plugins/module_utils/_netapp.py +++ b/plugins/module_utils/_netapp.py @@ -41,7 +41,7 @@ from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.six.moves.urllib.error import HTTPError, URLError from ansible.module_utils.urls import open_url from ansible.module_utils.api import basic_auth_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native try: from ansible.module_utils.ansible_release import __version__ as ansible_version diff --git a/plugins/module_utils/csv.py b/plugins/module_utils/csv.py index 426e2eb279..86c4694524 100644 --- a/plugins/module_utils/csv.py +++ b/plugins/module_utils/csv.py @@ -10,7 +10,7 @@ __metaclass__ = type import csv from io import BytesIO, StringIO -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.six import PY3 diff --git a/plugins/module_utils/gandi_livedns_api.py b/plugins/module_utils/gandi_livedns_api.py index 60e0761d26..2c785353ad 100644 --- a/plugins/module_utils/gandi_livedns_api.py +++ b/plugins/module_utils/gandi_livedns_api.py @@ -7,7 +7,7 @@ __metaclass__ = type import json -from ansible.module_utils._text import to_native, to_text +from ansible.module_utils.common.text.converters import to_native, to_text from ansible.module_utils.urls import fetch_url diff --git a/plugins/module_utils/gitlab.py b/plugins/module_utils/gitlab.py index e13f38c099..5ddafa2b42 100644 --- a/plugins/module_utils/gitlab.py +++ b/plugins/module_utils/gitlab.py @@ -12,7 +12,7 @@ from distutils.version import StrictVersion from ansible.module_utils.basic import missing_required_lib from ansible.module_utils.urls import fetch_url -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native try: from urllib import quote_plus # Python 2.X diff --git a/plugins/module_utils/hwc_utils.py b/plugins/module_utils/hwc_utils.py index 05e0c1378d..c11cb7d4d2 100644 --- a/plugins/module_utils/hwc_utils.py +++ b/plugins/module_utils/hwc_utils.py @@ -21,7 +21,7 @@ except ImportError: from ansible.module_utils.basic import (AnsibleModule, env_fallback, missing_required_lib) -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text class HwcModuleException(Exception): diff --git a/plugins/module_utils/ibm_sa_utils.py b/plugins/module_utils/ibm_sa_utils.py index c3ab4103a9..fdaa38a9fc 100644 --- a/plugins/module_utils/ibm_sa_utils.py +++ b/plugins/module_utils/ibm_sa_utils.py @@ -9,7 +9,7 @@ __metaclass__ = type import traceback from functools import wraps -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.basic import missing_required_lib PYXCLI_INSTALLED = True diff --git a/plugins/module_utils/identity/keycloak/keycloak.py b/plugins/module_utils/identity/keycloak/keycloak.py index ae002a7c94..b11289a634 100644 --- a/plugins/module_utils/identity/keycloak/keycloak.py +++ b/plugins/module_utils/identity/keycloak/keycloak.py @@ -35,7 +35,7 @@ import traceback from ansible.module_utils.urls import open_url from ansible.module_utils.six.moves.urllib.parse import urlencode, quote from ansible.module_utils.six.moves.urllib.error import HTTPError -from ansible.module_utils._text import to_native, to_text +from ansible.module_utils.common.text.converters import to_native, to_text URL_REALMS = "{url}/admin/realms" URL_REALM = "{url}/admin/realms/{realm}" diff --git a/plugins/module_utils/ipa.py b/plugins/module_utils/ipa.py index b2b1a892cd..76fe6ca717 100644 --- a/plugins/module_utils/ipa.py +++ b/plugins/module_utils/ipa.py @@ -18,7 +18,7 @@ import socket import uuid import re -from ansible.module_utils._text import to_bytes, to_native, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text from ansible.module_utils.six import PY3 from ansible.module_utils.six.moves.urllib.parse import quote from ansible.module_utils.urls import fetch_url, HAS_GSSAPI diff --git a/plugins/module_utils/ldap.py b/plugins/module_utils/ldap.py index 999d7e67ee..30dbaf7640 100644 --- a/plugins/module_utils/ldap.py +++ b/plugins/module_utils/ldap.py @@ -10,7 +10,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type import traceback -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native try: import ldap diff --git a/plugins/module_utils/lxd.py b/plugins/module_utils/lxd.py index e835a6abca..e393090799 100644 --- a/plugins/module_utils/lxd.py +++ b/plugins/module_utils/lxd.py @@ -20,7 +20,7 @@ import ssl from ansible.module_utils.urls import generic_urlparse from ansible.module_utils.six.moves.urllib.parse import urlparse from ansible.module_utils.six.moves import http_client -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text # httplib/http.client connection using unix domain socket HTTPConnection = http_client.HTTPConnection diff --git a/plugins/module_utils/net_tools/nios/api.py b/plugins/module_utils/net_tools/nios/api.py index 4a771e49af..cbb8b63f3b 100644 --- a/plugins/module_utils/net_tools/nios/api.py +++ b/plugins/module_utils/net_tools/nios/api.py @@ -14,9 +14,9 @@ __metaclass__ = type import os from functools import partial -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.six import iteritems -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text from ansible.module_utils.basic import env_fallback from ansible.module_utils.common.validation import check_type_dict diff --git a/plugins/module_utils/oneview.py b/plugins/module_utils/oneview.py index bfa5f09102..3ebb057ca7 100644 --- a/plugins/module_utils/oneview.py +++ b/plugins/module_utils/oneview.py @@ -27,7 +27,7 @@ except ImportError: from ansible.module_utils import six from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common._collections_compat import Mapping diff --git a/plugins/module_utils/oracle/oci_utils.py b/plugins/module_utils/oracle/oci_utils.py index 610366d9ba..0b82dadf0e 100644 --- a/plugins/module_utils/oracle/oci_utils.py +++ b/plugins/module_utils/oracle/oci_utils.py @@ -38,7 +38,7 @@ except ImportError: HAS_OCI_PY_SDK = False -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.module_utils.six import iteritems __version__ = "1.6.0-dev" diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index df7011a0b4..c39c02a42e 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -6,8 +6,8 @@ __metaclass__ = type import json from ansible.module_utils.urls import open_url -from ansible.module_utils._text import to_native -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_native +from ansible.module_utils.common.text.converters import to_text from ansible.module_utils.six.moves import http_client from ansible.module_utils.six.moves.urllib.error import URLError, HTTPError from ansible.module_utils.six.moves.urllib.parse import urlparse diff --git a/plugins/module_utils/source_control/bitbucket.py b/plugins/module_utils/source_control/bitbucket.py index c17dcb1d9e..c24a25074a 100644 --- a/plugins/module_utils/source_control/bitbucket.py +++ b/plugins/module_utils/source_control/bitbucket.py @@ -7,7 +7,7 @@ __metaclass__ = type import json -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text from ansible.module_utils.basic import env_fallback from ansible.module_utils.urls import fetch_url, basic_auth_header diff --git a/plugins/module_utils/utm_utils.py b/plugins/module_utils/utm_utils.py index 591305a4b3..fd196dcbca 100644 --- a/plugins/module_utils/utm_utils.py +++ b/plugins/module_utils/utm_utils.py @@ -13,7 +13,7 @@ __metaclass__ = type import json -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url diff --git a/plugins/module_utils/vexata.py b/plugins/module_utils/vexata.py index e5c9bdb819..3d6fb7aaca 100644 --- a/plugins/module_utils/vexata.py +++ b/plugins/module_utils/vexata.py @@ -13,7 +13,7 @@ try: except ImportError: HAS_VEXATAPI = False -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.basic import env_fallback VXOS_VERSION = None diff --git a/plugins/modules/cloud/atomic/atomic_container.py b/plugins/modules/cloud/atomic/atomic_container.py index 273cdc8931..ca63125661 100644 --- a/plugins/modules/cloud/atomic/atomic_container.py +++ b/plugins/modules/cloud/atomic/atomic_container.py @@ -95,7 +95,7 @@ msg: import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def do_install(module, mode, rootfs, container, image, values_list, backend): diff --git a/plugins/modules/cloud/atomic/atomic_host.py b/plugins/modules/cloud/atomic/atomic_host.py index d7164a9adb..85b00f917a 100644 --- a/plugins/modules/cloud/atomic/atomic_host.py +++ b/plugins/modules/cloud/atomic/atomic_host.py @@ -52,7 +52,7 @@ import os import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def core(module): diff --git a/plugins/modules/cloud/atomic/atomic_image.py b/plugins/modules/cloud/atomic/atomic_image.py index fd99bb3bf7..350ad4c2ae 100644 --- a/plugins/modules/cloud/atomic/atomic_image.py +++ b/plugins/modules/cloud/atomic/atomic_image.py @@ -69,7 +69,7 @@ msg: import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def do_upgrade(module, image): diff --git a/plugins/modules/cloud/dimensiondata/dimensiondata_network.py b/plugins/modules/cloud/dimensiondata/dimensiondata_network.py index 246b486d06..64cc8b118a 100644 --- a/plugins/modules/cloud/dimensiondata/dimensiondata_network.py +++ b/plugins/modules/cloud/dimensiondata/dimensiondata_network.py @@ -113,7 +113,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.dimensiondata import HAS_LIBCLOUD, DimensionDataModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native if HAS_LIBCLOUD: from libcloud.compute.base import NodeLocation diff --git a/plugins/modules/cloud/lxc/lxc_container.py b/plugins/modules/cloud/lxc/lxc_container.py index 636508dbda..18f1d02efe 100644 --- a/plugins/modules/cloud/lxc/lxc_container.py +++ b/plugins/modules/cloud/lxc/lxc_container.py @@ -433,7 +433,7 @@ else: from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.parsing.convert_bool import BOOLEANS_FALSE, BOOLEANS_TRUE from ansible.module_utils.six.moves import xrange -from ansible.module_utils._text import to_text, to_bytes +from ansible.module_utils.common.text.converters import to_text, to_bytes # LXC_COMPRESSION_MAP is a map of available compression types when creating diff --git a/plugins/modules/cloud/misc/cloud_init_data_facts.py b/plugins/modules/cloud/misc/cloud_init_data_facts.py index 5774fa6f39..1b44c50cbe 100644 --- a/plugins/modules/cloud/misc/cloud_init_data_facts.py +++ b/plugins/modules/cloud/misc/cloud_init_data_facts.py @@ -85,7 +85,7 @@ cloud_init_data_facts: import os from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text CLOUD_INIT_PATH = "/var/lib/cloud/data" diff --git a/plugins/modules/cloud/misc/proxmox.py b/plugins/modules/cloud/misc/proxmox.py index 422c108c35..21817f10dc 100644 --- a/plugins/modules/cloud/misc/proxmox.py +++ b/plugins/modules/cloud/misc/proxmox.py @@ -364,7 +364,7 @@ except ImportError: HAS_PROXMOXER = False from ansible.module_utils.basic import AnsibleModule, env_fallback -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native VZ_TYPE = None diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index 0fb486600c..939c72a126 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -771,7 +771,7 @@ except ImportError: HAS_PROXMOXER = False from ansible.module_utils.basic import AnsibleModule, env_fallback -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def get_nextvmid(module, proxmox): diff --git a/plugins/modules/cloud/misc/proxmox_snap.py b/plugins/modules/cloud/misc/proxmox_snap.py index 17c6ef335a..4ee2d27893 100644 --- a/plugins/modules/cloud/misc/proxmox_snap.py +++ b/plugins/modules/cloud/misc/proxmox_snap.py @@ -119,7 +119,7 @@ except ImportError: HAS_PROXMOXER = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib, env_fallback -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native VZ_TYPE = None diff --git a/plugins/modules/cloud/packet/packet_device.py b/plugins/modules/cloud/packet/packet_device.py index 5dc662a255..f939572656 100644 --- a/plugins/modules/cloud/packet/packet_device.py +++ b/plugins/modules/cloud/packet/packet_device.py @@ -275,7 +275,7 @@ import uuid import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native HAS_PACKET_SDK = True try: diff --git a/plugins/modules/cloud/packet/packet_ip_subnet.py b/plugins/modules/cloud/packet/packet_ip_subnet.py index fbc12698a1..718de36f22 100644 --- a/plugins/modules/cloud/packet/packet_ip_subnet.py +++ b/plugins/modules/cloud/packet/packet_ip_subnet.py @@ -151,7 +151,7 @@ import uuid import re from ansible.module_utils.basic import AnsibleModule, env_fallback -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native HAS_PACKET_SDK = True diff --git a/plugins/modules/cloud/packet/packet_project.py b/plugins/modules/cloud/packet/packet_project.py index 38d7ca7640..c6502c6ea6 100644 --- a/plugins/modules/cloud/packet/packet_project.py +++ b/plugins/modules/cloud/packet/packet_project.py @@ -122,7 +122,7 @@ id: ''' from ansible.module_utils.basic import AnsibleModule, env_fallback -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native HAS_PACKET_SDK = True diff --git a/plugins/modules/cloud/packet/packet_volume.py b/plugins/modules/cloud/packet/packet_volume.py index 2966139a43..97c1e7498d 100644 --- a/plugins/modules/cloud/packet/packet_volume.py +++ b/plugins/modules/cloud/packet/packet_volume.py @@ -168,7 +168,7 @@ description: import uuid from ansible.module_utils.basic import AnsibleModule, env_fallback -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native HAS_PACKET_SDK = True diff --git a/plugins/modules/cloud/packet/packet_volume_attachment.py b/plugins/modules/cloud/packet/packet_volume_attachment.py index 7cda16ce86..9044fbcffa 100644 --- a/plugins/modules/cloud/packet/packet_volume_attachment.py +++ b/plugins/modules/cloud/packet/packet_volume_attachment.py @@ -130,7 +130,7 @@ device_id: import uuid from ansible.module_utils.basic import AnsibleModule, env_fallback -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native HAS_PACKET_SDK = True diff --git a/plugins/modules/cloud/profitbricks/profitbricks.py b/plugins/modules/cloud/profitbricks/profitbricks.py index c64151d68e..4c24d6408f 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks.py +++ b/plugins/modules/cloud/profitbricks/profitbricks.py @@ -198,7 +198,7 @@ except ImportError: from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves import xrange -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native LOCATIONS = ['us/las', diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume.py b/plugins/modules/cloud/profitbricks/profitbricks_volume.py index 0e9523c664..5fff01d3d7 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_volume.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_volume.py @@ -149,7 +149,7 @@ except ImportError: from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves import xrange -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native uuid_match = re.compile( diff --git a/plugins/modules/cloud/pubnub/pubnub_blocks.py b/plugins/modules/cloud/pubnub/pubnub_blocks.py index 1dbe416b9c..c8de702597 100644 --- a/plugins/modules/cloud/pubnub/pubnub_blocks.py +++ b/plugins/modules/cloud/pubnub/pubnub_blocks.py @@ -247,7 +247,7 @@ except ImportError: exceptions = None from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text def pubnub_user(module): diff --git a/plugins/modules/cloud/rackspace/rax_cdb_user.py b/plugins/modules/cloud/rackspace/rax_cdb_user.py index 2034170f42..01c10950c4 100644 --- a/plugins/modules/cloud/rackspace/rax_cdb_user.py +++ b/plugins/modules/cloud/rackspace/rax_cdb_user.py @@ -77,7 +77,7 @@ except ImportError: HAS_PYRAX = False from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text from ansible_collections.community.general.plugins.module_utils.rax import rax_argument_spec, rax_required_together, rax_to_dict, setup_rax_module diff --git a/plugins/modules/cloud/scaleway/scaleway_security_group_rule.py b/plugins/modules/cloud/scaleway/scaleway_security_group_rule.py index 48e2f10ef3..118883328a 100644 --- a/plugins/modules/cloud/scaleway/scaleway_security_group_rule.py +++ b/plugins/modules/cloud/scaleway/scaleway_security_group_rule.py @@ -133,7 +133,7 @@ data: import traceback from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway, payload_from_object -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text from ansible.module_utils.basic import AnsibleModule, missing_required_lib try: diff --git a/plugins/modules/cloud/smartos/vmadm.py b/plugins/modules/cloud/smartos/vmadm.py index 63a4c21231..03a022423e 100644 --- a/plugins/modules/cloud/smartos/vmadm.py +++ b/plugins/modules/cloud/smartos/vmadm.py @@ -404,7 +404,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native # While vmadm(1M) supports a -E option to return any errors in JSON, the # generated JSON does not play well with the JSON parsers of Python. diff --git a/plugins/modules/clustering/consul/consul_kv.py b/plugins/modules/clustering/consul/consul_kv.py index 01e9be2d05..d392228146 100644 --- a/plugins/modules/clustering/consul/consul_kv.py +++ b/plugins/modules/clustering/consul/consul_kv.py @@ -136,7 +136,7 @@ EXAMPLES = ''' state: acquire ''' -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text try: import consul diff --git a/plugins/modules/clustering/etcd3.py b/plugins/modules/clustering/etcd3.py index 0f87e32d13..28c5915693 100644 --- a/plugins/modules/clustering/etcd3.py +++ b/plugins/modules/clustering/etcd3.py @@ -119,7 +119,7 @@ old_value: import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native try: diff --git a/plugins/modules/clustering/nomad/nomad_job.py b/plugins/modules/clustering/nomad/nomad_job.py index 6c28579773..a5e1cd3755 100644 --- a/plugins/modules/clustering/nomad/nomad_job.py +++ b/plugins/modules/clustering/nomad/nomad_job.py @@ -84,7 +84,7 @@ EXAMPLES = ''' import json from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native import_nomad = None try: diff --git a/plugins/modules/clustering/nomad/nomad_job_info.py b/plugins/modules/clustering/nomad/nomad_job_info.py index 5e9455f77b..d913ebeb61 100644 --- a/plugins/modules/clustering/nomad/nomad_job_info.py +++ b/plugins/modules/clustering/nomad/nomad_job_info.py @@ -270,7 +270,7 @@ import os import json from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native import_nomad = None try: diff --git a/plugins/modules/clustering/znode.py b/plugins/modules/clustering/znode.py index e85537e6e8..8456a187ee 100644 --- a/plugins/modules/clustering/znode.py +++ b/plugins/modules/clustering/znode.py @@ -108,7 +108,7 @@ except ImportError: KAZOO_INSTALLED = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes def main(): diff --git a/plugins/modules/database/influxdb/influxdb_query.py b/plugins/modules/database/influxdb/influxdb_query.py index d9cf500727..bff6fa989b 100644 --- a/plugins/modules/database/influxdb/influxdb_query.py +++ b/plugins/modules/database/influxdb/influxdb_query.py @@ -64,7 +64,7 @@ query_results: ''' from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.influxdb import InfluxDb diff --git a/plugins/modules/database/influxdb/influxdb_retention_policy.py b/plugins/modules/database/influxdb/influxdb_retention_policy.py index 3ff48cbad0..a145f9e32b 100644 --- a/plugins/modules/database/influxdb/influxdb_retention_policy.py +++ b/plugins/modules/database/influxdb/influxdb_retention_policy.py @@ -145,7 +145,7 @@ except ImportError: from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.influxdb import InfluxDb -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native VALID_DURATION_REGEX = re.compile(r'^(INF|(\d+(ns|u|ยต|ms|s|m|h|d|w)))+$') diff --git a/plugins/modules/database/influxdb/influxdb_user.py b/plugins/modules/database/influxdb/influxdb_user.py index cb35ea7ce6..8746445335 100644 --- a/plugins/modules/database/influxdb/influxdb_user.py +++ b/plugins/modules/database/influxdb/influxdb_user.py @@ -104,7 +104,7 @@ import json from ansible.module_utils.urls import ConnectionError from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native import ansible_collections.community.general.plugins.module_utils.influxdb as influx diff --git a/plugins/modules/database/influxdb/influxdb_write.py b/plugins/modules/database/influxdb/influxdb_write.py index 0dc063a7b1..e34fe9c2cf 100644 --- a/plugins/modules/database/influxdb/influxdb_write.py +++ b/plugins/modules/database/influxdb/influxdb_write.py @@ -61,7 +61,7 @@ RETURN = r''' ''' from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.influxdb import InfluxDb diff --git a/plugins/modules/database/misc/odbc.py b/plugins/modules/database/misc/odbc.py index 313a7f7096..5d1cdf884b 100644 --- a/plugins/modules/database/misc/odbc.py +++ b/plugins/modules/database/misc/odbc.py @@ -78,7 +78,7 @@ row_count: ''' from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native HAS_PYODBC = None try: diff --git a/plugins/modules/database/misc/redis.py b/plugins/modules/database/misc/redis.py index 602aaf6c74..960b072fea 100644 --- a/plugins/modules/database/misc/redis.py +++ b/plugins/modules/database/misc/redis.py @@ -143,7 +143,7 @@ else: from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.common.text.formatters import human_to_bytes -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native import re diff --git a/plugins/modules/database/misc/redis_info.py b/plugins/modules/database/misc/redis_info.py index b615addbd2..9762b03c98 100644 --- a/plugins/modules/database/misc/redis_info.py +++ b/plugins/modules/database/misc/redis_info.py @@ -196,7 +196,7 @@ except ImportError: HAS_REDIS_PACKAGE = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def redis_client(**client_params): diff --git a/plugins/modules/database/saphana/hana_query.py b/plugins/modules/database/saphana/hana_query.py index ab147ef3fe..9b26134022 100644 --- a/plugins/modules/database/saphana/hana_query.py +++ b/plugins/modules/database/saphana/hana_query.py @@ -103,7 +103,7 @@ query_result: import csv from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six import StringIO -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def csv_to_list(rawcsv): diff --git a/plugins/modules/database/vertica/vertica_configuration.py b/plugins/modules/database/vertica/vertica_configuration.py index 1d67a831d9..b210e3f6f0 100644 --- a/plugins/modules/database/vertica/vertica_configuration.py +++ b/plugins/modules/database/vertica/vertica_configuration.py @@ -76,7 +76,7 @@ else: pyodbc_found = True from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class NotSupportedError(Exception): diff --git a/plugins/modules/database/vertica/vertica_info.py b/plugins/modules/database/vertica/vertica_info.py index c0aa94be1e..feaebecbdc 100644 --- a/plugins/modules/database/vertica/vertica_info.py +++ b/plugins/modules/database/vertica/vertica_info.py @@ -74,7 +74,7 @@ else: pyodbc_found = True from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class NotSupportedError(Exception): diff --git a/plugins/modules/database/vertica/vertica_role.py b/plugins/modules/database/vertica/vertica_role.py index fc80907cc6..06dd218ed0 100644 --- a/plugins/modules/database/vertica/vertica_role.py +++ b/plugins/modules/database/vertica/vertica_role.py @@ -87,7 +87,7 @@ else: pyodbc_found = True from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class NotSupportedError(Exception): diff --git a/plugins/modules/database/vertica/vertica_schema.py b/plugins/modules/database/vertica/vertica_schema.py index 0c85e3e091..749234add0 100644 --- a/plugins/modules/database/vertica/vertica_schema.py +++ b/plugins/modules/database/vertica/vertica_schema.py @@ -109,7 +109,7 @@ else: pyodbc_found = True from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class NotSupportedError(Exception): diff --git a/plugins/modules/database/vertica/vertica_user.py b/plugins/modules/database/vertica/vertica_user.py index 791ef5fef9..fed3a2a56f 100644 --- a/plugins/modules/database/vertica/vertica_user.py +++ b/plugins/modules/database/vertica/vertica_user.py @@ -118,7 +118,7 @@ else: pyodbc_found = True from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class NotSupportedError(Exception): diff --git a/plugins/modules/files/filesize.py b/plugins/modules/files/filesize.py index 5b22fb4512..f073ff4119 100644 --- a/plugins/modules/files/filesize.py +++ b/plugins/modules/files/filesize.py @@ -224,7 +224,7 @@ import os import math from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native # These are the multiplicative suffixes understood (or returned) by dd and diff --git a/plugins/modules/files/iso_create.py b/plugins/modules/files/iso_create.py index bf6359b14a..3fa456339e 100644 --- a/plugins/modules/files/iso_create.py +++ b/plugins/modules/files/iso_create.py @@ -153,7 +153,7 @@ except ImportError: HAS_PYCDLIB = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def add_file(module, iso_file=None, src_file=None, file_path=None, rock_ridge=None, use_joliet=None, use_udf=None): diff --git a/plugins/modules/files/read_csv.py b/plugins/modules/files/read_csv.py index c48efc7440..2d5644db2e 100644 --- a/plugins/modules/files/read_csv.py +++ b/plugins/modules/files/read_csv.py @@ -138,7 +138,7 @@ list: ''' from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.csv import (initialize_dialect, read_csv, CSVError, DialectNotAvailableError, diff --git a/plugins/modules/files/sapcar_extract.py b/plugins/modules/files/sapcar_extract.py index db0f5f9ea8..b6a76a1629 100644 --- a/plugins/modules/files/sapcar_extract.py +++ b/plugins/modules/files/sapcar_extract.py @@ -90,7 +90,7 @@ import os from tempfile import NamedTemporaryFile from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import open_url -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def get_list_of_files(dir_name): diff --git a/plugins/modules/files/xattr.py b/plugins/modules/files/xattr.py index 7691f30905..8578ed4c4e 100644 --- a/plugins/modules/files/xattr.py +++ b/plugins/modules/files/xattr.py @@ -94,7 +94,7 @@ import os # import module snippets from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def get_xattr_keys(module, path, follow): diff --git a/plugins/modules/files/xml.py b/plugins/modules/files/xml.py index e7c6ca3f1e..ffdb65400c 100644 --- a/plugins/modules/files/xml.py +++ b/plugins/modules/files/xml.py @@ -369,7 +369,7 @@ except ImportError: from ansible.module_utils.basic import AnsibleModule, json_dict_bytes_to_unicode, missing_required_lib from ansible.module_utils.six import iteritems, string_types -from ansible.module_utils._text import to_bytes, to_native +from ansible.module_utils.common.text.converters import to_bytes, to_native from ansible.module_utils.common._collections_compat import MutableMapping _IDENT = r"[a-zA-Z-][a-zA-Z0-9_\-\.]*" diff --git a/plugins/modules/identity/ipa/ipa_config.py b/plugins/modules/identity/ipa/ipa_config.py index 49d46fb5b2..e8ee073d6e 100644 --- a/plugins/modules/identity/ipa/ipa_config.py +++ b/plugins/modules/identity/ipa/ipa_config.py @@ -194,7 +194,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class ConfigIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_dnsrecord.py b/plugins/modules/identity/ipa/ipa_dnsrecord.py index 635bf2ff91..73b6695698 100644 --- a/plugins/modules/identity/ipa/ipa_dnsrecord.py +++ b/plugins/modules/identity/ipa/ipa_dnsrecord.py @@ -151,7 +151,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class DNSRecordIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_dnszone.py b/plugins/modules/identity/ipa/ipa_dnszone.py index 1536866c29..3dabad8db8 100644 --- a/plugins/modules/identity/ipa/ipa_dnszone.py +++ b/plugins/modules/identity/ipa/ipa_dnszone.py @@ -71,7 +71,7 @@ zone: from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class DNSZoneIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_group.py b/plugins/modules/identity/ipa/ipa_group.py index 84ff443a59..f62d9f0a18 100644 --- a/plugins/modules/identity/ipa/ipa_group.py +++ b/plugins/modules/identity/ipa/ipa_group.py @@ -115,7 +115,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class GroupIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_hbacrule.py b/plugins/modules/identity/ipa/ipa_hbacrule.py index cb49fd53dd..5f0704d58b 100644 --- a/plugins/modules/identity/ipa/ipa_hbacrule.py +++ b/plugins/modules/identity/ipa/ipa_hbacrule.py @@ -153,7 +153,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class HBACRuleIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_host.py b/plugins/modules/identity/ipa/ipa_host.py index 80892c01c0..25c65f0b34 100644 --- a/plugins/modules/identity/ipa/ipa_host.py +++ b/plugins/modules/identity/ipa/ipa_host.py @@ -163,7 +163,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class HostIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_hostgroup.py b/plugins/modules/identity/ipa/ipa_hostgroup.py index ae1f1a6b33..9d5c6f99c7 100644 --- a/plugins/modules/identity/ipa/ipa_hostgroup.py +++ b/plugins/modules/identity/ipa/ipa_hostgroup.py @@ -86,7 +86,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class HostGroupIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_otpconfig.py b/plugins/modules/identity/ipa/ipa_otpconfig.py index 84a9e969cb..9a10baec0b 100644 --- a/plugins/modules/identity/ipa/ipa_otpconfig.py +++ b/plugins/modules/identity/ipa/ipa_otpconfig.py @@ -78,7 +78,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class OTPConfigIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_otptoken.py b/plugins/modules/identity/ipa/ipa_otptoken.py index f8f48d68a6..4027a1c459 100644 --- a/plugins/modules/identity/ipa/ipa_otptoken.py +++ b/plugins/modules/identity/ipa/ipa_otptoken.py @@ -168,7 +168,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule, sanitize_keys from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class OTPTokenIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_pwpolicy.py b/plugins/modules/identity/ipa/ipa_pwpolicy.py index 7c694f32ee..0f9b141b4c 100644 --- a/plugins/modules/identity/ipa/ipa_pwpolicy.py +++ b/plugins/modules/identity/ipa/ipa_pwpolicy.py @@ -127,7 +127,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class PwPolicyIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_role.py b/plugins/modules/identity/ipa/ipa_role.py index 589a6d5efe..c602614ef9 100644 --- a/plugins/modules/identity/ipa/ipa_role.py +++ b/plugins/modules/identity/ipa/ipa_role.py @@ -131,7 +131,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class RoleIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_service.py b/plugins/modules/identity/ipa/ipa_service.py index 088127e0c3..f85b80d44e 100644 --- a/plugins/modules/identity/ipa/ipa_service.py +++ b/plugins/modules/identity/ipa/ipa_service.py @@ -82,7 +82,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class ServiceIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_subca.py b/plugins/modules/identity/ipa/ipa_subca.py index 218951a071..3b0d3e8707 100644 --- a/plugins/modules/identity/ipa/ipa_subca.py +++ b/plugins/modules/identity/ipa/ipa_subca.py @@ -77,7 +77,7 @@ subca: from distutils.version import LooseVersion from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class SubCAIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_sudocmd.py b/plugins/modules/identity/ipa/ipa_sudocmd.py index aa09e0e44b..d75aff44ce 100644 --- a/plugins/modules/identity/ipa/ipa_sudocmd.py +++ b/plugins/modules/identity/ipa/ipa_sudocmd.py @@ -63,7 +63,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class SudoCmdIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_sudocmdgroup.py b/plugins/modules/identity/ipa/ipa_sudocmdgroup.py index 96eb655930..65fdd4f75f 100644 --- a/plugins/modules/identity/ipa/ipa_sudocmdgroup.py +++ b/plugins/modules/identity/ipa/ipa_sudocmdgroup.py @@ -72,7 +72,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class SudoCmdGroupIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_sudorule.py b/plugins/modules/identity/ipa/ipa_sudorule.py index 4494122e8d..2054599f9d 100644 --- a/plugins/modules/identity/ipa/ipa_sudorule.py +++ b/plugins/modules/identity/ipa/ipa_sudorule.py @@ -178,7 +178,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class SudoRuleIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_user.py b/plugins/modules/identity/ipa/ipa_user.py index 847749f15e..8a7b3abea2 100644 --- a/plugins/modules/identity/ipa/ipa_user.py +++ b/plugins/modules/identity/ipa/ipa_user.py @@ -172,7 +172,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class UserIPAClient(IPAClient): diff --git a/plugins/modules/identity/ipa/ipa_vault.py b/plugins/modules/identity/ipa/ipa_vault.py index 3376b8c4e7..7a6a601fa9 100644 --- a/plugins/modules/identity/ipa/ipa_vault.py +++ b/plugins/modules/identity/ipa/ipa_vault.py @@ -135,7 +135,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class VaultIPAClient(IPAClient): diff --git a/plugins/modules/identity/onepassword_info.py b/plugins/modules/identity/onepassword_info.py index 42a6311c0d..95ef7c12b7 100644 --- a/plugins/modules/identity/onepassword_info.py +++ b/plugins/modules/identity/onepassword_info.py @@ -163,7 +163,7 @@ import re from subprocess import Popen, PIPE -from ansible.module_utils._text import to_bytes, to_native +from ansible.module_utils.common.text.converters import to_bytes, to_native from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/monitoring/bigpanda.py b/plugins/modules/monitoring/bigpanda.py index 8392c19536..c5fe61cbf6 100644 --- a/plugins/modules/monitoring/bigpanda.py +++ b/plugins/modules/monitoring/bigpanda.py @@ -130,7 +130,7 @@ import socket import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.urls import fetch_url diff --git a/plugins/modules/monitoring/circonus_annotation.py b/plugins/modules/monitoring/circonus_annotation.py index 27d2316873..8543aa00fa 100644 --- a/plugins/modules/monitoring/circonus_annotation.py +++ b/plugins/modules/monitoring/circonus_annotation.py @@ -155,7 +155,7 @@ except ImportError: from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.six import PY3 -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def check_requests_dep(module): diff --git a/plugins/modules/monitoring/datadog/datadog_event.py b/plugins/modules/monitoring/datadog/datadog_event.py index 3f6500f11f..6284b5bf23 100644 --- a/plugins/modules/monitoring/datadog/datadog_event.py +++ b/plugins/modules/monitoring/datadog/datadog_event.py @@ -123,7 +123,7 @@ except Exception: HAS_DATADOG = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/monitoring/datadog/datadog_monitor.py index 8be71297f4..6c0f8cdb02 100644 --- a/plugins/modules/monitoring/datadog/datadog_monitor.py +++ b/plugins/modules/monitoring/datadog/datadog_monitor.py @@ -198,7 +198,7 @@ except Exception: HAS_DATADOG = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/monitoring/honeybadger_deployment.py b/plugins/modules/monitoring/honeybadger_deployment.py index 0b96af04a9..2e2198e1a3 100644 --- a/plugins/modules/monitoring/honeybadger_deployment.py +++ b/plugins/modules/monitoring/honeybadger_deployment.py @@ -67,7 +67,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves.urllib.parse import urlencode -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.urls import fetch_url diff --git a/plugins/modules/monitoring/rollbar_deployment.py b/plugins/modules/monitoring/rollbar_deployment.py index 161361b774..cea3bfdf51 100644 --- a/plugins/modules/monitoring/rollbar_deployment.py +++ b/plugins/modules/monitoring/rollbar_deployment.py @@ -84,7 +84,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves.urllib.parse import urlencode -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.urls import fetch_url diff --git a/plugins/modules/monitoring/sensu/sensu_check.py b/plugins/modules/monitoring/sensu/sensu_check.py index 71e8f07228..ec43b60abe 100644 --- a/plugins/modules/monitoring/sensu/sensu_check.py +++ b/plugins/modules/monitoring/sensu/sensu_check.py @@ -179,7 +179,7 @@ import json import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def sensu_check(module, path, name, state='present', backup=False): diff --git a/plugins/modules/monitoring/sensu/sensu_silence.py b/plugins/modules/monitoring/sensu/sensu_silence.py index 12dc5d2068..80a5216711 100644 --- a/plugins/modules/monitoring/sensu/sensu_silence.py +++ b/plugins/modules/monitoring/sensu/sensu_silence.py @@ -97,7 +97,7 @@ RETURN = ''' import json -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url diff --git a/plugins/modules/monitoring/sensu/sensu_subscription.py b/plugins/modules/monitoring/sensu/sensu_subscription.py index 6316254d7b..947c6e0de5 100644 --- a/plugins/modules/monitoring/sensu/sensu_subscription.py +++ b/plugins/modules/monitoring/sensu/sensu_subscription.py @@ -66,7 +66,7 @@ import json import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def sensu_subscription(module, path, name, state='present', backup=False): diff --git a/plugins/modules/monitoring/spectrum_model_attrs.py b/plugins/modules/monitoring/spectrum_model_attrs.py index d6f3948254..231352acd6 100644 --- a/plugins/modules/monitoring/spectrum_model_attrs.py +++ b/plugins/modules/monitoring/spectrum_model_attrs.py @@ -142,7 +142,7 @@ changed_attrs: from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.urls import fetch_url from ansible.module_utils.six.moves.urllib.parse import quote import json diff --git a/plugins/modules/monitoring/stackdriver.py b/plugins/modules/monitoring/stackdriver.py index 8e2d19a9ab..8eacdbfe49 100644 --- a/plugins/modules/monitoring/stackdriver.py +++ b/plugins/modules/monitoring/stackdriver.py @@ -96,7 +96,7 @@ import json import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.urls import fetch_url diff --git a/plugins/modules/monitoring/statusio_maintenance.py b/plugins/modules/monitoring/statusio_maintenance.py index 3a6124f8b0..10f733d4a8 100644 --- a/plugins/modules/monitoring/statusio_maintenance.py +++ b/plugins/modules/monitoring/statusio_maintenance.py @@ -177,7 +177,7 @@ import datetime import json from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.urls import open_url diff --git a/plugins/modules/monitoring/uptimerobot.py b/plugins/modules/monitoring/uptimerobot.py index bb4e60faee..833a7f191e 100644 --- a/plugins/modules/monitoring/uptimerobot.py +++ b/plugins/modules/monitoring/uptimerobot.py @@ -56,7 +56,7 @@ import json from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves.urllib.parse import urlencode from ansible.module_utils.urls import fetch_url -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text API_BASE = "https://api.uptimerobot.com/" diff --git a/plugins/modules/net_tools/cloudflare_dns.py b/plugins/modules/net_tools/cloudflare_dns.py index ffa4e55745..4e82e0af36 100644 --- a/plugins/modules/net_tools/cloudflare_dns.py +++ b/plugins/modules/net_tools/cloudflare_dns.py @@ -360,7 +360,7 @@ import json from ansible.module_utils.basic import AnsibleModule, env_fallback from ansible.module_utils.six.moves.urllib.parse import urlencode -from ansible.module_utils._text import to_native, to_text +from ansible.module_utils.common.text.converters import to_native, to_text from ansible.module_utils.urls import fetch_url diff --git a/plugins/modules/net_tools/haproxy.py b/plugins/modules/net_tools/haproxy.py index a3320b45c5..f736036671 100644 --- a/plugins/modules/net_tools/haproxy.py +++ b/plugins/modules/net_tools/haproxy.py @@ -211,7 +211,7 @@ import time from string import Template from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_bytes, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_text DEFAULT_SOCKET_LOCATION = "/var/run/haproxy.sock" diff --git a/plugins/modules/net_tools/ip_netns.py b/plugins/modules/net_tools/ip_netns.py index 50aec392c5..9854709e82 100644 --- a/plugins/modules/net_tools/ip_netns.py +++ b/plugins/modules/net_tools/ip_netns.py @@ -58,7 +58,7 @@ RETURN = ''' ''' from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text class Namespace(object): diff --git a/plugins/modules/net_tools/ipify_facts.py b/plugins/modules/net_tools/ipify_facts.py index dcdc5ef801..2ae0348cb1 100644 --- a/plugins/modules/net_tools/ipify_facts.py +++ b/plugins/modules/net_tools/ipify_facts.py @@ -62,7 +62,7 @@ import json from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text class IpifyFacts(object): diff --git a/plugins/modules/net_tools/ldap/ldap_attrs.py b/plugins/modules/net_tools/ldap/ldap_attrs.py index ae5cb7fdae..c357a83087 100644 --- a/plugins/modules/net_tools/ldap/ldap_attrs.py +++ b/plugins/modules/net_tools/ldap/ldap_attrs.py @@ -166,7 +166,7 @@ modlist: import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native, to_bytes +from ansible.module_utils.common.text.converters import to_native, to_bytes from ansible_collections.community.general.plugins.module_utils.ldap import LdapGeneric, gen_specs import re diff --git a/plugins/modules/net_tools/ldap/ldap_entry.py b/plugins/modules/net_tools/ldap/ldap_entry.py index ac1d63ac0e..2ef06b9693 100644 --- a/plugins/modules/net_tools/ldap/ldap_entry.py +++ b/plugins/modules/net_tools/ldap/ldap_entry.py @@ -104,7 +104,7 @@ RETURN = """ import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native, to_bytes +from ansible.module_utils.common.text.converters import to_native, to_bytes from ansible_collections.community.general.plugins.module_utils.ldap import LdapGeneric, gen_specs LDAP_IMP_ERR = None diff --git a/plugins/modules/net_tools/ldap/ldap_search.py b/plugins/modules/net_tools/ldap/ldap_search.py index f4d02c1cd2..6b83321ff9 100644 --- a/plugins/modules/net_tools/ldap/ldap_search.py +++ b/plugins/modules/net_tools/ldap/ldap_search.py @@ -77,7 +77,7 @@ EXAMPLES = r""" import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.ldap import LdapGeneric, gen_specs LDAP_IMP_ERR = None diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index 30f0537e70..657df3bd2a 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -650,7 +650,7 @@ RETURN = r"""# """ from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text import re diff --git a/plugins/modules/net_tools/nsupdate.py b/plugins/modules/net_tools/nsupdate.py index b110c6fe20..520d12e803 100644 --- a/plugins/modules/net_tools/nsupdate.py +++ b/plugins/modules/net_tools/nsupdate.py @@ -198,7 +198,7 @@ except ImportError: HAVE_DNSPYTHON = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class RecordManager(object): diff --git a/plugins/modules/net_tools/omapi_host.py b/plugins/modules/net_tools/omapi_host.py index 41c68a471a..4d65fcb95d 100644 --- a/plugins/modules/net_tools/omapi_host.py +++ b/plugins/modules/net_tools/omapi_host.py @@ -140,7 +140,7 @@ except ImportError: pureomapi_found = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_bytes, to_native +from ansible.module_utils.common.text.converters import to_bytes, to_native class OmapiHostManager: diff --git a/plugins/modules/net_tools/pritunl/pritunl_org.py b/plugins/modules/net_tools/pritunl/pritunl_org.py index 7fa7cbc124..35796ae361 100644 --- a/plugins/modules/net_tools/pritunl/pritunl_org.py +++ b/plugins/modules/net_tools/pritunl/pritunl_org.py @@ -78,7 +78,7 @@ response: from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.dict_transformations import dict_merge from ansible_collections.community.general.plugins.module_utils.net_tools.pritunl.api import ( PritunlException, diff --git a/plugins/modules/net_tools/pritunl/pritunl_org_info.py b/plugins/modules/net_tools/pritunl/pritunl_org_info.py index e0c573fb19..a7e65c80d1 100644 --- a/plugins/modules/net_tools/pritunl/pritunl_org_info.py +++ b/plugins/modules/net_tools/pritunl/pritunl_org_info.py @@ -75,7 +75,7 @@ organizations: """ from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.dict_transformations import dict_merge from ansible_collections.community.general.plugins.module_utils.net_tools.pritunl.api import ( PritunlException, diff --git a/plugins/modules/net_tools/pritunl/pritunl_user.py b/plugins/modules/net_tools/pritunl/pritunl_user.py index 3d1c7f338f..7ea4f18a44 100644 --- a/plugins/modules/net_tools/pritunl/pritunl_user.py +++ b/plugins/modules/net_tools/pritunl/pritunl_user.py @@ -142,7 +142,7 @@ response: from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.dict_transformations import dict_merge from ansible_collections.community.general.plugins.module_utils.net_tools.pritunl.api import ( PritunlException, diff --git a/plugins/modules/net_tools/pritunl/pritunl_user_info.py b/plugins/modules/net_tools/pritunl/pritunl_user_info.py index c00da6dc23..e8cf5e2955 100644 --- a/plugins/modules/net_tools/pritunl/pritunl_user_info.py +++ b/plugins/modules/net_tools/pritunl/pritunl_user_info.py @@ -93,7 +93,7 @@ users: """ from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.dict_transformations import dict_merge from ansible_collections.community.general.plugins.module_utils.net_tools.pritunl.api import ( PritunlException, diff --git a/plugins/modules/net_tools/snmp_facts.py b/plugins/modules/net_tools/snmp_facts.py index 3918a3a1c0..221eda30f9 100644 --- a/plugins/modules/net_tools/snmp_facts.py +++ b/plugins/modules/net_tools/snmp_facts.py @@ -190,7 +190,7 @@ except Exception: HAS_PYSNMP = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text class DefineOid(object): diff --git a/plugins/modules/notification/hipchat.py b/plugins/modules/notification/hipchat.py index 06c9fca4d2..76c1227af4 100644 --- a/plugins/modules/notification/hipchat.py +++ b/plugins/modules/notification/hipchat.py @@ -96,7 +96,7 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves.urllib.parse import urlencode from ansible.module_utils.six.moves.urllib.request import pathname2url -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.urls import fetch_url diff --git a/plugins/modules/notification/irc.py b/plugins/modules/notification/irc.py index 1c050fc187..9b1b91f586 100644 --- a/plugins/modules/notification/irc.py +++ b/plugins/modules/notification/irc.py @@ -137,7 +137,7 @@ import ssl import time import traceback -from ansible.module_utils._text import to_native, to_bytes +from ansible.module_utils.common.text.converters import to_native, to_bytes from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/notification/jabber.py b/plugins/modules/notification/jabber.py index 68e2c5938b..9b6811b3fa 100644 --- a/plugins/modules/notification/jabber.py +++ b/plugins/modules/notification/jabber.py @@ -92,7 +92,7 @@ except ImportError: HAS_XMPP = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/notification/mail.py b/plugins/modules/notification/mail.py index 3b5936d134..2f03f8c239 100644 --- a/plugins/modules/notification/mail.py +++ b/plugins/modules/notification/mail.py @@ -204,7 +204,7 @@ from email.header import Header from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six import PY3 -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/notification/mqtt.py b/plugins/modules/notification/mqtt.py index 0551ab203c..991114e8ae 100644 --- a/plugins/modules/notification/mqtt.py +++ b/plugins/modules/notification/mqtt.py @@ -136,7 +136,7 @@ except ImportError: HAS_PAHOMQTT = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native # =========================================== diff --git a/plugins/modules/notification/sendgrid.py b/plugins/modules/notification/sendgrid.py index 02ab072270..4a63a03db7 100644 --- a/plugins/modules/notification/sendgrid.py +++ b/plugins/modules/notification/sendgrid.py @@ -136,7 +136,7 @@ except ImportError: from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.six.moves.urllib.parse import urlencode -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.module_utils.urls import fetch_url diff --git a/plugins/modules/notification/syslogger.py b/plugins/modules/notification/syslogger.py index 7f4f899f8c..226126f5a9 100644 --- a/plugins/modules/notification/syslogger.py +++ b/plugins/modules/notification/syslogger.py @@ -98,7 +98,7 @@ import syslog import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def get_facility(facility): diff --git a/plugins/modules/packaging/language/maven_artifact.py b/plugins/modules/packaging/language/maven_artifact.py index 83833b0480..9e2f94190f 100644 --- a/plugins/modules/packaging/language/maven_artifact.py +++ b/plugins/modules/packaging/language/maven_artifact.py @@ -261,7 +261,7 @@ except ImportError: from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.six.moves.urllib.parse import urlparse from ansible.module_utils.urls import fetch_url -from ansible.module_utils._text import to_bytes, to_native, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text def split_pre_existing_dir(dirname): diff --git a/plugins/modules/packaging/language/npm.py b/plugins/modules/packaging/language/npm.py index 5a48468970..283b8e0be7 100644 --- a/plugins/modules/packaging/language/npm.py +++ b/plugins/modules/packaging/language/npm.py @@ -141,7 +141,7 @@ import os import re from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class Npm(object): diff --git a/plugins/modules/packaging/language/pear.py b/plugins/modules/packaging/language/pear.py index fef04d325f..e8e36b3c56 100644 --- a/plugins/modules/packaging/language/pear.py +++ b/plugins/modules/packaging/language/pear.py @@ -111,7 +111,7 @@ EXAMPLES = r''' import os -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/packaging/language/pip_package_info.py b/plugins/modules/packaging/language/pip_package_info.py index b769afb866..cdcc9f51cc 100644 --- a/plugins/modules/packaging/language/pip_package_info.py +++ b/plugins/modules/packaging/language/pip_package_info.py @@ -89,7 +89,7 @@ packages: import json import os -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.facts.packages import CLIMgr diff --git a/plugins/modules/packaging/os/flatpak_remote.py b/plugins/modules/packaging/os/flatpak_remote.py index a7767621d7..e0e4170f47 100644 --- a/plugins/modules/packaging/os/flatpak_remote.py +++ b/plugins/modules/packaging/os/flatpak_remote.py @@ -119,7 +119,7 @@ stdout: ''' from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_bytes, to_native +from ansible.module_utils.common.text.converters import to_bytes, to_native def add_remote(module, binary, name, flatpakrepo_url, method): diff --git a/plugins/modules/packaging/os/homebrew_cask.py b/plugins/modules/packaging/os/homebrew_cask.py index 498d0b8771..6c3de1c9ba 100644 --- a/plugins/modules/packaging/os/homebrew_cask.py +++ b/plugins/modules/packaging/os/homebrew_cask.py @@ -142,7 +142,7 @@ import re import tempfile from distutils import version -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six import iteritems, string_types diff --git a/plugins/modules/packaging/os/mas.py b/plugins/modules/packaging/os/mas.py index bc3e6dfd66..dd394b7c43 100644 --- a/plugins/modules/packaging/os/mas.py +++ b/plugins/modules/packaging/os/mas.py @@ -96,7 +96,7 @@ EXAMPLES = ''' RETURN = r''' # ''' from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from distutils.version import StrictVersion import os diff --git a/plugins/modules/packaging/os/pacman_key.py b/plugins/modules/packaging/os/pacman_key.py index 85896c211d..a40575b697 100644 --- a/plugins/modules/packaging/os/pacman_key.py +++ b/plugins/modules/packaging/os/pacman_key.py @@ -118,7 +118,7 @@ import os.path import tempfile from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class PacmanKey(object): diff --git a/plugins/modules/packaging/os/portage.py b/plugins/modules/packaging/os/portage.py index 1f0fdc682a..2a8679dbbd 100644 --- a/plugins/modules/packaging/os/portage.py +++ b/plugins/modules/packaging/os/portage.py @@ -229,7 +229,7 @@ import os import re from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def query_package(module, package, action): diff --git a/plugins/modules/packaging/os/redhat_subscription.py b/plugins/modules/packaging/os/redhat_subscription.py index c8b5e991a0..f3e5400900 100644 --- a/plugins/modules/packaging/os/redhat_subscription.py +++ b/plugins/modules/packaging/os/redhat_subscription.py @@ -277,7 +277,7 @@ import tempfile import json from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.six.moves import configparser diff --git a/plugins/modules/packaging/os/rhn_channel.py b/plugins/modules/packaging/os/rhn_channel.py index 63be03230c..f1954037fa 100644 --- a/plugins/modules/packaging/os/rhn_channel.py +++ b/plugins/modules/packaging/os/rhn_channel.py @@ -73,7 +73,7 @@ EXAMPLES = ''' ''' import ssl -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves import xmlrpc_client diff --git a/plugins/modules/packaging/os/yum_versionlock.py b/plugins/modules/packaging/os/yum_versionlock.py index 13319f6711..6dfb3d20ba 100644 --- a/plugins/modules/packaging/os/yum_versionlock.py +++ b/plugins/modules/packaging/os/yum_versionlock.py @@ -75,7 +75,7 @@ state: ''' from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class YumVersionLock: diff --git a/plugins/modules/packaging/os/zypper.py b/plugins/modules/packaging/os/zypper.py index 9c9b12a1a5..367bd8d9a0 100644 --- a/plugins/modules/packaging/os/zypper.py +++ b/plugins/modules/packaging/os/zypper.py @@ -216,7 +216,7 @@ EXAMPLES = ''' import xml import re from xml.dom.minidom import parseString as parseXML -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native # import module snippets from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/remote_management/cobbler/cobbler_sync.py b/plugins/modules/remote_management/cobbler/cobbler_sync.py index 3ce1c25564..157208216b 100644 --- a/plugins/modules/remote_management/cobbler/cobbler_sync.py +++ b/plugins/modules/remote_management/cobbler/cobbler_sync.py @@ -72,7 +72,7 @@ import ssl from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves import xmlrpc_client -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text def main(): diff --git a/plugins/modules/remote_management/cobbler/cobbler_system.py b/plugins/modules/remote_management/cobbler/cobbler_system.py index 504369e56a..e97be01239 100644 --- a/plugins/modules/remote_management/cobbler/cobbler_system.py +++ b/plugins/modules/remote_management/cobbler/cobbler_system.py @@ -151,7 +151,7 @@ import ssl from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six import iteritems from ansible.module_utils.six.moves import xmlrpc_client -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text IFPROPS_MAPPING = dict( bondingopts='bonding_opts', diff --git a/plugins/modules/remote_management/hpilo/hpilo_info.py b/plugins/modules/remote_management/hpilo/hpilo_info.py index 0f204b4a15..f373b58639 100644 --- a/plugins/modules/remote_management/hpilo/hpilo_info.py +++ b/plugins/modules/remote_management/hpilo/hpilo_info.py @@ -128,7 +128,7 @@ except ImportError: HAS_HPILO = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native # Suppress warnings from hpilo diff --git a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py index d8966c6d64..1dbf4ad0b6 100644 --- a/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py +++ b/plugins/modules/remote_management/lenovoxcc/xcc_redfish_command.py @@ -283,7 +283,7 @@ redfish_facts: ''' from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_command.py b/plugins/modules/remote_management/redfish/idrac_redfish_command.py index a637d15631..5e02154ed8 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_command.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_command.py @@ -82,7 +82,7 @@ msg: import re from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class IdracRedfishUtils(RedfishUtils): diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_config.py b/plugins/modules/remote_management/redfish/idrac_redfish_config.py index b16401311b..adea4b11a9 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_config.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_config.py @@ -150,7 +150,7 @@ from ansible.module_utils.common.validation import ( check_required_arguments ) from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class IdracRedfishUtils(RedfishUtils): diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_info.py b/plugins/modules/remote_management/redfish/idrac_redfish_info.py index 0033db7384..cb1aa8f34f 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_info.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_info.py @@ -120,7 +120,7 @@ msg: from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class IdracRedfishUtils(RedfishUtils): diff --git a/plugins/modules/remote_management/redfish/redfish_command.py b/plugins/modules/remote_management/redfish/redfish_command.py index a2f290d16a..01f1fd771d 100644 --- a/plugins/modules/remote_management/redfish/redfish_command.py +++ b/plugins/modules/remote_management/redfish/redfish_command.py @@ -551,7 +551,7 @@ msg: from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native # More will be added as module features are expanded diff --git a/plugins/modules/remote_management/redfish/redfish_config.py b/plugins/modules/remote_management/redfish/redfish_config.py index e084c670f4..9b15a3e63e 100644 --- a/plugins/modules/remote_management/redfish/redfish_config.py +++ b/plugins/modules/remote_management/redfish/redfish_config.py @@ -204,7 +204,7 @@ msg: from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.module_utils.redfish_utils import RedfishUtils -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native # More will be added as module features are expanded diff --git a/plugins/modules/remote_management/wakeonlan.py b/plugins/modules/remote_management/wakeonlan.py index 2f097fcf30..725e070cd8 100644 --- a/plugins/modules/remote_management/wakeonlan.py +++ b/plugins/modules/remote_management/wakeonlan.py @@ -65,7 +65,7 @@ import struct import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def wakeonlan(module, mac, broadcast, port): diff --git a/plugins/modules/source_control/github/github_release.py b/plugins/modules/source_control/github/github_release.py index 7813ba1d89..654dce5f98 100644 --- a/plugins/modules/source_control/github/github_release.py +++ b/plugins/modules/source_control/github/github_release.py @@ -135,7 +135,7 @@ except ImportError: HAS_GITHUB_API = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/source_control/github/github_webhook.py b/plugins/modules/source_control/github/github_webhook.py index 2a737ef5a4..b1f0cb7a2b 100644 --- a/plugins/modules/source_control/github/github_webhook.py +++ b/plugins/modules/source_control/github/github_webhook.py @@ -148,7 +148,7 @@ except ImportError: HAS_GITHUB = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def _create_hook_config(module): diff --git a/plugins/modules/source_control/github/github_webhook_info.py b/plugins/modules/source_control/github/github_webhook_info.py index 2e7012e631..3936cbe37b 100644 --- a/plugins/modules/source_control/github/github_webhook_info.py +++ b/plugins/modules/source_control/github/github_webhook_info.py @@ -94,7 +94,7 @@ except ImportError: HAS_GITHUB = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def _munge_hook(hook_obj): diff --git a/plugins/modules/source_control/gitlab/gitlab_deploy_key.py b/plugins/modules/source_control/gitlab/gitlab_deploy_key.py index a75aef4e48..45149e275c 100644 --- a/plugins/modules/source_control/gitlab/gitlab_deploy_key.py +++ b/plugins/modules/source_control/gitlab/gitlab_deploy_key.py @@ -124,7 +124,7 @@ except Exception: from ansible.module_utils.api import basic_auth_argument_spec from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.gitlab import findProject, gitlabAuthentication diff --git a/plugins/modules/source_control/gitlab/gitlab_group.py b/plugins/modules/source_control/gitlab/gitlab_group.py index 0c61273363..42e1801a81 100644 --- a/plugins/modules/source_control/gitlab/gitlab_group.py +++ b/plugins/modules/source_control/gitlab/gitlab_group.py @@ -131,7 +131,7 @@ except Exception: from ansible.module_utils.api import basic_auth_argument_spec from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.gitlab import findGroup, gitlabAuthentication diff --git a/plugins/modules/source_control/gitlab/gitlab_hook.py b/plugins/modules/source_control/gitlab/gitlab_hook.py index bc4b6ecba4..5128fba9e1 100644 --- a/plugins/modules/source_control/gitlab/gitlab_hook.py +++ b/plugins/modules/source_control/gitlab/gitlab_hook.py @@ -174,7 +174,7 @@ except Exception: from ansible.module_utils.api import basic_auth_argument_spec from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.gitlab import findProject, gitlabAuthentication diff --git a/plugins/modules/source_control/gitlab/gitlab_project.py b/plugins/modules/source_control/gitlab/gitlab_project.py index 060d77ef6a..73def710c3 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project.py +++ b/plugins/modules/source_control/gitlab/gitlab_project.py @@ -181,7 +181,7 @@ except Exception: from ansible.module_utils.api import basic_auth_argument_spec from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.gitlab import findGroup, findProject, gitlabAuthentication diff --git a/plugins/modules/source_control/gitlab/gitlab_project_variable.py b/plugins/modules/source_control/gitlab/gitlab_project_variable.py index 2ca788a194..21821cd495 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project_variable.py +++ b/plugins/modules/source_control/gitlab/gitlab_project_variable.py @@ -129,7 +129,7 @@ project_variable: import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.api import basic_auth_argument_spec from ansible.module_utils.six import string_types from ansible.module_utils.six import integer_types diff --git a/plugins/modules/source_control/gitlab/gitlab_runner.py b/plugins/modules/source_control/gitlab/gitlab_runner.py index d38b4819a6..25490b00dd 100644 --- a/plugins/modules/source_control/gitlab/gitlab_runner.py +++ b/plugins/modules/source_control/gitlab/gitlab_runner.py @@ -169,7 +169,7 @@ except Exception: from ansible.module_utils.api import basic_auth_argument_spec from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.gitlab import gitlabAuthentication diff --git a/plugins/modules/source_control/gitlab/gitlab_user.py b/plugins/modules/source_control/gitlab/gitlab_user.py index 8770a041b4..c586cafd60 100644 --- a/plugins/modules/source_control/gitlab/gitlab_user.py +++ b/plugins/modules/source_control/gitlab/gitlab_user.py @@ -236,7 +236,7 @@ except Exception: from ansible.module_utils.api import basic_auth_argument_spec from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.gitlab import findGroup, gitlabAuthentication diff --git a/plugins/modules/source_control/hg.py b/plugins/modules/source_control/hg.py index 810b918bd6..572b036e1f 100644 --- a/plugins/modules/source_control/hg.py +++ b/plugins/modules/source_control/hg.py @@ -89,7 +89,7 @@ EXAMPLES = ''' import os from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class Hg(object): diff --git a/plugins/modules/storage/emc/emc_vnx_sg_member.py b/plugins/modules/storage/emc/emc_vnx_sg_member.py index b5b68d4ef4..2698f5327a 100644 --- a/plugins/modules/storage/emc/emc_vnx_sg_member.py +++ b/plugins/modules/storage/emc/emc_vnx_sg_member.py @@ -79,7 +79,7 @@ hluid: import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.storage.emc.emc_vnx import emc_vnx_argument_spec LIB_IMP_ERR = None diff --git a/plugins/modules/system/crypttab.py b/plugins/modules/system/crypttab.py index 9841a786c1..8eeec56d3d 100644 --- a/plugins/modules/system/crypttab.py +++ b/plugins/modules/system/crypttab.py @@ -76,7 +76,7 @@ import os import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_bytes, to_native +from ansible.module_utils.common.text.converters import to_bytes, to_native def main(): diff --git a/plugins/modules/system/dpkg_divert.py b/plugins/modules/system/dpkg_divert.py index b7b57fd321..1033f70f14 100644 --- a/plugins/modules/system/dpkg_divert.py +++ b/plugins/modules/system/dpkg_divert.py @@ -161,7 +161,7 @@ import os from distutils.version import LooseVersion from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_bytes, to_native +from ansible.module_utils.common.text.converters import to_bytes, to_native def diversion_state(module, command, path): diff --git a/plugins/modules/system/filesystem.py b/plugins/modules/system/filesystem.py index 97fe2dc1ab..cbb0e5e95e 100644 --- a/plugins/modules/system/filesystem.py +++ b/plugins/modules/system/filesystem.py @@ -110,7 +110,7 @@ import re import stat from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class Device(object): diff --git a/plugins/modules/system/interfaces_file.py b/plugins/modules/system/interfaces_file.py index 618a472d91..c22c0ce29e 100644 --- a/plugins/modules/system/interfaces_file.py +++ b/plugins/modules/system/interfaces_file.py @@ -145,7 +145,7 @@ import re import tempfile from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes def lineDict(line): diff --git a/plugins/modules/system/iptables_state.py b/plugins/modules/system/iptables_state.py index 66ba2c9b20..1f35edc04b 100644 --- a/plugins/modules/system/iptables_state.py +++ b/plugins/modules/system/iptables_state.py @@ -232,7 +232,7 @@ import filecmp import shutil from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_bytes, to_native +from ansible.module_utils.common.text.converters import to_bytes, to_native IPTABLES = dict( diff --git a/plugins/modules/system/launchd.py b/plugins/modules/system/launchd.py index 919d8d7bd2..30a5ed02b2 100644 --- a/plugins/modules/system/launchd.py +++ b/plugins/modules/system/launchd.py @@ -114,7 +114,7 @@ from abc import ABCMeta, abstractmethod from time import sleep from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class ServiceState: diff --git a/plugins/modules/system/listen_ports_facts.py b/plugins/modules/system/listen_ports_facts.py index 27ecca8f50..c81977d7f4 100644 --- a/plugins/modules/system/listen_ports_facts.py +++ b/plugins/modules/system/listen_ports_facts.py @@ -137,7 +137,7 @@ ansible_facts: import re import platform -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/system/locale_gen.py b/plugins/modules/system/locale_gen.py index 9a5b84f071..c142da1ceb 100644 --- a/plugins/modules/system/locale_gen.py +++ b/plugins/modules/system/locale_gen.py @@ -40,7 +40,7 @@ import re from subprocess import Popen, PIPE, call from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native LOCALE_NORMALIZATION = { ".utf8": ".UTF-8", diff --git a/plugins/modules/system/nosh.py b/plugins/modules/system/nosh.py index 0f7de471d3..4fe3020393 100644 --- a/plugins/modules/system/nosh.py +++ b/plugins/modules/system/nosh.py @@ -315,7 +315,7 @@ import json from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.service import fail_if_missing -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def run_sys_ctl(module, args): diff --git a/plugins/modules/system/openwrt_init.py b/plugins/modules/system/openwrt_init.py index 817ed9f4b5..afc3c3a956 100644 --- a/plugins/modules/system/openwrt_init.py +++ b/plugins/modules/system/openwrt_init.py @@ -72,7 +72,7 @@ RETURN = ''' import os import glob from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_bytes, to_native +from ansible.module_utils.common.text.converters import to_bytes, to_native module = None init_script = None diff --git a/plugins/modules/system/pam_limits.py b/plugins/modules/system/pam_limits.py index bde41d44f1..17b1ea1304 100644 --- a/plugins/modules/system/pam_limits.py +++ b/plugins/modules/system/pam_limits.py @@ -138,7 +138,7 @@ import re import tempfile from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def _assert_is_valid_value(module, item, value, prefix=''): diff --git a/plugins/modules/system/runit.py b/plugins/modules/system/runit.py index 30cd611b29..053c77ff07 100644 --- a/plugins/modules/system/runit.py +++ b/plugins/modules/system/runit.py @@ -84,7 +84,7 @@ import os import re from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class Sv(object): diff --git a/plugins/modules/system/sefcontext.py b/plugins/modules/system/sefcontext.py index 457e2e236b..73c79662bc 100644 --- a/plugins/modules/system/sefcontext.py +++ b/plugins/modules/system/sefcontext.py @@ -102,7 +102,7 @@ RETURN = r''' import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native SELINUX_IMP_ERR = None try: diff --git a/plugins/modules/system/selinux_permissive.py b/plugins/modules/system/selinux_permissive.py index 0d1f9f5985..7289705192 100644 --- a/plugins/modules/system/selinux_permissive.py +++ b/plugins/modules/system/selinux_permissive.py @@ -63,7 +63,7 @@ except ImportError: SEOBJECT_IMP_ERR = traceback.format_exc() from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/system/selogin.py b/plugins/modules/system/selogin.py index 7036dad958..53b077f954 100644 --- a/plugins/modules/system/selogin.py +++ b/plugins/modules/system/selogin.py @@ -113,7 +113,7 @@ except ImportError: from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def semanage_login_add(module, login, seuser, do_reload, serange='s0', sestore=''): diff --git a/plugins/modules/system/seport.py b/plugins/modules/system/seport.py index 71df8d6be9..c2eee25ae1 100644 --- a/plugins/modules/system/seport.py +++ b/plugins/modules/system/seport.py @@ -109,7 +109,7 @@ except ImportError: HAVE_SEOBJECT = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def get_runtime_status(ignore_selinux_state=False): diff --git a/plugins/modules/system/ssh_config.py b/plugins/modules/system/ssh_config.py index be177baaaf..49525849f1 100644 --- a/plugins/modules/system/ssh_config.py +++ b/plugins/modules/system/ssh_config.py @@ -157,7 +157,7 @@ except ImportError: STORM_IMP_ERR = traceback.format_exc() from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class SSHConfig(): diff --git a/plugins/modules/system/svc.py b/plugins/modules/system/svc.py index e921567074..f49f904d93 100644 --- a/plugins/modules/system/svc.py +++ b/plugins/modules/system/svc.py @@ -91,7 +91,7 @@ import re import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def _load_dist_subclass(cls, *args, **kwargs): diff --git a/plugins/modules/web_infrastructure/deploy_helper.py b/plugins/modules/web_infrastructure/deploy_helper.py index a07281819b..f879594bc3 100644 --- a/plugins/modules/web_infrastructure/deploy_helper.py +++ b/plugins/modules/web_infrastructure/deploy_helper.py @@ -274,7 +274,7 @@ import time import traceback from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class DeployHelper(object): diff --git a/plugins/modules/web_infrastructure/htpasswd.py b/plugins/modules/web_infrastructure/htpasswd.py index 6ff041316f..b15a946448 100644 --- a/plugins/modules/web_infrastructure/htpasswd.py +++ b/plugins/modules/web_infrastructure/htpasswd.py @@ -97,7 +97,7 @@ import tempfile import traceback from distutils.version import LooseVersion from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native PASSLIB_IMP_ERR = None try: diff --git a/plugins/modules/web_infrastructure/jenkins_build.py b/plugins/modules/web_infrastructure/jenkins_build.py index 68f64f7a7b..43dc667ace 100644 --- a/plugins/modules/web_infrastructure/jenkins_build.py +++ b/plugins/modules/web_infrastructure/jenkins_build.py @@ -127,7 +127,7 @@ except ImportError: python_jenkins_installed = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class JenkinsBuild: diff --git a/plugins/modules/web_infrastructure/jenkins_job.py b/plugins/modules/web_infrastructure/jenkins_job.py index 6fb775d22a..9993a996e0 100644 --- a/plugins/modules/web_infrastructure/jenkins_job.py +++ b/plugins/modules/web_infrastructure/jenkins_job.py @@ -167,7 +167,7 @@ except ImportError: python_jenkins_installed = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native class JenkinsJob(object): diff --git a/plugins/modules/web_infrastructure/jenkins_job_info.py b/plugins/modules/web_infrastructure/jenkins_job_info.py index c927e5b954..9dcf5776c9 100644 --- a/plugins/modules/web_infrastructure/jenkins_job_info.py +++ b/plugins/modules/web_infrastructure/jenkins_job_info.py @@ -146,7 +146,7 @@ except ImportError: HAS_JENKINS = False from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def get_jenkins_connection(module): diff --git a/plugins/modules/web_infrastructure/jenkins_plugin.py b/plugins/modules/web_infrastructure/jenkins_plugin.py index be335fcfd3..20fd8554bc 100644 --- a/plugins/modules/web_infrastructure/jenkins_plugin.py +++ b/plugins/modules/web_infrastructure/jenkins_plugin.py @@ -273,7 +273,7 @@ from ansible.module_utils.six.moves import http_cookiejar as cookiejar from ansible.module_utils.six.moves.urllib.parse import urlencode from ansible.module_utils.urls import fetch_url, url_argument_spec from ansible.module_utils.six import text_type, binary_type -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native import base64 import hashlib import io diff --git a/plugins/modules/web_infrastructure/jenkins_script.py b/plugins/modules/web_infrastructure/jenkins_script.py index 68f06c2758..6d3b3d2253 100644 --- a/plugins/modules/web_infrastructure/jenkins_script.py +++ b/plugins/modules/web_infrastructure/jenkins_script.py @@ -107,7 +107,7 @@ from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves import http_cookiejar as cookiejar from ansible.module_utils.six.moves.urllib.parse import urlencode from ansible.module_utils.urls import fetch_url -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def is_csrf_protection_enabled(module): diff --git a/plugins/modules/web_infrastructure/jira.py b/plugins/modules/web_infrastructure/jira.py index 4c10974126..9cd86341a1 100644 --- a/plugins/modules/web_infrastructure/jira.py +++ b/plugins/modules/web_infrastructure/jira.py @@ -390,7 +390,7 @@ import traceback from ansible_collections.community.general.plugins.module_utils.module_helper import StateModuleHelper, cause_changes from ansible.module_utils.six.moves.urllib.request import pathname2url -from ansible.module_utils._text import to_text, to_bytes, to_native +from ansible.module_utils.common.text.converters import to_text, to_bytes, to_native from ansible.module_utils.urls import fetch_url diff --git a/plugins/modules/web_infrastructure/nginx_status_info.py b/plugins/modules/web_infrastructure/nginx_status_info.py index a13a57a637..ada6881714 100644 --- a/plugins/modules/web_infrastructure/nginx_status_info.py +++ b/plugins/modules/web_infrastructure/nginx_status_info.py @@ -94,7 +94,7 @@ data: import re from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text class NginxStatusInfo(object): diff --git a/plugins/modules/web_infrastructure/rundeck_acl_policy.py b/plugins/modules/web_infrastructure/rundeck_acl_policy.py index 8c2043d22c..6356f5a166 100644 --- a/plugins/modules/web_infrastructure/rundeck_acl_policy.py +++ b/plugins/modules/web_infrastructure/rundeck_acl_policy.py @@ -123,7 +123,7 @@ after: # import module snippets from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url, url_argument_spec -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text import json import re diff --git a/plugins/modules/web_infrastructure/rundeck_project.py b/plugins/modules/web_infrastructure/rundeck_project.py index 5c84648207..ef78299596 100644 --- a/plugins/modules/web_infrastructure/rundeck_project.py +++ b/plugins/modules/web_infrastructure/rundeck_project.py @@ -103,7 +103,7 @@ after: # import module snippets from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.urls import fetch_url, url_argument_spec import json diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py index b4aca155dc..70a0a78fd8 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py @@ -188,7 +188,7 @@ result: """ from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py index 6d230c1a71..88356a2e54 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py @@ -101,7 +101,7 @@ result: """ from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py b/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py index e940f4168e..81dffe223b 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py @@ -132,7 +132,7 @@ result: """ from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py index ad315df9a0..02542532f7 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py @@ -79,7 +79,7 @@ result: """ from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py index 1f080abfa0..76d463ccba 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py @@ -128,7 +128,7 @@ result: """ from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py index ecf08871fc..a8b3cc1f2b 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py @@ -108,7 +108,7 @@ result: """ from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py index c1d0f7d880..3f623d5a86 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py @@ -75,7 +75,7 @@ result: """ from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py index caa0085c25..0dd460509a 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py @@ -307,7 +307,7 @@ result: """ from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py index ed241af1fe..6d606abf89 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py @@ -204,7 +204,7 @@ result: """ from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py index 8dba3640db..a738bfab6b 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py @@ -234,7 +234,7 @@ result: """ from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py index 450bd16168..263b976045 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py @@ -120,7 +120,7 @@ result: """ from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py index 7c4bc8b6cf..99d56030be 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py @@ -178,7 +178,7 @@ result: """ from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py index 1125c4fada..afc0f5efcd 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py @@ -101,7 +101,7 @@ result: """ from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/web_infrastructure/taiga_issue.py b/plugins/modules/web_infrastructure/taiga_issue.py index ae8f31c0ef..f05550276e 100644 --- a/plugins/modules/web_infrastructure/taiga_issue.py +++ b/plugins/modules/web_infrastructure/taiga_issue.py @@ -117,7 +117,7 @@ import traceback from os import getenv from os.path import isfile from ansible.module_utils.basic import AnsibleModule, missing_required_lib -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native TAIGA_IMP_ERR = None try: diff --git a/tests/unit/mock/loader.py b/tests/unit/mock/loader.py index 907ec9b928..756d532e68 100644 --- a/tests/unit/mock/loader.py +++ b/tests/unit/mock/loader.py @@ -9,7 +9,7 @@ import os from ansible.errors import AnsibleParserError from ansible.parsing.dataloader import DataLoader -from ansible.module_utils._text import to_bytes, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_text class DictDataLoader(DataLoader): diff --git a/tests/unit/mock/procenv.py b/tests/unit/mock/procenv.py index 616a75bbd3..5673863e16 100644 --- a/tests/unit/mock/procenv.py +++ b/tests/unit/mock/procenv.py @@ -13,7 +13,7 @@ from contextlib import contextmanager from io import BytesIO, StringIO from ansible_collections.community.general.tests.unit.compat import unittest from ansible.module_utils.six import PY3 -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes @contextmanager diff --git a/tests/unit/mock/vault_helper.py b/tests/unit/mock/vault_helper.py index b54629da49..6bd2db9c32 100644 --- a/tests/unit/mock/vault_helper.py +++ b/tests/unit/mock/vault_helper.py @@ -3,7 +3,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.parsing.vault import VaultSecret diff --git a/tests/unit/plugins/module_utils/conftest.py b/tests/unit/plugins/module_utils/conftest.py index 8bc13c4d55..61ed0acd27 100644 --- a/tests/unit/plugins/module_utils/conftest.py +++ b/tests/unit/plugins/module_utils/conftest.py @@ -12,7 +12,7 @@ import pytest import ansible.module_utils.basic from ansible.module_utils.six import PY3, string_types -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.module_utils.common._collections_compat import MutableMapping diff --git a/tests/unit/plugins/modules/conftest.py b/tests/unit/plugins/modules/conftest.py index a7d1e0475f..9d8c52e6c5 100644 --- a/tests/unit/plugins/modules/conftest.py +++ b/tests/unit/plugins/modules/conftest.py @@ -9,7 +9,7 @@ import json import pytest from ansible.module_utils.six import string_types -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.module_utils.common._collections_compat import MutableMapping diff --git a/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py b/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py index b64a20f8ae..b380e857b1 100644 --- a/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py +++ b/tests/unit/plugins/modules/monitoring/test_circonus_annotation.py @@ -11,7 +11,7 @@ import uuid from urllib3.response import HTTPResponse from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible_collections.community.general.plugins.modules.monitoring import circonus_annotation from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/net_tools/test_nmcli.py b/tests/unit/plugins/modules/net_tools/test_nmcli.py index 8724bd4f60..911ffd1217 100644 --- a/tests/unit/plugins/modules/net_tools/test_nmcli.py +++ b/tests/unit/plugins/modules/net_tools/test_nmcli.py @@ -8,7 +8,7 @@ import json import pytest -from ansible.module_utils._text import to_text +from ansible.module_utils.common.text.converters import to_text from ansible_collections.community.general.plugins.modules.net_tools import nmcli pytestmark = pytest.mark.usefixtures('patch_ansible_module') diff --git a/tests/unit/plugins/modules/packaging/os/test_rhn_register.py b/tests/unit/plugins/modules/packaging/os/test_rhn_register.py index ae2f44aeda..9dde4bae7d 100644 --- a/tests/unit/plugins/modules/packaging/os/test_rhn_register.py +++ b/tests/unit/plugins/modules/packaging/os/test_rhn_register.py @@ -8,7 +8,7 @@ import os from ansible_collections.community.general.tests.unit.compat.mock import mock_open from ansible.module_utils import basic -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native import ansible.module_utils.six from ansible.module_utils.six.moves import xmlrpc_client from ansible_collections.community.general.plugins.modules.packaging.os import rhn_register diff --git a/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py b/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py index 38a6652fb1..418474c578 100644 --- a/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py +++ b/tests/unit/plugins/modules/remote_management/lenovoxcc/test_xcc_redfish_command.py @@ -8,7 +8,7 @@ from ansible_collections.community.general.tests.unit.compat import mock from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.compat import unittest from ansible.module_utils import basic -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes import ansible_collections.community.general.plugins.modules.remote_management.lenovoxcc.xcc_redfish_command as module from ansible_collections.community.general.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args, exit_json, fail_json diff --git a/tests/unit/plugins/modules/system/test_ufw.py b/tests/unit/plugins/modules/system/test_ufw.py index 3374c49322..44882e0e93 100644 --- a/tests/unit/plugins/modules/system/test_ufw.py +++ b/tests/unit/plugins/modules/system/test_ufw.py @@ -6,7 +6,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible.module_utils import basic -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes import ansible_collections.community.general.plugins.modules.system.ufw as module import json diff --git a/tests/unit/plugins/modules/utils.py b/tests/unit/plugins/modules/utils.py index 1a28072be1..6a00fd25fc 100644 --- a/tests/unit/plugins/modules/utils.py +++ b/tests/unit/plugins/modules/utils.py @@ -8,7 +8,7 @@ import json from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible.module_utils import basic -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes def set_module_args(args): diff --git a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py b/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py index 3774871329..687ef0f766 100644 --- a/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py +++ b/tests/unit/plugins/modules/web_infrastructure/test_jenkins_build.py @@ -6,7 +6,7 @@ __metaclass__ = type from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat.mock import patch from ansible.module_utils import basic -from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible_collections.community.general.plugins.modules.web_infrastructure import jenkins_build import json