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
ansible/modules/set_fact.py
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
# Copyright: (c) 2013, Dag Wieers (@dagwieers) <dag@wieers.com>
|
|
4
4
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
5
5
|
|
|
6
|
-
from __future__ import
|
|
7
|
-
__metaclass__ = type
|
|
6
|
+
from __future__ import annotations
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
DOCUMENTATION = r'''
|
ansible/modules/set_stats.py
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
# Copyright: (c) 2016, Ansible RedHat, Inc
|
|
4
4
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
5
5
|
|
|
6
|
-
from __future__ import
|
|
7
|
-
__metaclass__ = type
|
|
6
|
+
from __future__ import annotations
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
DOCUMENTATION = r'''
|
ansible/modules/setup.py
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
|
|
4
4
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
5
5
|
|
|
6
|
-
from __future__ import
|
|
7
|
-
__metaclass__ = type
|
|
6
|
+
from __future__ import annotations
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
DOCUMENTATION = '''
|
ansible/modules/shell.py
CHANGED
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
# it runs the 'command' module with special arguments and it behaves differently.
|
|
8
8
|
# See the command source and the comment "#USE_SHELL".
|
|
9
9
|
|
|
10
|
-
from __future__ import
|
|
11
|
-
__metaclass__ = type
|
|
10
|
+
from __future__ import annotations
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
DOCUMENTATION = r'''
|
ansible/modules/slurp.py
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
|
|
4
4
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
5
5
|
|
|
6
|
-
from __future__ import
|
|
7
|
-
__metaclass__ = type
|
|
6
|
+
from __future__ import annotations
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
DOCUMENTATION = r'''
|
ansible/modules/stat.py
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
# Copyright: (c) 2017, Ansible Project
|
|
3
3
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
4
4
|
|
|
5
|
-
from __future__ import
|
|
6
|
-
__metaclass__ = type
|
|
5
|
+
from __future__ import annotations
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
DOCUMENTATION = r'''
|
ansible/modules/subversion.py
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
# Copyright: (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
|
|
4
4
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
5
5
|
|
|
6
|
-
from __future__ import
|
|
7
|
-
__metaclass__ = type
|
|
6
|
+
from __future__ import annotations
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
DOCUMENTATION = '''
|
|
@@ -142,7 +141,7 @@ from ansible.module_utils.compat.version import LooseVersion
|
|
|
142
141
|
class Subversion(object):
|
|
143
142
|
|
|
144
143
|
# Example text matched by the regexp:
|
|
145
|
-
# Révision
|
|
144
|
+
# Révision : 1889134
|
|
146
145
|
# 版本: 1889134
|
|
147
146
|
# Revision: 1889134
|
|
148
147
|
REVISION_RE = r'^\w+\s?:\s+\d+$'
|
ansible/modules/systemd.py
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
# Copyright: (c) 2016, Brian Coca <bcoca@ansible.com>
|
|
4
4
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
5
5
|
|
|
6
|
-
from __future__ import
|
|
7
|
-
__metaclass__ = type
|
|
6
|
+
from __future__ import annotations
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
DOCUMENTATION = '''
|
|
@@ -15,6 +14,8 @@ version_added: "2.2"
|
|
|
15
14
|
short_description: Manage systemd units
|
|
16
15
|
description:
|
|
17
16
|
- Controls systemd units (services, timers, and so on) on remote hosts.
|
|
17
|
+
- M(ansible.builtin.systemd) is renamed to M(ansible.builtin.systemd_service) to better reflect the scope of the module.
|
|
18
|
+
M(ansible.builtin.systemd) is kept as an alias for backward compatibility.
|
|
18
19
|
options:
|
|
19
20
|
name:
|
|
20
21
|
description:
|
|
@@ -28,11 +29,13 @@ options:
|
|
|
28
29
|
- V(started)/V(stopped) are idempotent actions that will not run commands unless necessary.
|
|
29
30
|
V(restarted) will always bounce the unit.
|
|
30
31
|
V(reloaded) will always reload and if the service is not running at the moment of the reload, it is started.
|
|
32
|
+
- If set, requires O(name).
|
|
31
33
|
type: str
|
|
32
34
|
choices: [ reloaded, restarted, started, stopped ]
|
|
33
35
|
enabled:
|
|
34
36
|
description:
|
|
35
37
|
- Whether the unit should start on boot. B(At least one of state and enabled are required.)
|
|
38
|
+
- If set, requires O(name).
|
|
36
39
|
type: bool
|
|
37
40
|
force:
|
|
38
41
|
description:
|
|
@@ -41,7 +44,8 @@ options:
|
|
|
41
44
|
version_added: 2.6
|
|
42
45
|
masked:
|
|
43
46
|
description:
|
|
44
|
-
- Whether the unit should be masked or not
|
|
47
|
+
- Whether the unit should be masked or not. A masked unit is impossible to start.
|
|
48
|
+
- If set, requires O(name).
|
|
45
49
|
type: bool
|
|
46
50
|
daemon_reload:
|
|
47
51
|
description:
|
|
@@ -64,7 +68,7 @@ options:
|
|
|
64
68
|
- "For systemd to work with 'user', the executing user must have its own instance of dbus started and accessible (systemd requirement)."
|
|
65
69
|
- "The user dbus process is normally started during normal login, but not during the run of Ansible tasks.
|
|
66
70
|
Otherwise you will probably get a 'Failed to connect to bus: no such file or directory' error."
|
|
67
|
-
- The user must have access, normally given via setting the C(XDG_RUNTIME_DIR) variable, see example below.
|
|
71
|
+
- The user must have access, normally given via setting the C(XDG_RUNTIME_DIR) variable, see the example below.
|
|
68
72
|
|
|
69
73
|
type: str
|
|
70
74
|
choices: [ system, user, global ]
|
|
@@ -86,12 +90,11 @@ attributes:
|
|
|
86
90
|
platform:
|
|
87
91
|
platforms: posix
|
|
88
92
|
notes:
|
|
89
|
-
-
|
|
90
|
-
and all except O(daemon_reload) and (O(daemon_reexec) since 2.8) also require O(name).
|
|
93
|
+
- O(state), O(enabled), O(masked) requires O(name).
|
|
91
94
|
- Before 2.4 you always required O(name).
|
|
92
|
-
- Globs are not supported in name,
|
|
93
|
-
- The service names might vary by specific OS/distribution
|
|
94
|
-
- The order of execution when having multiple properties is to first enable/disable, then mask/unmask and then deal with service state.
|
|
95
|
+
- Globs are not supported in name, in other words, C(postgres*.service).
|
|
96
|
+
- The service names might vary by specific OS/distribution.
|
|
97
|
+
- The order of execution when having multiple properties is to first enable/disable, then mask/unmask and then deal with the service state.
|
|
95
98
|
It has been reported that systemctl can behave differently depending on the order of operations if you do the same manually.
|
|
96
99
|
requirements:
|
|
97
100
|
- A system managed by systemd.
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
# Copyright: (c) 2016, Brian Coca <bcoca@ansible.com>
|
|
4
4
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
5
5
|
|
|
6
|
-
from __future__ import
|
|
7
|
-
__metaclass__ = type
|
|
6
|
+
from __future__ import annotations
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
DOCUMENTATION = '''
|
|
@@ -15,6 +14,8 @@ version_added: "2.2"
|
|
|
15
14
|
short_description: Manage systemd units
|
|
16
15
|
description:
|
|
17
16
|
- Controls systemd units (services, timers, and so on) on remote hosts.
|
|
17
|
+
- M(ansible.builtin.systemd) is renamed to M(ansible.builtin.systemd_service) to better reflect the scope of the module.
|
|
18
|
+
M(ansible.builtin.systemd) is kept as an alias for backward compatibility.
|
|
18
19
|
options:
|
|
19
20
|
name:
|
|
20
21
|
description:
|
|
@@ -28,11 +29,13 @@ options:
|
|
|
28
29
|
- V(started)/V(stopped) are idempotent actions that will not run commands unless necessary.
|
|
29
30
|
V(restarted) will always bounce the unit.
|
|
30
31
|
V(reloaded) will always reload and if the service is not running at the moment of the reload, it is started.
|
|
32
|
+
- If set, requires O(name).
|
|
31
33
|
type: str
|
|
32
34
|
choices: [ reloaded, restarted, started, stopped ]
|
|
33
35
|
enabled:
|
|
34
36
|
description:
|
|
35
37
|
- Whether the unit should start on boot. B(At least one of state and enabled are required.)
|
|
38
|
+
- If set, requires O(name).
|
|
36
39
|
type: bool
|
|
37
40
|
force:
|
|
38
41
|
description:
|
|
@@ -41,7 +44,8 @@ options:
|
|
|
41
44
|
version_added: 2.6
|
|
42
45
|
masked:
|
|
43
46
|
description:
|
|
44
|
-
- Whether the unit should be masked or not
|
|
47
|
+
- Whether the unit should be masked or not. A masked unit is impossible to start.
|
|
48
|
+
- If set, requires O(name).
|
|
45
49
|
type: bool
|
|
46
50
|
daemon_reload:
|
|
47
51
|
description:
|
|
@@ -64,7 +68,7 @@ options:
|
|
|
64
68
|
- "For systemd to work with 'user', the executing user must have its own instance of dbus started and accessible (systemd requirement)."
|
|
65
69
|
- "The user dbus process is normally started during normal login, but not during the run of Ansible tasks.
|
|
66
70
|
Otherwise you will probably get a 'Failed to connect to bus: no such file or directory' error."
|
|
67
|
-
- The user must have access, normally given via setting the C(XDG_RUNTIME_DIR) variable, see example below.
|
|
71
|
+
- The user must have access, normally given via setting the C(XDG_RUNTIME_DIR) variable, see the example below.
|
|
68
72
|
|
|
69
73
|
type: str
|
|
70
74
|
choices: [ system, user, global ]
|
|
@@ -86,12 +90,11 @@ attributes:
|
|
|
86
90
|
platform:
|
|
87
91
|
platforms: posix
|
|
88
92
|
notes:
|
|
89
|
-
-
|
|
90
|
-
and all except O(daemon_reload) and (O(daemon_reexec) since 2.8) also require O(name).
|
|
93
|
+
- O(state), O(enabled), O(masked) requires O(name).
|
|
91
94
|
- Before 2.4 you always required O(name).
|
|
92
|
-
- Globs are not supported in name,
|
|
93
|
-
- The service names might vary by specific OS/distribution
|
|
94
|
-
- The order of execution when having multiple properties is to first enable/disable, then mask/unmask and then deal with service state.
|
|
95
|
+
- Globs are not supported in name, in other words, C(postgres*.service).
|
|
96
|
+
- The service names might vary by specific OS/distribution.
|
|
97
|
+
- The order of execution when having multiple properties is to first enable/disable, then mask/unmask and then deal with the service state.
|
|
95
98
|
It has been reported that systemctl can behave differently depending on the order of operations if you do the same manually.
|
|
96
99
|
requirements:
|
|
97
100
|
- A system managed by systemd.
|
ansible/modules/sysvinit.py
CHANGED
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
# (c) 2017 Ansible Project
|
|
5
5
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
6
6
|
|
|
7
|
-
from __future__ import
|
|
8
|
-
__metaclass__ = type
|
|
7
|
+
from __future__ import annotations
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
DOCUMENTATION = '''
|
|
@@ -87,6 +86,12 @@ EXAMPLES = '''
|
|
|
87
86
|
state: started
|
|
88
87
|
enabled: yes
|
|
89
88
|
|
|
89
|
+
- name: Sleep for 5 seconds between stop and start command of badly behaving service
|
|
90
|
+
ansible.builtin.sysvinit:
|
|
91
|
+
name: apache2
|
|
92
|
+
state: restarted
|
|
93
|
+
sleep: 5
|
|
94
|
+
|
|
90
95
|
- name: Make sure apache2 is started on runlevels 3 and 5
|
|
91
96
|
ansible.builtin.sysvinit:
|
|
92
97
|
name: apache2
|
ansible/modules/tempfile.py
CHANGED
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
# Copyright: (c) 2017, Ansible Project
|
|
5
5
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
6
6
|
|
|
7
|
-
from __future__ import
|
|
8
|
-
__metaclass__ = type
|
|
7
|
+
from __future__ import annotations
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
DOCUMENTATION = '''
|
|
@@ -68,6 +67,12 @@ EXAMPLES = """
|
|
|
68
67
|
suffix: temp
|
|
69
68
|
register: tempfile_1
|
|
70
69
|
|
|
70
|
+
- name: Create a temporary file with a specific prefix
|
|
71
|
+
ansible.builtin.tempfile:
|
|
72
|
+
state: file
|
|
73
|
+
suffix: txt
|
|
74
|
+
prefix: myfile_
|
|
75
|
+
|
|
71
76
|
- name: Use the registered var and the file module to remove the temporary file
|
|
72
77
|
ansible.builtin.file:
|
|
73
78
|
path: "{{ tempfile_1.path }}"
|
ansible/modules/template.py
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
# This is a virtual module that is entirely implemented as an action plugin and runs on the controller
|
|
7
7
|
|
|
8
|
-
from __future__ import
|
|
9
|
-
__metaclass__ = type
|
|
8
|
+
from __future__ import annotations
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
DOCUMENTATION = r'''
|
|
@@ -86,7 +85,7 @@ EXAMPLES = r'''
|
|
|
86
85
|
dest: /etc/named.conf
|
|
87
86
|
group: named
|
|
88
87
|
setype: named_conf_t
|
|
89
|
-
mode: 0640
|
|
88
|
+
mode: '0640'
|
|
90
89
|
|
|
91
90
|
- name: Create a DOS-style text file from a template
|
|
92
91
|
ansible.builtin.template:
|
ansible/modules/unarchive.py
CHANGED
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
# Copyright: (c) 2017, Ansible Project
|
|
8
8
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
9
9
|
|
|
10
|
-
from __future__ import
|
|
11
|
-
__metaclass__ = type
|
|
10
|
+
from __future__ import annotations
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
DOCUMENTATION = r'''
|
|
@@ -283,6 +282,7 @@ MISSING_FILE_RE = re.compile(r': Warning: Cannot stat: No such file or directory
|
|
|
283
282
|
ZIP_FILE_MODE_RE = re.compile(r'([r-][w-][SsTtx-]){3}')
|
|
284
283
|
INVALID_OWNER_RE = re.compile(r': Invalid owner')
|
|
285
284
|
INVALID_GROUP_RE = re.compile(r': Invalid group')
|
|
285
|
+
SYMLINK_DIFF_RE = re.compile(r': Symlink differs$')
|
|
286
286
|
|
|
287
287
|
|
|
288
288
|
def crc32(path, buffer_size):
|
|
@@ -500,7 +500,8 @@ class ZipArchive(object):
|
|
|
500
500
|
continue
|
|
501
501
|
|
|
502
502
|
# Check first and seventh field in order to skip header/footer
|
|
503
|
-
|
|
503
|
+
# 7 or 8 are FAT, 10 is normal unix perms
|
|
504
|
+
if len(pcs[0]) not in (7, 8, 10):
|
|
504
505
|
continue
|
|
505
506
|
if len(pcs[6]) != 15:
|
|
506
507
|
continue
|
|
@@ -552,6 +553,12 @@ class ZipArchive(object):
|
|
|
552
553
|
else:
|
|
553
554
|
permstr = 'rw-rw-rw-'
|
|
554
555
|
file_umask = umask
|
|
556
|
+
elif len(permstr) == 7:
|
|
557
|
+
if permstr == 'rwxa---':
|
|
558
|
+
permstr = 'rwxrwxrwx'
|
|
559
|
+
else:
|
|
560
|
+
permstr = 'rw-rw-rw-'
|
|
561
|
+
file_umask = umask
|
|
555
562
|
elif 'bsd' in systemtype.lower():
|
|
556
563
|
file_umask = umask
|
|
557
564
|
else:
|
|
@@ -880,6 +887,8 @@ class TgzArchive(object):
|
|
|
880
887
|
out += line + '\n'
|
|
881
888
|
if INVALID_GROUP_RE.search(line):
|
|
882
889
|
out += line + '\n'
|
|
890
|
+
if SYMLINK_DIFF_RE.search(line):
|
|
891
|
+
out += line + '\n'
|
|
883
892
|
if out:
|
|
884
893
|
unarchived = False
|
|
885
894
|
return dict(unarchived=unarchived, rc=rc, out=out, err=err, cmd=cmd)
|
|
@@ -969,6 +978,7 @@ class TarZstdArchive(TgzArchive):
|
|
|
969
978
|
class ZipZArchive(ZipArchive):
|
|
970
979
|
def __init__(self, src, b_dest, file_args, module):
|
|
971
980
|
super(ZipZArchive, self).__init__(src, b_dest, file_args, module)
|
|
981
|
+
# NOTE: adds 'l', which is default on most linux but not all implementations
|
|
972
982
|
self.zipinfoflag = '-Zl'
|
|
973
983
|
self.binaries = (
|
|
974
984
|
('unzip', 'cmd_path'),
|
ansible/modules/uri.py
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
# Copyright: (c) 2013, Romeo Theriault <romeot () hawaii.edu>
|
|
4
4
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
5
5
|
|
|
6
|
-
from __future__ import
|
|
7
|
-
__metaclass__ = type
|
|
6
|
+
from __future__ import annotations
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
DOCUMENTATION = r'''
|
|
@@ -109,13 +108,13 @@ options:
|
|
|
109
108
|
follow_redirects:
|
|
110
109
|
description:
|
|
111
110
|
- Whether or not the URI module should follow redirects.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
111
|
+
choices:
|
|
112
|
+
all: Will follow all redirects.
|
|
113
|
+
none: Will not follow any redirects.
|
|
114
|
+
safe: Only redirects doing GET or HEAD requests will be followed.
|
|
115
|
+
urllib2: Defer to urllib2 behavior (As of writing this follows HTTP redirects).
|
|
116
|
+
'no': (DEPRECATED, will be removed in the future version) alias of V(none).
|
|
117
|
+
'yes': (DEPRECATED, will be removed in the future version) alias of V(all).
|
|
119
118
|
type: str
|
|
120
119
|
default: safe
|
|
121
120
|
creates:
|
|
@@ -445,11 +444,10 @@ import json
|
|
|
445
444
|
import os
|
|
446
445
|
import re
|
|
447
446
|
import shutil
|
|
448
|
-
import sys
|
|
449
447
|
import tempfile
|
|
450
448
|
|
|
451
449
|
from ansible.module_utils.basic import AnsibleModule, sanitize_keys
|
|
452
|
-
from ansible.module_utils.six import
|
|
450
|
+
from ansible.module_utils.six import binary_type, iteritems, string_types
|
|
453
451
|
from ansible.module_utils.six.moves.urllib.parse import urlencode, urlsplit
|
|
454
452
|
from ansible.module_utils.common.text.converters import to_native, to_text
|
|
455
453
|
from ansible.module_utils.compat.datetime import utcnow, utcfromtimestamp
|
|
@@ -587,7 +585,7 @@ def uri(module, url, dest, body, body_format, method, headers, socket_timeout, c
|
|
|
587
585
|
method=method, timeout=socket_timeout, unix_socket=module.params['unix_socket'],
|
|
588
586
|
ca_path=ca_path, unredirected_headers=unredirected_headers,
|
|
589
587
|
use_proxy=module.params['use_proxy'], decompress=decompress,
|
|
590
|
-
ciphers=ciphers, use_netrc=use_netrc, **kwargs)
|
|
588
|
+
ciphers=ciphers, use_netrc=use_netrc, force=module.params['force'], **kwargs)
|
|
591
589
|
|
|
592
590
|
if src:
|
|
593
591
|
# Try to close the open file handle
|
|
@@ -721,7 +719,7 @@ def main():
|
|
|
721
719
|
|
|
722
720
|
if maybe_output:
|
|
723
721
|
try:
|
|
724
|
-
if
|
|
722
|
+
if r.fp is None or r.closed:
|
|
725
723
|
raise TypeError
|
|
726
724
|
content = r.read()
|
|
727
725
|
except (AttributeError, TypeError):
|
|
@@ -772,8 +770,7 @@ def main():
|
|
|
772
770
|
js = json.loads(u_content)
|
|
773
771
|
uresp['json'] = js
|
|
774
772
|
except Exception:
|
|
775
|
-
|
|
776
|
-
sys.exc_clear() # Avoid false positive traceback in fail_json() on Python 2
|
|
773
|
+
...
|
|
777
774
|
else:
|
|
778
775
|
u_content = None
|
|
779
776
|
|
ansible/modules/user.py
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
# Copyright: (c) 2012, Stephen Fromm <sfromm@gmail.com>
|
|
4
4
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
5
5
|
|
|
6
|
-
from __future__ import
|
|
7
|
-
__metaclass__ = type
|
|
6
|
+
from __future__ import annotations
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
DOCUMENTATION = r'''
|
|
@@ -73,8 +72,8 @@ options:
|
|
|
73
72
|
- Optionally set the user's shell.
|
|
74
73
|
- On macOS, before Ansible 2.5, the default shell for non-system users was V(/usr/bin/false).
|
|
75
74
|
Since Ansible 2.5, the default shell for non-system users on macOS is V(/bin/bash).
|
|
76
|
-
-
|
|
77
|
-
|
|
75
|
+
- On other operating systems, the default shell is determined by the underlying tool
|
|
76
|
+
invoked by this module. See Notes for a per platform list of invoked tools.
|
|
78
77
|
type: str
|
|
79
78
|
home:
|
|
80
79
|
description:
|
|
@@ -306,6 +305,11 @@ EXAMPLES = r'''
|
|
|
306
305
|
uid: 1040
|
|
307
306
|
group: admin
|
|
308
307
|
|
|
308
|
+
- name: Create a user 'johnd' with a home directory
|
|
309
|
+
ansible.builtin.user:
|
|
310
|
+
name: johnd
|
|
311
|
+
create_home: yes
|
|
312
|
+
|
|
309
313
|
- name: Add the user 'james' with a bash shell, appending the group 'admins' and 'developers' to the user's groups
|
|
310
314
|
ansible.builtin.user:
|
|
311
315
|
name: james
|
|
@@ -632,6 +636,9 @@ class User(object):
|
|
|
632
636
|
# sha512
|
|
633
637
|
if fields[1] == '6' and len(fields[-1]) != 86:
|
|
634
638
|
maybe_invalid = True
|
|
639
|
+
# yescrypt
|
|
640
|
+
if fields[1] == 'y' and len(fields[-1]) != 43:
|
|
641
|
+
maybe_invalid = True
|
|
635
642
|
else:
|
|
636
643
|
maybe_invalid = True
|
|
637
644
|
if maybe_invalid:
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
# Copyright 2021 Red Hat
|
|
4
4
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
5
5
|
|
|
6
|
-
from __future__ import
|
|
7
|
-
__metaclass__ = type
|
|
6
|
+
from __future__ import annotations
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
DOCUMENTATION = r'''
|
|
@@ -52,32 +51,32 @@ attributes:
|
|
|
52
51
|
EXAMPLES = r'''
|
|
53
52
|
- name: verify vars needed for this task file are present when included
|
|
54
53
|
ansible.builtin.validate_argument_spec:
|
|
55
|
-
argument_spec: '{{required_data}}'
|
|
54
|
+
argument_spec: '{{ required_data }}'
|
|
56
55
|
vars:
|
|
57
56
|
required_data:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
# unlike spec file, just put the options in directly
|
|
58
|
+
stuff:
|
|
59
|
+
description: stuff
|
|
60
|
+
type: str
|
|
61
|
+
choices: ['who', 'knows', 'what']
|
|
62
|
+
default: what
|
|
63
|
+
but:
|
|
64
|
+
description: i guess we need one
|
|
65
|
+
type: str
|
|
66
|
+
required: true
|
|
68
67
|
|
|
69
68
|
|
|
70
69
|
- name: verify vars needed for this task file are present when included, with spec from a spec file
|
|
71
70
|
ansible.builtin.validate_argument_spec:
|
|
72
|
-
|
|
71
|
+
argument_spec: "{{ (lookup('ansible.builtin.file', 'myargspec.yml') | from_yaml )['specname']['options'] }}"
|
|
73
72
|
|
|
74
73
|
|
|
75
74
|
- name: verify vars needed for next include and not from inside it, also with params i'll only define there
|
|
76
75
|
block:
|
|
77
76
|
- ansible.builtin.validate_argument_spec:
|
|
78
|
-
argument_spec: "{{lookup('ansible.builtin.file', 'nakedoptions.yml'}}"
|
|
77
|
+
argument_spec: "{{ lookup('ansible.builtin.file', 'nakedoptions.yml') }}"
|
|
79
78
|
provided_arguments:
|
|
80
|
-
|
|
79
|
+
but: "that i can define on the include itself, like in it's `vars:` keyword"
|
|
81
80
|
|
|
82
81
|
- name: the include itself
|
|
83
82
|
vars:
|
ansible/modules/wait_for.py
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
# Copyright: (c) 2012, Jeroen Hoekx <jeroen@hoekx.be>
|
|
4
4
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
5
5
|
|
|
6
|
-
from __future__ import
|
|
7
|
-
__metaclass__ = type
|
|
6
|
+
from __future__ import annotations
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
DOCUMENTATION = r'''
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
|
|
4
4
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
5
5
|
|
|
6
|
-
from __future__ import
|
|
7
|
-
__metaclass__ = type
|
|
6
|
+
from __future__ import annotations
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
DOCUMENTATION = r'''
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
#
|
|
5
5
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
6
6
|
|
|
7
|
-
from __future__ import
|
|
8
|
-
__metaclass__ = type
|
|
7
|
+
from __future__ import annotations
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
DOCUMENTATION = '''
|
|
@@ -67,7 +66,7 @@ options:
|
|
|
67
66
|
type: str
|
|
68
67
|
description:
|
|
69
68
|
description:
|
|
70
|
-
- A human
|
|
69
|
+
- A human-readable string describing the repository. This option corresponds to the "name" property in the repo file.
|
|
71
70
|
- This parameter is only required if O(state) is set to V(present).
|
|
72
71
|
type: str
|
|
73
72
|
enabled:
|
ansible/parsing/__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/parsing/ajson.py
CHANGED
|
@@ -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
|
import json
|
|
9
7
|
|
ansible/parsing/dataloader.py
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
# Copyright: (c) 2017, Ansible Project
|
|
3
3
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
from __future__ import (absolute_import, division, print_function)
|
|
7
|
-
__metaclass__ = type
|
|
5
|
+
from __future__ import annotations
|
|
8
6
|
|
|
9
7
|
import copy
|
|
10
8
|
import os
|
|
@@ -79,30 +77,43 @@ class DataLoader:
|
|
|
79
77
|
'''Backwards compat for now'''
|
|
80
78
|
return from_yaml(data, file_name, show_content, self._vault.secrets, json_only=json_only)
|
|
81
79
|
|
|
82
|
-
def load_from_file(self, file_name: str, cache:
|
|
83
|
-
'''
|
|
80
|
+
def load_from_file(self, file_name: str, cache: str = 'all', unsafe: bool = False, json_only: bool = False) -> t.Any:
|
|
81
|
+
'''
|
|
82
|
+
Loads data from a file, which can contain either JSON or YAML.
|
|
83
|
+
|
|
84
|
+
:param file_name: The name of the file to load data from.
|
|
85
|
+
:param cache: Options for caching: none|all|vaulted
|
|
86
|
+
:param unsafe: If True, returns the parsed data as-is without deep copying.
|
|
87
|
+
:param json_only: If True, only loads JSON data from the file.
|
|
88
|
+
:return: The loaded data, optionally deep-copied for safety.
|
|
89
|
+
'''
|
|
84
90
|
|
|
91
|
+
# Resolve the file name
|
|
85
92
|
file_name = self.path_dwim(file_name)
|
|
93
|
+
|
|
94
|
+
# Log the file being loaded
|
|
86
95
|
display.debug("Loading data from %s" % file_name)
|
|
87
96
|
|
|
88
|
-
# if the file has
|
|
89
|
-
|
|
90
|
-
if cache and file_name in self._FILE_CACHE:
|
|
97
|
+
# Check if the file has been cached and use the cached data if available
|
|
98
|
+
if cache != 'none' and file_name in self._FILE_CACHE:
|
|
91
99
|
parsed_data = self._FILE_CACHE[file_name]
|
|
92
100
|
else:
|
|
93
|
-
#
|
|
101
|
+
# Read the file contents and load the data structure from them
|
|
94
102
|
(b_file_data, show_content) = self._get_file_contents(file_name)
|
|
95
103
|
|
|
96
104
|
file_data = to_text(b_file_data, errors='surrogate_or_strict')
|
|
97
105
|
parsed_data = self.load(data=file_data, file_name=file_name, show_content=show_content, json_only=json_only)
|
|
98
106
|
|
|
99
|
-
#
|
|
100
|
-
|
|
107
|
+
# Cache the file contents for next time based on the cache option
|
|
108
|
+
if cache == 'all':
|
|
109
|
+
self._FILE_CACHE[file_name] = parsed_data
|
|
110
|
+
elif cache == 'vaulted' and not show_content:
|
|
111
|
+
self._FILE_CACHE[file_name] = parsed_data
|
|
101
112
|
|
|
113
|
+
# Return the parsed data, optionally deep-copied for safety
|
|
102
114
|
if unsafe:
|
|
103
115
|
return parsed_data
|
|
104
116
|
else:
|
|
105
|
-
# return a deep copy here, so the cache is not affected
|
|
106
117
|
return copy.deepcopy(parsed_data)
|
|
107
118
|
|
|
108
119
|
def path_exists(self, path: str) -> bool:
|