ansible-core 2.16.5rc1__py3-none-any.whl → 2.17.0b1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ansible-core might be problematic. Click here for more details.
- ansible/__init__.py +1 -3
- ansible/__main__.py +1 -0
- ansible/_vendor/__init__.py +1 -2
- ansible/cli/__init__.py +7 -8
- ansible/cli/adhoc.py +1 -2
- ansible/cli/arguments/__init__.py +1 -2
- ansible/cli/arguments/option_helpers.py +1 -2
- ansible/cli/config.py +1 -2
- ansible/cli/console.py +1 -2
- ansible/cli/doc.py +320 -198
- ansible/cli/galaxy.py +9 -3
- ansible/cli/inventory.py +5 -27
- ansible/cli/playbook.py +1 -2
- ansible/cli/pull.py +4 -5
- ansible/cli/scripts/ansible_connection_cli_stub.py +1 -4
- ansible/cli/vault.py +1 -2
- ansible/collections/list.py +1 -0
- ansible/compat/__init__.py +1 -4
- ansible/compat/importlib_resources.py +1 -2
- ansible/compat/{selectors/__init__.py → selectors.py} +12 -12
- ansible/config/ansible_builtin_runtime.yml +2 -0
- ansible/config/base.yml +154 -149
- ansible/config/manager.py +32 -25
- ansible/constants.py +41 -2
- ansible/context.py +1 -4
- ansible/errors/__init__.py +1 -3
- ansible/errors/yaml_strings.py +1 -3
- ansible/executor/__init__.py +1 -3
- ansible/executor/discovery/python_target.py +1 -2
- ansible/executor/interpreter_discovery.py +9 -8
- ansible/executor/module_common.py +1 -3
- ansible/executor/play_iterator.py +1 -3
- ansible/executor/playbook_executor.py +1 -3
- ansible/executor/powershell/module_manifest.py +2 -3
- ansible/executor/process/__init__.py +1 -3
- ansible/executor/process/worker.py +1 -3
- ansible/executor/stats.py +1 -3
- ansible/executor/task_executor.py +10 -5
- ansible/executor/task_queue_manager.py +1 -3
- ansible/executor/task_result.py +2 -3
- ansible/galaxy/__init__.py +1 -2
- ansible/galaxy/api.py +10 -2
- ansible/galaxy/collection/__init__.py +38 -24
- ansible/galaxy/collection/concrete_artifact_manager.py +1 -2
- ansible/galaxy/collection/galaxy_api_proxy.py +1 -2
- ansible/galaxy/collection/gpg.py +4 -2
- ansible/galaxy/data/apb/meta/main.yml.j2 +0 -15
- ansible/galaxy/data/container/meta/main.yml.j2 +0 -18
- ansible/galaxy/data/default/role/meta/main.yml.j2 +0 -18
- ansible/galaxy/data/network/cliconf_plugins/example.py.j2 +1 -2
- ansible/galaxy/data/network/library/example_command.py.j2 +1 -2
- ansible/galaxy/data/network/library/example_config.py.j2 +1 -2
- ansible/galaxy/data/network/library/example_facts.py.j2 +1 -2
- ansible/galaxy/data/network/meta/main.yml.j2 +0 -15
- ansible/galaxy/data/network/module_utils/example.py.j2 +1 -2
- ansible/galaxy/data/network/netconf_plugins/example.py.j2 +1 -2
- ansible/galaxy/data/network/terminal_plugins/example.py.j2 +1 -2
- ansible/galaxy/dependency_resolution/__init__.py +1 -2
- ansible/galaxy/dependency_resolution/dataclasses.py +5 -6
- ansible/galaxy/dependency_resolution/errors.py +1 -2
- ansible/galaxy/dependency_resolution/providers.py +3 -4
- ansible/galaxy/dependency_resolution/reporters.py +2 -3
- ansible/galaxy/dependency_resolution/resolvers.py +1 -2
- ansible/galaxy/dependency_resolution/versioning.py +1 -2
- ansible/galaxy/role.py +2 -3
- ansible/galaxy/token.py +1 -2
- ansible/galaxy/user_agent.py +1 -2
- ansible/inventory/data.py +1 -2
- ansible/inventory/group.py +1 -2
- ansible/inventory/helpers.py +1 -2
- ansible/inventory/host.py +1 -3
- ansible/inventory/manager.py +1 -2
- ansible/module_utils/_text.py +1 -2
- ansible/module_utils/ansible_release.py +3 -5
- ansible/module_utils/api.py +1 -2
- ansible/module_utils/basic.py +113 -158
- ansible/module_utils/common/_collections_compat.py +1 -2
- ansible/module_utils/common/_utils.py +1 -3
- ansible/module_utils/common/arg_spec.py +1 -2
- ansible/module_utils/common/collections.py +1 -2
- ansible/module_utils/common/dict_transformations.py +1 -2
- ansible/module_utils/common/file.py +10 -5
- ansible/module_utils/common/json.py +1 -3
- ansible/module_utils/common/locale.py +1 -2
- ansible/module_utils/common/network.py +2 -3
- ansible/module_utils/common/parameters.py +9 -9
- ansible/module_utils/common/process.py +12 -5
- ansible/module_utils/common/respawn.py +2 -3
- ansible/module_utils/common/sys_info.py +1 -2
- ansible/module_utils/common/text/converters.py +1 -2
- ansible/module_utils/common/text/formatters.py +1 -2
- ansible/module_utils/common/validation.py +5 -6
- ansible/module_utils/common/warnings.py +1 -2
- ansible/module_utils/common/yaml.py +1 -2
- ansible/module_utils/compat/datetime.py +1 -3
- ansible/module_utils/compat/importlib.py +21 -13
- ansible/module_utils/compat/paramiko.py +1 -2
- ansible/module_utils/compat/selectors.py +10 -34
- ansible/module_utils/compat/selinux.py +1 -2
- ansible/module_utils/compat/typing.py +1 -2
- ansible/module_utils/compat/version.py +1 -2
- ansible/module_utils/connection.py +1 -2
- ansible/module_utils/csharp/Ansible.Basic.cs +20 -3
- ansible/module_utils/distro/__init__.py +2 -3
- ansible/module_utils/distro/_distro.py +230 -234
- ansible/module_utils/errors.py +1 -2
- ansible/module_utils/facts/__init__.py +1 -2
- ansible/module_utils/facts/ansible_collector.py +1 -2
- ansible/module_utils/facts/collector.py +1 -2
- ansible/module_utils/facts/compat.py +1 -2
- ansible/module_utils/facts/default_collectors.py +1 -2
- ansible/module_utils/facts/hardware/aix.py +1 -2
- ansible/module_utils/facts/hardware/base.py +1 -2
- ansible/module_utils/facts/hardware/darwin.py +1 -2
- ansible/module_utils/facts/hardware/dragonfly.py +1 -2
- ansible/module_utils/facts/hardware/freebsd.py +1 -2
- ansible/module_utils/facts/hardware/hpux.py +1 -2
- ansible/module_utils/facts/hardware/hurd.py +1 -2
- ansible/module_utils/facts/hardware/linux.py +8 -6
- ansible/module_utils/facts/hardware/netbsd.py +1 -2
- ansible/module_utils/facts/hardware/openbsd.py +1 -2
- ansible/module_utils/facts/hardware/sunos.py +2 -3
- ansible/module_utils/facts/namespace.py +1 -2
- ansible/module_utils/facts/network/aix.py +1 -2
- ansible/module_utils/facts/network/base.py +1 -2
- ansible/module_utils/facts/network/darwin.py +1 -2
- ansible/module_utils/facts/network/dragonfly.py +1 -2
- ansible/module_utils/facts/network/fc_wwn.py +1 -2
- ansible/module_utils/facts/network/freebsd.py +1 -2
- ansible/module_utils/facts/network/generic_bsd.py +1 -2
- ansible/module_utils/facts/network/hpux.py +1 -2
- ansible/module_utils/facts/network/hurd.py +1 -2
- ansible/module_utils/facts/network/iscsi.py +1 -2
- ansible/module_utils/facts/network/linux.py +1 -2
- ansible/module_utils/facts/network/netbsd.py +1 -2
- ansible/module_utils/facts/network/nvme.py +1 -2
- ansible/module_utils/facts/network/openbsd.py +1 -2
- ansible/module_utils/facts/network/sunos.py +1 -2
- ansible/module_utils/facts/other/facter.py +1 -2
- ansible/module_utils/facts/other/ohai.py +1 -2
- ansible/module_utils/facts/packages.py +1 -2
- ansible/module_utils/facts/sysctl.py +1 -2
- ansible/module_utils/facts/system/apparmor.py +1 -2
- ansible/module_utils/facts/system/caps.py +1 -2
- ansible/module_utils/facts/system/chroot.py +1 -2
- ansible/module_utils/facts/system/cmdline.py +1 -2
- ansible/module_utils/facts/system/date_time.py +1 -2
- ansible/module_utils/facts/system/distribution.py +4 -5
- ansible/module_utils/facts/system/dns.py +1 -2
- ansible/module_utils/facts/system/env.py +1 -2
- ansible/module_utils/facts/system/fips.py +1 -2
- ansible/module_utils/facts/system/loadavg.py +1 -2
- ansible/module_utils/facts/system/local.py +1 -2
- ansible/module_utils/facts/system/lsb.py +1 -2
- ansible/module_utils/facts/system/pkg_mgr.py +7 -30
- ansible/module_utils/facts/system/platform.py +1 -2
- ansible/module_utils/facts/system/python.py +1 -2
- ansible/module_utils/facts/system/selinux.py +1 -2
- ansible/module_utils/facts/system/service_mgr.py +1 -2
- ansible/module_utils/facts/system/ssh_pub_keys.py +1 -2
- ansible/module_utils/facts/system/user.py +1 -2
- ansible/module_utils/facts/timeout.py +1 -2
- ansible/module_utils/facts/utils.py +1 -2
- ansible/module_utils/facts/virtual/base.py +1 -2
- ansible/module_utils/facts/virtual/dragonfly.py +1 -2
- ansible/module_utils/facts/virtual/freebsd.py +1 -2
- ansible/module_utils/facts/virtual/hpux.py +1 -2
- ansible/module_utils/facts/virtual/linux.py +2 -3
- ansible/module_utils/facts/virtual/netbsd.py +1 -2
- ansible/module_utils/facts/virtual/openbsd.py +1 -2
- ansible/module_utils/facts/virtual/sunos.py +1 -2
- ansible/module_utils/facts/virtual/sysctl.py +1 -2
- ansible/module_utils/json_utils.py +1 -2
- ansible/module_utils/parsing/convert_bool.py +1 -2
- ansible/module_utils/powershell/Ansible.ModuleUtils.Legacy.psm1 +5 -2
- ansible/module_utils/powershell/Ansible.ModuleUtils.WebRequest.psm1 +1 -1
- ansible/module_utils/pycompat24.py +24 -4
- ansible/module_utils/service.py +31 -5
- ansible/module_utils/six/__init__.py +1 -1
- ansible/module_utils/splitter.py +1 -2
- ansible/module_utils/urls.py +335 -1052
- ansible/module_utils/yumdnf.py +13 -35
- ansible/modules/add_host.py +1 -2
- ansible/modules/apt.py +38 -22
- ansible/modules/apt_key.py +1 -2
- ansible/modules/apt_repository.py +18 -10
- ansible/modules/assemble.py +1 -2
- ansible/modules/assert.py +8 -4
- ansible/modules/async_status.py +17 -14
- ansible/modules/async_wrapper.py +11 -9
- ansible/modules/blockinfile.py +3 -4
- ansible/modules/command.py +1 -2
- ansible/modules/copy.py +4 -76
- ansible/modules/cron.py +3 -3
- ansible/modules/deb822_repository.py +5 -5
- ansible/modules/debconf.py +19 -8
- ansible/modules/debug.py +1 -2
- ansible/modules/dnf.py +63 -188
- ansible/modules/dnf5.py +57 -43
- ansible/modules/dpkg_selections.py +1 -2
- ansible/modules/expect.py +23 -15
- ansible/modules/fail.py +1 -2
- ansible/modules/fetch.py +1 -2
- ansible/modules/file.py +4 -3
- ansible/modules/find.py +25 -9
- ansible/modules/gather_facts.py +1 -2
- ansible/modules/get_url.py +2 -3
- ansible/modules/getent.py +2 -3
- ansible/modules/git.py +28 -17
- ansible/modules/group.py +1 -2
- ansible/modules/group_by.py +1 -2
- ansible/modules/hostname.py +2 -19
- ansible/modules/import_playbook.py +1 -2
- ansible/modules/import_role.py +9 -2
- ansible/modules/import_tasks.py +1 -2
- ansible/modules/include_role.py +1 -2
- ansible/modules/include_tasks.py +1 -2
- ansible/modules/include_vars.py +1 -2
- ansible/modules/iptables.py +38 -21
- ansible/modules/known_hosts.py +15 -8
- ansible/modules/lineinfile.py +1 -6
- ansible/modules/meta.py +3 -2
- ansible/modules/package.py +6 -5
- ansible/modules/package_facts.py +1 -2
- ansible/modules/pause.py +2 -3
- ansible/modules/ping.py +1 -2
- ansible/modules/pip.py +40 -20
- ansible/modules/raw.py +1 -2
- ansible/modules/reboot.py +1 -2
- ansible/modules/replace.py +7 -5
- ansible/modules/rpm_key.py +1 -2
- ansible/modules/script.py +1 -2
- ansible/modules/service.py +3 -21
- ansible/modules/service_facts.py +3 -12
- ansible/modules/set_fact.py +1 -2
- ansible/modules/set_stats.py +1 -2
- ansible/modules/setup.py +1 -2
- ansible/modules/shell.py +1 -2
- ansible/modules/slurp.py +1 -2
- ansible/modules/stat.py +1 -2
- ansible/modules/subversion.py +2 -3
- ansible/modules/systemd.py +12 -9
- ansible/modules/systemd_service.py +12 -9
- ansible/modules/sysvinit.py +7 -2
- ansible/modules/tempfile.py +7 -2
- ansible/modules/template.py +2 -3
- ansible/modules/unarchive.py +14 -4
- ansible/modules/uri.py +5 -8
- ansible/modules/user.py +11 -10
- ansible/modules/validate_argument_spec.py +15 -16
- ansible/modules/wait_for.py +1 -2
- ansible/modules/wait_for_connection.py +1 -2
- ansible/modules/yum_repository.py +2 -3
- ansible/parsing/__init__.py +1 -3
- ansible/parsing/ajson.py +1 -3
- ansible/parsing/dataloader.py +23 -12
- ansible/parsing/mod_args.py +14 -8
- ansible/parsing/plugin_docs.py +1 -2
- ansible/parsing/quoting.py +1 -3
- ansible/parsing/splitter.py +1 -3
- ansible/parsing/utils/__init__.py +1 -3
- ansible/parsing/utils/addresses.py +1 -3
- ansible/parsing/utils/jsonify.py +1 -3
- ansible/parsing/utils/yaml.py +1 -3
- ansible/parsing/vault/__init__.py +6 -8
- ansible/parsing/yaml/__init__.py +1 -3
- ansible/parsing/yaml/constructor.py +1 -3
- ansible/parsing/yaml/dumper.py +1 -3
- ansible/parsing/yaml/loader.py +1 -3
- ansible/parsing/yaml/objects.py +1 -3
- ansible/playbook/__init__.py +1 -3
- ansible/playbook/attribute.py +1 -3
- ansible/playbook/base.py +2 -3
- ansible/playbook/block.py +1 -3
- ansible/playbook/collectionsearch.py +1 -2
- ansible/playbook/conditional.py +1 -3
- ansible/playbook/delegatable.py +1 -0
- ansible/playbook/handler.py +2 -4
- ansible/playbook/handler_task_include.py +1 -3
- ansible/playbook/helpers.py +1 -4
- ansible/playbook/included_file.py +4 -4
- ansible/playbook/loop_control.py +1 -3
- ansible/playbook/notifiable.py +1 -0
- ansible/playbook/play.py +1 -3
- ansible/playbook/play_context.py +1 -3
- ansible/playbook/playbook_include.py +1 -3
- ansible/playbook/role/__init__.py +2 -4
- ansible/playbook/role/definition.py +1 -3
- ansible/playbook/role/include.py +1 -3
- ansible/playbook/role/metadata.py +1 -3
- ansible/playbook/role/requirement.py +1 -3
- ansible/playbook/role_include.py +2 -10
- ansible/playbook/taggable.py +1 -3
- ansible/playbook/task.py +2 -4
- ansible/playbook/task_include.py +1 -3
- ansible/plugins/__init__.py +4 -5
- ansible/plugins/action/__init__.py +20 -14
- ansible/plugins/action/add_host.py +2 -4
- ansible/plugins/action/assemble.py +2 -3
- ansible/plugins/action/assert.py +1 -2
- ansible/plugins/action/async_status.py +1 -2
- ansible/plugins/action/command.py +1 -2
- ansible/plugins/action/copy.py +12 -9
- ansible/plugins/action/debug.py +1 -2
- ansible/plugins/action/dnf.py +4 -4
- ansible/plugins/action/fail.py +1 -2
- ansible/plugins/action/fetch.py +6 -3
- ansible/plugins/action/gather_facts.py +3 -4
- ansible/plugins/action/group_by.py +1 -2
- ansible/plugins/action/include_vars.py +1 -2
- ansible/plugins/action/normal.py +1 -2
- ansible/plugins/action/package.py +36 -21
- ansible/plugins/action/pause.py +1 -2
- ansible/plugins/action/raw.py +2 -3
- ansible/plugins/action/reboot.py +30 -15
- ansible/plugins/action/script.py +3 -4
- ansible/plugins/action/service.py +1 -2
- ansible/plugins/action/set_fact.py +1 -2
- ansible/plugins/action/set_stats.py +1 -2
- ansible/plugins/action/shell.py +1 -2
- ansible/plugins/action/template.py +1 -2
- ansible/plugins/action/unarchive.py +1 -2
- ansible/plugins/action/uri.py +2 -3
- ansible/plugins/action/validate_argument_spec.py +1 -2
- ansible/plugins/action/wait_for_connection.py +2 -3
- ansible/plugins/become/__init__.py +1 -2
- ansible/plugins/become/runas.py +1 -2
- ansible/plugins/become/su.py +1 -2
- ansible/plugins/become/sudo.py +1 -2
- ansible/plugins/cache/__init__.py +3 -2
- ansible/plugins/cache/base.py +1 -2
- ansible/plugins/cache/jsonfile.py +1 -3
- ansible/plugins/cache/memory.py +1 -2
- ansible/plugins/callback/__init__.py +2 -4
- ansible/plugins/callback/default.py +2 -3
- ansible/plugins/callback/junit.py +1 -2
- ansible/plugins/callback/minimal.py +1 -3
- ansible/plugins/callback/oneline.py +1 -3
- ansible/plugins/callback/tree.py +1 -2
- ansible/plugins/cliconf/__init__.py +1 -2
- ansible/plugins/connection/__init__.py +4 -5
- ansible/plugins/connection/local.py +3 -4
- ansible/plugins/connection/paramiko_ssh.py +1 -2
- ansible/plugins/connection/psrp.py +1 -2
- ansible/plugins/connection/ssh.py +18 -54
- ansible/plugins/connection/winrm.py +17 -6
- ansible/plugins/doc_fragments/action_common_attributes.py +2 -3
- ansible/plugins/doc_fragments/action_core.py +3 -4
- ansible/plugins/doc_fragments/backup.py +1 -2
- ansible/plugins/doc_fragments/connection_pipelining.py +1 -2
- ansible/plugins/doc_fragments/constructed.py +1 -2
- ansible/plugins/doc_fragments/decrypt.py +2 -3
- ansible/plugins/doc_fragments/default_callback.py +1 -2
- ansible/plugins/doc_fragments/files.py +1 -2
- ansible/plugins/doc_fragments/inventory_cache.py +1 -2
- ansible/plugins/doc_fragments/result_format_callback.py +1 -2
- ansible/plugins/doc_fragments/return_common.py +1 -2
- ansible/plugins/doc_fragments/shell_common.py +1 -2
- ansible/plugins/doc_fragments/shell_windows.py +1 -2
- ansible/plugins/doc_fragments/template_common.py +1 -2
- ansible/plugins/doc_fragments/url.py +1 -2
- ansible/plugins/doc_fragments/url_windows.py +1 -2
- ansible/plugins/doc_fragments/validate.py +1 -2
- ansible/plugins/doc_fragments/vars_plugin_staging.py +1 -2
- ansible/plugins/filter/__init__.py +1 -2
- ansible/plugins/filter/b64decode.yml +8 -8
- ansible/plugins/filter/b64encode.yml +4 -4
- ansible/plugins/filter/comment.yml +1 -1
- ansible/plugins/filter/core.py +11 -9
- ansible/plugins/filter/encryption.py +1 -3
- ansible/plugins/filter/extract.yml +1 -1
- ansible/plugins/filter/from_yaml_all.yml +1 -1
- ansible/plugins/filter/human_readable.yml +3 -3
- ansible/plugins/filter/human_to_bytes.yml +2 -2
- ansible/plugins/filter/mandatory.yml +1 -1
- ansible/plugins/filter/mathstuff.py +2 -2
- ansible/plugins/filter/password_hash.yml +3 -2
- ansible/plugins/filter/regex_replace.yml +15 -0
- ansible/plugins/filter/regex_search.yml +12 -0
- ansible/plugins/filter/strftime.yml +2 -9
- ansible/plugins/filter/to_datetime.yml +17 -2
- ansible/plugins/filter/to_nice_json.yml +4 -0
- ansible/plugins/filter/union.yml +1 -1
- ansible/plugins/filter/urls.py +1 -2
- ansible/plugins/filter/urlsplit.py +1 -2
- ansible/plugins/filter/zip.yml +2 -2
- ansible/plugins/filter/zip_longest.yml +1 -1
- ansible/plugins/httpapi/__init__.py +1 -2
- ansible/plugins/inventory/__init__.py +2 -4
- ansible/plugins/inventory/advanced_host_list.py +1 -2
- ansible/plugins/inventory/auto.py +2 -3
- ansible/plugins/inventory/constructed.py +3 -2
- ansible/plugins/inventory/generator.py +1 -2
- ansible/plugins/inventory/host_list.py +1 -2
- ansible/plugins/inventory/ini.py +1 -2
- ansible/plugins/inventory/script.py +122 -3
- ansible/plugins/inventory/toml.py +1 -2
- ansible/plugins/inventory/yaml.py +3 -4
- ansible/plugins/list.py +2 -3
- ansible/plugins/loader.py +10 -11
- ansible/plugins/lookup/__init__.py +1 -3
- ansible/plugins/lookup/config.py +19 -15
- ansible/plugins/lookup/csvfile.py +16 -7
- ansible/plugins/lookup/dict.py +2 -3
- ansible/plugins/lookup/env.py +4 -4
- ansible/plugins/lookup/file.py +1 -2
- ansible/plugins/lookup/fileglob.py +1 -2
- ansible/plugins/lookup/first_found.py +8 -7
- ansible/plugins/lookup/indexed_items.py +1 -2
- ansible/plugins/lookup/ini.py +6 -3
- ansible/plugins/lookup/inventory_hostnames.py +1 -2
- ansible/plugins/lookup/items.py +1 -2
- ansible/plugins/lookup/lines.py +1 -2
- ansible/plugins/lookup/list.py +1 -3
- ansible/plugins/lookup/nested.py +1 -2
- ansible/plugins/lookup/password.py +16 -14
- ansible/plugins/lookup/pipe.py +1 -2
- ansible/plugins/lookup/random_choice.py +1 -2
- ansible/plugins/lookup/sequence.py +21 -52
- ansible/plugins/lookup/subelements.py +1 -2
- ansible/plugins/lookup/template.py +1 -2
- ansible/plugins/lookup/together.py +1 -2
- ansible/plugins/lookup/unvault.py +1 -2
- ansible/plugins/lookup/url.py +9 -3
- ansible/plugins/lookup/varnames.py +1 -2
- ansible/plugins/lookup/vars.py +1 -2
- ansible/plugins/netconf/__init__.py +1 -2
- ansible/plugins/shell/__init__.py +3 -4
- ansible/plugins/shell/cmd.py +1 -2
- ansible/plugins/shell/powershell.py +1 -2
- ansible/plugins/shell/sh.py +1 -2
- ansible/plugins/strategy/__init__.py +33 -21
- ansible/plugins/strategy/debug.py +1 -2
- ansible/plugins/strategy/free.py +18 -8
- ansible/plugins/strategy/host_pinned.py +1 -3
- ansible/plugins/strategy/linear.py +23 -23
- ansible/plugins/terminal/__init__.py +2 -3
- ansible/plugins/test/__init__.py +1 -2
- ansible/plugins/test/change.yml +1 -1
- ansible/plugins/test/changed.yml +1 -1
- ansible/plugins/test/contains.yml +1 -1
- ansible/plugins/test/core.py +2 -4
- ansible/plugins/test/exists.yml +1 -1
- ansible/plugins/test/failed.yml +1 -1
- ansible/plugins/test/failure.yml +1 -1
- ansible/plugins/test/files.py +1 -3
- ansible/plugins/test/finished.yml +3 -3
- ansible/plugins/test/issuperset.yml +1 -1
- ansible/plugins/test/match.yml +1 -1
- ansible/plugins/test/mathstuff.py +1 -2
- ansible/plugins/test/reachable.yml +1 -1
- ansible/plugins/test/regex.yml +1 -1
- ansible/plugins/test/search.yml +1 -1
- ansible/plugins/test/skip.yml +1 -1
- ansible/plugins/test/skipped.yml +1 -1
- ansible/plugins/test/started.yml +1 -1
- ansible/plugins/test/succeeded.yml +1 -1
- ansible/plugins/test/success.yml +1 -1
- ansible/plugins/test/successful.yml +1 -1
- ansible/plugins/test/superset.yml +1 -1
- ansible/plugins/test/unreachable.yml +1 -1
- ansible/plugins/test/uri.py +1 -3
- ansible/plugins/vars/__init__.py +1 -2
- ansible/plugins/vars/host_group_vars.py +2 -3
- ansible/release.py +3 -5
- ansible/template/__init__.py +14 -27
- ansible/template/native_helpers.py +1 -3
- ansible/template/template.py +1 -3
- ansible/template/vars.py +1 -0
- ansible/utils/__init__.py +1 -3
- ansible/utils/cmd_functions.py +1 -2
- ansible/utils/collection_loader/__init__.py +1 -2
- ansible/utils/collection_loader/_collection_config.py +1 -2
- ansible/utils/collection_loader/_collection_finder.py +1 -2
- ansible/utils/collection_loader/_collection_meta.py +1 -2
- ansible/utils/color.py +1 -2
- ansible/utils/context_objects.py +1 -4
- ansible/utils/display.py +88 -30
- ansible/utils/encrypt.py +4 -105
- ansible/utils/fqcn.py +1 -2
- ansible/utils/galaxy.py +1 -3
- ansible/utils/hashing.py +1 -3
- ansible/utils/helpers.py +1 -3
- ansible/utils/jsonrpc.py +1 -2
- ansible/utils/listify.py +1 -3
- ansible/utils/lock.py +1 -3
- ansible/utils/multiprocessing.py +1 -3
- ansible/utils/native_jinja.py +1 -3
- ansible/utils/path.py +1 -2
- ansible/utils/plugin_docs.py +7 -6
- ansible/utils/py3compat.py +17 -55
- ansible/utils/sentinel.py +1 -3
- ansible/utils/shlex.py +1 -3
- ansible/utils/singleton.py +1 -3
- ansible/utils/ssh_functions.py +1 -3
- ansible/utils/unicode.py +1 -3
- ansible/utils/unsafe_proxy.py +1 -2
- ansible/utils/vars.py +6 -8
- ansible/utils/version.py +1 -3
- ansible/vars/clean.py +1 -3
- ansible/vars/fact_cache.py +1 -2
- ansible/vars/hostvars.py +9 -29
- ansible/vars/manager.py +24 -6
- ansible/vars/reserved.py +1 -3
- {ansible_core-2.16.5rc1.data → ansible_core-2.17.0b1.data}/scripts/ansible-test +1 -2
- {ansible_core-2.16.5rc1.dist-info → ansible_core-2.17.0b1.dist-info}/METADATA +3 -3
- ansible_core-2.17.0b1.dist-info/RECORD +987 -0
- ansible_test/__init__.py +1 -2
- ansible_test/_data/completion/docker.txt +7 -9
- ansible_test/_data/completion/remote.txt +6 -7
- ansible_test/_data/requirements/ansible-test.txt +0 -2
- ansible_test/_data/requirements/constraints.txt +1 -6
- ansible_test/_data/requirements/sanity.ansible-doc.txt +3 -3
- ansible_test/_data/requirements/sanity.changelog.txt +3 -3
- ansible_test/_data/requirements/sanity.import.plugin.txt +2 -2
- ansible_test/_data/requirements/sanity.mypy.txt +12 -12
- ansible_test/_data/requirements/sanity.pep8.txt +1 -1
- ansible_test/_data/requirements/sanity.pylint.txt +7 -7
- ansible_test/_data/requirements/sanity.runtime-metadata.txt +1 -1
- ansible_test/_data/requirements/sanity.validate-modules.txt +3 -3
- ansible_test/_data/requirements/sanity.yamllint.txt +2 -2
- ansible_test/_internal/bootstrap.py +2 -2
- ansible_test/_internal/classification/__init__.py +0 -5
- ansible_test/_internal/commands/integration/cloud/cs.py +1 -1
- ansible_test/_internal/commands/integration/cloud/nios.py +1 -1
- ansible_test/_internal/commands/sanity/__init__.py +1 -27
- ansible_test/_internal/commands/sanity/ansible_doc.py +1 -1
- ansible_test/_internal/commands/sanity/import.py +0 -18
- ansible_test/_internal/commands/sanity/mypy.py +7 -10
- ansible_test/_internal/commands/units/__init__.py +1 -1
- ansible_test/_internal/config.py +0 -1
- ansible_test/_internal/content_config.py +0 -5
- ansible_test/_internal/coverage_util.py +0 -1
- ansible_test/_internal/docker_util.py +1 -1
- ansible_test/_internal/host_profiles.py +5 -4
- ansible_test/_internal/python_requirements.py +1 -119
- ansible_test/_internal/ssh.py +1 -0
- ansible_test/_internal/util.py +1 -1
- ansible_test/_internal/util_common.py +1 -1
- ansible_test/_internal/venv.py +10 -108
- ansible_test/_util/__init__.py +1 -2
- ansible_test/_util/controller/sanity/mypy/ansible-core.ini +0 -6
- ansible_test/_util/controller/sanity/mypy/modules.ini +0 -6
- ansible_test/_util/controller/sanity/pylint/config/ansible-test-target.cfg +0 -1
- ansible_test/_util/controller/sanity/pylint/config/ansible-test.cfg +0 -1
- ansible_test/_util/controller/sanity/pylint/config/code-smell.cfg +0 -1
- ansible_test/_util/controller/sanity/pylint/config/collection.cfg +0 -1
- ansible_test/_util/controller/sanity/pylint/config/default.cfg +0 -1
- ansible_test/_util/controller/sanity/pylint/plugins/deprecated.py +1 -2
- ansible_test/_util/controller/sanity/shellcheck/exclude.txt +0 -1
- ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py +31 -59
- ansible_test/_util/controller/sanity/validate-modules/validate_modules/module_args.py +0 -7
- ansible_test/_util/controller/sanity/validate-modules/validate_modules/schema.py +10 -2
- ansible_test/_util/controller/sanity/validate-modules/validate_modules/utils.py +1 -1
- ansible_test/_util/controller/sanity/yamllint/yamllinter.py +16 -4
- ansible_test/_util/target/__init__.py +1 -2
- ansible_test/_util/target/cli/ansible_test_cli_stub.py +1 -2
- ansible_test/_util/target/common/constants.py +1 -4
- ansible_test/_util/target/injector/python.py +4 -19
- ansible_test/_util/target/pytest/plugins/ansible_forked.py +2 -9
- ansible_test/_util/target/pytest/plugins/ansible_pytest_collections.py +1 -5
- ansible_test/_util/target/pytest/plugins/ansible_pytest_coverage.py +1 -2
- ansible_test/_util/target/sanity/compile/compile.py +3 -12
- ansible_test/_util/target/sanity/import/importer.py +1 -12
- ansible_test/_util/target/setup/bootstrap.sh +58 -105
- ansible_test/_util/target/setup/probe_cgroups.py +1 -2
- ansible_test/_util/target/setup/quiet_pip.py +1 -16
- ansible_test/_util/target/setup/requirements.py +9 -2
- ansible_test/_util/target/tools/virtualenvcheck.py +1 -2
- ansible_test/_util/target/tools/yamlcheck.py +1 -2
- ansible/module_utils/common/_json_compat.py +0 -16
- ansible/module_utils/compat/_selectors2.py +0 -655
- ansible/modules/yum.py +0 -1821
- ansible/plugins/action/yum.py +0 -111
- ansible_core-2.16.5rc1.dist-info/RECORD +0 -1009
- ansible_test/_util/controller/sanity/code-smell/future-import-boilerplate.json +0 -7
- ansible_test/_util/controller/sanity/code-smell/future-import-boilerplate.py +0 -46
- ansible_test/_util/controller/sanity/code-smell/metaclass-boilerplate.json +0 -7
- ansible_test/_util/controller/sanity/code-smell/metaclass-boilerplate.py +0 -44
- ansible_test/_util/controller/sanity/code-smell/no-basestring.json +0 -7
- ansible_test/_util/controller/sanity/code-smell/no-basestring.py +0 -21
- ansible_test/_util/controller/sanity/code-smell/no-dict-iteritems.json +0 -7
- ansible_test/_util/controller/sanity/code-smell/no-dict-iteritems.py +0 -21
- ansible_test/_util/controller/sanity/code-smell/no-dict-iterkeys.json +0 -7
- ansible_test/_util/controller/sanity/code-smell/no-dict-iterkeys.py +0 -21
- ansible_test/_util/controller/sanity/code-smell/no-dict-itervalues.json +0 -7
- ansible_test/_util/controller/sanity/code-smell/no-dict-itervalues.py +0 -21
- ansible_test/_util/controller/sanity/code-smell/no-main-display.json +0 -10
- ansible_test/_util/controller/sanity/code-smell/no-main-display.py +0 -21
- ansible_test/_util/controller/sanity/code-smell/no-unicode-literals.json +0 -7
- ansible_test/_util/controller/sanity/code-smell/no-unicode-literals.py +0 -21
- ansible_test/_util/controller/tools/sslcheck.py +0 -22
- ansible_test/_util/target/common/__init__.py +0 -2
- {ansible_core-2.16.5rc1.dist-info → ansible_core-2.17.0b1.dist-info}/COPYING +0 -0
- {ansible_core-2.16.5rc1.dist-info → ansible_core-2.17.0b1.dist-info}/WHEEL +0 -0
- {ansible_core-2.16.5rc1.dist-info → ansible_core-2.17.0b1.dist-info}/entry_points.txt +0 -0
- {ansible_core-2.16.5rc1.dist-info → ansible_core-2.17.0b1.dist-info}/top_level.txt +0 -0
ansible_test/__init__.py
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
# Empty __init__.py to allow
|
|
2
|
-
# This allows the ansible-test entry point to report supported Python versions before exiting.
|
|
1
|
+
# Empty __init__.py to allow relative imports to work under mypy.
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
base image=quay.io/ansible/base-test-container:
|
|
2
|
-
default image=quay.io/ansible/default-test-container:
|
|
3
|
-
default image=quay.io/ansible/ansible-core-test-container:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ubuntu2004 image=quay.io/ansible/ubuntu2004-test-container:6.3.0 python=3.8
|
|
9
|
-
ubuntu2204 image=quay.io/ansible/ubuntu2204-test-container:6.3.0 python=3.10
|
|
1
|
+
base image=quay.io/ansible/base-test-container:6.2.0 python=3.12,3.7,3.8,3.9,3.10,3.11
|
|
2
|
+
default image=quay.io/ansible/default-test-container:9.6.0 python=3.12,3.7,3.8,3.9,3.10,3.11 context=collection
|
|
3
|
+
default image=quay.io/ansible/ansible-core-test-container:9.6.0 python=3.12,3.7,3.8,3.9,3.10,3.11 context=ansible-core
|
|
4
|
+
alpine319 image=quay.io/ansible/alpine319-test-container:7.1.0 python=3.11 cgroup=none audit=none
|
|
5
|
+
fedora39 image=quay.io/ansible/fedora39-test-container:7.1.0 python=3.12
|
|
6
|
+
ubuntu2004 image=quay.io/ansible/ubuntu2004-test-container:7.1.0 python=3.8
|
|
7
|
+
ubuntu2204 image=quay.io/ansible/ubuntu2204-test-container:7.1.0 python=3.10
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
alpine/3.
|
|
1
|
+
alpine/3.19 python=3.11 become=doas_sudo provider=aws arch=x86_64
|
|
2
2
|
alpine become=doas_sudo provider=aws arch=x86_64
|
|
3
|
-
fedora/
|
|
3
|
+
fedora/39 python=3.12 become=sudo provider=aws arch=x86_64
|
|
4
4
|
fedora become=sudo provider=aws arch=x86_64
|
|
5
|
-
freebsd/13.
|
|
5
|
+
freebsd/13.3 python=3.9,3.11 python_dir=/usr/local/bin become=su_sudo provider=aws arch=x86_64
|
|
6
|
+
freebsd/14.0 python=3.9,3.11 python_dir=/usr/local/bin become=su_sudo provider=aws arch=x86_64
|
|
6
7
|
freebsd python_dir=/usr/local/bin become=su_sudo provider=aws arch=x86_64
|
|
7
|
-
macos/
|
|
8
|
+
macos/14.3 python=3.11 python_dir=/usr/local/bin become=sudo provider=parallels arch=x86_64
|
|
8
9
|
macos python_dir=/usr/local/bin become=sudo provider=parallels arch=x86_64
|
|
9
|
-
rhel/
|
|
10
|
-
rhel/8.8 python=3.6,3.11 become=sudo provider=aws arch=x86_64
|
|
11
|
-
rhel/9.2 python=3.9,3.11 become=sudo provider=aws arch=x86_64
|
|
10
|
+
rhel/9.3 python=3.9,3.11 become=sudo provider=aws arch=x86_64
|
|
12
11
|
rhel become=sudo provider=aws arch=x86_64
|
|
13
12
|
ubuntu/22.04 python=3.10 become=sudo provider=aws arch=x86_64
|
|
14
13
|
ubuntu become=sudo provider=aws arch=x86_64
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
# The test-constraints sanity test verifies this file, but changes must be made manually to keep it in up-to-date.
|
|
2
|
-
virtualenv == 16.7.12 ; python_version < '3'
|
|
3
2
|
coverage == 7.3.2 ; python_version >= '3.8' and python_version <= '3.12'
|
|
4
3
|
coverage == 6.5.0 ; python_version >= '3.7' and python_version <= '3.7'
|
|
5
|
-
coverage == 4.5.4 ; python_version >= '2.6' and python_version <= '3.6'
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
# do not add a cryptography or pyopenssl constraint to this file, they require special handling, see get_cryptography_requirements in python_requirements.py
|
|
2
2
|
# do not add a coverage constraint to this file, it is handled internally by ansible-test
|
|
3
|
-
packaging < 21.0 ; python_version < '3.6' # packaging 21.0 requires Python 3.6 or newer
|
|
4
3
|
pywinrm >= 0.3.0 ; python_version < '3.11' # message encryption support
|
|
5
4
|
pywinrm >= 0.4.3 ; python_version >= '3.11' # support for Python 3.11
|
|
6
|
-
pytest
|
|
7
|
-
pytest >= 4.5.0 ; python_version > '2.7' # pytest 4.5.0 added support for --strict-markers
|
|
5
|
+
pytest >= 4.5.0 # pytest 4.5.0 added support for --strict-markers
|
|
8
6
|
ntlm-auth >= 1.3.0 # message encryption support using cryptography
|
|
9
7
|
requests-ntlm >= 1.1.0 # message encryption support
|
|
10
8
|
requests-credssp >= 0.1.0 # message encryption support
|
|
11
|
-
pyparsing < 3.0.0 ; python_version < '3.5' # pyparsing 3 and later require python 3.5 or later
|
|
12
9
|
mock >= 2.0.0 # needed for features backported from Python 3.6 unittest.mock (assert_called, assert_called_once...)
|
|
13
10
|
pytest-mock >= 1.4.0 # needed for mock_use_standalone_module pytest option
|
|
14
|
-
setuptools < 45 ; python_version == '2.7' # setuptools 45 and later require python 3.5 or later
|
|
15
|
-
wheel < 0.38.0 ; python_version < '3.7' # wheel 0.38.0 and later require python 3.7 or later
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# edit "sanity.changelog.in" and generate with: hacking/update-sanity-requirements.py --test changelog
|
|
2
|
-
antsibull-changelog==0.
|
|
2
|
+
antsibull-changelog==0.26.0
|
|
3
3
|
docutils==0.18.1
|
|
4
|
-
packaging==
|
|
4
|
+
packaging==24.0
|
|
5
5
|
PyYAML==6.0.1
|
|
6
6
|
rstcheck==5.0.0
|
|
7
7
|
semantic-version==2.10.0
|
|
8
8
|
types-docutils==0.18.3
|
|
9
|
-
typing_extensions==4.
|
|
9
|
+
typing_extensions==4.10.0
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# edit "sanity.mypy.in" and generate with: hacking/update-sanity-requirements.py --test mypy
|
|
2
2
|
cffi==1.16.0
|
|
3
|
-
cryptography==
|
|
4
|
-
Jinja2==3.1.
|
|
5
|
-
MarkupSafe==2.1.
|
|
6
|
-
mypy==1.
|
|
3
|
+
cryptography==42.0.5
|
|
4
|
+
Jinja2==3.1.3
|
|
5
|
+
MarkupSafe==2.1.5
|
|
6
|
+
mypy==1.9.0
|
|
7
7
|
mypy-extensions==1.0.0
|
|
8
|
-
packaging==
|
|
8
|
+
packaging==24.0
|
|
9
9
|
pycparser==2.21
|
|
10
10
|
tomli==2.0.1
|
|
11
11
|
types-backports==0.1.3
|
|
12
|
-
types-paramiko==3.
|
|
13
|
-
types-PyYAML==6.0.12.
|
|
14
|
-
types-requests==2.31.0.
|
|
15
|
-
types-setuptools==
|
|
16
|
-
types-toml==0.10.8.
|
|
17
|
-
typing_extensions==4.
|
|
18
|
-
urllib3==2.
|
|
12
|
+
types-paramiko==3.4.0.20240311
|
|
13
|
+
types-PyYAML==6.0.12.20240311
|
|
14
|
+
types-requests==2.31.0.20240311
|
|
15
|
+
types-setuptools==69.2.0.20240317
|
|
16
|
+
types-toml==0.10.8.20240310
|
|
17
|
+
typing_extensions==4.10.0
|
|
18
|
+
urllib3==2.2.1
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# edit "sanity.pep8.in" and generate with: hacking/update-sanity-requirements.py --test pep8
|
|
2
|
-
pycodestyle==2.11.
|
|
2
|
+
pycodestyle==2.11.1
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# edit "sanity.pylint.in" and generate with: hacking/update-sanity-requirements.py --test pylint
|
|
2
|
-
astroid==3.
|
|
3
|
-
dill==0.3.
|
|
4
|
-
isort==5.
|
|
2
|
+
astroid==3.1.0
|
|
3
|
+
dill==0.3.8
|
|
4
|
+
isort==5.13.2
|
|
5
5
|
mccabe==0.7.0
|
|
6
|
-
platformdirs==
|
|
7
|
-
pylint==3.0
|
|
6
|
+
platformdirs==4.2.0
|
|
7
|
+
pylint==3.1.0
|
|
8
8
|
PyYAML==6.0.1
|
|
9
9
|
tomli==2.0.1
|
|
10
|
-
tomlkit==0.12.
|
|
11
|
-
typing_extensions==4.
|
|
10
|
+
tomlkit==0.12.4
|
|
11
|
+
typing_extensions==4.10.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# edit "sanity.validate-modules.in" and generate with: hacking/update-sanity-requirements.py --test validate-modules
|
|
2
2
|
antsibull-docs-parser==1.0.0
|
|
3
|
-
Jinja2==3.1.
|
|
4
|
-
MarkupSafe==2.1.
|
|
3
|
+
Jinja2==3.1.3
|
|
4
|
+
MarkupSafe==2.1.5
|
|
5
5
|
PyYAML==6.0.1
|
|
6
|
-
voluptuous==0.
|
|
6
|
+
voluptuous==0.14.2
|
|
@@ -28,7 +28,7 @@ class Bootstrap:
|
|
|
28
28
|
"""Base class for bootstrapping systems."""
|
|
29
29
|
|
|
30
30
|
controller: bool
|
|
31
|
-
|
|
31
|
+
python_interpreters: dict[str, str]
|
|
32
32
|
ssh_key: SshKey
|
|
33
33
|
|
|
34
34
|
@property
|
|
@@ -41,7 +41,7 @@ class Bootstrap:
|
|
|
41
41
|
return dict(
|
|
42
42
|
bootstrap_type=self.bootstrap_type,
|
|
43
43
|
controller='yes' if self.controller else '',
|
|
44
|
-
|
|
44
|
+
python_interpreters=[f'{key}:{value}' for key, value in self.python_interpreters.items()],
|
|
45
45
|
ssh_key_type=self.ssh_key.KEY_TYPE,
|
|
46
46
|
ssh_private_key=self.ssh_key.key_contents,
|
|
47
47
|
ssh_public_key=self.ssh_key.pub_contents,
|
|
@@ -674,11 +674,6 @@ class PathMapper:
|
|
|
674
674
|
|
|
675
675
|
# Early classification that needs to occur before common classification belongs here.
|
|
676
676
|
|
|
677
|
-
if path.startswith('test/units/compat/'):
|
|
678
|
-
return {
|
|
679
|
-
'units': 'test/units/',
|
|
680
|
-
}
|
|
681
|
-
|
|
682
677
|
if dirname == '.azure-pipelines/commands':
|
|
683
678
|
test_map = {
|
|
684
679
|
'cloud.sh': 'integration:cloud/',
|
|
@@ -38,7 +38,7 @@ class CsCloudProvider(CloudProvider):
|
|
|
38
38
|
def __init__(self, args: IntegrationConfig) -> None:
|
|
39
39
|
super().__init__(args)
|
|
40
40
|
|
|
41
|
-
self.image = os.environ.get('ANSIBLE_CLOUDSTACK_CONTAINER', 'quay.io/ansible/cloudstack-test-container:1.
|
|
41
|
+
self.image = os.environ.get('ANSIBLE_CLOUDSTACK_CONTAINER', 'quay.io/ansible/cloudstack-test-container:1.7.0')
|
|
42
42
|
self.host = ''
|
|
43
43
|
self.port = 0
|
|
44
44
|
|
|
@@ -28,7 +28,7 @@ class NiosProvider(CloudProvider):
|
|
|
28
28
|
#
|
|
29
29
|
# It's source source itself resides at:
|
|
30
30
|
# https://github.com/ansible/nios-test-container
|
|
31
|
-
DOCKER_IMAGE = 'quay.io/ansible/nios-test-container:
|
|
31
|
+
DOCKER_IMAGE = 'quay.io/ansible/nios-test-container:3.0.0'
|
|
32
32
|
|
|
33
33
|
def __init__(self, args: IntegrationConfig) -> None:
|
|
34
34
|
super().__init__(args)
|
|
@@ -764,11 +764,6 @@ class SanityTest(metaclass=abc.ABCMeta):
|
|
|
764
764
|
"""True if the test targets should include symlinks."""
|
|
765
765
|
return False
|
|
766
766
|
|
|
767
|
-
@property
|
|
768
|
-
def py2_compat(self) -> bool:
|
|
769
|
-
"""True if the test only applies to code that runs on Python 2.x."""
|
|
770
|
-
return False
|
|
771
|
-
|
|
772
767
|
@property
|
|
773
768
|
def supported_python_versions(self) -> t.Optional[tuple[str, ...]]:
|
|
774
769
|
"""A tuple of supported Python versions or None if the test does not depend on specific Python versions."""
|
|
@@ -786,23 +781,11 @@ class SanityTest(metaclass=abc.ABCMeta):
|
|
|
786
781
|
|
|
787
782
|
def filter_targets_by_version(self, args: SanityConfig, targets: list[TestTarget], python_version: str) -> list[TestTarget]:
|
|
788
783
|
"""Return the given list of test targets, filtered to include only those relevant for the test, taking into account the Python version."""
|
|
784
|
+
del args # args is not used here, but derived classes may make use of it
|
|
789
785
|
del python_version # python_version is not used here, but derived classes may make use of it
|
|
790
786
|
|
|
791
787
|
targets = self.filter_targets(targets)
|
|
792
788
|
|
|
793
|
-
if self.py2_compat:
|
|
794
|
-
# This sanity test is a Python 2.x compatibility test.
|
|
795
|
-
content_config = get_content_config(args)
|
|
796
|
-
|
|
797
|
-
if content_config.py2_support:
|
|
798
|
-
# This collection supports Python 2.x.
|
|
799
|
-
# Filter targets to include only those that require support for remote-only Python versions.
|
|
800
|
-
targets = self.filter_remote_targets(targets)
|
|
801
|
-
else:
|
|
802
|
-
# This collection does not support Python 2.x.
|
|
803
|
-
# There are no targets to test.
|
|
804
|
-
targets = []
|
|
805
|
-
|
|
806
789
|
return targets
|
|
807
790
|
|
|
808
791
|
@staticmethod
|
|
@@ -878,7 +861,6 @@ class SanityCodeSmellTest(SanitySingleVersion):
|
|
|
878
861
|
self.__no_targets: bool = self.config.get('no_targets')
|
|
879
862
|
self.__include_directories: bool = self.config.get('include_directories')
|
|
880
863
|
self.__include_symlinks: bool = self.config.get('include_symlinks')
|
|
881
|
-
self.__py2_compat: bool = self.config.get('py2_compat', False)
|
|
882
864
|
self.__error_code: str | None = self.config.get('error_code', None)
|
|
883
865
|
else:
|
|
884
866
|
self.output = None
|
|
@@ -894,7 +876,6 @@ class SanityCodeSmellTest(SanitySingleVersion):
|
|
|
894
876
|
self.__no_targets = True
|
|
895
877
|
self.__include_directories = False
|
|
896
878
|
self.__include_symlinks = False
|
|
897
|
-
self.__py2_compat = False
|
|
898
879
|
self.__error_code = None
|
|
899
880
|
|
|
900
881
|
if self.no_targets:
|
|
@@ -939,11 +920,6 @@ class SanityCodeSmellTest(SanitySingleVersion):
|
|
|
939
920
|
"""True if the test targets should include symlinks."""
|
|
940
921
|
return self.__include_symlinks
|
|
941
922
|
|
|
942
|
-
@property
|
|
943
|
-
def py2_compat(self) -> bool:
|
|
944
|
-
"""True if the test only applies to code that runs on Python 2.x."""
|
|
945
|
-
return self.__py2_compat
|
|
946
|
-
|
|
947
923
|
@property
|
|
948
924
|
def supported_python_versions(self) -> t.Optional[tuple[str, ...]]:
|
|
949
925
|
"""A tuple of supported Python versions or None if the test does not depend on specific Python versions."""
|
|
@@ -1141,10 +1117,8 @@ def create_sanity_virtualenv(
|
|
|
1141
1117
|
commands = collect_requirements( # create_sanity_virtualenv()
|
|
1142
1118
|
python=python,
|
|
1143
1119
|
controller=True,
|
|
1144
|
-
virtualenv=False,
|
|
1145
1120
|
command=None,
|
|
1146
1121
|
ansible=False,
|
|
1147
|
-
cryptography=False,
|
|
1148
1122
|
coverage=coverage,
|
|
1149
1123
|
minimize=minimize,
|
|
1150
1124
|
sanity=name,
|
|
@@ -79,7 +79,7 @@ class AnsibleDocTest(SanitySingleVersion):
|
|
|
79
79
|
plugin_parts = os.path.relpath(plugin_file_path, plugin_path).split(os.path.sep)
|
|
80
80
|
plugin_name = os.path.splitext(plugin_parts[-1])[0]
|
|
81
81
|
|
|
82
|
-
if plugin_name.startswith('_'):
|
|
82
|
+
if plugin_name.startswith('_') and not data_context().content.collection:
|
|
83
83
|
plugin_name = plugin_name[1:]
|
|
84
84
|
|
|
85
85
|
plugin_fqcn = data_context().content.prefix + '.'.join(plugin_parts[:-1] + [plugin_name])
|
|
@@ -47,11 +47,6 @@ from ...ansible_util import (
|
|
|
47
47
|
ansible_environment,
|
|
48
48
|
)
|
|
49
49
|
|
|
50
|
-
from ...python_requirements import (
|
|
51
|
-
PipUnavailableError,
|
|
52
|
-
install_requirements,
|
|
53
|
-
)
|
|
54
|
-
|
|
55
50
|
from ...config import (
|
|
56
51
|
SanityConfig,
|
|
57
52
|
)
|
|
@@ -68,10 +63,6 @@ from ...host_configs import (
|
|
|
68
63
|
PythonConfig,
|
|
69
64
|
)
|
|
70
65
|
|
|
71
|
-
from ...venv import (
|
|
72
|
-
get_virtualenv_version,
|
|
73
|
-
)
|
|
74
|
-
|
|
75
66
|
|
|
76
67
|
def _get_module_test(module_restrictions: bool) -> c.Callable[[str], bool]:
|
|
77
68
|
"""Create a predicate which tests whether a path can be used by modules or not."""
|
|
@@ -109,15 +100,6 @@ class ImportTest(SanityMultipleVersion):
|
|
|
109
100
|
|
|
110
101
|
paths = [target.path for target in targets.include]
|
|
111
102
|
|
|
112
|
-
if python.version.startswith('2.') and (get_virtualenv_version(args, python.path) or (0,)) < (13,):
|
|
113
|
-
# hack to make sure that virtualenv is available under Python 2.x
|
|
114
|
-
# on Python 3.x we can use the built-in venv
|
|
115
|
-
# version 13+ is required to use the `--no-wheel` option
|
|
116
|
-
try:
|
|
117
|
-
install_requirements(args, python, virtualenv=True, controller=False) # sanity (import)
|
|
118
|
-
except PipUnavailableError as ex:
|
|
119
|
-
display.warning(str(ex))
|
|
120
|
-
|
|
121
103
|
temp_root = os.path.join(ResultType.TMP.path, 'sanity', 'import')
|
|
122
104
|
|
|
123
105
|
messages = []
|
|
@@ -66,7 +66,6 @@ class MypyTest(SanityMultipleVersion):
|
|
|
66
66
|
vendored_paths = (
|
|
67
67
|
'lib/ansible/module_utils/six/__init__.py',
|
|
68
68
|
'lib/ansible/module_utils/distro/_distro.py',
|
|
69
|
-
'lib/ansible/module_utils/compat/_selectors2.py',
|
|
70
69
|
)
|
|
71
70
|
|
|
72
71
|
def filter_targets(self, targets: list[TestTarget]) -> list[TestTarget]:
|
|
@@ -76,15 +75,6 @@ class MypyTest(SanityMultipleVersion):
|
|
|
76
75
|
or target.path.startswith('packaging/')
|
|
77
76
|
or target.path.startswith('test/lib/ansible_test/_util/target/sanity/import/'))]
|
|
78
77
|
|
|
79
|
-
@property
|
|
80
|
-
def supported_python_versions(self) -> t.Optional[tuple[str, ...]]:
|
|
81
|
-
"""A tuple of supported Python versions or None if the test does not depend on specific Python versions."""
|
|
82
|
-
# mypy 0.981 dropped support for Python 2
|
|
83
|
-
# see: https://mypy-lang.blogspot.com/2022/09/mypy-0981-released.html
|
|
84
|
-
# cryptography dropped support for Python 3.5 in version 3.3
|
|
85
|
-
# see: https://cryptography.io/en/latest/changelog/#v3-3
|
|
86
|
-
return tuple(version for version in SUPPORTED_PYTHON_VERSIONS if str_to_version(version) >= (3, 6))
|
|
87
|
-
|
|
88
78
|
@property
|
|
89
79
|
def error_code(self) -> t.Optional[str]:
|
|
90
80
|
"""Error code for ansible-test matching the format used by the underlying test program, or None if the program does not use error codes."""
|
|
@@ -95,6 +85,13 @@ class MypyTest(SanityMultipleVersion):
|
|
|
95
85
|
"""True if the test requires PyPI, otherwise False."""
|
|
96
86
|
return True
|
|
97
87
|
|
|
88
|
+
@property
|
|
89
|
+
def supported_python_versions(self) -> t.Optional[tuple[str, ...]]:
|
|
90
|
+
"""A tuple of supported Python versions or None if the test does not depend on specific Python versions."""
|
|
91
|
+
# Because the version of typeshed mypy use in 1.9 doesn't support 3.7, neither does mypy 1.9.
|
|
92
|
+
# see: https://mypy-lang.blogspot.com/2024/03/mypy-19-released.html
|
|
93
|
+
return tuple(version for version in SUPPORTED_PYTHON_VERSIONS if str_to_version(version) >= (3, 8))
|
|
94
|
+
|
|
98
95
|
def test(self, args: SanityConfig, targets: SanityTargets, python: PythonConfig) -> TestResult:
|
|
99
96
|
settings = self.load_processor(args, python.version)
|
|
100
97
|
|
|
@@ -245,7 +245,7 @@ def command_units(args: UnitsConfig) -> None:
|
|
|
245
245
|
#
|
|
246
246
|
# NOTE: This only affects use of pytest-mock.
|
|
247
247
|
# Collection unit tests may directly import mock, which will be provided by ansible-test when it installs requirements using pip.
|
|
248
|
-
# Although mock is available for ansible-core unit tests, they should import
|
|
248
|
+
# Although mock is available for ansible-core unit tests, they should import unittest.mock instead.
|
|
249
249
|
if str_to_version(python.version) < (3, 8):
|
|
250
250
|
config_name = 'legacy.ini'
|
|
251
251
|
else:
|
ansible_test/_internal/config.py
CHANGED
|
@@ -29,7 +29,6 @@ from .io import (
|
|
|
29
29
|
from .util import (
|
|
30
30
|
ApplicationError,
|
|
31
31
|
display,
|
|
32
|
-
str_to_version,
|
|
33
32
|
)
|
|
34
33
|
|
|
35
34
|
from .data import (
|
|
@@ -75,13 +74,9 @@ def parse_content_config(data: t.Any) -> ContentConfig:
|
|
|
75
74
|
python_versions = tuple(version for version in SUPPORTED_PYTHON_VERSIONS
|
|
76
75
|
if version in CONTROLLER_PYTHON_VERSIONS or version in modules.python_versions)
|
|
77
76
|
|
|
78
|
-
# True if Python 2.x is supported.
|
|
79
|
-
py2_support = any(version for version in python_versions if str_to_version(version)[0] == 2)
|
|
80
|
-
|
|
81
77
|
return ContentConfig(
|
|
82
78
|
modules=modules,
|
|
83
79
|
python_versions=python_versions,
|
|
84
|
-
py2_support=py2_support,
|
|
85
80
|
)
|
|
86
81
|
|
|
87
82
|
|
|
@@ -71,7 +71,6 @@ COVERAGE_VERSIONS = (
|
|
|
71
71
|
# IMPORTANT: Keep this in sync with the ansible-test.txt requirements file.
|
|
72
72
|
CoverageVersion('7.3.2', 7, (3, 8), (3, 12)),
|
|
73
73
|
CoverageVersion('6.5.0', 7, (3, 7), (3, 7)),
|
|
74
|
-
CoverageVersion('4.5.4', 0, (2, 6), (3, 6)),
|
|
75
74
|
)
|
|
76
75
|
"""
|
|
77
76
|
This tuple specifies the coverage version to use for Python version ranges.
|
|
@@ -496,7 +496,7 @@ def get_docker_hostname() -> str:
|
|
|
496
496
|
"""Return the hostname of the Docker service."""
|
|
497
497
|
docker_host = os.environ.get('DOCKER_HOST')
|
|
498
498
|
|
|
499
|
-
if docker_host and docker_host.startswith('tcp://'):
|
|
499
|
+
if docker_host and docker_host.startswith(('tcp://', 'ssh://')):
|
|
500
500
|
try:
|
|
501
501
|
hostname = urllib.parse.urlparse(docker_host)[1].split(':')[0]
|
|
502
502
|
display.info('Detected Docker host: %s' % hostname, verbosity=1)
|
|
@@ -958,7 +958,7 @@ class DockerProfile(ControllerHostProfile[DockerConfig], SshTargetHostProfile[Do
|
|
|
958
958
|
"""Perform out-of-band setup before delegation."""
|
|
959
959
|
bootstrapper = BootstrapDocker(
|
|
960
960
|
controller=self.controller,
|
|
961
|
-
|
|
961
|
+
python_interpreters={self.python.version: self.python.path},
|
|
962
962
|
ssh_key=SshKey(self.args),
|
|
963
963
|
)
|
|
964
964
|
|
|
@@ -1214,8 +1214,9 @@ class PosixRemoteProfile(ControllerHostProfile[PosixRemoteConfig], RemoteProfile
|
|
|
1214
1214
|
def configure(self) -> None:
|
|
1215
1215
|
"""Perform in-band configuration. Executed before delegation for the controller and after delegation for targets."""
|
|
1216
1216
|
# a target uses a single python version, but a controller may include additional versions for targets running on the controller
|
|
1217
|
-
|
|
1218
|
-
|
|
1217
|
+
python_interpreters = {self.python.version: self.python.path}
|
|
1218
|
+
python_interpreters.update({target.python.version: target.python.path for target in self.targets if isinstance(target, ControllerConfig)})
|
|
1219
|
+
python_interpreters = {version: python_interpreters[version] for version in sorted_versions(list(python_interpreters.keys()))}
|
|
1219
1220
|
|
|
1220
1221
|
core_ci = self.wait_for_instance()
|
|
1221
1222
|
pwd = self.wait_until_ready()
|
|
@@ -1226,7 +1227,7 @@ class PosixRemoteProfile(ControllerHostProfile[PosixRemoteConfig], RemoteProfile
|
|
|
1226
1227
|
controller=self.controller,
|
|
1227
1228
|
platform=self.config.platform,
|
|
1228
1229
|
platform_version=self.config.version,
|
|
1229
|
-
|
|
1230
|
+
python_interpreters=python_interpreters,
|
|
1230
1231
|
ssh_key=core_ci.ssh_key,
|
|
1231
1232
|
)
|
|
1232
1233
|
|