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/plugins/lookup/ini.py
CHANGED
|
@@ -39,7 +39,7 @@ DOCUMENTATION = """
|
|
|
39
39
|
default: ''
|
|
40
40
|
case_sensitive:
|
|
41
41
|
description:
|
|
42
|
-
Whether key names read from
|
|
42
|
+
Whether key names read from O(file) should be case sensitive. This prevents
|
|
43
43
|
duplicate key errors if keys only differ in case.
|
|
44
44
|
default: False
|
|
45
45
|
version_added: '2.12'
|
|
@@ -50,6 +50,9 @@ DOCUMENTATION = """
|
|
|
50
50
|
default: False
|
|
51
51
|
aliases: ['allow_none']
|
|
52
52
|
version_added: '2.12'
|
|
53
|
+
seealso:
|
|
54
|
+
- ref: playbook_task_paths
|
|
55
|
+
description: Search paths used for relative files.
|
|
53
56
|
"""
|
|
54
57
|
|
|
55
58
|
EXAMPLES = """
|
|
@@ -85,7 +88,7 @@ from collections import defaultdict
|
|
|
85
88
|
from collections.abc import MutableSequence
|
|
86
89
|
|
|
87
90
|
from ansible.errors import AnsibleLookupError, AnsibleOptionsError
|
|
88
|
-
from ansible.module_utils.
|
|
91
|
+
from ansible.module_utils.common.text.converters import to_text, to_native
|
|
89
92
|
from ansible.plugins.lookup import LookupBase
|
|
90
93
|
|
|
91
94
|
|
|
@@ -187,7 +190,7 @@ class LookupModule(LookupBase):
|
|
|
187
190
|
config.seek(0, os.SEEK_SET)
|
|
188
191
|
|
|
189
192
|
try:
|
|
190
|
-
self.cp.
|
|
193
|
+
self.cp.read_file(config)
|
|
191
194
|
except configparser.DuplicateOptionError as doe:
|
|
192
195
|
raise AnsibleLookupError("Duplicate option in '{file}': {error}".format(file=paramvals['file'], error=to_native(doe)))
|
|
193
196
|
|
ansible/plugins/lookup/lines.py
CHANGED
|
@@ -20,6 +20,7 @@ DOCUMENTATION = """
|
|
|
20
20
|
- Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'.
|
|
21
21
|
If you need to use different permissions, you must change the command or run Ansible as another user.
|
|
22
22
|
- Alternatively, you can use a shell/command task that runs against localhost and registers the result.
|
|
23
|
+
- The directory of the play is used as the current working directory.
|
|
23
24
|
"""
|
|
24
25
|
|
|
25
26
|
EXAMPLES = """
|
|
@@ -44,7 +45,7 @@ RETURN = """
|
|
|
44
45
|
import subprocess
|
|
45
46
|
from ansible.errors import AnsibleError
|
|
46
47
|
from ansible.plugins.lookup import LookupBase
|
|
47
|
-
from ansible.module_utils.
|
|
48
|
+
from ansible.module_utils.common.text.converters import to_text
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
class LookupModule(LookupBase):
|
|
@@ -28,17 +28,18 @@ DOCUMENTATION = """
|
|
|
28
28
|
required: True
|
|
29
29
|
encrypt:
|
|
30
30
|
description:
|
|
31
|
-
- Which hash scheme to encrypt the returning password, should be one hash scheme from C(passlib.hash;
|
|
31
|
+
- Which hash scheme to encrypt the returning password, should be one hash scheme from C(passlib.hash);
|
|
32
|
+
V(md5_crypt), V(bcrypt), V(sha256_crypt), V(sha512_crypt).
|
|
32
33
|
- If not provided, the password will be returned in plain text.
|
|
33
34
|
- Note that the password is always stored as plain text, only the returning password is encrypted.
|
|
34
35
|
- Encrypt also forces saving the salt value for idempotence.
|
|
35
36
|
- Note that before 2.6 this option was incorrectly labeled as a boolean for a long time.
|
|
36
37
|
ident:
|
|
37
38
|
description:
|
|
38
|
-
- Specify version of Bcrypt algorithm to be used while using
|
|
39
|
-
- The parameter is only available for
|
|
39
|
+
- Specify version of Bcrypt algorithm to be used while using O(encrypt) as V(bcrypt).
|
|
40
|
+
- The parameter is only available for V(bcrypt) - U(https://passlib.readthedocs.io/en/stable/lib/passlib.hash.bcrypt.html#passlib.hash.bcrypt).
|
|
40
41
|
- Other hash types will simply ignore this parameter.
|
|
41
|
-
- 'Valid values for this parameter are:
|
|
42
|
+
- 'Valid values for this parameter are: V(2), V(2a), V(2y), V(2b).'
|
|
42
43
|
type: string
|
|
43
44
|
version_added: "2.12"
|
|
44
45
|
chars:
|
|
@@ -46,8 +47,7 @@ DOCUMENTATION = """
|
|
|
46
47
|
description:
|
|
47
48
|
- A list of names that compose a custom character set in the generated passwords.
|
|
48
49
|
- This parameter defines the possible character sets in the resulting password, not the required character sets.
|
|
49
|
-
If you want to require certain character sets for passwords, you can use the
|
|
50
|
-
P(community.general.random_string#lookup).
|
|
50
|
+
If you want to require certain character sets for passwords, you can use the P(community.general.random_string#lookup) lookup plugin.
|
|
51
51
|
- 'By default generated passwords contain a random mix of upper and lowercase ASCII letters, the numbers 0-9, and punctuation (". , : - _").'
|
|
52
52
|
- "They can be either parts of Python's string module attributes or represented literally ( :, -)."
|
|
53
53
|
- "Though string modules can vary by Python version, valid values for both major releases include:
|
|
@@ -133,7 +133,7 @@ import time
|
|
|
133
133
|
import hashlib
|
|
134
134
|
|
|
135
135
|
from ansible.errors import AnsibleError, AnsibleAssertionError
|
|
136
|
-
from ansible.module_utils.
|
|
136
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
|
137
137
|
from ansible.module_utils.six import string_types
|
|
138
138
|
from ansible.parsing.splitter import parse_kv
|
|
139
139
|
from ansible.plugins.lookup import LookupBase
|
ansible/plugins/lookup/pipe.py
CHANGED
|
@@ -24,6 +24,7 @@ DOCUMENTATION = r"""
|
|
|
24
24
|
It is strongly recommended to pass user input or variable input via quote filter before using with pipe lookup.
|
|
25
25
|
See example section for this.
|
|
26
26
|
Read more about this L(Bandit B602 docs,https://bandit.readthedocs.io/en/latest/plugins/b602_subprocess_popen_with_shell_equals_true.html)
|
|
27
|
+
- The directory of the play is used as the current working directory.
|
|
27
28
|
"""
|
|
28
29
|
|
|
29
30
|
EXAMPLES = r"""
|
|
@@ -35,13 +35,13 @@ RETURN = """
|
|
|
35
35
|
import random
|
|
36
36
|
|
|
37
37
|
from ansible.errors import AnsibleError
|
|
38
|
-
from ansible.module_utils.
|
|
38
|
+
from ansible.module_utils.common.text.converters import to_native
|
|
39
39
|
from ansible.plugins.lookup import LookupBase
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
class LookupModule(LookupBase):
|
|
43
43
|
|
|
44
|
-
def run(self, terms,
|
|
44
|
+
def run(self, terms, variables=None, **kwargs):
|
|
45
45
|
|
|
46
46
|
ret = terms
|
|
47
47
|
if terms:
|
|
@@ -19,8 +19,8 @@ DOCUMENTATION = """
|
|
|
19
19
|
default: False
|
|
20
20
|
description:
|
|
21
21
|
- Lookup accepts this flag from a dictionary as optional. See Example section for more information.
|
|
22
|
-
- If set to
|
|
23
|
-
- If set to
|
|
22
|
+
- If set to V(True), the lookup plugin will skip the lists items that do not contain the given subkey.
|
|
23
|
+
- If set to V(False), the plugin will yield an error and complain about the missing subkey.
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
26
|
EXAMPLES = """
|
|
@@ -56,6 +56,9 @@ DOCUMENTATION = """
|
|
|
56
56
|
version_added: '2.12'
|
|
57
57
|
type: str
|
|
58
58
|
default: '#}'
|
|
59
|
+
seealso:
|
|
60
|
+
- ref: playbook_task_paths
|
|
61
|
+
description: Search paths used for relative templates.
|
|
59
62
|
"""
|
|
60
63
|
|
|
61
64
|
EXAMPLES = """
|
|
@@ -86,7 +89,7 @@ import ansible.constants as C
|
|
|
86
89
|
|
|
87
90
|
from ansible.errors import AnsibleError
|
|
88
91
|
from ansible.plugins.lookup import LookupBase
|
|
89
|
-
from ansible.module_utils.
|
|
92
|
+
from ansible.module_utils.common.text.converters import to_text
|
|
90
93
|
from ansible.template import generate_ansible_template_vars, AnsibleEnvironment
|
|
91
94
|
from ansible.utils.display import Display
|
|
92
95
|
from ansible.utils.native_jinja import NativeJinjaText
|
|
@@ -16,6 +16,9 @@ DOCUMENTATION = """
|
|
|
16
16
|
required: True
|
|
17
17
|
notes:
|
|
18
18
|
- This lookup does not understand 'globbing' nor shell environment variables.
|
|
19
|
+
seealso:
|
|
20
|
+
- ref: playbook_task_paths
|
|
21
|
+
description: Search paths used for relative files.
|
|
19
22
|
"""
|
|
20
23
|
|
|
21
24
|
EXAMPLES = """
|
|
@@ -32,7 +35,7 @@ RETURN = """
|
|
|
32
35
|
|
|
33
36
|
from ansible.errors import AnsibleParserError
|
|
34
37
|
from ansible.plugins.lookup import LookupBase
|
|
35
|
-
from ansible.module_utils.
|
|
38
|
+
from ansible.module_utils.common.text.converters import to_text
|
|
36
39
|
from ansible.utils.display import Display
|
|
37
40
|
|
|
38
41
|
display = Display()
|
ansible/plugins/lookup/url.py
CHANGED
|
@@ -64,7 +64,7 @@ options:
|
|
|
64
64
|
- section: url_lookup
|
|
65
65
|
key: timeout
|
|
66
66
|
http_agent:
|
|
67
|
-
description: User-Agent to use in the request. The default was changed in 2.11 to
|
|
67
|
+
description: User-Agent to use in the request. The default was changed in 2.11 to V(ansible-httpget).
|
|
68
68
|
type: string
|
|
69
69
|
version_added: "2.10"
|
|
70
70
|
default: ansible-httpget
|
|
@@ -81,12 +81,12 @@ options:
|
|
|
81
81
|
version_added: "2.10"
|
|
82
82
|
default: False
|
|
83
83
|
vars:
|
|
84
|
-
- name:
|
|
84
|
+
- name: ansible_lookup_url_force_basic_auth
|
|
85
85
|
env:
|
|
86
|
-
- name:
|
|
86
|
+
- name: ANSIBLE_LOOKUP_URL_FORCE_BASIC_AUTH
|
|
87
87
|
ini:
|
|
88
88
|
- section: url_lookup
|
|
89
|
-
key:
|
|
89
|
+
key: force_basic_auth
|
|
90
90
|
follow_redirects:
|
|
91
91
|
description: String of urllib2, all/yes, safe, none to determine how redirects are followed, see RedirectHandlerFactory for more information
|
|
92
92
|
type: string
|
|
@@ -102,7 +102,7 @@ options:
|
|
|
102
102
|
use_gssapi:
|
|
103
103
|
description:
|
|
104
104
|
- Use GSSAPI handler of requests
|
|
105
|
-
- As of Ansible 2.11, GSSAPI credentials can be specified with
|
|
105
|
+
- As of Ansible 2.11, GSSAPI credentials can be specified with O(username) and O(password).
|
|
106
106
|
type: boolean
|
|
107
107
|
version_added: "2.10"
|
|
108
108
|
default: False
|
|
@@ -211,7 +211,7 @@ RETURN = """
|
|
|
211
211
|
from urllib.error import HTTPError, URLError
|
|
212
212
|
|
|
213
213
|
from ansible.errors import AnsibleError
|
|
214
|
-
from ansible.module_utils.
|
|
214
|
+
from ansible.module_utils.common.text.converters import to_text, to_native
|
|
215
215
|
from ansible.module_utils.urls import open_url, ConnectionError, SSLValidationError
|
|
216
216
|
from ansible.plugins.lookup import LookupBase
|
|
217
217
|
from ansible.utils.display import Display
|
|
@@ -46,7 +46,7 @@ _value:
|
|
|
46
46
|
import re
|
|
47
47
|
|
|
48
48
|
from ansible.errors import AnsibleError
|
|
49
|
-
from ansible.module_utils.
|
|
49
|
+
from ansible.module_utils.common.text.converters import to_native
|
|
50
50
|
from ansible.module_utils.six import string_types
|
|
51
51
|
from ansible.plugins.lookup import LookupBase
|
|
52
52
|
|
|
@@ -24,7 +24,7 @@ from functools import wraps
|
|
|
24
24
|
|
|
25
25
|
from ansible.errors import AnsibleError
|
|
26
26
|
from ansible.plugins import AnsiblePlugin
|
|
27
|
-
from ansible.module_utils.
|
|
27
|
+
from ansible.module_utils.common.text.converters import to_native
|
|
28
28
|
from ansible.module_utils.basic import missing_required_lib
|
|
29
29
|
|
|
30
30
|
try:
|
|
@@ -62,8 +62,8 @@ class NetconfBase(AnsiblePlugin):
|
|
|
62
62
|
:class:`TerminalBase` plugins are byte strings. This is because of
|
|
63
63
|
how close to the underlying platform these plugins operate. Remember
|
|
64
64
|
to mark literal strings as byte string (``b"string"``) and to use
|
|
65
|
-
:func:`~ansible.module_utils.
|
|
66
|
-
:func:`~ansible.module_utils.
|
|
65
|
+
:func:`~ansible.module_utils.common.text.converters.to_bytes` and
|
|
66
|
+
:func:`~ansible.module_utils.common.text.converters.to_text` to avoid unexpected
|
|
67
67
|
problems.
|
|
68
68
|
|
|
69
69
|
List of supported rpc's:
|
|
@@ -27,7 +27,7 @@ import time
|
|
|
27
27
|
from collections.abc import Mapping, Sequence
|
|
28
28
|
|
|
29
29
|
from ansible.errors import AnsibleError
|
|
30
|
-
from ansible.module_utils.
|
|
30
|
+
from ansible.module_utils.common.text.converters import to_native
|
|
31
31
|
from ansible.module_utils.six import text_type, string_types
|
|
32
32
|
from ansible.plugins import AnsiblePlugin
|
|
33
33
|
|
ansible/plugins/shell/cmd.py
CHANGED
|
@@ -34,24 +34,24 @@ class ShellModule(PSShellModule):
|
|
|
34
34
|
# Used by various parts of Ansible to do Windows specific changes
|
|
35
35
|
_IS_WINDOWS = True
|
|
36
36
|
|
|
37
|
-
def quote(self,
|
|
37
|
+
def quote(self, cmd):
|
|
38
38
|
# cmd does not support single quotes that the shlex_quote uses. We need to override the quoting behaviour to
|
|
39
39
|
# better match cmd.exe.
|
|
40
40
|
# https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
|
|
41
41
|
|
|
42
42
|
# Return an empty argument
|
|
43
|
-
if not
|
|
43
|
+
if not cmd:
|
|
44
44
|
return '""'
|
|
45
45
|
|
|
46
|
-
if _find_unsafe(
|
|
47
|
-
return
|
|
46
|
+
if _find_unsafe(cmd) is None:
|
|
47
|
+
return cmd
|
|
48
48
|
|
|
49
49
|
# Escape the metachars as we are quoting the string to stop cmd from interpreting that metachar. For example
|
|
50
50
|
# 'file &whoami.exe' would result in 'file $(whoami.exe)' instead of the literal string
|
|
51
51
|
# https://stackoverflow.com/questions/3411771/multiple-character-replace-with-python
|
|
52
52
|
for c in '^()%!"<>&|': # '^' must be the first char that we scan and replace
|
|
53
|
-
if c in
|
|
53
|
+
if c in cmd:
|
|
54
54
|
# I can't find any docs that explicitly say this but to escape ", it needs to be prefixed with \^.
|
|
55
|
-
|
|
55
|
+
cmd = cmd.replace(c, ("\\^" if c == '"' else "^") + c)
|
|
56
56
|
|
|
57
|
-
return '^"' +
|
|
57
|
+
return '^"' + cmd + '^"'
|
|
@@ -23,7 +23,7 @@ import pkgutil
|
|
|
23
23
|
import xml.etree.ElementTree as ET
|
|
24
24
|
import ntpath
|
|
25
25
|
|
|
26
|
-
from ansible.module_utils.
|
|
26
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
|
27
27
|
from ansible.plugins.shell import ShellBase
|
|
28
28
|
|
|
29
29
|
|
|
@@ -43,7 +43,7 @@ from ansible.executor.process.worker import WorkerProcess
|
|
|
43
43
|
from ansible.executor.task_result import TaskResult
|
|
44
44
|
from ansible.executor.task_queue_manager import CallbackSend, DisplaySend, PromptSend
|
|
45
45
|
from ansible.module_utils.six import string_types
|
|
46
|
-
from ansible.module_utils.
|
|
46
|
+
from ansible.module_utils.common.text.converters import to_text
|
|
47
47
|
from ansible.module_utils.connection import Connection, ConnectionError
|
|
48
48
|
from ansible.playbook.conditional import Conditional
|
|
49
49
|
from ansible.playbook.handler import Handler
|
|
@@ -54,7 +54,6 @@ from ansible.plugins import loader as plugin_loader
|
|
|
54
54
|
from ansible.template import Templar
|
|
55
55
|
from ansible.utils.display import Display
|
|
56
56
|
from ansible.utils.fqcn import add_internal_fqcns
|
|
57
|
-
from ansible.utils.multiprocessing import context as multiprocessing_context
|
|
58
57
|
from ansible.utils.unsafe_proxy import wrap_var
|
|
59
58
|
from ansible.utils.vars import combine_vars, isidentifier
|
|
60
59
|
from ansible.vars.clean import strip_internal_keys, module_response_deepcopy
|
|
@@ -117,7 +116,8 @@ def results_thread_main(strategy):
|
|
|
117
116
|
if isinstance(result, StrategySentinel):
|
|
118
117
|
break
|
|
119
118
|
elif isinstance(result, DisplaySend):
|
|
120
|
-
display
|
|
119
|
+
dmethod = getattr(display, result.method)
|
|
120
|
+
dmethod(*result.args, **result.kwargs)
|
|
121
121
|
elif isinstance(result, CallbackSend):
|
|
122
122
|
for arg in result.args:
|
|
123
123
|
if isinstance(arg, TaskResult):
|
|
@@ -571,10 +571,7 @@ class StrategyBase:
|
|
|
571
571
|
Reads results off the final queue and takes appropriate action
|
|
572
572
|
based on the result (executing callbacks, updating state, etc.).
|
|
573
573
|
'''
|
|
574
|
-
|
|
575
574
|
ret_results = []
|
|
576
|
-
handler_templar = Templar(self._loader)
|
|
577
|
-
|
|
578
575
|
cur_pass = 0
|
|
579
576
|
while True:
|
|
580
577
|
try:
|
|
@@ -605,7 +602,7 @@ class StrategyBase:
|
|
|
605
602
|
else:
|
|
606
603
|
iterator.mark_host_failed(original_host)
|
|
607
604
|
|
|
608
|
-
state,
|
|
605
|
+
state, dummy = iterator.get_next_task_for_host(original_host, peek=True)
|
|
609
606
|
|
|
610
607
|
if iterator.is_failed(original_host) and state and state.run_state == IteratingStates.COMPLETE:
|
|
611
608
|
self._tqm._failed_hosts[original_host.name] = True
|
|
@@ -702,7 +699,7 @@ class StrategyBase:
|
|
|
702
699
|
else:
|
|
703
700
|
all_task_vars = found_task_vars
|
|
704
701
|
all_task_vars[original_task.register] = wrap_var(result_item)
|
|
705
|
-
post_process_whens(result_item, original_task,
|
|
702
|
+
post_process_whens(result_item, original_task, Templar(self._loader), all_task_vars)
|
|
706
703
|
if original_task.loop or original_task.loop_with:
|
|
707
704
|
new_item_result = TaskResult(
|
|
708
705
|
task_result._host,
|
|
@@ -1036,8 +1033,9 @@ class StrategyBase:
|
|
|
1036
1033
|
# How would this work with allow_duplicates??
|
|
1037
1034
|
if task.implicit:
|
|
1038
1035
|
role_obj = self._get_cached_role(task, iterator._play)
|
|
1039
|
-
|
|
1040
|
-
|
|
1036
|
+
if target_host.name in role_obj._had_task_run:
|
|
1037
|
+
role_obj._completed[target_host.name] = True
|
|
1038
|
+
msg = 'role_complete for %s' % target_host.name
|
|
1041
1039
|
elif meta_action == 'reset_connection':
|
|
1042
1040
|
all_vars = self._variable_manager.get_vars(play=iterator._play, host=target_host, task=task,
|
|
1043
1041
|
_hosts=self._hosts_cache, _hosts_all=self._hosts_cache_all)
|
ansible/plugins/strategy/free.py
CHANGED
|
@@ -40,7 +40,7 @@ from ansible.playbook.included_file import IncludedFile
|
|
|
40
40
|
from ansible.plugins.loader import action_loader
|
|
41
41
|
from ansible.plugins.strategy import StrategyBase
|
|
42
42
|
from ansible.template import Templar
|
|
43
|
-
from ansible.module_utils.
|
|
43
|
+
from ansible.module_utils.common.text.converters import to_text
|
|
44
44
|
from ansible.utils.display import Display
|
|
45
45
|
|
|
46
46
|
display = Display()
|
|
@@ -34,7 +34,7 @@ DOCUMENTATION = '''
|
|
|
34
34
|
from ansible import constants as C
|
|
35
35
|
from ansible.errors import AnsibleError, AnsibleAssertionError, AnsibleParserError
|
|
36
36
|
from ansible.executor.play_iterator import IteratingStates, FailedStates
|
|
37
|
-
from ansible.module_utils.
|
|
37
|
+
from ansible.module_utils.common.text.converters import to_text
|
|
38
38
|
from ansible.playbook.handler import Handler
|
|
39
39
|
from ansible.playbook.included_file import IncludedFile
|
|
40
40
|
from ansible.playbook.task import Task
|
|
@@ -77,7 +77,7 @@ class StrategyModule(StrategyBase):
|
|
|
77
77
|
|
|
78
78
|
if self._in_handlers and not any(filter(
|
|
79
79
|
lambda rs: rs == IteratingStates.HANDLERS,
|
|
80
|
-
(s.run_state for s,
|
|
80
|
+
(s.run_state for s, dummy in state_task_per_host.values()))
|
|
81
81
|
):
|
|
82
82
|
self._in_handlers = False
|
|
83
83
|
|
|
@@ -361,7 +361,7 @@ class StrategyModule(StrategyBase):
|
|
|
361
361
|
if any_errors_fatal and (len(failed_hosts) > 0 or len(unreachable_hosts) > 0):
|
|
362
362
|
dont_fail_states = frozenset([IteratingStates.RESCUE, IteratingStates.ALWAYS])
|
|
363
363
|
for host in hosts_left:
|
|
364
|
-
(s,
|
|
364
|
+
(s, dummy) = iterator.get_next_task_for_host(host, peek=True)
|
|
365
365
|
# the state may actually be in a child state, use the get_active_state()
|
|
366
366
|
# method in the iterator to figure out the true active state
|
|
367
367
|
s = iterator.get_active_state(s)
|
|
@@ -34,8 +34,8 @@ class TerminalBase(ABC):
|
|
|
34
34
|
:class:`TerminalBase` plugins are byte strings. This is because of
|
|
35
35
|
how close to the underlying platform these plugins operate. Remember
|
|
36
36
|
to mark literal strings as byte string (``b"string"``) and to use
|
|
37
|
-
:func:`~ansible.module_utils.
|
|
38
|
-
:func:`~ansible.module_utils.
|
|
37
|
+
:func:`~ansible.module_utils.common.text.converters.to_bytes` and
|
|
38
|
+
:func:`~ansible.module_utils.common.text.converters.to_text` to avoid unexpected
|
|
39
39
|
problems.
|
|
40
40
|
'''
|
|
41
41
|
|
ansible/plugins/test/abs.yml
CHANGED
ansible/plugins/test/all.yml
CHANGED
ansible/plugins/test/any.yml
CHANGED
ansible/plugins/test/change.yml
CHANGED
|
@@ -6,7 +6,7 @@ DOCUMENTATION:
|
|
|
6
6
|
aliases: [change]
|
|
7
7
|
description:
|
|
8
8
|
- Tests if task required changes to complete
|
|
9
|
-
- This test checks for the existance of a C(changed) key in the input dictionary and that it is
|
|
9
|
+
- This test checks for the existance of a C(changed) key in the input dictionary and that it is V(True) if present
|
|
10
10
|
options:
|
|
11
11
|
_input:
|
|
12
12
|
description: registered result from an Ansible task
|
|
@@ -18,5 +18,5 @@ EXAMPLES: |
|
|
|
18
18
|
|
|
19
19
|
RETURN:
|
|
20
20
|
_value:
|
|
21
|
-
description: Returns
|
|
21
|
+
description: Returns V(True) if the task was required changes, V(False) otherwise.
|
|
22
22
|
type: boolean
|
ansible/plugins/test/changed.yml
CHANGED
|
@@ -6,7 +6,7 @@ DOCUMENTATION:
|
|
|
6
6
|
aliases: [change]
|
|
7
7
|
description:
|
|
8
8
|
- Tests if task required changes to complete
|
|
9
|
-
- This test checks for the existance of a C(changed) key in the input dictionary and that it is
|
|
9
|
+
- This test checks for the existance of a C(changed) key in the input dictionary and that it is V(True) if present
|
|
10
10
|
options:
|
|
11
11
|
_input:
|
|
12
12
|
description: registered result from an Ansible task
|
|
@@ -18,5 +18,5 @@ EXAMPLES: |
|
|
|
18
18
|
|
|
19
19
|
RETURN:
|
|
20
20
|
_value:
|
|
21
|
-
description: Returns
|
|
21
|
+
description: Returns V(True) if the task was required changes, V(False) otherwise.
|
|
22
22
|
type: boolean
|
|
@@ -45,5 +45,5 @@ EXAMPLES: |
|
|
|
45
45
|
- em4
|
|
46
46
|
RETURN:
|
|
47
47
|
_value:
|
|
48
|
-
description: Returns
|
|
48
|
+
description: Returns V(True) if the specified element is contained in the supplied sequence, V(False) otherwise.
|
|
49
49
|
type: boolean
|
ansible/plugins/test/core.py
CHANGED
|
@@ -27,7 +27,7 @@ from collections.abc import MutableMapping, MutableSequence
|
|
|
27
27
|
from ansible.module_utils.compat.version import LooseVersion, StrictVersion
|
|
28
28
|
|
|
29
29
|
from ansible import errors
|
|
30
|
-
from ansible.module_utils.
|
|
30
|
+
from ansible.module_utils.common.text.converters import to_native, to_text
|
|
31
31
|
from ansible.module_utils.parsing.convert_bool import boolean
|
|
32
32
|
from ansible.utils.display import Display
|
|
33
33
|
from ansible.utils.version import SemanticVersion
|
|
@@ -17,5 +17,5 @@ EXAMPLES: |
|
|
|
17
17
|
|
|
18
18
|
RETURN:
|
|
19
19
|
_value:
|
|
20
|
-
description: Returns
|
|
20
|
+
description: Returns V(True) if the path corresponds to an existing directory on the filesystem on the controller, V(False) if otherwise.
|
|
21
21
|
type: boolean
|
ansible/plugins/test/exists.yml
CHANGED
|
@@ -5,7 +5,8 @@ DOCUMENTATION:
|
|
|
5
5
|
short_description: does the path exist, follow symlinks
|
|
6
6
|
description:
|
|
7
7
|
- Check if the provided path maps to an existing filesystem object on the controller (localhost).
|
|
8
|
-
- Follows symlinks and checks the target of the symlink instead of the link itself, use the
|
|
8
|
+
- Follows symlinks and checks the target of the symlink instead of the link itself, use the P(ansible.builtin.link#test)
|
|
9
|
+
or P(ansible.builtin.link_exists#test) tests to check on the link.
|
|
9
10
|
options:
|
|
10
11
|
_input:
|
|
11
12
|
description: a path
|
|
@@ -18,5 +19,5 @@ EXAMPLES: |
|
|
|
18
19
|
|
|
19
20
|
RETURN:
|
|
20
21
|
_value:
|
|
21
|
-
description: Returns
|
|
22
|
+
description: Returns V(True) if the path corresponds to an existing filesystem object on the controller (after following symlinks), V(False) if otherwise.
|
|
22
23
|
type: boolean
|
ansible/plugins/test/failed.yml
CHANGED
|
@@ -6,7 +6,7 @@ DOCUMENTATION:
|
|
|
6
6
|
aliases: [failure]
|
|
7
7
|
description:
|
|
8
8
|
- Tests if task finished in failure, opposite of C(succeeded).
|
|
9
|
-
- This test checks for the existance of a C(failed) key in the input dictionary and that it is
|
|
9
|
+
- This test checks for the existance of a C(failed) key in the input dictionary and that it is V(True) if present.
|
|
10
10
|
- Tasks that get skipped or not executed due to other failures (syntax, templating, unreachable host, etc) do not return a 'failed' status.
|
|
11
11
|
options:
|
|
12
12
|
_input:
|
|
@@ -19,5 +19,5 @@ EXAMPLES: |
|
|
|
19
19
|
|
|
20
20
|
RETURN:
|
|
21
21
|
_value:
|
|
22
|
-
description: Returns
|
|
22
|
+
description: Returns V(True) if the task was failed, V(False) otherwise.
|
|
23
23
|
type: boolean
|
ansible/plugins/test/failure.yml
CHANGED
|
@@ -6,7 +6,7 @@ DOCUMENTATION:
|
|
|
6
6
|
aliases: [failure]
|
|
7
7
|
description:
|
|
8
8
|
- Tests if task finished in failure, opposite of C(succeeded).
|
|
9
|
-
- This test checks for the existance of a C(failed) key in the input dictionary and that it is
|
|
9
|
+
- This test checks for the existance of a C(failed) key in the input dictionary and that it is V(True) if present.
|
|
10
10
|
- Tasks that get skipped or not executed due to other failures (syntax, templating, unreachable host, etc) do not return a 'failed' status.
|
|
11
11
|
options:
|
|
12
12
|
_input:
|
|
@@ -19,5 +19,5 @@ EXAMPLES: |
|
|
|
19
19
|
|
|
20
20
|
RETURN:
|
|
21
21
|
_value:
|
|
22
|
-
description: Returns
|
|
22
|
+
description: Returns V(True) if the task was failed, V(False) otherwise.
|
|
23
23
|
type: boolean
|
ansible/plugins/test/falsy.yml
CHANGED
|
@@ -12,7 +12,7 @@ DOCUMENTATION:
|
|
|
12
12
|
type: string
|
|
13
13
|
required: True
|
|
14
14
|
convert_bool:
|
|
15
|
-
description: Attempts to convert the result to a strict Python boolean vs normally acceptable values (
|
|
15
|
+
description: Attempts to convert the result to a strict Python boolean vs normally acceptable values (V(yes)/V(no), V(on)/V(off), V(0)/V(1), etc).
|
|
16
16
|
type: bool
|
|
17
17
|
default: false
|
|
18
18
|
EXAMPLES: |
|
|
@@ -20,5 +20,5 @@ EXAMPLES: |
|
|
|
20
20
|
thisistrue: '{{ "" is falsy }}'
|
|
21
21
|
RETURN:
|
|
22
22
|
_value:
|
|
23
|
-
description: Returns
|
|
23
|
+
description: Returns V(False) if the condition is not "Python truthy", V(True) otherwise.
|
|
24
24
|
type: boolean
|
ansible/plugins/test/file.yml
CHANGED
|
@@ -18,5 +18,5 @@ EXAMPLES: |
|
|
|
18
18
|
|
|
19
19
|
RETURN:
|
|
20
20
|
_value:
|
|
21
|
-
description: Returns
|
|
21
|
+
description: Returns V(True) if the path corresponds to an existing file on the filesystem on the controller, V(False) if otherwise.
|
|
22
22
|
type: boolean
|
|
@@ -5,7 +5,7 @@ DOCUMENTATION:
|
|
|
5
5
|
short_description: Did async task finish
|
|
6
6
|
description:
|
|
7
7
|
- Used to test if an async task has finished, it will aslo work with normal tasks but will issue a warning.
|
|
8
|
-
- This test checks for the existance of a C(finished) key in the input dictionary and that it is
|
|
8
|
+
- This test checks for the existance of a C(finished) key in the input dictionary and that it is V(1) if present
|
|
9
9
|
options:
|
|
10
10
|
_input:
|
|
11
11
|
description: registered result from an Ansible task
|
|
@@ -17,5 +17,5 @@ EXAMPLES: |
|
|
|
17
17
|
|
|
18
18
|
RETURN:
|
|
19
19
|
_value:
|
|
20
|
-
description: Returns
|
|
20
|
+
description: Returns V(True) if the aysnc task has finished, V(False) otherwise.
|
|
21
21
|
type: boolean
|
ansible/plugins/test/is_abs.yml
CHANGED
ansible/plugins/test/is_dir.yml
CHANGED
|
@@ -17,5 +17,5 @@ EXAMPLES: |
|
|
|
17
17
|
|
|
18
18
|
RETURN:
|
|
19
19
|
_value:
|
|
20
|
-
description: Returns
|
|
20
|
+
description: Returns V(True) if the path corresponds to an existing directory on the filesystem on the controller, V(False) if otherwise.
|
|
21
21
|
type: boolean
|
ansible/plugins/test/is_file.yml
CHANGED
|
@@ -18,5 +18,5 @@ EXAMPLES: |
|
|
|
18
18
|
|
|
19
19
|
RETURN:
|
|
20
20
|
_value:
|
|
21
|
-
description: Returns
|
|
21
|
+
description: Returns V(True) if the path corresponds to an existing file on the filesystem on the controller, V(False) if otherwise.
|
|
22
22
|
type: boolean
|
ansible/plugins/test/is_link.yml
CHANGED
|
@@ -17,5 +17,5 @@ EXAMPLES: |
|
|
|
17
17
|
|
|
18
18
|
RETURN:
|
|
19
19
|
_value:
|
|
20
|
-
description: Returns
|
|
20
|
+
description: Returns V(True) if the path corresponds to an existing symlink on the filesystem on the controller, V(False) if otherwise.
|
|
21
21
|
type: boolean
|