ansible-core 2.16.7rc1__py3-none-any.whl → 2.17.0__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 +326 -202
- ansible/cli/galaxy.py +9 -3
- ansible/cli/inventory.py +4 -6
- 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 +33 -25
- ansible/constants.py +1 -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 +2 -3
- 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 +3 -4
- 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 +1 -2
- 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 +2 -3
- 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 +39 -46
- ansible/modules/dnf5.py +28 -26
- 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 +18 -5
- 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 +13 -3
- ansible/modules/uri.py +12 -15
- ansible/modules/user.py +11 -4
- 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 +6 -4
- 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 +1 -3
- 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 +19 -13
- 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 +2 -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 -3
- 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 +3 -4
- 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 -11
- 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 +17 -7
- ansible/plugins/strategy/host_pinned.py +1 -3
- ansible/plugins/strategy/linear.py +22 -22
- 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 +89 -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 +3 -7
- ansible/vars/manager.py +24 -6
- ansible/vars/reserved.py +1 -3
- {ansible_core-2.16.7rc1.data → ansible_core-2.17.0.data}/scripts/ansible-test +1 -2
- {ansible_core-2.16.7rc1.dist-info → ansible_core-2.17.0.dist-info}/METADATA +3 -3
- ansible_core-2.17.0.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/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/pypi_proxy.py +1 -8
- 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 +49 -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.7rc1.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.7rc1.dist-info → ansible_core-2.17.0.dist-info}/COPYING +0 -0
- {ansible_core-2.16.7rc1.dist-info → ansible_core-2.17.0.dist-info}/WHEEL +0 -0
- {ansible_core-2.16.7rc1.dist-info → ansible_core-2.17.0.dist-info}/entry_points.txt +0 -0
- {ansible_core-2.16.7rc1.dist-info → ansible_core-2.17.0.dist-info}/top_level.txt +0 -0
|
@@ -14,9 +14,7 @@
|
|
|
14
14
|
#
|
|
15
15
|
# You should have received a copy of the GNU General Public License
|
|
16
16
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
-
|
|
18
|
-
from __future__ import (absolute_import, division, print_function)
|
|
19
|
-
__metaclass__ = type
|
|
17
|
+
from __future__ import annotations
|
|
20
18
|
|
|
21
19
|
DOCUMENTATION = '''
|
|
22
20
|
name: linear
|
|
@@ -33,7 +31,7 @@ DOCUMENTATION = '''
|
|
|
33
31
|
|
|
34
32
|
from ansible import constants as C
|
|
35
33
|
from ansible.errors import AnsibleError, AnsibleAssertionError, AnsibleParserError
|
|
36
|
-
from ansible.executor.play_iterator import IteratingStates
|
|
34
|
+
from ansible.executor.play_iterator import IteratingStates
|
|
37
35
|
from ansible.module_utils.common.text.converters import to_text
|
|
38
36
|
from ansible.playbook.handler import Handler
|
|
39
37
|
from ansible.playbook.included_file import IncludedFile
|
|
@@ -293,7 +291,12 @@ class StrategyModule(StrategyBase):
|
|
|
293
291
|
)
|
|
294
292
|
else:
|
|
295
293
|
is_handler = isinstance(included_file._task, Handler)
|
|
296
|
-
new_blocks = self._load_included_file(
|
|
294
|
+
new_blocks = self._load_included_file(
|
|
295
|
+
included_file,
|
|
296
|
+
iterator=iterator,
|
|
297
|
+
is_handler=is_handler,
|
|
298
|
+
handle_stats_and_callbacks=False,
|
|
299
|
+
)
|
|
297
300
|
|
|
298
301
|
# let PlayIterator know about any new handlers included via include_role or
|
|
299
302
|
# import_role within include_role/include_taks
|
|
@@ -326,13 +329,19 @@ class StrategyModule(StrategyBase):
|
|
|
326
329
|
except AnsibleParserError:
|
|
327
330
|
raise
|
|
328
331
|
except AnsibleError as e:
|
|
329
|
-
|
|
330
|
-
# include_role does not have on_include callback so display the error
|
|
331
|
-
display.error(to_text(e), wrap_text=False)
|
|
332
|
+
display.error(to_text(e), wrap_text=False)
|
|
332
333
|
for r in included_file._results:
|
|
333
334
|
r._result['failed'] = True
|
|
335
|
+
r._result['reason'] = str(e)
|
|
336
|
+
self._tqm._stats.increment('failures', r._host.name)
|
|
337
|
+
self._tqm.send_callback('v2_runner_on_failed', r)
|
|
334
338
|
failed_includes_hosts.add(r._host)
|
|
335
|
-
|
|
339
|
+
else:
|
|
340
|
+
# since we skip incrementing the stats when the task result is
|
|
341
|
+
# first processed, we do so now for each host in the list
|
|
342
|
+
for host in included_file._hosts:
|
|
343
|
+
self._tqm._stats.increment('ok', host.name)
|
|
344
|
+
self._tqm.send_callback('v2_playbook_on_include', included_file)
|
|
336
345
|
|
|
337
346
|
for host in failed_includes_hosts:
|
|
338
347
|
self._tqm._failed_hosts[host.name] = True
|
|
@@ -356,25 +365,16 @@ class StrategyModule(StrategyBase):
|
|
|
356
365
|
failed_hosts = []
|
|
357
366
|
unreachable_hosts = []
|
|
358
367
|
for res in results:
|
|
359
|
-
|
|
360
|
-
# so we skip checking it with the meta tasks and look just at the iterator
|
|
361
|
-
if (res.is_failed() or res._task.action in C._ACTION_META) and iterator.is_failed(res._host):
|
|
368
|
+
if res.is_failed():
|
|
362
369
|
failed_hosts.append(res._host.name)
|
|
363
370
|
elif res.is_unreachable():
|
|
364
371
|
unreachable_hosts.append(res._host.name)
|
|
365
372
|
|
|
366
|
-
|
|
367
|
-
if any_errors_fatal and (len(failed_hosts) > 0 or len(unreachable_hosts) > 0):
|
|
368
|
-
dont_fail_states = frozenset([IteratingStates.RESCUE, IteratingStates.ALWAYS])
|
|
373
|
+
if any_errors_fatal and (failed_hosts or unreachable_hosts):
|
|
369
374
|
for host in hosts_left:
|
|
370
|
-
|
|
371
|
-
# the state may actually be in a child state, use the get_active_state()
|
|
372
|
-
# method in the iterator to figure out the true active state
|
|
373
|
-
s = iterator.get_active_state(s)
|
|
374
|
-
if s.run_state not in dont_fail_states or \
|
|
375
|
-
s.run_state == IteratingStates.RESCUE and s.fail_state & FailedStates.RESCUE != 0:
|
|
375
|
+
if host.name not in failed_hosts:
|
|
376
376
|
self._tqm._failed_hosts[host.name] = True
|
|
377
|
-
|
|
377
|
+
iterator.mark_host_failed(host)
|
|
378
378
|
display.debug("done checking for any_errors_fatal")
|
|
379
379
|
|
|
380
380
|
display.debug("checking for max_fail_percentage")
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
# You should have received a copy of the GNU General Public License
|
|
17
17
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
18
18
|
#
|
|
19
|
-
from __future__ import
|
|
20
|
-
__metaclass__ = type
|
|
19
|
+
from __future__ import annotations
|
|
21
20
|
|
|
22
21
|
import re
|
|
23
22
|
|
|
@@ -85,7 +84,7 @@ class TerminalBase(ABC):
|
|
|
85
84
|
|
|
86
85
|
This method is called right after the invoke_shell() is called from
|
|
87
86
|
the Paramiko SSHClient instance. It provides an opportunity to setup
|
|
88
|
-
terminal parameters such as
|
|
87
|
+
terminal parameters such as disabling paging for instance.
|
|
89
88
|
"""
|
|
90
89
|
pass
|
|
91
90
|
|
ansible/plugins/test/__init__.py
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# (c) Ansible Project
|
|
2
2
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
3
3
|
|
|
4
|
-
from __future__ import
|
|
5
|
-
__metaclass__ = type
|
|
4
|
+
from __future__ import annotations
|
|
6
5
|
|
|
7
6
|
from ansible.plugins import AnsibleJinja2Plugin
|
|
8
7
|
|
ansible/plugins/test/change.yml
CHANGED
|
@@ -6,7 +6,7 @@ DOCUMENTATION:
|
|
|
6
6
|
aliases: [change]
|
|
7
7
|
description:
|
|
8
8
|
- Tests if task required changes to complete
|
|
9
|
-
- This test checks for the
|
|
9
|
+
- This test checks for the existence of a C(changed) key in the input dictionary and that it is V(True) if present
|
|
10
10
|
options:
|
|
11
11
|
_input:
|
|
12
12
|
description: registered result from an Ansible task
|
ansible/plugins/test/changed.yml
CHANGED
|
@@ -6,7 +6,7 @@ DOCUMENTATION:
|
|
|
6
6
|
aliases: [change]
|
|
7
7
|
description:
|
|
8
8
|
- Tests if task required changes to complete
|
|
9
|
-
- This test checks for the
|
|
9
|
+
- This test checks for the existence of a C(changed) key in the input dictionary and that it is V(True) if present
|
|
10
10
|
options:
|
|
11
11
|
_input:
|
|
12
12
|
description: registered result from an Ansible task
|
|
@@ -21,7 +21,7 @@ EXAMPLES: |
|
|
|
21
21
|
|
|
22
22
|
# as a selector
|
|
23
23
|
- action: module=doessomething
|
|
24
|
-
when: lacp_groups|selectattr('interfaces', 'contains', 'em1')|first).master
|
|
24
|
+
when: (lacp_groups|selectattr('interfaces', 'contains', 'em1')|first).master
|
|
25
25
|
vars:
|
|
26
26
|
lacp_groups:
|
|
27
27
|
- master: lacp0
|
ansible/plugins/test/core.py
CHANGED
|
@@ -15,9 +15,7 @@
|
|
|
15
15
|
# You should have received a copy of the GNU General Public License
|
|
16
16
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
from __future__ import (absolute_import, division, print_function)
|
|
20
|
-
__metaclass__ = type
|
|
18
|
+
from __future__ import annotations
|
|
21
19
|
|
|
22
20
|
import re
|
|
23
21
|
import operator as py_operator
|
|
@@ -138,7 +136,7 @@ def regex(value='', pattern='', ignorecase=False, multiline=False, match_type='s
|
|
|
138
136
|
|
|
139
137
|
|
|
140
138
|
def vault_encrypted(value):
|
|
141
|
-
"""
|
|
139
|
+
"""Evaluate whether a variable is a single vault encrypted value
|
|
142
140
|
|
|
143
141
|
.. versionadded:: 2.10
|
|
144
142
|
"""
|
ansible/plugins/test/exists.yml
CHANGED
|
@@ -14,7 +14,7 @@ DOCUMENTATION:
|
|
|
14
14
|
|
|
15
15
|
EXAMPLES: |
|
|
16
16
|
vars:
|
|
17
|
-
my_etc_hosts_exists: "{{ '/etc/hosts' is
|
|
17
|
+
my_etc_hosts_exists: "{{ '/etc/hosts' is exists }}"
|
|
18
18
|
list_of_local_files_to_copy_to_remote: "{{ list_of_all_possible_files | select('exists') }}"
|
|
19
19
|
|
|
20
20
|
RETURN:
|
ansible/plugins/test/failed.yml
CHANGED
|
@@ -6,7 +6,7 @@ DOCUMENTATION:
|
|
|
6
6
|
aliases: [failure]
|
|
7
7
|
description:
|
|
8
8
|
- Tests if task finished in failure, opposite of C(succeeded).
|
|
9
|
-
- This test checks for the
|
|
9
|
+
- This test checks for the existence of a C(failed) key in the input dictionary and that it is V(True) if present.
|
|
10
10
|
- Tasks that get skipped or not executed due to other failures (syntax, templating, unreachable host, etc) do not return a 'failed' status.
|
|
11
11
|
options:
|
|
12
12
|
_input:
|
ansible/plugins/test/failure.yml
CHANGED
|
@@ -6,7 +6,7 @@ DOCUMENTATION:
|
|
|
6
6
|
aliases: [failure]
|
|
7
7
|
description:
|
|
8
8
|
- Tests if task finished in failure, opposite of C(succeeded).
|
|
9
|
-
- This test checks for the
|
|
9
|
+
- This test checks for the existence of a C(failed) key in the input dictionary and that it is V(True) if present.
|
|
10
10
|
- Tasks that get skipped or not executed due to other failures (syntax, templating, unreachable host, etc) do not return a 'failed' status.
|
|
11
11
|
options:
|
|
12
12
|
_input:
|
ansible/plugins/test/files.py
CHANGED
|
@@ -15,9 +15,7 @@
|
|
|
15
15
|
# You should have received a copy of the GNU General Public License
|
|
16
16
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
from __future__ import (absolute_import, division, print_function)
|
|
20
|
-
__metaclass__ = type
|
|
18
|
+
from __future__ import annotations
|
|
21
19
|
|
|
22
20
|
from os.path import isdir, isfile, isabs, exists, lexists, islink, samefile, ismount
|
|
23
21
|
|
|
@@ -4,8 +4,8 @@ DOCUMENTATION:
|
|
|
4
4
|
version_added: "1.9"
|
|
5
5
|
short_description: Did async task finish
|
|
6
6
|
description:
|
|
7
|
-
- Used to test if an async task has finished, it will
|
|
8
|
-
- This test checks for the
|
|
7
|
+
- Used to test if an async task has finished, it will also work with normal tasks but will issue a warning.
|
|
8
|
+
- This test checks for the existence of a C(finished) key in the input dictionary and that it is V(1) if present
|
|
9
9
|
options:
|
|
10
10
|
_input:
|
|
11
11
|
description: registered result from an Ansible task
|
|
@@ -17,5 +17,5 @@ EXAMPLES: |
|
|
|
17
17
|
|
|
18
18
|
RETURN:
|
|
19
19
|
_value:
|
|
20
|
-
description: Returns V(True) if the
|
|
20
|
+
description: Returns V(True) if the async task has finished, V(False) otherwise.
|
|
21
21
|
type: boolean
|
ansible/plugins/test/match.yml
CHANGED
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
# You should have received a copy of the GNU General Public License
|
|
16
16
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
from __future__ import
|
|
19
|
-
__metaclass__ = type
|
|
18
|
+
from __future__ import annotations
|
|
20
19
|
|
|
21
20
|
import math
|
|
22
21
|
|
|
@@ -5,7 +5,7 @@ DOCUMENTATION:
|
|
|
5
5
|
short_description: Task did not end due to unreachable host
|
|
6
6
|
description:
|
|
7
7
|
- Tests if task was able to reach the host for execution
|
|
8
|
-
- This test checks for the
|
|
8
|
+
- This test checks for the existence of a C(unreachable) key in the input dictionary and that it is V(False) if present
|
|
9
9
|
options:
|
|
10
10
|
_input:
|
|
11
11
|
description: registered result from an Ansible task
|
ansible/plugins/test/regex.yml
CHANGED
ansible/plugins/test/search.yml
CHANGED
ansible/plugins/test/skip.yml
CHANGED
|
@@ -6,7 +6,7 @@ DOCUMENTATION:
|
|
|
6
6
|
aliases: [skip]
|
|
7
7
|
description:
|
|
8
8
|
- Tests if task was skipped
|
|
9
|
-
- This test checks for the
|
|
9
|
+
- This test checks for the existence of a C(skipped) key in the input dictionary and that it is V(True) if present
|
|
10
10
|
options:
|
|
11
11
|
_input:
|
|
12
12
|
description: registered result from an Ansible task
|
ansible/plugins/test/skipped.yml
CHANGED
|
@@ -6,7 +6,7 @@ DOCUMENTATION:
|
|
|
6
6
|
aliases: [skip]
|
|
7
7
|
description:
|
|
8
8
|
- Tests if task was skipped
|
|
9
|
-
- This test checks for the
|
|
9
|
+
- This test checks for the existence of a C(skipped) key in the input dictionary and that it is V(True) if present
|
|
10
10
|
options:
|
|
11
11
|
_input:
|
|
12
12
|
description: registered result from an Ansible task
|
ansible/plugins/test/started.yml
CHANGED
|
@@ -5,7 +5,7 @@ DOCUMENTATION:
|
|
|
5
5
|
short_description: Was async task started
|
|
6
6
|
description:
|
|
7
7
|
- Used to check if an async task has started, will also work with non async tasks but will issue a warning.
|
|
8
|
-
- This test checks for the
|
|
8
|
+
- This test checks for the existence of a C(started) key in the input dictionary and that it is V(1) if present
|
|
9
9
|
options:
|
|
10
10
|
_input:
|
|
11
11
|
description: registered result from an Ansible task
|
|
@@ -6,7 +6,7 @@ DOCUMENTATION:
|
|
|
6
6
|
aliases: [succeeded, successful]
|
|
7
7
|
description:
|
|
8
8
|
- Tests if task finished successfully, opposite of C(failed).
|
|
9
|
-
- This test checks for the
|
|
9
|
+
- This test checks for the existence of a C(failed) key in the input dictionary and that it is V(False) if present
|
|
10
10
|
options:
|
|
11
11
|
_input:
|
|
12
12
|
description: registered result from an Ansible task
|
ansible/plugins/test/success.yml
CHANGED
|
@@ -6,7 +6,7 @@ DOCUMENTATION:
|
|
|
6
6
|
aliases: [succeeded, successful]
|
|
7
7
|
description:
|
|
8
8
|
- Tests if task finished successfully, opposite of C(failed).
|
|
9
|
-
- This test checks for the
|
|
9
|
+
- This test checks for the existence of a C(failed) key in the input dictionary and that it is V(False) if present
|
|
10
10
|
options:
|
|
11
11
|
_input:
|
|
12
12
|
description: registered result from an Ansible task
|
|
@@ -6,7 +6,7 @@ DOCUMENTATION:
|
|
|
6
6
|
aliases: [succeeded, successful]
|
|
7
7
|
description:
|
|
8
8
|
- Tests if task finished successfully, opposite of C(failed).
|
|
9
|
-
- This test checks for the
|
|
9
|
+
- This test checks for the existence of a C(failed) key in the input dictionary and that it is V(False) if present
|
|
10
10
|
options:
|
|
11
11
|
_input:
|
|
12
12
|
description: registered result from an Ansible task
|
|
@@ -5,7 +5,7 @@ DOCUMENTATION:
|
|
|
5
5
|
short_description: Did task end due to the host was unreachable
|
|
6
6
|
description:
|
|
7
7
|
- Tests if task was not able to reach the host for execution
|
|
8
|
-
- This test checks for the
|
|
8
|
+
- This test checks for the existence of a C(unreachable) key in the input dictionary and that it's value is V(True)
|
|
9
9
|
options:
|
|
10
10
|
_input:
|
|
11
11
|
description: registered result from an Ansible task
|
ansible/plugins/test/uri.py
CHANGED
ansible/plugins/vars/__init__.py
CHANGED
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
#
|
|
16
16
|
# You should have received a copy of the GNU General Public License
|
|
17
17
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
-
from __future__ import
|
|
19
|
-
__metaclass__ = type
|
|
18
|
+
from __future__ import annotations
|
|
20
19
|
|
|
21
20
|
from ansible.plugins import AnsiblePlugin
|
|
22
21
|
from ansible.utils.path import basedir
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
# You should have received a copy of the GNU General Public License
|
|
16
16
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
#############################################
|
|
18
|
-
from __future__ import
|
|
19
|
-
__metaclass__ = type
|
|
18
|
+
from __future__ import annotations
|
|
20
19
|
|
|
21
20
|
DOCUMENTATION = '''
|
|
22
21
|
name: host_group_vars
|
|
@@ -74,7 +73,7 @@ class VarsModule(BaseVarsPlugin):
|
|
|
74
73
|
|
|
75
74
|
def load_found_files(self, loader, data, found_files):
|
|
76
75
|
for found in found_files:
|
|
77
|
-
new_data = loader.load_from_file(found, cache=
|
|
76
|
+
new_data = loader.load_from_file(found, cache='all', unsafe=True)
|
|
78
77
|
if new_data: # ignore empty files
|
|
79
78
|
data = combine_vars(data, new_data)
|
|
80
79
|
return data
|
ansible/release.py
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
# You should have received a copy of the GNU General Public License
|
|
16
16
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
from __future__ import (absolute_import, division, print_function)
|
|
20
|
-
__metaclass__ = type
|
|
18
|
+
from __future__ import annotations
|
|
21
19
|
|
|
22
|
-
__version__ = '2.
|
|
20
|
+
__version__ = '2.17.0'
|
|
23
21
|
__author__ = 'Ansible, Inc.'
|
|
24
|
-
__codename__ = "
|
|
22
|
+
__codename__ = "Gallows Pole"
|
ansible/template/__init__.py
CHANGED
|
@@ -15,12 +15,11 @@
|
|
|
15
15
|
# You should have received a copy of the GNU General Public License
|
|
16
16
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
from __future__ import (absolute_import, division, print_function)
|
|
20
|
-
__metaclass__ = type
|
|
18
|
+
from __future__ import annotations
|
|
21
19
|
|
|
22
20
|
import ast
|
|
23
21
|
import datetime
|
|
22
|
+
import functools
|
|
24
23
|
import os
|
|
25
24
|
import pwd
|
|
26
25
|
import re
|
|
@@ -297,23 +296,7 @@ def _unroll_iterator(func):
|
|
|
297
296
|
return list(ret)
|
|
298
297
|
return ret
|
|
299
298
|
|
|
300
|
-
return
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
def _update_wrapper(wrapper, func):
|
|
304
|
-
# This code is duplicated from ``functools.update_wrapper`` from Py3.7.
|
|
305
|
-
# ``functools.update_wrapper`` was failing when the func was ``functools.partial``
|
|
306
|
-
for attr in ('__module__', '__name__', '__qualname__', '__doc__', '__annotations__'):
|
|
307
|
-
try:
|
|
308
|
-
value = getattr(func, attr)
|
|
309
|
-
except AttributeError:
|
|
310
|
-
pass
|
|
311
|
-
else:
|
|
312
|
-
setattr(wrapper, attr, value)
|
|
313
|
-
for attr in ('__dict__',):
|
|
314
|
-
getattr(wrapper, attr).update(getattr(func, attr, {}))
|
|
315
|
-
wrapper.__wrapped__ = func
|
|
316
|
-
return wrapper
|
|
299
|
+
return functools.update_wrapper(wrapper, func)
|
|
317
300
|
|
|
318
301
|
|
|
319
302
|
def _wrap_native_text(func):
|
|
@@ -326,7 +309,7 @@ def _wrap_native_text(func):
|
|
|
326
309
|
ret = func(*args, **kwargs)
|
|
327
310
|
return NativeJinjaText(ret)
|
|
328
311
|
|
|
329
|
-
return
|
|
312
|
+
return functools.update_wrapper(wrapper, func)
|
|
330
313
|
|
|
331
314
|
|
|
332
315
|
class AnsibleUndefined(StrictUndefined):
|
|
@@ -493,7 +476,7 @@ class JinjaPluginIntercept(MutableMapping):
|
|
|
493
476
|
self._seen_it.remove(key)
|
|
494
477
|
raise TemplateSyntaxError('Could not load "%s": %s' % (key, to_native(original_exc or e)), 0)
|
|
495
478
|
|
|
496
|
-
# if i do have func and it is a filter, it
|
|
479
|
+
# if i do have func and it is a filter, it needs wrapping
|
|
497
480
|
if self._pluginloader.type == 'filter':
|
|
498
481
|
# filter need wrapping
|
|
499
482
|
if key in C.STRING_TYPE_FILTERS:
|
|
@@ -1039,12 +1022,16 @@ class Templar:
|
|
|
1039
1022
|
if unsafe:
|
|
1040
1023
|
res = wrap_var(res)
|
|
1041
1024
|
return res
|
|
1042
|
-
except
|
|
1025
|
+
except UndefinedError as e:
|
|
1043
1026
|
if fail_on_undefined:
|
|
1044
|
-
raise AnsibleUndefinedVariable(e
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1027
|
+
raise AnsibleUndefinedVariable(e)
|
|
1028
|
+
display.debug("Ignoring undefined failure: %s" % to_text(e))
|
|
1029
|
+
return data
|
|
1030
|
+
except AnsibleUndefinedVariable as e:
|
|
1031
|
+
if fail_on_undefined:
|
|
1032
|
+
raise
|
|
1033
|
+
display.debug("Ignoring undefined failure: %s" % to_text(e))
|
|
1034
|
+
return data
|
|
1048
1035
|
|
|
1049
1036
|
# for backwards compatibility in case anyone is using old private method directly
|
|
1050
1037
|
_do_template = do_template
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# Copyright: (c) 2018, Ansible Project
|
|
2
2
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
from __future__ import (absolute_import, division, print_function)
|
|
6
|
-
__metaclass__ = type
|
|
4
|
+
from __future__ import annotations
|
|
7
5
|
|
|
8
6
|
|
|
9
7
|
import ast
|
ansible/template/template.py
CHANGED
|
@@ -15,9 +15,7 @@
|
|
|
15
15
|
# You should have received a copy of the GNU General Public License
|
|
16
16
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
from __future__ import (absolute_import, division, print_function)
|
|
20
|
-
__metaclass__ = type
|
|
18
|
+
from __future__ import annotations
|
|
21
19
|
|
|
22
20
|
from jinja2.nativetypes import NativeTemplate
|
|
23
21
|
|
ansible/template/vars.py
CHANGED
ansible/utils/__init__.py
CHANGED
|
@@ -15,6 +15,4 @@
|
|
|
15
15
|
# You should have received a copy of the GNU General Public License
|
|
16
16
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
from __future__ import (absolute_import, division, print_function)
|
|
20
|
-
__metaclass__ = type
|
|
18
|
+
from __future__ import annotations
|
ansible/utils/cmd_functions.py
CHANGED
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
# You should have received a copy of the GNU General Public License
|
|
16
16
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
from __future__ import
|
|
19
|
-
__metaclass__ = type
|
|
18
|
+
from __future__ import annotations
|
|
20
19
|
|
|
21
20
|
import os
|
|
22
21
|
import select
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
# CAUTION: This implementation of the collection loader is used by ansible-test.
|
|
5
5
|
# Because of this, it must be compatible with all Python versions supported on the controller or remote.
|
|
6
6
|
|
|
7
|
-
from __future__ import
|
|
8
|
-
__metaclass__ = type
|
|
7
|
+
from __future__ import annotations
|
|
9
8
|
|
|
10
9
|
# FIXME: decide what of this we want to actually be public/toplevel, put other stuff on a utility class?
|
|
11
10
|
from ._collection_config import AnsibleCollectionConfig
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
# CAUTION: This implementation of the collection loader is used by ansible-test.
|
|
5
5
|
# Because of this, it must be compatible with all Python versions supported on the controller or remote.
|
|
6
6
|
|
|
7
|
-
from __future__ import
|
|
8
|
-
__metaclass__ = type
|
|
7
|
+
from __future__ import annotations
|
|
9
8
|
|
|
10
9
|
from ansible.module_utils.common.text.converters import to_text
|
|
11
10
|
from ansible.module_utils.six import add_metaclass
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
# CAUTION: This implementation of the collection loader is used by ansible-test.
|
|
5
5
|
# Because of this, it must be compatible with all Python versions supported on the controller or remote.
|
|
6
6
|
|
|
7
|
-
from __future__ import
|
|
8
|
-
__metaclass__ = type
|
|
7
|
+
from __future__ import annotations
|
|
9
8
|
|
|
10
9
|
import itertools
|
|
11
10
|
import os
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
# CAUTION: This implementation of the collection loader is used by ansible-test.
|
|
5
5
|
# Because of this, it must be compatible with all Python versions supported on the controller or remote.
|
|
6
6
|
|
|
7
|
-
from __future__ import
|
|
8
|
-
__metaclass__ = type
|
|
7
|
+
from __future__ import annotations
|
|
9
8
|
|
|
10
9
|
try:
|
|
11
10
|
from collections.abc import Mapping
|
ansible/utils/color.py
CHANGED
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
#
|
|
15
15
|
# You should have received a copy of the GNU General Public License
|
|
16
16
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
-
from __future__ import
|
|
18
|
-
__metaclass__ = type
|
|
17
|
+
from __future__ import annotations
|
|
19
18
|
|
|
20
19
|
import re
|
|
21
20
|
import sys
|
ansible/utils/context_objects.py
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
# Copyright: (c) 2018, Ansible Project
|
|
2
2
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
3
3
|
|
|
4
|
-
# Make coding more python3-ish
|
|
5
|
-
from __future__ import (absolute_import, division, print_function)
|
|
6
|
-
__metaclass__ = type
|
|
7
|
-
|
|
8
4
|
"""
|
|
9
5
|
Hold command line arguments for use in other modules
|
|
10
6
|
"""
|
|
7
|
+
from __future__ import annotations
|
|
11
8
|
|
|
12
9
|
from abc import ABCMeta
|
|
13
10
|
from collections.abc import Container, Mapping, Sequence, Set
|