mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
[PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409)
Sort imports with ruff check --fix (#11400)
Sort imports with ruff check --fix.
(cherry picked from commit 236b9c0e04)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
ebaf2e71d5
commit
b769b0bc01
829 changed files with 1644 additions and 1692 deletions
|
|
@ -7,10 +7,10 @@ from __future__ import annotations
|
|||
import time
|
||||
import typing as t
|
||||
|
||||
from ansible.plugins.action import ActionBase
|
||||
from ansible.errors import AnsibleActionFail, AnsibleConnectionFailure
|
||||
from ansible.utils.vars import merge_hash
|
||||
from ansible.plugins.action import ActionBase
|
||||
from ansible.utils.display import Display
|
||||
from ansible.utils.vars import merge_hash
|
||||
|
||||
display = Display()
|
||||
|
||||
|
|
|
|||
|
|
@ -6,12 +6,11 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
import typing as t
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleConnectionFailure
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
from ansible.errors import AnsibleConnectionFailure, AnsibleError
|
||||
from ansible.module_utils.common.collections import is_string
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
from ansible.plugins.action import ActionBase
|
||||
from ansible.utils.display import Display
|
||||
|
||||
|
|
|
|||
|
|
@ -92,9 +92,8 @@ EXAMPLES = r"""
|
|||
|
||||
from re import compile as re_compile
|
||||
|
||||
from ansible.plugins.become import BecomeBase
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
|
||||
from ansible.plugins.become import BecomeBase
|
||||
|
||||
ansi_color_codes = re_compile(to_bytes(r"\x1B\[[0-9;]+m"))
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ notes:
|
|||
"""
|
||||
|
||||
from shlex import quote as shlex_quote
|
||||
|
||||
from ansible.plugins.become import BecomeBase
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: run0
|
||||
short_description: Systemd's run0
|
||||
|
|
@ -78,8 +77,8 @@ EXAMPLES = r"""
|
|||
|
||||
from re import compile as re_compile
|
||||
|
||||
from ansible.plugins.become import BecomeBase
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from ansible.plugins.become import BecomeBase
|
||||
|
||||
ansi_color_codes = re_compile(to_bytes(r"\x1B\[[0-9;]+m"))
|
||||
|
||||
|
|
|
|||
4
plugins/cache/memcached.py
vendored
4
plugins/cache/memcached.py
vendored
|
|
@ -49,11 +49,11 @@ options:
|
|||
import collections
|
||||
import os
|
||||
import time
|
||||
from multiprocessing import Lock
|
||||
from collections.abc import MutableSet
|
||||
from itertools import chain
|
||||
from multiprocessing import Lock
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from collections.abc import MutableSet
|
||||
from ansible.plugins.cache import BaseCacheModule
|
||||
from ansible.utils.display import Display
|
||||
|
||||
|
|
|
|||
6
plugins/cache/redis.py
vendored
6
plugins/cache/redis.py
vendored
|
|
@ -66,17 +66,17 @@ options:
|
|||
section: defaults
|
||||
"""
|
||||
|
||||
import json
|
||||
import re
|
||||
import time
|
||||
import json
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.parsing.ajson import AnsibleJSONEncoder, AnsibleJSONDecoder
|
||||
from ansible.parsing.ajson import AnsibleJSONDecoder, AnsibleJSONEncoder
|
||||
from ansible.plugins.cache import BaseCacheModule
|
||||
from ansible.utils.display import Display
|
||||
|
||||
try:
|
||||
from redis import StrictRedis, VERSION
|
||||
from redis import VERSION, StrictRedis
|
||||
|
||||
HAS_REDIS = True
|
||||
except ImportError:
|
||||
|
|
|
|||
3
plugins/cache/yaml.py
vendored
3
plugins/cache/yaml.py
vendored
|
|
@ -46,9 +46,8 @@ options:
|
|||
import os
|
||||
|
||||
import yaml
|
||||
|
||||
from ansible.parsing.yaml.loader import AnsibleLoader
|
||||
from ansible.parsing.yaml.dumper import AnsibleDumper
|
||||
from ansible.parsing.yaml.loader import AnsibleLoader
|
||||
from ansible.plugins.cache import BaseFileCacheModule
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ options:
|
|||
key: cur_mem_file
|
||||
"""
|
||||
|
||||
import time
|
||||
import threading
|
||||
import time
|
||||
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ requirements:
|
|||
"""
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.playbook.task_include import TaskInclude
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
from ansible.utils.color import colorize, hostcolor
|
||||
from ansible.playbook.task_include import TaskInclude
|
||||
|
||||
|
||||
class CallbackModule(CallbackBase):
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ try:
|
|||
except ImportError:
|
||||
pass
|
||||
|
||||
import sys
|
||||
from collections.abc import MutableMapping, MutableSequence
|
||||
|
||||
from ansible.plugins.callback.default import CallbackModule as CallbackModule_default
|
||||
from ansible.utils.color import colorize, hostcolor
|
||||
from ansible.utils.display import Display
|
||||
|
||||
import sys
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -778,10 +778,11 @@ playbook.yml: >-
|
|||
|
||||
import sys
|
||||
from contextlib import contextmanager
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.plugins.callback.default import CallbackModule as Default
|
||||
from ansible.template import Templar
|
||||
from ansible.vars.manager import VariableManager
|
||||
from ansible.plugins.callback.default import CallbackModule as Default
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
try:
|
||||
from ansible.template import trust_as_template # noqa: F401, pylint: disable=unused-import
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ import getpass
|
|||
import socket
|
||||
import time
|
||||
import uuid
|
||||
|
||||
from collections import OrderedDict
|
||||
from contextlib import closing
|
||||
from os.path import basename
|
||||
|
|
@ -92,7 +91,7 @@ from ansible.plugins.callback import CallbackBase
|
|||
|
||||
ELASTIC_LIBRARY_IMPORT_ERROR: ImportError | None
|
||||
try:
|
||||
from elasticapm import Client, capture_span, trace_parent_from_string, instrument, label
|
||||
from elasticapm import Client, capture_span, instrument, label, trace_parent_from_string
|
||||
except ImportError as imp_exc:
|
||||
ELASTIC_LIBRARY_IMPORT_ERROR = imp_exc
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -27,16 +27,15 @@ options:
|
|||
key: log_folder
|
||||
"""
|
||||
|
||||
import json
|
||||
import os
|
||||
import time
|
||||
import json
|
||||
|
||||
from ansible.utils.path import makedirs_safe
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from collections.abc import MutableMapping
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from ansible.parsing.ajson import AnsibleJSONEncoder
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
from ansible.utils.path import makedirs_safe
|
||||
|
||||
# NOTE: in Ansible 1.2 or later general logging is available without
|
||||
# this plugin, just set ANSIBLE_LOG_PATH as an environment variable
|
||||
|
|
|
|||
|
|
@ -51,14 +51,13 @@ examples: |-
|
|||
shared_key = dZD0kCbKl3ehZG6LHFMuhtE0yHiFCmetzFMc2u+roXIUQuatqU924SsAAAAPemhjbGlAemhjbGktTUJQAQIDBA==
|
||||
"""
|
||||
|
||||
import base64
|
||||
import getpass
|
||||
import hashlib
|
||||
import hmac
|
||||
import base64
|
||||
import json
|
||||
import uuid
|
||||
import socket
|
||||
import getpass
|
||||
|
||||
import uuid
|
||||
from os.path import basename
|
||||
|
||||
from ansible.module_utils.ansible_release import __version__ as ansible_version
|
||||
|
|
|
|||
|
|
@ -55,12 +55,13 @@ options:
|
|||
default: ansible
|
||||
"""
|
||||
|
||||
import logging
|
||||
import json
|
||||
import logging
|
||||
import socket
|
||||
from uuid import getnode
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
from ansible.parsing.ajson import AnsibleJSONEncoder
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
try:
|
||||
from logdna import LogDNAHandler
|
||||
|
|
|
|||
|
|
@ -96,8 +96,8 @@ examples: >-
|
|||
"""
|
||||
|
||||
import os
|
||||
import socket
|
||||
import random
|
||||
import socket
|
||||
import time
|
||||
import uuid
|
||||
|
||||
|
|
|
|||
|
|
@ -94,12 +94,13 @@ ansible.cfg: |
|
|||
}
|
||||
"""
|
||||
|
||||
import os
|
||||
import json
|
||||
from ansible import context
|
||||
import logging
|
||||
import os
|
||||
import socket
|
||||
import uuid
|
||||
import logging
|
||||
|
||||
from ansible import context
|
||||
|
||||
try:
|
||||
import logstash
|
||||
|
|
|
|||
|
|
@ -79,10 +79,10 @@ options:
|
|||
version_added: 8.2.0
|
||||
"""
|
||||
|
||||
import email.utils
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import email.utils
|
||||
import smtplib
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
|
|
|
|||
|
|
@ -148,15 +148,15 @@ from ansible.plugins.callback import CallbackBase
|
|||
OTEL_LIBRARY_IMPORT_ERROR: ImportError | None
|
||||
try:
|
||||
from opentelemetry import trace
|
||||
from opentelemetry.trace import SpanKind
|
||||
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter as GRPCOTLPSpanExporter
|
||||
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter as HTTPOTLPSpanExporter
|
||||
from opentelemetry.sdk.resources import SERVICE_NAME, Resource
|
||||
from opentelemetry.trace.status import Status, StatusCode
|
||||
from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator
|
||||
from opentelemetry.sdk.trace import TracerProvider
|
||||
from opentelemetry.sdk.trace.export import BatchSpanProcessor, SimpleSpanProcessor
|
||||
from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter
|
||||
from opentelemetry.trace import SpanKind
|
||||
from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator
|
||||
from opentelemetry.trace.status import Status, StatusCode
|
||||
except ImportError as imp_exc:
|
||||
OTEL_LIBRARY_IMPORT_ERROR = imp_exc
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ ansible.cfg: |-
|
|||
callbacks_enabled=community.general.print_task
|
||||
"""
|
||||
|
||||
from yaml import load, dump
|
||||
from yaml import dump, load
|
||||
|
||||
try:
|
||||
from yaml import CSafeDumper as SafeDumper
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ description:
|
|||
- This plugin uses C(say) or C(espeak) to "speak" about play events.
|
||||
"""
|
||||
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
from ansible.module_utils.common.process import get_bin_path
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
|
|
|||
|
|
@ -39,9 +39,8 @@ EXAMPLES = r"""
|
|||
import difflib
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
DONT_COLORIZE = False
|
||||
COLORS = {
|
||||
|
|
|
|||
|
|
@ -83,11 +83,10 @@ examples: >-
|
|||
authtoken = f23blad6-5965-4537-bf69-5b5a545blabla88
|
||||
"""
|
||||
|
||||
import json
|
||||
import uuid
|
||||
import socket
|
||||
import getpass
|
||||
|
||||
import json
|
||||
import socket
|
||||
import uuid
|
||||
from os.path import basename
|
||||
|
||||
from ansible.module_utils.ansible_release import __version__ as ansible_version
|
||||
|
|
|
|||
|
|
@ -40,11 +40,10 @@ examples: |-
|
|||
url = https://endpoint1.collection.us2.sumologic.com/receiver/v1/http/R8moSv1d8EW9LAUFZJ6dbxCFxwLH6kfCdcBfddlfxCbLuL-BN5twcTpMk__pYy_cDmp==
|
||||
"""
|
||||
|
||||
import json
|
||||
import uuid
|
||||
import socket
|
||||
import getpass
|
||||
|
||||
import json
|
||||
import socket
|
||||
import uuid
|
||||
from os.path import basename
|
||||
|
||||
from ansible.module_utils.ansible_release import __version__ as ansible_version
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ options:
|
|||
|
||||
import logging
|
||||
import logging.handlers
|
||||
|
||||
import socket
|
||||
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: timestamp
|
||||
type: stdout
|
||||
|
|
@ -49,12 +48,13 @@ extends_documentation_fragment:
|
|||
"""
|
||||
|
||||
|
||||
import sys
|
||||
import types
|
||||
from datetime import datetime
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.plugins.callback.default import CallbackModule as Default
|
||||
from ansible.utils.display import get_text_width
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from datetime import datetime
|
||||
import types
|
||||
import sys
|
||||
|
||||
# Store whether the zoneinfo module is available
|
||||
_ZONEINFO_AVAILABLE = sys.version_info >= (3, 9)
|
||||
|
|
|
|||
|
|
@ -20,11 +20,12 @@ requirements:
|
|||
"""
|
||||
|
||||
from os.path import basename
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible import context
|
||||
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
|
||||
from ansible.utils.color import colorize, hostcolor
|
||||
|
||||
|
||||
class CallbackModule(CallbackModule_default):
|
||||
|
|
|
|||
|
|
@ -80,7 +80,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.common.text.converters import to_bytes
|
||||
from ansible.plugins.connection import ConnectionBase, BUFSIZE
|
||||
from ansible.plugins.connection import BUFSIZE, ConnectionBase
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ except ImportError:
|
|||
pass
|
||||
|
||||
import os
|
||||
import tempfile
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.connection import ConnectionBase
|
||||
|
|
|
|||
|
|
@ -79,9 +79,9 @@ options:
|
|||
|
||||
import os
|
||||
import re
|
||||
from subprocess import call, Popen, PIPE
|
||||
from subprocess import PIPE, Popen, call
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleConnectionFailure, AnsibleFileNotFound
|
||||
from ansible.errors import AnsibleConnectionFailure, AnsibleError, AnsibleFileNotFound
|
||||
from ansible.module_utils.common.process import get_bin_path
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from ansible.plugins.connection import ConnectionBase
|
||||
|
|
|
|||
|
|
@ -33,11 +33,12 @@ options:
|
|||
|
||||
import subprocess
|
||||
|
||||
from ansible_collections.community.general.plugins.connection.jail import Connection as Jail
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.utils.display import Display
|
||||
|
||||
from ansible_collections.community.general.plugins.connection.jail import Connection as Jail
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ from shlex import quote as shlex_quote
|
|||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.common.process import get_bin_path
|
||||
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 BUFSIZE, ConnectionBase
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
|
|
|||
|
|
@ -31,12 +31,12 @@ options:
|
|||
- name: ansible_lxc_executable
|
||||
"""
|
||||
|
||||
import errno
|
||||
import fcntl
|
||||
import os
|
||||
import select
|
||||
import shutil
|
||||
import traceback
|
||||
import select
|
||||
import fcntl
|
||||
import errno
|
||||
|
||||
HAS_LIBLXC = False
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -74,9 +74,9 @@ options:
|
|||
"""
|
||||
|
||||
import os
|
||||
from subprocess import Popen, PIPE
|
||||
from subprocess import PIPE, Popen
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleConnectionFailure, AnsibleFileNotFound
|
||||
from ansible.errors import AnsibleConnectionFailure, AnsibleError, AnsibleFileNotFound
|
||||
from ansible.module_utils.common.process import get_bin_path
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from ansible.plugins.connection import ConnectionBase
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: qubes
|
||||
short_description: Interact with an existing QubesOS AppVM
|
||||
|
|
@ -40,9 +39,9 @@ options:
|
|||
|
||||
import subprocess
|
||||
|
||||
from ansible.errors import AnsibleConnectionFailure
|
||||
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
|
||||
|
||||
display = Display()
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ description:
|
|||
- This allows you to use existing Saltstack infrastructure to connect to targets.
|
||||
"""
|
||||
|
||||
import os
|
||||
import base64
|
||||
import os
|
||||
|
||||
from ansible import errors
|
||||
from ansible.plugins.connection import ConnectionBase
|
||||
|
|
|
|||
|
|
@ -315,21 +315,22 @@ import shlex
|
|||
import tempfile
|
||||
import traceback
|
||||
import typing as t
|
||||
from binascii import hexlify
|
||||
from subprocess import list2cmdline
|
||||
|
||||
from ansible.errors import (
|
||||
AnsibleAuthenticationFailure,
|
||||
AnsibleConnectionFailure,
|
||||
AnsibleError,
|
||||
)
|
||||
from ansible_collections.community.general.plugins.module_utils._filelock import FileLock, LockTimeout
|
||||
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
||||
from ansible.playbook.play_context import PlayContext
|
||||
from ansible.plugins.connection import ConnectionBase
|
||||
from ansible.utils.display import Display
|
||||
from ansible.utils.path import makedirs_safe
|
||||
from binascii import hexlify
|
||||
from subprocess import list2cmdline
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils._filelock import FileLock, LockTimeout
|
||||
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
|
||||
|
||||
PARAMIKO_IMPORT_ERR: str | None
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ from shlex import quote as shlex_quote
|
|||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.common.process import get_bin_path
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from ansible.plugins.connection import ConnectionBase, BUFSIZE
|
||||
from ansible.plugins.connection import BUFSIZE, ConnectionBase
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ EXAMPLES = r"""
|
|||
# Produces ['a', 'ab', 'abc']
|
||||
"""
|
||||
|
||||
from itertools import accumulate
|
||||
from collections.abc import Sequence
|
||||
from itertools import accumulate
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
|
||||
|
|
|
|||
|
|
@ -34,9 +34,10 @@ _value:
|
|||
type: dictionary
|
||||
"""
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from collections.abc import Sequence
|
||||
from collections import Counter
|
||||
from collections.abc import Sequence
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
|
||||
|
||||
def counter(sequence):
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from ansible.module_utils.common.collections import is_string
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
|
||||
try:
|
||||
from zlib import crc32
|
||||
|
|
|
|||
|
|
@ -80,11 +80,11 @@ _value:
|
|||
from ansible.errors import AnsibleFilterError
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.csv import (
|
||||
CSVError,
|
||||
CustomDialectFailureError,
|
||||
DialectNotAvailableError,
|
||||
initialize_dialect,
|
||||
read_csv,
|
||||
CSVError,
|
||||
DialectNotAvailableError,
|
||||
CustomDialectFailureError,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ _value:
|
|||
"""
|
||||
|
||||
|
||||
from io import StringIO
|
||||
from configparser import ConfigParser
|
||||
from io import StringIO
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
|
||||
|
|
|
|||
|
|
@ -52,9 +52,10 @@ _value:
|
|||
type: dictionary
|
||||
"""
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from collections.abc import Mapping, Sequence
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
|
||||
|
||||
def groupby_as_dict(sequence, attribute):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ from ansible.errors import (
|
|||
AnsibleError,
|
||||
AnsibleFilterError,
|
||||
)
|
||||
|
||||
from ansible.module_utils.common.collections import is_sequence
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -74,9 +74,10 @@ _value:
|
|||
type: any
|
||||
"""
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleFilterError
|
||||
import importlib
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleFilterError
|
||||
|
||||
try:
|
||||
import jc
|
||||
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ from __future__ import annotations
|
|||
|
||||
import typing as t
|
||||
from json import loads
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from typing import Any
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
|
||||
JSONPATCH_IMPORT_ERROR: ImportError | None
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -194,13 +194,13 @@ _value:
|
|||
elements: dictionary
|
||||
"""
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from collections.abc import Mapping, Sequence
|
||||
from ansible.utils.vars import merge_hash
|
||||
|
||||
from collections import defaultdict
|
||||
from collections.abc import Mapping, Sequence
|
||||
from operator import itemgetter
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from ansible.utils.vars import merge_hash
|
||||
|
||||
|
||||
def list_mergeby(x, y, index, recursive=False, list_merge="replace"):
|
||||
"""Merge 2 lists by attribute 'index'. The function 'merge_hash'
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
from ansible.errors import AnsibleFilterError
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
|
||||
UNIT_FACTORS = {
|
||||
"ms": [],
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ _value:
|
|||
from collections.abc import Mapping
|
||||
from configparser import ConfigParser
|
||||
from io import StringIO
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ from ansible.module_utils.common.collections import is_sequence
|
|||
|
||||
try:
|
||||
# This is ansible-core 2.19+
|
||||
from ansible.utils.vars import transform_to_native_types
|
||||
from ansible.parsing.vault import VaultHelper, VaultLib
|
||||
from ansible.utils.vars import transform_to_native_types
|
||||
|
||||
HAS_TRANSFORM_TO_NATIVE_TYPES = True
|
||||
except ImportError:
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: gitlab_runners
|
||||
author:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: icinga2
|
||||
short_description: Icinga2 inventory source
|
||||
|
|
@ -97,8 +96,8 @@ import json
|
|||
from urllib.error import HTTPError
|
||||
|
||||
from ansible.errors import AnsibleParserError
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
|
||||
|
||||
from ansible_collections.community.general.plugins.plugin_utils.unsafe import make_unsafe
|
||||
|
||||
|
|
|
|||
|
|
@ -83,11 +83,12 @@ remotes:
|
|||
- remote-2:default
|
||||
"""
|
||||
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
|
||||
from ansible.utils.display import Display
|
||||
from json import loads
|
||||
from subprocess import check_output
|
||||
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -170,13 +170,13 @@ groups:
|
|||
test: inventory_hostname.startswith('test')
|
||||
"""
|
||||
|
||||
import re
|
||||
import os
|
||||
from subprocess import Popen, PIPE
|
||||
import re
|
||||
from subprocess import PIPE, Popen
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleParserError
|
||||
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, Cacheable, Constructable
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
|
|
|||
|
|
@ -125,15 +125,14 @@ compose:
|
|||
"""
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, Constructable
|
||||
|
||||
from ansible_collections.community.general.plugins.plugin_utils.unsafe import make_unsafe
|
||||
|
||||
|
||||
try:
|
||||
from linode_api4 import LinodeClient
|
||||
from linode_api4.objects.linode import Instance
|
||||
from linode_api4.errors import ApiError as LinodeApiError
|
||||
from linode_api4.objects.linode import Instance
|
||||
|
||||
HAS_LINODE = True
|
||||
except ImportError:
|
||||
|
|
|
|||
|
|
@ -167,15 +167,16 @@ groupby:
|
|||
"""
|
||||
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
import os
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
from ansible.module_utils.common.dict_transformations import dict_merge
|
||||
from ansible.errors import AnsibleError, AnsibleParserError
|
||||
from ansible.module_utils.common.dict_transformations import dict_merge
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.lxd import LXDClient, LXDClientException
|
||||
from ansible_collections.community.general.plugins.plugin_utils.unsafe import make_unsafe
|
||||
|
||||
|
|
|
|||
|
|
@ -125,14 +125,13 @@ groups:
|
|||
|
||||
import os
|
||||
import re
|
||||
|
||||
from subprocess import Popen, PIPE
|
||||
from subprocess import PIPE, Popen
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.errors import AnsibleParserError
|
||||
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
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, Constructable
|
||||
|
||||
from ansible_collections.community.general.plugins.plugin_utils.unsafe import make_unsafe
|
||||
|
||||
|
|
|
|||
|
|
@ -64,10 +64,10 @@ from sys import version as python_version
|
|||
from urllib.parse import urljoin
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.ansible_release import __version__ as ansible_version
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.module_utils.ansible_release import __version__ as ansible_version
|
||||
|
||||
from ansible_collections.community.general.plugins.plugin_utils.unsafe import make_unsafe
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: opennebula
|
||||
author:
|
||||
|
|
@ -90,14 +89,14 @@ try:
|
|||
except ImportError:
|
||||
HAS_PYONE = False
|
||||
|
||||
import os
|
||||
from collections import namedtuple
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
|
||||
|
||||
from ansible_collections.community.general.plugins.plugin_utils.unsafe import make_unsafe
|
||||
|
||||
from collections import namedtuple
|
||||
import os
|
||||
|
||||
|
||||
class InventoryModule(BaseInventoryPlugin, Constructable):
|
||||
NAME = "community.general.opennebula"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: scaleway
|
||||
author:
|
||||
|
|
@ -118,8 +117,8 @@ variables:
|
|||
ansible_user: "'admin'"
|
||||
"""
|
||||
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
|
||||
YAML_IMPORT_ERROR: ImportError | None
|
||||
try:
|
||||
|
|
@ -129,14 +128,15 @@ except ImportError as exc:
|
|||
else:
|
||||
YAML_IMPORT_ERROR = None
|
||||
|
||||
import urllib.parse as urllib_parse
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.module_utils.urls import open_url
|
||||
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.plugin_utils.unsafe import make_unsafe
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
import urllib.parse as urllib_parse
|
||||
|
||||
|
||||
def _fetch_information(token, url):
|
||||
|
|
|
|||
|
|
@ -72,14 +72,13 @@ groups:
|
|||
"""
|
||||
|
||||
import os
|
||||
|
||||
from subprocess import Popen, PIPE
|
||||
from collections.abc import MutableMapping
|
||||
from subprocess import PIPE, Popen
|
||||
|
||||
from ansible.errors import AnsibleParserError
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from collections.abc import MutableMapping
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
||||
from ansible.module_utils.common.process import get_bin_path
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, Constructable
|
||||
|
||||
from ansible_collections.community.general.plugins.plugin_utils.unsafe import make_unsafe
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ import ssl
|
|||
from time import sleep
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, Constructable
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
|
||||
from ansible_collections.community.general.plugins.plugin_utils.unsafe import make_unsafe
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ import base64
|
|||
|
||||
from ansible.errors import AnsibleLookupError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ _raw:
|
|||
elements: list
|
||||
"""
|
||||
|
||||
from subprocess import Popen, PIPE
|
||||
from subprocess import PIPE, Popen
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleOptionsError
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: bitwarden_secrets_manager
|
||||
author:
|
||||
|
|
@ -67,7 +66,7 @@ _raw:
|
|||
elements: dict
|
||||
"""
|
||||
|
||||
from subprocess import Popen, PIPE
|
||||
from subprocess import PIPE, Popen
|
||||
from time import sleep
|
||||
|
||||
from ansible.errors import AnsibleLookupError
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ _raw:
|
|||
"""
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.parsing.splitter import parse_kv
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
try:
|
||||
import chef
|
||||
|
|
|
|||
|
|
@ -61,11 +61,9 @@ import re
|
|||
from importlib import import_module
|
||||
|
||||
import yaml
|
||||
|
||||
from ansible.errors import AnsibleLookupError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
|
||||
FQCN_RE = re.compile(r"^[A-Za-z0-9_]+\.[A-Za-z0-9_]+$")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
author: Unknown (!UNKNOWN)
|
||||
name: consul_kv
|
||||
|
|
@ -112,9 +111,9 @@ _raw:
|
|||
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleAssertionError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.errors import AnsibleAssertionError, AnsibleError
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
try:
|
||||
import consul
|
||||
|
|
|
|||
|
|
@ -79,12 +79,11 @@ _result:
|
|||
|
||||
import os
|
||||
import subprocess
|
||||
from subprocess import PIPE
|
||||
from subprocess import Popen
|
||||
from subprocess import PIPE, Popen
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
|
|
|||
|
|
@ -118,8 +118,9 @@ _list:
|
|||
key2: bar
|
||||
"""
|
||||
|
||||
from ansible.errors import AnsibleLookupError
|
||||
from collections.abc import Mapping, Sequence
|
||||
|
||||
from ansible.errors import AnsibleLookupError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.template import Templar
|
||||
|
||||
|
|
|
|||
|
|
@ -240,20 +240,20 @@ _list:
|
|||
- C(strings).
|
||||
"""
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils.parsing.convert_bool import boolean
|
||||
from ansible.utils.display import Display
|
||||
import socket
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.parsing.convert_bool import boolean
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.display import Display
|
||||
|
||||
try:
|
||||
import dns.exception
|
||||
import dns.name
|
||||
import dns.rdataclass
|
||||
import dns.resolver
|
||||
import dns.reversename
|
||||
import dns.rdataclass
|
||||
from dns.rdatatype import (
|
||||
A,
|
||||
AAAA,
|
||||
CAA,
|
||||
CNAME,
|
||||
|
|
@ -274,6 +274,7 @@ try:
|
|||
SSHFP,
|
||||
TLSA,
|
||||
TXT,
|
||||
A,
|
||||
)
|
||||
|
||||
HAVE_DNS = True
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: dsv
|
||||
author: Adam Migus (@amigus) <adam@migus.org>
|
||||
|
|
@ -96,9 +95,8 @@ try:
|
|||
except ImportError:
|
||||
sdk_is_missing = True
|
||||
|
||||
from ansible.utils.display import Display
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ _raw:
|
|||
|
||||
import json
|
||||
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
# this can be made configurable, not should not use ansible.cfg
|
||||
#
|
||||
|
|
|
|||
|
|
@ -124,11 +124,11 @@ _raw:
|
|||
description: Time of last metadata update or creation (depends on OS).
|
||||
type: float
|
||||
"""
|
||||
import grp
|
||||
import os
|
||||
import pwd
|
||||
import grp
|
||||
import stat
|
||||
import re
|
||||
import stat
|
||||
|
||||
HAVE_SELINUX = False
|
||||
try:
|
||||
|
|
@ -138,8 +138,8 @@ try:
|
|||
except ImportError:
|
||||
pass
|
||||
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ except ImportError:
|
|||
HAS_PYTHON_JWT = False # vs pyjwt
|
||||
if HAS_JWT and hasattr(jwt, "JWT"):
|
||||
HAS_PYTHON_JWT = True
|
||||
from jwt import jwk_from_pem, JWT # type: ignore[attr-defined]
|
||||
from jwt import JWT, jwk_from_pem # type: ignore[attr-defined]
|
||||
|
||||
jwt_instance = JWT()
|
||||
|
||||
|
|
@ -95,12 +95,12 @@ except ImportError:
|
|||
HAS_CRYPTOGRAPHY = False
|
||||
|
||||
|
||||
import time
|
||||
import json
|
||||
import time
|
||||
from urllib.error import HTTPError
|
||||
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.errors import AnsibleError, AnsibleOptionsError
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.display import Display
|
||||
|
||||
|
|
|
|||
|
|
@ -67,9 +67,9 @@ _raw:
|
|||
elements: str
|
||||
"""
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.cmd_functions import run_cmd
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
|
||||
class Hiera:
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ _raw:
|
|||
elements: str
|
||||
"""
|
||||
|
||||
from subprocess import Popen, PIPE
|
||||
from subprocess import PIPE, Popen
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ _raw:
|
|||
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
HAVE_LMDB = True
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -75,14 +75,14 @@ _raw:
|
|||
"""
|
||||
|
||||
import abc
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.errors import AnsibleLookupError, AnsibleOptionsError
|
||||
from ansible.module_utils.common.process import get_bin_path
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.onepassword import OnePasswordConfig
|
||||
|
||||
|
|
|
|||
|
|
@ -43,9 +43,10 @@ _raw:
|
|||
elements: string
|
||||
"""
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup.onepassword import OnePass, OnePassCLIv2
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup.onepassword import OnePass, OnePassCLIv2
|
||||
|
||||
|
||||
class OnePassCLIv2Doc(OnePassCLIv2):
|
||||
def get_raw(self, item_id, vault=None, token=None):
|
||||
|
|
|
|||
|
|
@ -54,9 +54,10 @@ _raw:
|
|||
|
||||
import json
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup.onepassword import OnePass
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup.onepassword import OnePass
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
def run(self, terms, variables=None, **kwargs):
|
||||
|
|
|
|||
|
|
@ -49,12 +49,13 @@ _raw:
|
|||
"""
|
||||
import json
|
||||
|
||||
from ansible.errors import AnsibleLookupError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup.onepassword import (
|
||||
OnePass,
|
||||
OnePassCLIv2,
|
||||
)
|
||||
from ansible.errors import AnsibleLookupError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: passwordstore
|
||||
author:
|
||||
|
|
@ -240,20 +239,20 @@ _raw:
|
|||
elements: str
|
||||
"""
|
||||
|
||||
from contextlib import contextmanager
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import time
|
||||
import yaml
|
||||
from contextlib import contextmanager
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleAssertionError
|
||||
import yaml
|
||||
from ansible import constants as C
|
||||
from ansible.errors import AnsibleAssertionError, AnsibleError
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
||||
from ansible.module_utils.parsing.convert_bool import boolean
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.display import Display
|
||||
from ansible.utils.encrypt import random_password
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible import constants as C
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils._filelock import FileLock
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: random_pet
|
||||
author:
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: random_string
|
||||
author:
|
||||
|
|
@ -171,8 +170,8 @@ import secrets
|
|||
import string
|
||||
|
||||
from ansible.errors import AnsibleLookupError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: random_words
|
||||
author:
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ try:
|
|||
except ImportError:
|
||||
pass
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: revbitspss
|
||||
author: RevBits (@RevBits) <info@revbits.com>
|
||||
|
|
@ -61,9 +60,9 @@ EXAMPLES = r"""
|
|||
UUIDPAM is {{ (secret['UUIDPAM']) }} and DB_PASS is {{ (secret['DB_PASS']) }}
|
||||
"""
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.display import Display
|
||||
from ansible.errors import AnsibleError
|
||||
|
||||
ANOTHER_LIBRARY_IMPORT_ERROR: ImportError | None
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ _list:
|
|||
"""
|
||||
import shelve
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleAssertionError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.errors import AnsibleAssertionError, AnsibleError
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: tss
|
||||
author: Adam Migus (@amigus) <adam@migus.org>
|
||||
|
|
@ -301,17 +300,18 @@ EXAMPLES = r"""
|
|||
|
||||
import abc
|
||||
import os
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleOptionsError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.display import Display
|
||||
|
||||
try:
|
||||
from delinea.secrets.server import (
|
||||
AccessTokenAuthorizer,
|
||||
DomainPasswordGrantAuthorizer,
|
||||
PasswordGrantAuthorizer,
|
||||
SecretServer,
|
||||
SecretServerError,
|
||||
PasswordGrantAuthorizer,
|
||||
DomainPasswordGrantAuthorizer,
|
||||
AccessTokenAuthorizer,
|
||||
)
|
||||
|
||||
HAS_TSS_SDK = True
|
||||
|
|
@ -320,11 +320,11 @@ try:
|
|||
except ImportError:
|
||||
try:
|
||||
from thycotic.secrets.server import (
|
||||
AccessTokenAuthorizer,
|
||||
DomainPasswordGrantAuthorizer,
|
||||
PasswordGrantAuthorizer,
|
||||
SecretServer,
|
||||
SecretServerError,
|
||||
PasswordGrantAuthorizer,
|
||||
DomainPasswordGrantAuthorizer,
|
||||
AccessTokenAuthorizer,
|
||||
)
|
||||
|
||||
HAS_TSS_SDK = True
|
||||
|
|
|
|||
|
|
@ -7,12 +7,11 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import fcntl
|
||||
import os
|
||||
import stat
|
||||
import time
|
||||
import fcntl
|
||||
import typing as t
|
||||
|
||||
from contextlib import contextmanager
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import tempfile
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
|
||||
|
||||
# This is used to attach to a running container and execute commands from
|
||||
# within the container on the host. This will provide local access to a
|
||||
# container without using SSH. The template will attempt to work within the
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import re
|
||||
import traceback
|
||||
from operator import itemgetter
|
||||
|
||||
|
||||
PARAMIKO_IMPORT_ERROR: str | None
|
||||
try:
|
||||
from paramiko.config import SSHConfig
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
import traceback
|
||||
import typing as t
|
||||
|
||||
|
|
@ -23,15 +23,15 @@ if t.TYPE_CHECKING:
|
|||
|
||||
try:
|
||||
import footmark
|
||||
import footmark.ecs
|
||||
import footmark.slb
|
||||
import footmark.vpc
|
||||
import footmark.rds
|
||||
import footmark.ess
|
||||
import footmark.sts
|
||||
import footmark.dns
|
||||
import footmark.ram
|
||||
import footmark.ecs
|
||||
import footmark.ess
|
||||
import footmark.market
|
||||
import footmark.ram
|
||||
import footmark.rds
|
||||
import footmark.slb
|
||||
import footmark.sts
|
||||
import footmark.vpc
|
||||
|
||||
FOOTMARK_IMP_ERR = None
|
||||
HAS_FOOTMARK = True
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
import re
|
||||
import typing as t
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
import re
|
||||
import os
|
||||
import re
|
||||
import typing as t
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
"""
|
||||
This module adds shared support for generic cloud modules
|
||||
|
||||
|
|
@ -32,9 +31,9 @@ The 'cloud' module provides the following common classes:
|
|||
|
||||
"""
|
||||
import random
|
||||
from functools import wraps
|
||||
import syslog
|
||||
import time
|
||||
from functools import wraps
|
||||
|
||||
|
||||
def _exponential_backoff(retries=10, delay=2, backoff=2, max_delay=60):
|
||||
|
|
|
|||
|
|
@ -9,11 +9,14 @@ import typing as t
|
|||
|
||||
from ansible.module_utils.common.collections import is_sequence
|
||||
from ansible.module_utils.common.locale import get_best_parsable_locale
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils import cmd_runner_fmt
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Callable, Mapping, Sequence
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.cmd_runner_fmt import ArgFormatType
|
||||
|
||||
ArgFormatter = t.Union[ArgFormatType, cmd_runner_fmt._ArgFormat] # noqa: UP007
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue