ansible-core 2.15.4rc1__py3-none-any.whl → 2.16.0b2__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/cli/__init__.py +3 -3
- ansible/cli/adhoc.py +1 -1
- ansible/cli/arguments/option_helpers.py +15 -5
- ansible/cli/config.py +2 -2
- ansible/cli/console.py +21 -17
- ansible/cli/doc.py +8 -9
- ansible/cli/galaxy.py +60 -27
- ansible/cli/inventory.py +1 -1
- ansible/cli/playbook.py +1 -1
- ansible/cli/pull.py +2 -2
- ansible/cli/scripts/ansible_connection_cli_stub.py +1 -1
- ansible/cli/vault.py +11 -6
- ansible/collections/__init__.py +0 -29
- ansible/collections/list.py +23 -44
- ansible/config/ansible_builtin_runtime.yml +8 -4
- ansible/config/base.yml +34 -22
- ansible/config/manager.py +1 -1
- ansible/constants.py +3 -5
- ansible/errors/__init__.py +1 -1
- ansible/executor/interpreter_discovery.py +1 -1
- ansible/executor/module_common.py +39 -32
- ansible/executor/play_iterator.py +0 -15
- ansible/executor/playbook_executor.py +3 -3
- ansible/executor/powershell/module_manifest.py +1 -1
- ansible/executor/powershell/module_wrapper.ps1 +4 -1
- ansible/executor/process/worker.py +22 -7
- ansible/executor/task_executor.py +39 -40
- ansible/executor/task_queue_manager.py +8 -11
- ansible/galaxy/__init__.py +1 -1
- ansible/galaxy/api.py +8 -11
- ansible/galaxy/collection/__init__.py +17 -4
- ansible/galaxy/collection/concrete_artifact_manager.py +7 -2
- ansible/galaxy/collection/galaxy_api_proxy.py +1 -1
- ansible/galaxy/data/container/README.md +3 -5
- ansible/galaxy/dependency_resolution/__init__.py +1 -6
- ansible/galaxy/dependency_resolution/dataclasses.py +22 -1
- ansible/galaxy/dependency_resolution/providers.py +61 -69
- ansible/galaxy/role.py +31 -13
- ansible/galaxy/token.py +2 -2
- ansible/inventory/group.py +1 -1
- ansible/inventory/manager.py +1 -1
- ansible/module_utils/ansible_release.py +2 -2
- ansible/module_utils/basic.py +11 -41
- ansible/module_utils/common/file.py +0 -100
- ansible/module_utils/common/json.py +1 -1
- ansible/module_utils/common/locale.py +1 -1
- ansible/module_utils/common/text/converters.py +2 -2
- ansible/module_utils/common/validation.py +1 -1
- ansible/module_utils/compat/_selectors2.py +4 -4
- ansible/module_utils/compat/datetime.py +40 -0
- ansible/module_utils/compat/selinux.py +1 -1
- ansible/module_utils/compat/typing.py +1 -1
- ansible/module_utils/connection.py +1 -1
- ansible/module_utils/facts/hardware/linux.py +2 -2
- ansible/module_utils/facts/hardware/openbsd.py +1 -1
- ansible/module_utils/facts/network/linux.py +3 -3
- ansible/module_utils/facts/other/facter.py +8 -15
- ansible/module_utils/facts/sysctl.py +1 -1
- ansible/module_utils/facts/system/date_time.py +2 -2
- ansible/module_utils/facts/system/distribution.py +1 -1
- ansible/module_utils/facts/system/local.py +6 -2
- ansible/module_utils/facts/system/pkg_mgr.py +6 -1
- ansible/module_utils/facts/system/service_mgr.py +4 -2
- ansible/module_utils/parsing/convert_bool.py +1 -1
- ansible/module_utils/service.py +9 -6
- ansible/module_utils/urls.py +40 -22
- ansible/modules/add_host.py +2 -2
- ansible/modules/apt.py +48 -31
- ansible/modules/apt_key.py +4 -4
- ansible/modules/apt_repository.py +5 -5
- ansible/modules/assemble.py +7 -7
- ansible/modules/assert.py +1 -1
- ansible/modules/async_status.py +11 -7
- ansible/modules/async_wrapper.py +1 -1
- ansible/modules/blockinfile.py +60 -17
- ansible/modules/command.py +37 -15
- ansible/modules/copy.py +35 -30
- ansible/modules/cron.py +14 -14
- ansible/modules/deb822_repository.py +4 -3
- ansible/modules/debconf.py +35 -14
- ansible/modules/debug.py +1 -1
- ansible/modules/dnf.py +29 -27
- ansible/modules/dnf5.py +22 -22
- ansible/modules/dpkg_selections.py +9 -2
- ansible/modules/expect.py +4 -4
- ansible/modules/fetch.py +7 -7
- ansible/modules/file.py +30 -30
- ansible/modules/find.py +82 -22
- ansible/modules/gather_facts.py +6 -2
- ansible/modules/get_url.py +29 -29
- ansible/modules/getent.py +4 -4
- ansible/modules/git.py +27 -27
- ansible/modules/group.py +5 -12
- ansible/modules/hostname.py +21 -2
- ansible/modules/include_role.py +5 -5
- ansible/modules/include_tasks.py +2 -2
- ansible/modules/include_vars.py +5 -5
- ansible/modules/iptables.py +70 -65
- ansible/modules/known_hosts.py +7 -7
- ansible/modules/lineinfile.py +33 -33
- ansible/modules/meta.py +13 -13
- ansible/modules/package.py +8 -8
- ansible/modules/package_facts.py +3 -3
- ansible/modules/pause.py +2 -2
- ansible/modules/ping.py +5 -5
- ansible/modules/pip.py +80 -46
- ansible/modules/reboot.py +8 -4
- ansible/modules/replace.py +20 -15
- ansible/modules/rpm_key.py +2 -2
- ansible/modules/script.py +16 -10
- ansible/modules/service.py +26 -98
- ansible/modules/service_facts.py +36 -12
- ansible/modules/set_fact.py +2 -2
- ansible/modules/set_stats.py +2 -2
- ansible/modules/setup.py +18 -18
- ansible/modules/shell.py +3 -3
- ansible/modules/stat.py +9 -30
- ansible/modules/subversion.py +9 -9
- ansible/modules/systemd.py +20 -19
- ansible/modules/systemd_service.py +20 -19
- ansible/modules/sysvinit.py +26 -21
- ansible/modules/tempfile.py +5 -4
- ansible/modules/template.py +60 -6
- ansible/modules/unarchive.py +21 -18
- ansible/modules/uri.py +39 -39
- ansible/modules/user.py +81 -53
- ansible/modules/wait_for.py +22 -21
- ansible/modules/wait_for_connection.py +4 -4
- ansible/modules/yum.py +38 -38
- ansible/modules/yum_repository.py +58 -80
- ansible/parsing/dataloader.py +27 -27
- ansible/parsing/mod_args.py +1 -1
- ansible/parsing/plugin_docs.py +3 -3
- ansible/parsing/splitter.py +14 -16
- ansible/parsing/utils/yaml.py +1 -1
- ansible/parsing/vault/__init__.py +8 -6
- ansible/parsing/yaml/constructor.py +1 -1
- ansible/parsing/yaml/objects.py +1 -1
- ansible/playbook/__init__.py +1 -1
- ansible/playbook/base.py +2 -2
- ansible/playbook/block.py +0 -1
- ansible/playbook/conditional.py +40 -114
- ansible/playbook/helpers.py +5 -28
- ansible/playbook/included_file.py +8 -7
- ansible/playbook/play.py +1 -1
- ansible/playbook/play_context.py +2 -2
- ansible/playbook/playbook_include.py +2 -2
- ansible/playbook/role/__init__.py +1 -1
- ansible/playbook/role/include.py +1 -1
- ansible/playbook/role/metadata.py +1 -1
- ansible/playbook/role_include.py +1 -1
- ansible/playbook/task.py +2 -2
- ansible/playbook/task_include.py +1 -24
- ansible/plugins/__init__.py +13 -5
- ansible/plugins/action/__init__.py +17 -43
- ansible/plugins/action/add_host.py +2 -3
- ansible/plugins/action/assemble.py +1 -1
- ansible/plugins/action/assert.py +2 -1
- ansible/plugins/action/copy.py +2 -2
- ansible/plugins/action/debug.py +2 -1
- ansible/plugins/action/fail.py +1 -0
- ansible/plugins/action/fetch.py +3 -1
- ansible/plugins/action/gather_facts.py +37 -13
- ansible/plugins/action/group_by.py +1 -0
- ansible/plugins/action/include_vars.py +3 -2
- ansible/plugins/action/normal.py +3 -3
- ansible/plugins/action/pause.py +1 -1
- ansible/plugins/action/reboot.py +21 -16
- ansible/plugins/action/script.py +23 -8
- ansible/plugins/action/set_fact.py +1 -0
- ansible/plugins/action/set_stats.py +1 -0
- ansible/plugins/action/shell.py +6 -0
- ansible/plugins/action/template.py +1 -1
- ansible/plugins/action/unarchive.py +1 -1
- ansible/plugins/action/uri.py +1 -1
- ansible/plugins/action/validate_argument_spec.py +1 -0
- ansible/plugins/action/wait_for_connection.py +4 -4
- ansible/plugins/become/__init__.py +1 -1
- ansible/plugins/become/su.py +1 -1
- ansible/plugins/cache/__init__.py +1 -1
- ansible/plugins/callback/junit.py +1 -1
- ansible/plugins/callback/oneline.py +1 -1
- ansible/plugins/callback/tree.py +1 -1
- ansible/plugins/cliconf/__init__.py +2 -2
- ansible/plugins/connection/__init__.py +65 -37
- ansible/plugins/connection/local.py +9 -8
- ansible/plugins/connection/paramiko_ssh.py +34 -28
- ansible/plugins/connection/psrp.py +56 -43
- ansible/plugins/connection/ssh.py +67 -43
- ansible/plugins/connection/winrm.py +77 -30
- ansible/plugins/doc_fragments/constructed.py +4 -4
- ansible/plugins/doc_fragments/files.py +12 -12
- ansible/plugins/doc_fragments/inventory_cache.py +0 -6
- ansible/plugins/doc_fragments/result_format_callback.py +5 -5
- ansible/plugins/doc_fragments/shell_common.py +2 -2
- ansible/plugins/doc_fragments/shell_windows.py +1 -1
- ansible/plugins/doc_fragments/template_common.py +6 -6
- ansible/plugins/doc_fragments/url.py +10 -10
- ansible/plugins/doc_fragments/url_windows.py +15 -15
- ansible/plugins/doc_fragments/vars_plugin_staging.py +4 -4
- ansible/plugins/filter/b64decode.yml +1 -1
- ansible/plugins/filter/b64encode.yml +2 -2
- ansible/plugins/filter/bool.yml +5 -5
- ansible/plugins/filter/combine.yml +1 -1
- ansible/plugins/filter/commonpath.yml +2 -1
- ansible/plugins/filter/core.py +6 -8
- ansible/plugins/filter/dict2items.yml +11 -1
- ansible/plugins/filter/difference.yml +1 -0
- ansible/plugins/filter/encryption.py +1 -1
- ansible/plugins/filter/extract.yml +1 -1
- ansible/plugins/filter/flatten.yml +1 -1
- ansible/plugins/filter/from_yaml.yml +1 -1
- ansible/plugins/filter/from_yaml_all.yml +2 -2
- ansible/plugins/filter/hash.yml +1 -1
- ansible/plugins/filter/human_readable.yml +1 -1
- ansible/plugins/filter/human_to_bytes.yml +2 -2
- ansible/plugins/filter/intersect.yml +1 -0
- ansible/plugins/filter/mandatory.yml +7 -0
- ansible/plugins/filter/mathstuff.py +15 -17
- ansible/plugins/filter/normpath.yml +1 -1
- ansible/plugins/filter/path_join.yml +8 -1
- ansible/plugins/filter/realpath.yml +3 -2
- ansible/plugins/filter/regex_findall.yml +8 -2
- ansible/plugins/filter/regex_replace.yml +9 -3
- ansible/plugins/filter/regex_search.yml +8 -2
- ansible/plugins/filter/relpath.yml +2 -2
- ansible/plugins/filter/root.yml +1 -1
- ansible/plugins/filter/splitext.yml +1 -1
- ansible/plugins/filter/subelements.yml +2 -2
- ansible/plugins/filter/symmetric_difference.yml +1 -0
- ansible/plugins/filter/ternary.yml +5 -5
- ansible/plugins/filter/to_json.yml +7 -7
- ansible/plugins/filter/to_nice_json.yml +5 -5
- ansible/plugins/filter/to_yaml.yml +2 -2
- ansible/plugins/filter/type_debug.yml +1 -1
- ansible/plugins/filter/union.yml +1 -0
- ansible/plugins/filter/unvault.yml +2 -2
- ansible/plugins/filter/urldecode.yml +13 -32
- ansible/plugins/filter/urlsplit.py +1 -1
- ansible/plugins/filter/vault.yml +1 -1
- ansible/plugins/filter/zip.yml +1 -1
- ansible/plugins/filter/zip_longest.yml +1 -1
- ansible/plugins/inventory/__init__.py +1 -1
- ansible/plugins/inventory/advanced_host_list.py +1 -1
- ansible/plugins/inventory/constructed.py +2 -2
- ansible/plugins/inventory/host_list.py +1 -1
- ansible/plugins/inventory/ini.py +6 -3
- ansible/plugins/inventory/script.py +8 -2
- ansible/plugins/inventory/toml.py +1 -1
- ansible/plugins/inventory/yaml.py +1 -1
- ansible/plugins/list.py +21 -17
- ansible/plugins/loader.py +66 -88
- ansible/plugins/lookup/__init__.py +1 -1
- ansible/plugins/lookup/config.py +16 -6
- ansible/plugins/lookup/csvfile.py +7 -4
- ansible/plugins/lookup/env.py +1 -1
- ansible/plugins/lookup/file.py +5 -2
- ansible/plugins/lookup/fileglob.py +5 -2
- ansible/plugins/lookup/first_found.py +20 -14
- ansible/plugins/lookup/ini.py +6 -3
- ansible/plugins/lookup/lines.py +2 -1
- ansible/plugins/lookup/password.py +7 -7
- ansible/plugins/lookup/pipe.py +1 -0
- ansible/plugins/lookup/random_choice.py +2 -2
- ansible/plugins/lookup/sequence.py +1 -1
- ansible/plugins/lookup/subelements.py +2 -2
- ansible/plugins/lookup/template.py +4 -1
- ansible/plugins/lookup/unvault.py +4 -1
- ansible/plugins/lookup/url.py +6 -6
- ansible/plugins/lookup/varnames.py +1 -1
- ansible/plugins/netconf/__init__.py +3 -3
- ansible/plugins/shell/__init__.py +1 -1
- ansible/plugins/shell/cmd.py +7 -7
- ansible/plugins/shell/powershell.py +1 -1
- ansible/plugins/strategy/__init__.py +8 -10
- ansible/plugins/strategy/free.py +1 -1
- ansible/plugins/strategy/linear.py +3 -3
- ansible/plugins/terminal/__init__.py +2 -2
- ansible/plugins/test/abs.yml +1 -1
- ansible/plugins/test/all.yml +1 -1
- ansible/plugins/test/any.yml +1 -1
- ansible/plugins/test/change.yml +2 -2
- ansible/plugins/test/changed.yml +2 -2
- ansible/plugins/test/contains.yml +1 -1
- ansible/plugins/test/core.py +1 -1
- ansible/plugins/test/directory.yml +1 -1
- ansible/plugins/test/exists.yml +3 -2
- ansible/plugins/test/failed.yml +2 -2
- ansible/plugins/test/failure.yml +2 -2
- ansible/plugins/test/falsy.yml +2 -2
- ansible/plugins/test/file.yml +1 -1
- ansible/plugins/test/finished.yml +2 -2
- ansible/plugins/test/is_abs.yml +1 -1
- ansible/plugins/test/is_dir.yml +1 -1
- ansible/plugins/test/is_file.yml +1 -1
- ansible/plugins/test/is_link.yml +1 -1
- ansible/plugins/test/is_mount.yml +1 -1
- ansible/plugins/test/is_same_file.yml +1 -1
- ansible/plugins/test/isnan.yml +1 -1
- ansible/plugins/test/issubset.yml +1 -2
- ansible/plugins/test/issuperset.yml +1 -2
- ansible/plugins/test/link.yml +1 -1
- ansible/plugins/test/link_exists.yml +1 -1
- ansible/plugins/test/match.yml +2 -2
- ansible/plugins/test/mount.yml +1 -1
- ansible/plugins/test/nan.yml +1 -1
- ansible/plugins/test/reachable.yml +2 -2
- ansible/plugins/test/regex.yml +1 -1
- ansible/plugins/test/same_file.yml +1 -1
- ansible/plugins/test/search.yml +2 -2
- ansible/plugins/test/skip.yml +3 -3
- ansible/plugins/test/skipped.yml +3 -3
- ansible/plugins/test/started.yml +2 -2
- ansible/plugins/test/subset.yml +1 -2
- ansible/plugins/test/succeeded.yml +2 -2
- ansible/plugins/test/success.yml +2 -2
- ansible/plugins/test/successful.yml +2 -2
- ansible/plugins/test/superset.yml +1 -2
- ansible/plugins/test/truthy.yml +3 -3
- ansible/plugins/test/unreachable.yml +2 -2
- ansible/plugins/test/uri.yml +1 -1
- ansible/plugins/test/url.yml +1 -1
- ansible/plugins/test/urn.yml +1 -1
- ansible/plugins/test/vault_encrypted.yml +1 -1
- ansible/plugins/test/version.yml +7 -7
- ansible/plugins/test/version_compare.yml +7 -7
- ansible/plugins/vars/host_group_vars.py +1 -1
- ansible/release.py +2 -2
- ansible/template/__init__.py +24 -26
- ansible/template/native_helpers.py +1 -1
- ansible/template/vars.py +1 -1
- ansible/utils/_junit_xml.py +1 -1
- ansible/utils/cmd_functions.py +1 -1
- ansible/utils/collection_loader/_collection_finder.py +12 -1
- ansible/utils/display.py +113 -62
- ansible/utils/encrypt.py +11 -14
- ansible/utils/hashing.py +1 -1
- ansible/utils/jsonrpc.py +1 -1
- ansible/utils/path.py +1 -1
- ansible/utils/plugin_docs.py +1 -1
- ansible/utils/py3compat.py +1 -1
- ansible/utils/shlex.py +2 -10
- ansible/utils/ssh_functions.py +5 -4
- ansible/utils/unicode.py +1 -1
- ansible/utils/unsafe_proxy.py +1 -1
- ansible/utils/vars.py +4 -29
- ansible/vars/hostvars.py +1 -2
- ansible/vars/manager.py +13 -9
- ansible/vars/plugins.py +2 -2
- {ansible_core-2.15.4rc1.dist-info → ansible_core-2.16.0b2.dist-info}/COPYING +4 -5
- {ansible_core-2.15.4rc1.dist-info → ansible_core-2.16.0b2.dist-info}/METADATA +2 -4
- {ansible_core-2.15.4rc1.dist-info → ansible_core-2.16.0b2.dist-info}/RECORD +424 -425
- ansible_test/_data/completion/docker.txt +9 -9
- ansible_test/_data/completion/remote.txt +4 -7
- ansible_test/_data/completion/windows.txt +0 -2
- ansible_test/_data/requirements/ansible-test.txt +2 -1
- ansible_test/_data/requirements/ansible.txt +0 -3
- ansible_test/_data/requirements/constraints.txt +0 -2
- ansible_test/_data/requirements/sanity.ansible-doc.txt +3 -5
- ansible_test/_data/requirements/sanity.changelog.in +1 -2
- ansible_test/_data/requirements/sanity.changelog.txt +4 -6
- ansible_test/_data/requirements/sanity.import.plugin.txt +2 -4
- ansible_test/_data/requirements/sanity.import.txt +1 -3
- ansible_test/_data/requirements/sanity.integration-aliases.txt +1 -3
- 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 +6 -12
- ansible_test/_data/requirements/sanity.runtime-metadata.txt +1 -3
- ansible_test/_data/requirements/sanity.validate-modules.in +1 -1
- ansible_test/_data/requirements/sanity.validate-modules.txt +3 -5
- ansible_test/_data/requirements/sanity.yamllint.txt +3 -5
- ansible_test/_data/requirements/units.txt +0 -1
- ansible_test/_internal/ci/azp.py +4 -4
- ansible_test/_internal/cli/environments.py +0 -13
- ansible_test/_internal/commands/coverage/analyze/targets/__init__.py +4 -4
- ansible_test/_internal/commands/coverage/combine.py +1 -1
- ansible_test/_internal/commands/integration/cloud/acme.py +6 -8
- ansible_test/_internal/commands/integration/cloud/cs.py +4 -9
- ansible_test/_internal/commands/integration/cloud/galaxy.py +103 -96
- ansible_test/_internal/commands/integration/cloud/httptester.py +0 -3
- ansible_test/_internal/commands/integration/cloud/nios.py +7 -9
- ansible_test/_internal/commands/integration/cloud/openshift.py +2 -7
- ansible_test/_internal/commands/integration/cloud/vcenter.py +11 -95
- ansible_test/_internal/commands/sanity/__init__.py +10 -0
- ansible_test/_internal/commands/sanity/import.py +8 -2
- ansible_test/_internal/commands/sanity/pylint.py +27 -1
- ansible_test/_internal/commands/units/__init__.py +2 -1
- ansible_test/_internal/config.py +0 -7
- ansible_test/_internal/containers.py +11 -56
- ansible_test/_internal/core_ci.py +0 -7
- ansible_test/_internal/coverage_util.py +8 -3
- ansible_test/_internal/delegation.py +0 -1
- ansible_test/_internal/diff.py +1 -1
- ansible_test/_internal/docker_util.py +9 -2
- ansible_test/_internal/host_profiles.py +6 -6
- ansible_test/_internal/http.py +1 -1
- ansible_test/_internal/junit_xml.py +1 -1
- ansible_test/_internal/pypi_proxy.py +1 -1
- ansible_test/_internal/python_requirements.py +3 -8
- ansible_test/_internal/util.py +1 -6
- ansible_test/_util/controller/sanity/code-smell/no-get-exception.json +4 -0
- ansible_test/_util/controller/sanity/code-smell/replace-urlopen.json +4 -0
- ansible_test/_util/controller/sanity/code-smell/use-compat-six.json +4 -0
- ansible_test/_util/controller/sanity/mypy/ansible-core.ini +3 -0
- ansible_test/_util/controller/sanity/pylint/config/ansible-test-target.cfg +2 -0
- ansible_test/_util/controller/sanity/pylint/config/ansible-test.cfg +0 -1
- ansible_test/_util/controller/sanity/pylint/config/collection.cfg +1 -0
- ansible_test/_util/controller/sanity/pylint/plugins/deprecated.py +172 -10
- ansible_test/_util/controller/sanity/pylint/plugins/string_format.py +13 -2
- ansible_test/_util/controller/sanity/pylint/plugins/unwanted.py +7 -1
- ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py +6 -6
- ansible_test/_util/controller/sanity/validate-modules/validate_modules/module_args.py +1 -1
- ansible_test/_util/controller/sanity/validate-modules/validate_modules/utils.py +1 -1
- ansible_test/_util/controller/sanity/yamllint/yamllinter.py +3 -3
- ansible_test/_util/controller/tools/collection_detail.py +2 -2
- ansible_test/_util/target/common/constants.py +2 -2
- ansible_test/_util/target/pytest/plugins/ansible_forked.py +103 -0
- ansible_test/_util/target/sanity/import/importer.py +0 -8
- ansible_test/_util/target/setup/bootstrap.sh +36 -16
- ansible_test/_util/target/setup/quiet_pip.py +0 -4
- ansible/modules/_include.py +0 -80
- ansible_test/_internal/commands/integration/cloud/foreman.py +0 -102
- ansible_test/_util/target/setup/ConfigureRemotingForAnsible.ps1 +0 -435
- {ansible_core-2.15.4rc1.data → ansible_core-2.16.0b2.data}/scripts/ansible-test +0 -0
- {ansible_core-2.15.4rc1.dist-info → ansible_core-2.16.0b2.dist-info}/WHEEL +0 -0
- {ansible_core-2.15.4rc1.dist-info → ansible_core-2.16.0b2.dist-info}/entry_points.txt +0 -0
- {ansible_core-2.15.4rc1.dist-info → ansible_core-2.16.0b2.dist-info}/top_level.txt +0 -0
ansible/modules/unarchive.py
CHANGED
|
@@ -17,17 +17,17 @@ module: unarchive
|
|
|
17
17
|
version_added: '1.4'
|
|
18
18
|
short_description: Unpacks an archive after (optionally) copying it from the local machine
|
|
19
19
|
description:
|
|
20
|
-
- The
|
|
20
|
+
- The M(ansible.builtin.unarchive) module unpacks an archive. It will not unpack a compressed file that does not contain an archive.
|
|
21
21
|
- By default, it will copy the source file from the local system to the target before unpacking.
|
|
22
|
-
- Set
|
|
23
|
-
- If checksum validation is desired, use M(ansible.builtin.get_url) or M(ansible.builtin.uri) instead to fetch the file and set
|
|
22
|
+
- Set O(remote_src=yes) to unpack an archive which already exists on the target.
|
|
23
|
+
- If checksum validation is desired, use M(ansible.builtin.get_url) or M(ansible.builtin.uri) instead to fetch the file and set O(remote_src=yes).
|
|
24
24
|
- For Windows targets, use the M(community.windows.win_unzip) module instead.
|
|
25
25
|
options:
|
|
26
26
|
src:
|
|
27
27
|
description:
|
|
28
|
-
- If
|
|
28
|
+
- If O(remote_src=no) (default), local path to archive file to copy to the target server; can be absolute or relative. If O(remote_src=yes), path on the
|
|
29
29
|
target server to existing archive file to unpack.
|
|
30
|
-
- If
|
|
30
|
+
- If O(remote_src=yes) and O(src) contains V(://), the remote machine will download the file from the URL first. (version_added 2.0). This is only for
|
|
31
31
|
simple cases, for full download support use the M(ansible.builtin.get_url) module.
|
|
32
32
|
type: path
|
|
33
33
|
required: true
|
|
@@ -40,14 +40,14 @@ options:
|
|
|
40
40
|
copy:
|
|
41
41
|
description:
|
|
42
42
|
- If true, the file is copied from local controller to the managed (remote) node, otherwise, the plugin will look for src archive on the managed machine.
|
|
43
|
-
- This option has been deprecated in favor of
|
|
44
|
-
- This option is mutually exclusive with
|
|
43
|
+
- This option has been deprecated in favor of O(remote_src).
|
|
44
|
+
- This option is mutually exclusive with O(remote_src).
|
|
45
45
|
type: bool
|
|
46
46
|
default: yes
|
|
47
47
|
creates:
|
|
48
48
|
description:
|
|
49
49
|
- If the specified absolute path (file or directory) already exists, this step will B(not) be run.
|
|
50
|
-
- The specified absolute path (file or directory) must be below the base path given with
|
|
50
|
+
- The specified absolute path (file or directory) must be below the base path given with O(dest).
|
|
51
51
|
type: path
|
|
52
52
|
version_added: "1.6"
|
|
53
53
|
io_buffer_size:
|
|
@@ -65,16 +65,16 @@ options:
|
|
|
65
65
|
exclude:
|
|
66
66
|
description:
|
|
67
67
|
- List the directory and file entries that you would like to exclude from the unarchive action.
|
|
68
|
-
- Mutually exclusive with
|
|
68
|
+
- Mutually exclusive with O(include).
|
|
69
69
|
type: list
|
|
70
70
|
default: []
|
|
71
71
|
elements: str
|
|
72
72
|
version_added: "2.1"
|
|
73
73
|
include:
|
|
74
74
|
description:
|
|
75
|
-
- List of directory and file entries that you would like to extract from the archive. If
|
|
75
|
+
- List of directory and file entries that you would like to extract from the archive. If O(include)
|
|
76
76
|
is not empty, only files listed here will be extracted.
|
|
77
|
-
- Mutually exclusive with
|
|
77
|
+
- Mutually exclusive with O(exclude).
|
|
78
78
|
type: list
|
|
79
79
|
default: []
|
|
80
80
|
elements: str
|
|
@@ -96,16 +96,16 @@ options:
|
|
|
96
96
|
version_added: "2.1"
|
|
97
97
|
remote_src:
|
|
98
98
|
description:
|
|
99
|
-
- Set to
|
|
100
|
-
- This option is mutually exclusive with
|
|
99
|
+
- Set to V(true) to indicate the archived file is already on the remote system and not local to the Ansible controller.
|
|
100
|
+
- This option is mutually exclusive with O(copy).
|
|
101
101
|
type: bool
|
|
102
102
|
default: no
|
|
103
103
|
version_added: "2.2"
|
|
104
104
|
validate_certs:
|
|
105
105
|
description:
|
|
106
106
|
- This only applies if using a https URL as the source of the file.
|
|
107
|
-
- This should only set to
|
|
108
|
-
- Prior to 2.2 the code worked as if this was set to
|
|
107
|
+
- This should only set to V(false) used on personally controlled sites using self-signed certificate.
|
|
108
|
+
- Prior to 2.2 the code worked as if this was set to V(true).
|
|
109
109
|
type: bool
|
|
110
110
|
default: yes
|
|
111
111
|
version_added: "2.2"
|
|
@@ -188,7 +188,7 @@ dest:
|
|
|
188
188
|
sample: /opt/software
|
|
189
189
|
files:
|
|
190
190
|
description: List of all the files in the archive.
|
|
191
|
-
returned: When
|
|
191
|
+
returned: When O(list_files) is V(True)
|
|
192
192
|
type: list
|
|
193
193
|
sample: '["file1", "file2"]'
|
|
194
194
|
gid:
|
|
@@ -224,7 +224,7 @@ size:
|
|
|
224
224
|
src:
|
|
225
225
|
description:
|
|
226
226
|
- The source archive's path.
|
|
227
|
-
- If
|
|
227
|
+
- If O(src) was a remote web URL, or from the local ansible controller, this shows the temporary location where the download was stored.
|
|
228
228
|
returned: always
|
|
229
229
|
type: str
|
|
230
230
|
sample: "/home/paul/test.tar.gz"
|
|
@@ -255,7 +255,7 @@ import traceback
|
|
|
255
255
|
from functools import partial
|
|
256
256
|
from zipfile import ZipFile
|
|
257
257
|
|
|
258
|
-
from ansible.module_utils.
|
|
258
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
|
259
259
|
from ansible.module_utils.basic import AnsibleModule
|
|
260
260
|
from ansible.module_utils.common.process import get_bin_path
|
|
261
261
|
from ansible.module_utils.common.locale import get_best_parsable_locale
|
|
@@ -1054,6 +1054,9 @@ def main():
|
|
|
1054
1054
|
if not os.access(src, os.R_OK):
|
|
1055
1055
|
module.fail_json(msg="Source '%s' not readable" % src)
|
|
1056
1056
|
|
|
1057
|
+
# ensure src is an absolute path before picking handlers
|
|
1058
|
+
src = os.path.abspath(src)
|
|
1059
|
+
|
|
1057
1060
|
# skip working with 0 size archives
|
|
1058
1061
|
try:
|
|
1059
1062
|
if os.path.getsize(src) == 0:
|
ansible/modules/uri.py
CHANGED
|
@@ -20,7 +20,7 @@ options:
|
|
|
20
20
|
ciphers:
|
|
21
21
|
description:
|
|
22
22
|
- SSL/TLS Ciphers to use for the request.
|
|
23
|
-
- 'When a list is provided, all ciphers are joined in order with
|
|
23
|
+
- 'When a list is provided, all ciphers are joined in order with V(:)'
|
|
24
24
|
- See the L(OpenSSL Cipher List Format,https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html#CIPHER-LIST-FORMAT)
|
|
25
25
|
for more details.
|
|
26
26
|
- The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions
|
|
@@ -40,7 +40,7 @@ options:
|
|
|
40
40
|
required: true
|
|
41
41
|
dest:
|
|
42
42
|
description:
|
|
43
|
-
- A path of where to download the file to (if desired). If
|
|
43
|
+
- A path of where to download the file to (if desired). If O(dest) is a
|
|
44
44
|
directory, the basename of the file on the remote server will be used.
|
|
45
45
|
type: path
|
|
46
46
|
url_username:
|
|
@@ -55,23 +55,23 @@ options:
|
|
|
55
55
|
aliases: [ password ]
|
|
56
56
|
body:
|
|
57
57
|
description:
|
|
58
|
-
- The body of the http request/response to the web service. If
|
|
59
|
-
to
|
|
58
|
+
- The body of the http request/response to the web service. If O(body_format) is set
|
|
59
|
+
to V(json) it will take an already formatted JSON string or convert a data structure
|
|
60
60
|
into JSON.
|
|
61
|
-
- If
|
|
61
|
+
- If O(body_format) is set to V(form-urlencoded) it will convert a dictionary
|
|
62
62
|
or list of tuples into an 'application/x-www-form-urlencoded' string. (Added in v2.7)
|
|
63
|
-
- If
|
|
63
|
+
- If O(body_format) is set to V(form-multipart) it will convert a dictionary
|
|
64
64
|
into 'multipart/form-multipart' body. (Added in v2.10)
|
|
65
65
|
type: raw
|
|
66
66
|
body_format:
|
|
67
67
|
description:
|
|
68
|
-
- The serialization format of the body. When set to
|
|
68
|
+
- The serialization format of the body. When set to V(json), V(form-multipart), or V(form-urlencoded), encodes
|
|
69
69
|
the body argument, if needed, and automatically sets the Content-Type header accordingly.
|
|
70
70
|
- As of v2.3 it is possible to override the C(Content-Type) header, when
|
|
71
|
-
set to
|
|
72
|
-
- The 'Content-Type' header cannot be overridden when using
|
|
73
|
-
-
|
|
74
|
-
-
|
|
71
|
+
set to V(json) or V(form-urlencoded) via the O(headers) option.
|
|
72
|
+
- The 'Content-Type' header cannot be overridden when using V(form-multipart)
|
|
73
|
+
- V(form-urlencoded) was added in v2.7.
|
|
74
|
+
- V(form-multipart) was added in v2.10.
|
|
75
75
|
type: str
|
|
76
76
|
choices: [ form-urlencoded, json, raw, form-multipart ]
|
|
77
77
|
default: raw
|
|
@@ -88,15 +88,15 @@ options:
|
|
|
88
88
|
- Whether or not to return the body of the response as a "content" key in
|
|
89
89
|
the dictionary result no matter it succeeded or failed.
|
|
90
90
|
- Independently of this option, if the reported Content-type is "application/json", then the JSON is
|
|
91
|
-
always loaded into a key called
|
|
91
|
+
always loaded into a key called RV(ignore:json) in the dictionary results.
|
|
92
92
|
type: bool
|
|
93
93
|
default: no
|
|
94
94
|
force_basic_auth:
|
|
95
95
|
description:
|
|
96
96
|
- Force the sending of the Basic authentication header upon initial request.
|
|
97
|
-
- When this setting is
|
|
97
|
+
- When this setting is V(false), this module will first try an unauthenticated request, and when the server replies
|
|
98
98
|
with an C(HTTP 401) error, it will submit the Basic authentication header.
|
|
99
|
-
- When this setting is
|
|
99
|
+
- When this setting is V(true), this module will immediately send a Basic authentication header on the first
|
|
100
100
|
request.
|
|
101
101
|
- "Use this setting in any of the following scenarios:"
|
|
102
102
|
- You know the webservice endpoint always requires HTTP Basic authentication, and you want to speed up your
|
|
@@ -108,11 +108,11 @@ options:
|
|
|
108
108
|
default: no
|
|
109
109
|
follow_redirects:
|
|
110
110
|
description:
|
|
111
|
-
- Whether or not the URI module should follow redirects.
|
|
112
|
-
|
|
113
|
-
doing a GET or HEAD on the URI to which it is being redirected.
|
|
114
|
-
any redirects. Note that
|
|
115
|
-
where
|
|
111
|
+
- Whether or not the URI module should follow redirects. V(all) will follow all redirects.
|
|
112
|
+
V(safe) will follow only "safe" redirects, where "safe" means that the client is only
|
|
113
|
+
doing a GET or HEAD on the URI to which it is being redirected. V(none) will not follow
|
|
114
|
+
any redirects. Note that V(true) and V(false) choices are accepted for backwards compatibility,
|
|
115
|
+
where V(true) is the equivalent of V(all) and V(false) is the equivalent of V(safe). V(true) and V(false)
|
|
116
116
|
are deprecated and will be removed in some future version of Ansible.
|
|
117
117
|
type: str
|
|
118
118
|
choices: ['all', 'no', 'none', 'safe', 'urllib2', 'yes']
|
|
@@ -139,29 +139,29 @@ options:
|
|
|
139
139
|
headers:
|
|
140
140
|
description:
|
|
141
141
|
- Add custom HTTP headers to a request in the format of a YAML hash. As
|
|
142
|
-
of
|
|
143
|
-
generated by supplying
|
|
142
|
+
of Ansible 2.3 supplying C(Content-Type) here will override the header
|
|
143
|
+
generated by supplying V(json) or V(form-urlencoded) for O(body_format).
|
|
144
144
|
type: dict
|
|
145
145
|
default: {}
|
|
146
146
|
version_added: '2.1'
|
|
147
147
|
validate_certs:
|
|
148
148
|
description:
|
|
149
|
-
- If
|
|
150
|
-
- This should only set to
|
|
151
|
-
- Prior to 1.9.2 the code defaulted to
|
|
149
|
+
- If V(false), SSL certificates will not be validated.
|
|
150
|
+
- This should only set to V(false) used on personally controlled sites using self-signed certificates.
|
|
151
|
+
- Prior to 1.9.2 the code defaulted to V(false).
|
|
152
152
|
type: bool
|
|
153
153
|
default: true
|
|
154
154
|
version_added: '1.9.2'
|
|
155
155
|
client_cert:
|
|
156
156
|
description:
|
|
157
157
|
- PEM formatted certificate chain file to be used for SSL client authentication.
|
|
158
|
-
- This file can also include the key as well, and if the key is included,
|
|
158
|
+
- This file can also include the key as well, and if the key is included, O(client_key) is not required
|
|
159
159
|
type: path
|
|
160
160
|
version_added: '2.4'
|
|
161
161
|
client_key:
|
|
162
162
|
description:
|
|
163
163
|
- PEM formatted file that contains your private key to be used for SSL client authentication.
|
|
164
|
-
- If
|
|
164
|
+
- If O(client_cert) contains both the certificate and key, this option is not required.
|
|
165
165
|
type: path
|
|
166
166
|
version_added: '2.4'
|
|
167
167
|
ca_path:
|
|
@@ -172,25 +172,25 @@ options:
|
|
|
172
172
|
src:
|
|
173
173
|
description:
|
|
174
174
|
- Path to file to be submitted to the remote server.
|
|
175
|
-
- Cannot be used with
|
|
176
|
-
- Should be used with
|
|
175
|
+
- Cannot be used with O(body).
|
|
176
|
+
- Should be used with O(force_basic_auth) to ensure success when the remote end sends a 401.
|
|
177
177
|
type: path
|
|
178
178
|
version_added: '2.7'
|
|
179
179
|
remote_src:
|
|
180
180
|
description:
|
|
181
|
-
- If
|
|
182
|
-
- If
|
|
181
|
+
- If V(false), the module will search for the O(src) on the controller node.
|
|
182
|
+
- If V(true), the module will search for the O(src) on the managed (remote) node.
|
|
183
183
|
type: bool
|
|
184
184
|
default: no
|
|
185
185
|
version_added: '2.7'
|
|
186
186
|
force:
|
|
187
187
|
description:
|
|
188
|
-
- If
|
|
188
|
+
- If V(true) do not get a cached copy.
|
|
189
189
|
type: bool
|
|
190
190
|
default: no
|
|
191
191
|
use_proxy:
|
|
192
192
|
description:
|
|
193
|
-
- If
|
|
193
|
+
- If V(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
|
|
194
194
|
type: bool
|
|
195
195
|
default: true
|
|
196
196
|
unix_socket:
|
|
@@ -217,9 +217,9 @@ options:
|
|
|
217
217
|
- Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate
|
|
218
218
|
authentication.
|
|
219
219
|
- Requires the Python library L(gssapi,https://github.com/pythongssapi/python-gssapi) to be installed.
|
|
220
|
-
- Credentials for GSSAPI can be specified with
|
|
220
|
+
- Credentials for GSSAPI can be specified with O(url_username)/O(url_password) or with the GSSAPI env var
|
|
221
221
|
C(KRB5CCNAME) that specified a custom Kerberos credential cache.
|
|
222
|
-
- NTLM authentication is
|
|
222
|
+
- NTLM authentication is B(not) supported even if the GSSAPI mech for NTLM has been installed.
|
|
223
223
|
type: bool
|
|
224
224
|
default: no
|
|
225
225
|
version_added: '2.11'
|
|
@@ -440,7 +440,6 @@ url:
|
|
|
440
440
|
sample: https://www.ansible.com/
|
|
441
441
|
'''
|
|
442
442
|
|
|
443
|
-
import datetime
|
|
444
443
|
import json
|
|
445
444
|
import os
|
|
446
445
|
import re
|
|
@@ -451,7 +450,8 @@ import tempfile
|
|
|
451
450
|
from ansible.module_utils.basic import AnsibleModule, sanitize_keys
|
|
452
451
|
from ansible.module_utils.six import PY2, PY3, binary_type, iteritems, string_types
|
|
453
452
|
from ansible.module_utils.six.moves.urllib.parse import urlencode, urlsplit
|
|
454
|
-
from ansible.module_utils.
|
|
453
|
+
from ansible.module_utils.common.text.converters import to_native, to_text
|
|
454
|
+
from ansible.module_utils.compat.datetime import utcnow, utcfromtimestamp
|
|
455
455
|
from ansible.module_utils.six.moves.collections_abc import Mapping, Sequence
|
|
456
456
|
from ansible.module_utils.urls import fetch_url, get_response_filename, parse_content_type, prepare_multipart, url_argument_spec
|
|
457
457
|
|
|
@@ -580,7 +580,7 @@ def uri(module, url, dest, body, body_format, method, headers, socket_timeout, c
|
|
|
580
580
|
kwargs = {}
|
|
581
581
|
if dest is not None and os.path.isfile(dest):
|
|
582
582
|
# if destination file already exist, only download if file newer
|
|
583
|
-
kwargs['last_mod_time'] =
|
|
583
|
+
kwargs['last_mod_time'] = utcfromtimestamp(os.path.getmtime(dest))
|
|
584
584
|
|
|
585
585
|
resp, info = fetch_url(module, url, data=data, headers=headers,
|
|
586
586
|
method=method, timeout=socket_timeout, unix_socket=module.params['unix_socket'],
|
|
@@ -686,12 +686,12 @@ def main():
|
|
|
686
686
|
module.exit_json(stdout="skipped, since '%s' does not exist" % removes, changed=False)
|
|
687
687
|
|
|
688
688
|
# Make the request
|
|
689
|
-
start =
|
|
689
|
+
start = utcnow()
|
|
690
690
|
r, info = uri(module, url, dest, body, body_format, method,
|
|
691
691
|
dict_headers, socket_timeout, ca_path, unredirected_headers,
|
|
692
692
|
decompress, ciphers, use_netrc)
|
|
693
693
|
|
|
694
|
-
elapsed = (
|
|
694
|
+
elapsed = (utcnow() - start).seconds
|
|
695
695
|
|
|
696
696
|
if r and dest is not None and os.path.isdir(dest):
|
|
697
697
|
filename = get_response_filename(r) or 'index.html'
|