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