mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* Replace ansible.module_utils._text by ansible.module_utils.common.text.converters.
* Also adjust tests.
(cherry picked from commit fafabed9e6
)
This commit is contained in:
parent
0760f60ca5
commit
c34dc24d3a
249 changed files with 252 additions and 250 deletions
2
changelogs/fragments/ansible-core-_text.yml
Normal file
2
changelogs/fragments/ansible-core-_text.yml
Normal file
|
@ -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)."
|
|
@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
from ansible.errors import AnsibleError, AnsibleConnectionFailure
|
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.module_utils.common.collections import is_string
|
||||||
from ansible.plugins.action import ActionBase
|
from ansible.plugins.action import ActionBase
|
||||||
from ansible.utils.display import Display
|
from ansible.utils.display import Display
|
||||||
|
|
|
@ -81,7 +81,7 @@ DOCUMENTATION = '''
|
||||||
|
|
||||||
import re
|
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
|
from ansible.plugins.become import BecomeBase
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ DOCUMENTATION = '''
|
||||||
|
|
||||||
import re
|
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
|
from ansible.plugins.become import BecomeBase
|
||||||
|
|
||||||
|
|
||||||
|
|
2
plugins/cache/redis.py
vendored
2
plugins/cache/redis.py
vendored
|
@ -67,7 +67,7 @@ import json
|
||||||
|
|
||||||
from ansible import constants as C
|
from ansible import constants as C
|
||||||
from ansible.errors import AnsibleError
|
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.parsing.ajson import AnsibleJSONEncoder, AnsibleJSONDecoder
|
||||||
from ansible.plugins.cache import BaseCacheModule
|
from ansible.plugins.cache import BaseCacheModule
|
||||||
from ansible.release import __version__ as ansible_base_version
|
from ansible.release import __version__ as ansible_base_version
|
||||||
|
|
|
@ -792,7 +792,7 @@ from ansible.utils.color import colorize, hostcolor
|
||||||
from ansible.template import Templar
|
from ansible.template import Templar
|
||||||
from ansible.vars.manager import VariableManager
|
from ansible.vars.manager import VariableManager
|
||||||
from ansible.plugins.callback.default import CallbackModule as Default
|
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):
|
class DummyStdout(object):
|
||||||
|
|
|
@ -31,7 +31,7 @@ import time
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from ansible.utils.path import makedirs_safe
|
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.module_utils.common._collections_compat import MutableMapping
|
||||||
from ansible.parsing.ajson import AnsibleJSONEncoder
|
from ansible.parsing.ajson import AnsibleJSONEncoder
|
||||||
from ansible.plugins.callback import CallbackBase
|
from ansible.plugins.callback import CallbackBase
|
||||||
|
|
|
@ -111,7 +111,7 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAS_FLATDICT = False
|
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
|
from ansible.plugins.callback import CallbackBase
|
||||||
|
|
||||||
# Todo:
|
# Todo:
|
||||||
|
|
|
@ -62,7 +62,7 @@ import re
|
||||||
import smtplib
|
import smtplib
|
||||||
|
|
||||||
from ansible.module_utils.six import string_types
|
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.parsing.ajson import AnsibleJSONEncoder
|
||||||
from ansible.plugins.callback import CallbackBase
|
from ansible.plugins.callback import CallbackBase
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ import difflib
|
||||||
|
|
||||||
from ansible import constants as C
|
from ansible import constants as C
|
||||||
from ansible.plugins.callback import CallbackBase
|
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:
|
try:
|
||||||
codeCodes = C.COLOR_CODES
|
codeCodes = C.COLOR_CODES
|
||||||
|
|
|
@ -58,7 +58,7 @@ import os
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from ansible import context
|
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.module_utils.urls import open_url
|
||||||
from ansible.plugins.callback import CallbackBase
|
from ansible.plugins.callback import CallbackBase
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ DOCUMENTATION = '''
|
||||||
from os.path import basename
|
from os.path import basename
|
||||||
from ansible import constants as C
|
from ansible import constants as C
|
||||||
from ansible import context
|
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.utils.color import colorize, hostcolor
|
||||||
from ansible.plugins.callback.default import CallbackModule as CallbackModule_default
|
from ansible.plugins.callback.default import CallbackModule as CallbackModule_default
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ import re
|
||||||
import string
|
import string
|
||||||
import sys
|
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.module_utils.six import string_types
|
||||||
from ansible.parsing.yaml.dumper import AnsibleDumper
|
from ansible.parsing.yaml.dumper import AnsibleDumper
|
||||||
from ansible.plugins.callback import CallbackBase, strip_internal_keys, module_response_deepcopy
|
from ansible.plugins.callback import CallbackBase, strip_internal_keys, module_response_deepcopy
|
||||||
|
|
|
@ -54,7 +54,7 @@ from ansible.errors import AnsibleError
|
||||||
from ansible.module_utils.basic import is_executable
|
from ansible.module_utils.basic import is_executable
|
||||||
from ansible.module_utils.common.process import get_bin_path
|
from ansible.module_utils.common.process import get_bin_path
|
||||||
from ansible.module_utils.six.moves import shlex_quote
|
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.plugins.connection import ConnectionBase, BUFSIZE
|
||||||
from ansible.utils.display import Display
|
from ansible.utils.display import Display
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ DOCUMENTATION = '''
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.connection.jail import Connection as Jail
|
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.errors import AnsibleError
|
||||||
from ansible.utils.display import Display
|
from ansible.utils.display import Display
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ import traceback
|
||||||
|
|
||||||
from ansible.errors import AnsibleError
|
from ansible.errors import AnsibleError
|
||||||
from ansible.module_utils.six.moves import shlex_quote
|
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.plugins.connection import ConnectionBase, BUFSIZE
|
||||||
from ansible.utils.display import Display
|
from ansible.utils.display import Display
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from ansible import errors
|
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
|
from ansible.plugins.connection import ConnectionBase
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ from distutils.spawn import find_executable
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
from ansible.errors import AnsibleError, AnsibleConnectionFailure, AnsibleFileNotFound
|
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
|
from ansible.plugins.connection import ConnectionBase
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ DOCUMENTATION = '''
|
||||||
|
|
||||||
import subprocess
|
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.plugins.connection import ConnectionBase, ensure_connect
|
||||||
from ansible.errors import AnsibleConnectionFailure
|
from ansible.errors import AnsibleConnectionFailure
|
||||||
from ansible.utils.display import Display
|
from ansible.utils.display import Display
|
||||||
|
|
|
@ -33,7 +33,7 @@ import traceback
|
||||||
|
|
||||||
from ansible.errors import AnsibleError
|
from ansible.errors import AnsibleError
|
||||||
from ansible.module_utils.six.moves import shlex_quote
|
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.plugins.connection import ConnectionBase, BUFSIZE
|
||||||
from ansible.utils.display import Display
|
from ansible.utils.display import Display
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
from ansible.errors import AnsibleFilterError
|
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,
|
from ansible_collections.community.general.plugins.module_utils.csv import (initialize_dialect, read_csv, CSVError,
|
||||||
DialectNotAvailableError,
|
DialectNotAvailableError,
|
||||||
|
|
|
@ -72,7 +72,7 @@ from distutils.version import LooseVersion
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
from ansible.errors import AnsibleError
|
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.common._collections_compat import MutableMapping
|
||||||
from ansible.module_utils.six import iteritems
|
from ansible.module_utils.six import iteritems
|
||||||
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, to_safe_group_name
|
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, to_safe_group_name
|
||||||
|
|
|
@ -82,7 +82,7 @@ keyed_groups:
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.errors import AnsibleError, AnsibleParserError
|
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
|
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -122,7 +122,7 @@ import time
|
||||||
import os
|
import os
|
||||||
import socket
|
import socket
|
||||||
from ansible.plugins.inventory import BaseInventoryPlugin
|
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.common.dict_transformations import dict_merge
|
||||||
from ansible.errors import AnsibleError, AnsibleParserError
|
from ansible.errors import AnsibleError, AnsibleParserError
|
||||||
from ansible_collections.community.general.plugins.module_utils.compat import ipaddress
|
from ansible_collections.community.general.plugins.module_utils.compat import ipaddress
|
||||||
|
|
|
@ -56,7 +56,7 @@ from subprocess import Popen, PIPE
|
||||||
|
|
||||||
from ansible import constants as C
|
from ansible import constants as C
|
||||||
from ansible.errors import AnsibleParserError
|
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.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
||||||
from ansible.module_utils.common.process import get_bin_path
|
from ansible.module_utils.common.process import get_bin_path
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ from sys import version as python_version
|
||||||
from ansible.errors import AnsibleError
|
from ansible.errors import AnsibleError
|
||||||
from ansible.module_utils.urls import open_url
|
from ansible.module_utils.urls import open_url
|
||||||
from ansible.plugins.inventory import BaseInventoryPlugin
|
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.ansible_release import __version__ as ansible_version
|
||||||
from ansible.module_utils.six.moves.urllib.parse import urljoin
|
from ansible.module_utils.six.moves.urllib.parse import urljoin
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ from ansible.errors import AnsibleError
|
||||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
|
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
|
||||||
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, parse_pagination_link
|
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.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
|
import ansible.module_utils.six.moves.urllib.parse as urllib_parse
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ import os
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
from ansible.errors import AnsibleParserError
|
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.module_utils.common._collections_compat import MutableMapping
|
||||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
||||||
from ansible.module_utils.common.process import get_bin_path
|
from ansible.module_utils.common.process import get_bin_path
|
||||||
|
|
|
@ -106,7 +106,7 @@ import os
|
||||||
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
||||||
from ansible.errors import AnsibleError, AnsibleAssertionError
|
from ansible.errors import AnsibleError, AnsibleAssertionError
|
||||||
from ansible.plugins.lookup import LookupBase
|
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:
|
try:
|
||||||
import consul
|
import consul
|
||||||
|
|
|
@ -74,7 +74,7 @@ from subprocess import Popen
|
||||||
from ansible.errors import AnsibleError
|
from ansible.errors import AnsibleError
|
||||||
from ansible.plugins.lookup import LookupBase
|
from ansible.plugins.lookup import LookupBase
|
||||||
from ansible.parsing.splitter import parse_kv
|
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
|
from ansible.utils.display import Display
|
||||||
|
|
||||||
display = Display()
|
display = Display()
|
||||||
|
|
|
@ -152,7 +152,7 @@ RETURN = """
|
||||||
|
|
||||||
from ansible.errors import AnsibleError
|
from ansible.errors import AnsibleError
|
||||||
from ansible.plugins.lookup import LookupBase
|
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
|
import socket
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -54,7 +54,7 @@ except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from ansible.errors import AnsibleError
|
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
|
from ansible.plugins.lookup import LookupBase
|
||||||
|
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
|
|
|
@ -138,7 +138,7 @@ import re
|
||||||
from ansible.plugins.lookup import LookupBase
|
from ansible.plugins.lookup import LookupBase
|
||||||
from ansible.utils.display import Display
|
from ansible.utils.display import Display
|
||||||
from ansible.module_utils.basic import missing_required_lib
|
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.plugins.lookup import LookupBase
|
||||||
from ansible.errors import AnsibleError, AnsibleLookupError
|
from ansible.errors import AnsibleError, AnsibleLookupError
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from ansible.plugins.lookup import LookupBase
|
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
|
from ansible.utils.display import Display
|
||||||
|
|
||||||
display = Display()
|
display = Display()
|
||||||
|
|
|
@ -63,7 +63,7 @@ import os
|
||||||
|
|
||||||
from ansible.plugins.lookup import LookupBase
|
from ansible.plugins.lookup import LookupBase
|
||||||
from ansible.utils.cmd_functions import run_cmd
|
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_CFG = os.getenv('ANSIBLE_HIERA_CFG', '/etc/hiera.yaml')
|
||||||
ANSIBLE_HIERA_BIN = os.getenv('ANSIBLE_HIERA_BIN', '/usr/bin/hiera')
|
ANSIBLE_HIERA_BIN = os.getenv('ANSIBLE_HIERA_BIN', '/usr/bin/hiera')
|
||||||
|
|
|
@ -39,7 +39,7 @@ RETURN = """
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
from ansible.errors import AnsibleError
|
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
|
from ansible.plugins.lookup import LookupBase
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ _raw:
|
||||||
|
|
||||||
from ansible.errors import AnsibleError
|
from ansible.errors import AnsibleError
|
||||||
from ansible.plugins.lookup import LookupBase
|
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
|
HAVE_LMDB = True
|
||||||
try:
|
try:
|
||||||
import lmdb
|
import lmdb
|
||||||
|
|
|
@ -74,7 +74,7 @@ _list:
|
||||||
|
|
||||||
from ansible.plugins.lookup import LookupBase
|
from ansible.plugins.lookup import LookupBase
|
||||||
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import WapiLookup
|
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
|
from ansible.errors import AnsibleError
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ _list:
|
||||||
|
|
||||||
from ansible.plugins.lookup import LookupBase
|
from ansible.plugins.lookup import LookupBase
|
||||||
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import WapiLookup
|
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
|
from ansible.errors import AnsibleError
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ from subprocess import Popen, PIPE
|
||||||
|
|
||||||
from ansible.plugins.lookup import LookupBase
|
from ansible.plugins.lookup import LookupBase
|
||||||
from ansible.errors import AnsibleLookupError
|
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):
|
class OnePass(object):
|
||||||
|
|
|
@ -142,7 +142,7 @@ import yaml
|
||||||
|
|
||||||
from distutils import util
|
from distutils import util
|
||||||
from ansible.errors import AnsibleError, AnsibleAssertionError
|
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.display import Display
|
||||||
from ansible.utils.encrypt import random_password
|
from ansible.utils.encrypt import random_password
|
||||||
from ansible.plugins.lookup import LookupBase
|
from ansible.plugins.lookup import LookupBase
|
||||||
|
|
|
@ -138,7 +138,7 @@ import string
|
||||||
|
|
||||||
from ansible.errors import AnsibleLookupError
|
from ansible.errors import AnsibleLookupError
|
||||||
from ansible.plugins.lookup import LookupBase
|
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):
|
class LookupModule(LookupBase):
|
||||||
|
|
|
@ -80,7 +80,7 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
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.errors import AnsibleError
|
||||||
from ansible.plugins.lookup import LookupBase
|
from ansible.plugins.lookup import LookupBase
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ import shelve
|
||||||
|
|
||||||
from ansible.errors import AnsibleError, AnsibleAssertionError
|
from ansible.errors import AnsibleError, AnsibleAssertionError
|
||||||
from ansible.plugins.lookup import LookupBase
|
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):
|
class LookupModule(LookupBase):
|
||||||
|
|
|
@ -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.six.moves.urllib.error import HTTPError, URLError
|
||||||
from ansible.module_utils.urls import open_url
|
from ansible.module_utils.urls import open_url
|
||||||
from ansible.module_utils.api import basic_auth_argument_spec
|
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:
|
try:
|
||||||
from ansible.module_utils.ansible_release import __version__ as ansible_version
|
from ansible.module_utils.ansible_release import __version__ as ansible_version
|
||||||
|
|
|
@ -10,7 +10,7 @@ __metaclass__ = type
|
||||||
import csv
|
import csv
|
||||||
from io import BytesIO, StringIO
|
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
|
from ansible.module_utils.six import PY3
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ __metaclass__ = type
|
||||||
|
|
||||||
import json
|
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
|
from ansible.module_utils.urls import fetch_url
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ from distutils.version import StrictVersion
|
||||||
|
|
||||||
from ansible.module_utils.basic import missing_required_lib
|
from ansible.module_utils.basic import missing_required_lib
|
||||||
from ansible.module_utils.urls import fetch_url
|
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:
|
try:
|
||||||
from urllib import quote_plus # Python 2.X
|
from urllib import quote_plus # Python 2.X
|
||||||
|
|
|
@ -21,7 +21,7 @@ except ImportError:
|
||||||
|
|
||||||
from ansible.module_utils.basic import (AnsibleModule, env_fallback,
|
from ansible.module_utils.basic import (AnsibleModule, env_fallback,
|
||||||
missing_required_lib)
|
missing_required_lib)
|
||||||
from ansible.module_utils._text import to_text
|
from ansible.module_utils.common.text.converters import to_text
|
||||||
|
|
||||||
|
|
||||||
class HwcModuleException(Exception):
|
class HwcModuleException(Exception):
|
||||||
|
|
|
@ -9,7 +9,7 @@ __metaclass__ = type
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from functools import wraps
|
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
|
from ansible.module_utils.basic import missing_required_lib
|
||||||
|
|
||||||
PYXCLI_INSTALLED = True
|
PYXCLI_INSTALLED = True
|
||||||
|
|
|
@ -35,7 +35,7 @@ import traceback
|
||||||
from ansible.module_utils.urls import open_url
|
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.parse import urlencode, quote
|
||||||
from ansible.module_utils.six.moves.urllib.error import HTTPError
|
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_REALMS = "{url}/admin/realms"
|
||||||
URL_REALM = "{url}/admin/realms/{realm}"
|
URL_REALM = "{url}/admin/realms/{realm}"
|
||||||
|
|
|
@ -18,7 +18,7 @@ import socket
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import re
|
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 import PY3
|
||||||
from ansible.module_utils.six.moves.urllib.parse import quote
|
from ansible.module_utils.six.moves.urllib.parse import quote
|
||||||
from ansible.module_utils.urls import fetch_url, HAS_GSSAPI
|
from ansible.module_utils.urls import fetch_url, HAS_GSSAPI
|
||||||
|
|
|
@ -10,7 +10,7 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
from ansible.module_utils._text import to_native
|
from ansible.module_utils.common.text.converters import to_native
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import ldap
|
import ldap
|
||||||
|
|
|
@ -20,7 +20,7 @@ import ssl
|
||||||
from ansible.module_utils.urls import generic_urlparse
|
from ansible.module_utils.urls import generic_urlparse
|
||||||
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
||||||
from ansible.module_utils.six.moves import http_client
|
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
|
# httplib/http.client connection using unix domain socket
|
||||||
HTTPConnection = http_client.HTTPConnection
|
HTTPConnection = http_client.HTTPConnection
|
||||||
|
|
|
@ -14,9 +14,9 @@ __metaclass__ = type
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from functools import partial
|
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.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.basic import env_fallback
|
||||||
from ansible.module_utils.common.validation import check_type_dict
|
from ansible.module_utils.common.validation import check_type_dict
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ except ImportError:
|
||||||
|
|
||||||
from ansible.module_utils import six
|
from ansible.module_utils import six
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
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
|
from ansible.module_utils.common._collections_compat import Mapping
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ except ImportError:
|
||||||
HAS_OCI_PY_SDK = False
|
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
|
from ansible.module_utils.six import iteritems
|
||||||
|
|
||||||
__version__ = "1.6.0-dev"
|
__version__ = "1.6.0-dev"
|
||||||
|
|
|
@ -6,8 +6,8 @@ __metaclass__ = type
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from ansible.module_utils.urls import open_url
|
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
|
||||||
from ansible.module_utils._text import to_text
|
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 import http_client
|
||||||
from ansible.module_utils.six.moves.urllib.error import URLError, HTTPError
|
from ansible.module_utils.six.moves.urllib.error import URLError, HTTPError
|
||||||
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
||||||
|
|
|
@ -7,7 +7,7 @@ __metaclass__ = type
|
||||||
|
|
||||||
import json
|
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.basic import env_fallback
|
||||||
from ansible.module_utils.urls import fetch_url, basic_auth_header
|
from ansible.module_utils.urls import fetch_url, basic_auth_header
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ __metaclass__ = type
|
||||||
|
|
||||||
import json
|
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.basic import AnsibleModule
|
||||||
from ansible.module_utils.urls import fetch_url
|
from ansible.module_utils.urls import fetch_url
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAS_VEXATAPI = False
|
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
|
from ansible.module_utils.basic import env_fallback
|
||||||
|
|
||||||
VXOS_VERSION = None
|
VXOS_VERSION = None
|
||||||
|
|
|
@ -95,7 +95,7 @@ msg:
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
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):
|
def do_install(module, mode, rootfs, container, image, values_list, backend):
|
||||||
|
|
|
@ -52,7 +52,7 @@ import os
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
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):
|
def core(module):
|
||||||
|
|
|
@ -69,7 +69,7 @@ msg:
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
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):
|
def do_upgrade(module, image):
|
||||||
|
|
|
@ -113,7 +113,7 @@ import traceback
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.dimensiondata import HAS_LIBCLOUD, DimensionDataModule
|
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:
|
if HAS_LIBCLOUD:
|
||||||
from libcloud.compute.base import NodeLocation
|
from libcloud.compute.base import NodeLocation
|
||||||
|
|
|
@ -433,7 +433,7 @@ else:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.parsing.convert_bool import BOOLEANS_FALSE, BOOLEANS_TRUE
|
from ansible.module_utils.parsing.convert_bool import BOOLEANS_FALSE, BOOLEANS_TRUE
|
||||||
from ansible.module_utils.six.moves import xrange
|
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
|
# LXC_COMPRESSION_MAP is a map of available compression types when creating
|
||||||
|
|
|
@ -85,7 +85,7 @@ cloud_init_data_facts:
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
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"
|
CLOUD_INIT_PATH = "/var/lib/cloud/data"
|
||||||
|
|
|
@ -364,7 +364,7 @@ except ImportError:
|
||||||
HAS_PROXMOXER = False
|
HAS_PROXMOXER = False
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, env_fallback
|
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
|
VZ_TYPE = None
|
||||||
|
|
|
@ -771,7 +771,7 @@ except ImportError:
|
||||||
HAS_PROXMOXER = False
|
HAS_PROXMOXER = False
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, env_fallback
|
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):
|
def get_nextvmid(module, proxmox):
|
||||||
|
|
|
@ -119,7 +119,7 @@ except ImportError:
|
||||||
HAS_PROXMOXER = False
|
HAS_PROXMOXER = False
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib, env_fallback
|
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
|
VZ_TYPE = None
|
||||||
|
|
|
@ -275,7 +275,7 @@ import uuid
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
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
|
HAS_PACKET_SDK = True
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -151,7 +151,7 @@ import uuid
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, env_fallback
|
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
|
HAS_PACKET_SDK = True
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ id:
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, env_fallback
|
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
|
HAS_PACKET_SDK = True
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,7 @@ description:
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, env_fallback
|
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
|
HAS_PACKET_SDK = True
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ device_id:
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, env_fallback
|
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
|
HAS_PACKET_SDK = True
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,7 @@ except ImportError:
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.six.moves import xrange
|
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',
|
LOCATIONS = ['us/las',
|
||||||
|
|
|
@ -149,7 +149,7 @@ except ImportError:
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.six.moves import xrange
|
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(
|
uuid_match = re.compile(
|
||||||
|
|
|
@ -247,7 +247,7 @@ except ImportError:
|
||||||
exceptions = None
|
exceptions = None
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
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):
|
def pubnub_user(module):
|
||||||
|
|
|
@ -77,7 +77,7 @@ except ImportError:
|
||||||
HAS_PYRAX = False
|
HAS_PYRAX = False
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
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
|
from ansible_collections.community.general.plugins.module_utils.rax import rax_argument_spec, rax_required_together, rax_to_dict, setup_rax_module
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ data:
|
||||||
|
|
||||||
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway, payload_from_object
|
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway, payload_from_object
|
||||||
from ansible_collections.community.general.plugins.module_utils.compat.ipaddress import ip_network
|
from ansible_collections.community.general.plugins.module_utils.compat.ipaddress import ip_network
|
||||||
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.basic import AnsibleModule
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -404,7 +404,7 @@ import traceback
|
||||||
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
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
|
# 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.
|
# generated JSON does not play well with the JSON parsers of Python.
|
||||||
|
|
|
@ -136,7 +136,7 @@ EXAMPLES = '''
|
||||||
state: acquire
|
state: acquire
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.module_utils._text import to_text
|
from ansible.module_utils.common.text.converters import to_text
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import consul
|
import consul
|
||||||
|
|
|
@ -119,7 +119,7 @@ old_value:
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
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:
|
try:
|
||||||
|
|
|
@ -84,7 +84,7 @@ EXAMPLES = '''
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
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
|
import_nomad = None
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -270,7 +270,7 @@ import os
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
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
|
import_nomad = None
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -108,7 +108,7 @@ except ImportError:
|
||||||
KAZOO_INSTALLED = False
|
KAZOO_INSTALLED = False
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
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():
|
def main():
|
||||||
|
|
|
@ -64,7 +64,7 @@ query_results:
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
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
|
from ansible_collections.community.general.plugins.module_utils.influxdb import InfluxDb
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ except ImportError:
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils.influxdb import InfluxDb
|
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)))+$')
|
VALID_DURATION_REGEX = re.compile(r'^(INF|(\d+(ns|u|µ|ms|s|m|h|d|w)))+$')
|
||||||
|
|
|
@ -104,7 +104,7 @@ import json
|
||||||
|
|
||||||
from ansible.module_utils.urls import ConnectionError
|
from ansible.module_utils.urls import ConnectionError
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
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
|
import ansible_collections.community.general.plugins.module_utils.influxdb as influx
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ RETURN = r'''
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
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
|
from ansible_collections.community.general.plugins.module_utils.influxdb import InfluxDb
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ row_count:
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
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
|
HAS_PYODBC = None
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -143,7 +143,7 @@ else:
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
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.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
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ except ImportError:
|
||||||
HAS_REDIS_PACKAGE = False
|
HAS_REDIS_PACKAGE = False
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
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):
|
def redis_client(**client_params):
|
||||||
|
|
|
@ -103,7 +103,7 @@ query_result:
|
||||||
import csv
|
import csv
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.six import StringIO
|
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):
|
def csv_to_list(rawcsv):
|
||||||
|
|
|
@ -76,7 +76,7 @@ else:
|
||||||
pyodbc_found = True
|
pyodbc_found = True
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
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):
|
class NotSupportedError(Exception):
|
||||||
|
|
|
@ -74,7 +74,7 @@ else:
|
||||||
pyodbc_found = True
|
pyodbc_found = True
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
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):
|
class NotSupportedError(Exception):
|
||||||
|
|
|
@ -87,7 +87,7 @@ else:
|
||||||
pyodbc_found = True
|
pyodbc_found = True
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
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):
|
class NotSupportedError(Exception):
|
||||||
|
|
|
@ -109,7 +109,7 @@ else:
|
||||||
pyodbc_found = True
|
pyodbc_found = True
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
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):
|
class NotSupportedError(Exception):
|
||||||
|
|
|
@ -118,7 +118,7 @@ else:
|
||||||
pyodbc_found = True
|
pyodbc_found = True
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
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):
|
class NotSupportedError(Exception):
|
||||||
|
|
|
@ -224,7 +224,7 @@ import os
|
||||||
import math
|
import math
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
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
|
# These are the multiplicative suffixes understood (or returned) by dd and
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue