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
|
@@ -10,7 +10,7 @@ import re
|
|
|
10
10
|
import ansible.constants as C
|
|
11
11
|
from ansible.errors import AnsibleError
|
|
12
12
|
from ansible.module_utils.six import string_types
|
|
13
|
-
from ansible.module_utils.
|
|
13
|
+
from ansible.module_utils.common.text.converters import to_native, to_text
|
|
14
14
|
from ansible.plugins.action import ActionBase
|
|
15
15
|
from ansible.utils.vars import combine_vars
|
|
16
16
|
|
|
@@ -23,6 +23,7 @@ class ActionModule(ActionBase):
|
|
|
23
23
|
VALID_DIR_ARGUMENTS = ['dir', 'depth', 'files_matching', 'ignore_files', 'extensions', 'ignore_unknown_extensions']
|
|
24
24
|
VALID_FILE_ARGUMENTS = ['file', '_raw_params']
|
|
25
25
|
VALID_ALL = ['name', 'hash_behaviour']
|
|
26
|
+
_requires_connection = False
|
|
26
27
|
|
|
27
28
|
def _set_dir_defaults(self):
|
|
28
29
|
if not self.depth:
|
|
@@ -182,7 +183,7 @@ class ActionModule(ActionBase):
|
|
|
182
183
|
The default depth is unlimited.
|
|
183
184
|
"""
|
|
184
185
|
current_depth = 0
|
|
185
|
-
sorted_walk = list(walk(self.source_dir, onerror=self._log_walk))
|
|
186
|
+
sorted_walk = list(walk(self.source_dir, onerror=self._log_walk, followlinks=True))
|
|
186
187
|
sorted_walk.sort(key=lambda x: x[0])
|
|
187
188
|
for current_root, current_dir, current_files in sorted_walk:
|
|
188
189
|
current_depth += 1
|
ansible/plugins/action/normal.py
CHANGED
|
@@ -24,12 +24,12 @@ from ansible.utils.vars import merge_hash
|
|
|
24
24
|
|
|
25
25
|
class ActionModule(ActionBase):
|
|
26
26
|
|
|
27
|
+
_supports_check_mode = True
|
|
28
|
+
_supports_async = True
|
|
29
|
+
|
|
27
30
|
def run(self, tmp=None, task_vars=None):
|
|
28
31
|
|
|
29
32
|
# individual modules might disagree but as the generic the action plugin, pass at this point.
|
|
30
|
-
self._supports_check_mode = True
|
|
31
|
-
self._supports_async = True
|
|
32
|
-
|
|
33
33
|
result = super(ActionModule, self).run(tmp, task_vars)
|
|
34
34
|
del tmp # tmp no longer has any effect
|
|
35
35
|
|
ansible/plugins/action/pause.py
CHANGED
|
@@ -21,7 +21,7 @@ import datetime
|
|
|
21
21
|
import time
|
|
22
22
|
|
|
23
23
|
from ansible.errors import AnsibleError, AnsiblePromptInterrupt, AnsiblePromptNoninteractive
|
|
24
|
-
from ansible.module_utils.
|
|
24
|
+
from ansible.module_utils.common.text.converters import to_text
|
|
25
25
|
from ansible.plugins.action import ActionBase
|
|
26
26
|
from ansible.utils.display import Display
|
|
27
27
|
|
ansible/plugins/action/reboot.py
CHANGED
|
@@ -8,10 +8,10 @@ __metaclass__ = type
|
|
|
8
8
|
import random
|
|
9
9
|
import time
|
|
10
10
|
|
|
11
|
-
from datetime import datetime, timedelta
|
|
11
|
+
from datetime import datetime, timedelta, timezone
|
|
12
12
|
|
|
13
13
|
from ansible.errors import AnsibleError, AnsibleConnectionFailure
|
|
14
|
-
from ansible.module_utils.
|
|
14
|
+
from ansible.module_utils.common.text.converters import to_native, to_text
|
|
15
15
|
from ansible.module_utils.common.validation import check_type_list, check_type_str
|
|
16
16
|
from ansible.plugins.action import ActionBase
|
|
17
17
|
from ansible.utils.display import Display
|
|
@@ -129,7 +129,7 @@ class ActionModule(ActionBase):
|
|
|
129
129
|
else:
|
|
130
130
|
args = self._get_value_from_facts('SHUTDOWN_COMMAND_ARGS', distribution, 'DEFAULT_SHUTDOWN_COMMAND_ARGS')
|
|
131
131
|
|
|
132
|
-
# Convert seconds to minutes. If less
|
|
132
|
+
# Convert seconds to minutes. If less than 60, set it to 0.
|
|
133
133
|
delay_min = self.pre_reboot_delay // 60
|
|
134
134
|
reboot_message = self._task.args.get('msg', self.DEFAULT_REBOOT_MESSAGE)
|
|
135
135
|
return args.format(delay_sec=self.pre_reboot_delay, delay_min=delay_min, message=reboot_message)
|
|
@@ -236,7 +236,7 @@ class ActionModule(ActionBase):
|
|
|
236
236
|
display.vvv("{action}: attempting to get system boot time".format(action=self._task.action))
|
|
237
237
|
connect_timeout = self._task.args.get('connect_timeout', self._task.args.get('connect_timeout_sec', self.DEFAULT_CONNECT_TIMEOUT))
|
|
238
238
|
|
|
239
|
-
# override connection timeout from defaults to custom value
|
|
239
|
+
# override connection timeout from defaults to the custom value
|
|
240
240
|
if connect_timeout:
|
|
241
241
|
try:
|
|
242
242
|
display.debug("{action}: setting connect_timeout to {value}".format(action=self._task.action, value=connect_timeout))
|
|
@@ -280,14 +280,15 @@ class ActionModule(ActionBase):
|
|
|
280
280
|
display.vvv("{action}: system successfully rebooted".format(action=self._task.action))
|
|
281
281
|
|
|
282
282
|
def do_until_success_or_timeout(self, action, reboot_timeout, action_desc, distribution, action_kwargs=None):
|
|
283
|
-
max_end_time = datetime.
|
|
283
|
+
max_end_time = datetime.now(timezone.utc) + timedelta(seconds=reboot_timeout)
|
|
284
284
|
if action_kwargs is None:
|
|
285
285
|
action_kwargs = {}
|
|
286
286
|
|
|
287
287
|
fail_count = 0
|
|
288
288
|
max_fail_sleep = 12
|
|
289
|
+
last_error_msg = ''
|
|
289
290
|
|
|
290
|
-
while datetime.
|
|
291
|
+
while datetime.now(timezone.utc) < max_end_time:
|
|
291
292
|
try:
|
|
292
293
|
action(distribution=distribution, **action_kwargs)
|
|
293
294
|
if action_desc:
|
|
@@ -299,7 +300,7 @@ class ActionModule(ActionBase):
|
|
|
299
300
|
self._connection.reset()
|
|
300
301
|
except AnsibleConnectionFailure:
|
|
301
302
|
pass
|
|
302
|
-
# Use exponential backoff with a max
|
|
303
|
+
# Use exponential backoff with a max timeout, plus a little bit of randomness
|
|
303
304
|
random_int = random.randint(0, 1000) / 1000
|
|
304
305
|
fail_sleep = 2 ** fail_count + random_int
|
|
305
306
|
if fail_sleep > max_fail_sleep:
|
|
@@ -310,14 +311,18 @@ class ActionModule(ActionBase):
|
|
|
310
311
|
error = to_text(e).splitlines()[-1]
|
|
311
312
|
except IndexError as e:
|
|
312
313
|
error = to_text(e)
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
314
|
+
last_error_msg = f"{self._task.action}: {action_desc} fail '{error}'"
|
|
315
|
+
msg = f"{last_error_msg}, retrying in {fail_sleep:.4f} seconds..."
|
|
316
|
+
|
|
317
|
+
display.debug(msg)
|
|
318
|
+
display.vvv(msg)
|
|
318
319
|
fail_count += 1
|
|
319
320
|
time.sleep(fail_sleep)
|
|
320
321
|
|
|
322
|
+
if last_error_msg:
|
|
323
|
+
msg = f"Last error message before the timeout exception - {last_error_msg}"
|
|
324
|
+
display.debug(msg)
|
|
325
|
+
display.vvv(msg)
|
|
321
326
|
raise TimedOutException('Timed out waiting for {desc} (timeout={timeout})'.format(desc=action_desc, timeout=reboot_timeout))
|
|
322
327
|
|
|
323
328
|
def perform_reboot(self, task_vars, distribution):
|
|
@@ -336,7 +341,7 @@ class ActionModule(ActionBase):
|
|
|
336
341
|
display.debug('{action}: AnsibleConnectionFailure caught and handled: {error}'.format(action=self._task.action, error=to_text(e)))
|
|
337
342
|
reboot_result['rc'] = 0
|
|
338
343
|
|
|
339
|
-
result['start'] = datetime.
|
|
344
|
+
result['start'] = datetime.now(timezone.utc)
|
|
340
345
|
|
|
341
346
|
if reboot_result['rc'] != 0:
|
|
342
347
|
result['failed'] = True
|
|
@@ -406,7 +411,7 @@ class ActionModule(ActionBase):
|
|
|
406
411
|
self._supports_check_mode = True
|
|
407
412
|
self._supports_async = True
|
|
408
413
|
|
|
409
|
-
# If running with local connection, fail so we don't reboot
|
|
414
|
+
# If running with local connection, fail so we don't reboot ourselves
|
|
410
415
|
if self._connection.transport == 'local':
|
|
411
416
|
msg = 'Running {0} with local connection would reboot the control node.'.format(self._task.action)
|
|
412
417
|
return {'changed': False, 'elapsed': 0, 'rebooted': False, 'failed': True, 'msg': msg}
|
|
@@ -447,7 +452,7 @@ class ActionModule(ActionBase):
|
|
|
447
452
|
|
|
448
453
|
if reboot_result['failed']:
|
|
449
454
|
result = reboot_result
|
|
450
|
-
elapsed = datetime.
|
|
455
|
+
elapsed = datetime.now(timezone.utc) - reboot_result['start']
|
|
451
456
|
result['elapsed'] = elapsed.seconds
|
|
452
457
|
return result
|
|
453
458
|
|
|
@@ -459,7 +464,7 @@ class ActionModule(ActionBase):
|
|
|
459
464
|
# Make sure reboot was successful
|
|
460
465
|
result = self.validate_reboot(distribution, original_connection_timeout, action_kwargs={'previous_boot_time': previous_boot_time})
|
|
461
466
|
|
|
462
|
-
elapsed = datetime.
|
|
467
|
+
elapsed = datetime.now(timezone.utc) - reboot_result['start']
|
|
463
468
|
result['elapsed'] = elapsed.seconds
|
|
464
469
|
|
|
465
470
|
return result
|
ansible/plugins/action/script.py
CHANGED
|
@@ -23,7 +23,7 @@ import shlex
|
|
|
23
23
|
|
|
24
24
|
from ansible.errors import AnsibleError, AnsibleAction, _AnsibleActionDone, AnsibleActionFail, AnsibleActionSkip
|
|
25
25
|
from ansible.executor.powershell import module_manifest as ps_manifest
|
|
26
|
-
from ansible.module_utils.
|
|
26
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
|
27
27
|
from ansible.plugins.action import ActionBase
|
|
28
28
|
|
|
29
29
|
|
|
@@ -40,11 +40,25 @@ class ActionModule(ActionBase):
|
|
|
40
40
|
if task_vars is None:
|
|
41
41
|
task_vars = dict()
|
|
42
42
|
|
|
43
|
+
validation_result, new_module_args = self.validate_argument_spec(
|
|
44
|
+
argument_spec={
|
|
45
|
+
'_raw_params': {},
|
|
46
|
+
'cmd': {'type': 'str'},
|
|
47
|
+
'creates': {'type': 'str'},
|
|
48
|
+
'removes': {'type': 'str'},
|
|
49
|
+
'chdir': {'type': 'str'},
|
|
50
|
+
'executable': {'type': 'str'},
|
|
51
|
+
},
|
|
52
|
+
required_one_of=[
|
|
53
|
+
['_raw_params', 'cmd']
|
|
54
|
+
]
|
|
55
|
+
)
|
|
56
|
+
|
|
43
57
|
result = super(ActionModule, self).run(tmp, task_vars)
|
|
44
58
|
del tmp # tmp no longer has any effect
|
|
45
59
|
|
|
46
60
|
try:
|
|
47
|
-
creates =
|
|
61
|
+
creates = new_module_args['creates']
|
|
48
62
|
if creates:
|
|
49
63
|
# do not run the command if the line contains creates=filename
|
|
50
64
|
# and the filename already exists. This allows idempotence
|
|
@@ -52,7 +66,7 @@ class ActionModule(ActionBase):
|
|
|
52
66
|
if self._remote_file_exists(creates):
|
|
53
67
|
raise AnsibleActionSkip("%s exists, matching creates option" % creates)
|
|
54
68
|
|
|
55
|
-
removes =
|
|
69
|
+
removes = new_module_args['removes']
|
|
56
70
|
if removes:
|
|
57
71
|
# do not run the command if the line contains removes=filename
|
|
58
72
|
# and the filename does not exist. This allows idempotence
|
|
@@ -62,7 +76,7 @@ class ActionModule(ActionBase):
|
|
|
62
76
|
|
|
63
77
|
# The chdir must be absolute, because a relative path would rely on
|
|
64
78
|
# remote node behaviour & user config.
|
|
65
|
-
chdir =
|
|
79
|
+
chdir = new_module_args['chdir']
|
|
66
80
|
if chdir:
|
|
67
81
|
# Powershell is the only Windows-path aware shell
|
|
68
82
|
if getattr(self._connection._shell, "_IS_WINDOWS", False) and \
|
|
@@ -75,13 +89,14 @@ class ActionModule(ActionBase):
|
|
|
75
89
|
# Split out the script as the first item in raw_params using
|
|
76
90
|
# shlex.split() in order to support paths and files with spaces in the name.
|
|
77
91
|
# Any arguments passed to the script will be added back later.
|
|
78
|
-
raw_params = to_native(
|
|
92
|
+
raw_params = to_native(new_module_args.get('_raw_params', ''), errors='surrogate_or_strict')
|
|
79
93
|
parts = [to_text(s, errors='surrogate_or_strict') for s in shlex.split(raw_params.strip())]
|
|
80
94
|
source = parts[0]
|
|
81
95
|
|
|
82
96
|
# Support executable paths and files with spaces in the name.
|
|
83
|
-
executable =
|
|
84
|
-
|
|
97
|
+
executable = new_module_args['executable']
|
|
98
|
+
if executable:
|
|
99
|
+
executable = to_native(new_module_args['executable'], errors='surrogate_or_strict')
|
|
85
100
|
try:
|
|
86
101
|
source = self._loader.get_real_file(self._find_needle('files', source), decrypt=self._task.args.get('decrypt', True))
|
|
87
102
|
except AnsibleError as e:
|
|
@@ -90,7 +105,7 @@ class ActionModule(ActionBase):
|
|
|
90
105
|
if self._task.check_mode:
|
|
91
106
|
# check mode is supported if 'creates' or 'removes' are provided
|
|
92
107
|
# the task has already been skipped if a change would not occur
|
|
93
|
-
if
|
|
108
|
+
if new_module_args['creates'] or new_module_args['removes']:
|
|
94
109
|
result['changed'] = True
|
|
95
110
|
raise _AnsibleActionDone(result=result)
|
|
96
111
|
# If the script doesn't return changed in the result, it defaults to True,
|
ansible/plugins/action/shell.py
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
from __future__ import (absolute_import, division, print_function)
|
|
5
5
|
__metaclass__ = type
|
|
6
6
|
|
|
7
|
+
from ansible.errors import AnsibleActionFail
|
|
7
8
|
from ansible.plugins.action import ActionBase
|
|
8
9
|
|
|
9
10
|
|
|
@@ -15,6 +16,11 @@ class ActionModule(ActionBase):
|
|
|
15
16
|
# Shell module is implemented via command with a special arg
|
|
16
17
|
self._task.args['_uses_shell'] = True
|
|
17
18
|
|
|
19
|
+
# Shell shares the same module code as command. Fail if command
|
|
20
|
+
# specific options are set.
|
|
21
|
+
if "expand_argument_vars" in self._task.args:
|
|
22
|
+
raise AnsibleActionFail(f"Unsupported parameters for ({self._task.action}) module: expand_argument_vars")
|
|
23
|
+
|
|
18
24
|
command_action = self._shared_loader_obj.action_loader.get('ansible.legacy.command',
|
|
19
25
|
task=self._task,
|
|
20
26
|
connection=self._connection,
|
|
@@ -22,7 +22,7 @@ from jinja2.defaults import (
|
|
|
22
22
|
from ansible import constants as C
|
|
23
23
|
from ansible.config.manager import ensure_type
|
|
24
24
|
from ansible.errors import AnsibleError, AnsibleFileNotFound, AnsibleAction, AnsibleActionFail
|
|
25
|
-
from ansible.module_utils.
|
|
25
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_text, to_native
|
|
26
26
|
from ansible.module_utils.parsing.convert_bool import boolean
|
|
27
27
|
from ansible.module_utils.six import string_types
|
|
28
28
|
from ansible.plugins.action import ActionBase
|
|
@@ -21,7 +21,7 @@ __metaclass__ = type
|
|
|
21
21
|
import os
|
|
22
22
|
|
|
23
23
|
from ansible.errors import AnsibleError, AnsibleAction, AnsibleActionFail, AnsibleActionSkip
|
|
24
|
-
from ansible.module_utils.
|
|
24
|
+
from ansible.module_utils.common.text.converters import to_text
|
|
25
25
|
from ansible.module_utils.parsing.convert_bool import boolean
|
|
26
26
|
from ansible.plugins.action import ActionBase
|
|
27
27
|
|
ansible/plugins/action/uri.py
CHANGED
|
@@ -10,7 +10,7 @@ __metaclass__ = type
|
|
|
10
10
|
import os
|
|
11
11
|
|
|
12
12
|
from ansible.errors import AnsibleError, AnsibleAction, _AnsibleActionDone, AnsibleActionFail
|
|
13
|
-
from ansible.module_utils.
|
|
13
|
+
from ansible.module_utils.common.text.converters import to_native
|
|
14
14
|
from ansible.module_utils.common.collections import Mapping, MutableMapping
|
|
15
15
|
from ansible.module_utils.parsing.convert_bool import boolean
|
|
16
16
|
from ansible.plugins.action import ActionBase
|
|
@@ -20,9 +20,9 @@ from __future__ import (absolute_import, division, print_function)
|
|
|
20
20
|
__metaclass__ = type
|
|
21
21
|
|
|
22
22
|
import time
|
|
23
|
-
from datetime import datetime, timedelta
|
|
23
|
+
from datetime import datetime, timedelta, timezone
|
|
24
24
|
|
|
25
|
-
from ansible.module_utils.
|
|
25
|
+
from ansible.module_utils.common.text.converters import to_text
|
|
26
26
|
from ansible.plugins.action import ActionBase
|
|
27
27
|
from ansible.utils.display import Display
|
|
28
28
|
|
|
@@ -43,10 +43,10 @@ class ActionModule(ActionBase):
|
|
|
43
43
|
DEFAULT_TIMEOUT = 600
|
|
44
44
|
|
|
45
45
|
def do_until_success_or_timeout(self, what, timeout, connect_timeout, what_desc, sleep=1):
|
|
46
|
-
max_end_time = datetime.
|
|
46
|
+
max_end_time = datetime.now(timezone.utc) + timedelta(seconds=timeout)
|
|
47
47
|
|
|
48
48
|
e = None
|
|
49
|
-
while datetime.
|
|
49
|
+
while datetime.now(timezone.utc) < max_end_time:
|
|
50
50
|
try:
|
|
51
51
|
what(connect_timeout)
|
|
52
52
|
if what_desc:
|
|
@@ -12,7 +12,7 @@ from string import ascii_lowercase
|
|
|
12
12
|
from gettext import dgettext
|
|
13
13
|
|
|
14
14
|
from ansible.errors import AnsibleError
|
|
15
|
-
from ansible.module_utils.
|
|
15
|
+
from ansible.module_utils.common.text.converters import to_bytes
|
|
16
16
|
from ansible.plugins import AnsiblePlugin
|
|
17
17
|
|
|
18
18
|
|
ansible/plugins/become/su.py
CHANGED
|
@@ -29,7 +29,7 @@ from collections.abc import MutableMapping
|
|
|
29
29
|
|
|
30
30
|
from ansible import constants as C
|
|
31
31
|
from ansible.errors import AnsibleError
|
|
32
|
-
from ansible.module_utils.
|
|
32
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
|
33
33
|
from ansible.plugins import AnsiblePlugin
|
|
34
34
|
from ansible.plugins.loader import cache_loader
|
|
35
35
|
from ansible.utils.collection_loader import resource_from_fqcr
|
|
@@ -88,7 +88,7 @@ import time
|
|
|
88
88
|
import re
|
|
89
89
|
|
|
90
90
|
from ansible import constants as C
|
|
91
|
-
from ansible.module_utils.
|
|
91
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
|
92
92
|
from ansible.plugins.callback import CallbackBase
|
|
93
93
|
from ansible.utils._junit_xml import (
|
|
94
94
|
TestCase,
|
|
@@ -12,7 +12,7 @@ DOCUMENTATION = '''
|
|
|
12
12
|
short_description: oneline Ansible screen output
|
|
13
13
|
version_added: historical
|
|
14
14
|
description:
|
|
15
|
-
- This is the output callback used by the -o
|
|
15
|
+
- This is the output callback used by the C(-o)/C(--one-line) command line option.
|
|
16
16
|
'''
|
|
17
17
|
|
|
18
18
|
from ansible.plugins.callback import CallbackBase
|
ansible/plugins/callback/tree.py
CHANGED
|
@@ -31,7 +31,7 @@ DOCUMENTATION = '''
|
|
|
31
31
|
import os
|
|
32
32
|
|
|
33
33
|
from ansible.constants import TREE_DIR
|
|
34
|
-
from ansible.module_utils.
|
|
34
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
|
35
35
|
from ansible.plugins.callback import CallbackBase
|
|
36
36
|
from ansible.utils.path import makedirs_safe, unfrackpath
|
|
37
37
|
|
|
@@ -24,7 +24,7 @@ from functools import wraps
|
|
|
24
24
|
|
|
25
25
|
from ansible.plugins import AnsiblePlugin
|
|
26
26
|
from ansible.errors import AnsibleError, AnsibleConnectionFailure
|
|
27
|
-
from ansible.module_utils.
|
|
27
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
|
28
28
|
|
|
29
29
|
try:
|
|
30
30
|
from scp import SCPClient
|
|
@@ -276,7 +276,7 @@ class CliconfBase(AnsiblePlugin):
|
|
|
276
276
|
'diff_replace': [list of supported replace values],
|
|
277
277
|
'output': [list of supported command output format]
|
|
278
278
|
}
|
|
279
|
-
:return: capability as
|
|
279
|
+
:return: capability as dict
|
|
280
280
|
"""
|
|
281
281
|
result = {}
|
|
282
282
|
result['rpc'] = self.get_base_rpc()
|