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/find.py
CHANGED
|
@@ -19,6 +19,9 @@ short_description: Return a list of files based on specific criteria
|
|
|
19
19
|
description:
|
|
20
20
|
- Return a list of files based on specific criteria. Multiple criteria are AND'd together.
|
|
21
21
|
- For Windows targets, use the M(ansible.windows.win_find) module instead.
|
|
22
|
+
- This module does not use the C(find) command, it is a much simpler and slower Python implementation.
|
|
23
|
+
It is intended for small and simple uses. Those that need the extra power or speed and have expertise
|
|
24
|
+
with the UNIX command, should use it directly.
|
|
22
25
|
options:
|
|
23
26
|
age:
|
|
24
27
|
description:
|
|
@@ -30,7 +33,7 @@ options:
|
|
|
30
33
|
patterns:
|
|
31
34
|
default: []
|
|
32
35
|
description:
|
|
33
|
-
- One or more (shell or regex) patterns, which type is controlled by
|
|
36
|
+
- One or more (shell or regex) patterns, which type is controlled by O(use_regex) option.
|
|
34
37
|
- The patterns restrict the list of files to be returned to those whose basenames match at
|
|
35
38
|
least one of the patterns specified. Multiple patterns can be specified using a list.
|
|
36
39
|
- The pattern is matched against the file base name, excluding the directory.
|
|
@@ -40,14 +43,14 @@ options:
|
|
|
40
43
|
- This parameter expects a list, which can be either comma separated or YAML. If any of the
|
|
41
44
|
patterns contain a comma, make sure to put them in a list to avoid splitting the patterns
|
|
42
45
|
in undesirable ways.
|
|
43
|
-
- Defaults to
|
|
46
|
+
- Defaults to V(*) when O(use_regex=False), or V(.*) when O(use_regex=True).
|
|
44
47
|
type: list
|
|
45
48
|
aliases: [ pattern ]
|
|
46
49
|
elements: str
|
|
47
50
|
excludes:
|
|
48
51
|
description:
|
|
49
|
-
- One or more (shell or regex) patterns, which type is controlled by
|
|
50
|
-
- Items whose basenames match an
|
|
52
|
+
- One or more (shell or regex) patterns, which type is controlled by O(use_regex) option.
|
|
53
|
+
- Items whose basenames match an O(excludes) pattern are culled from O(patterns) matches.
|
|
51
54
|
Multiple patterns can be specified using a list.
|
|
52
55
|
type: list
|
|
53
56
|
aliases: [ exclude ]
|
|
@@ -56,17 +59,17 @@ options:
|
|
|
56
59
|
contains:
|
|
57
60
|
description:
|
|
58
61
|
- A regular expression or pattern which should be matched against the file content.
|
|
59
|
-
- If
|
|
60
|
-
|
|
61
|
-
(uses
|
|
62
|
-
- Works only when
|
|
62
|
+
- If O(read_whole_file) is V(false) it matches against the beginning of the line (uses
|
|
63
|
+
V(re.match(\))). If O(read_whole_file) is V(true), it searches anywhere for that pattern
|
|
64
|
+
(uses V(re.search(\))).
|
|
65
|
+
- Works only when O(file_type) is V(file).
|
|
63
66
|
type: str
|
|
64
67
|
read_whole_file:
|
|
65
68
|
description:
|
|
66
69
|
- When doing a C(contains) search, determines whether the whole file should be read into
|
|
67
70
|
memory or if the regex should be applied to the file line-by-line.
|
|
68
71
|
- Setting this to C(true) can have performance and memory implications for large files.
|
|
69
|
-
- This uses
|
|
72
|
+
- This uses V(re.search(\)) instead of V(re.match(\)).
|
|
70
73
|
type: bool
|
|
71
74
|
default: false
|
|
72
75
|
version_added: "2.11"
|
|
@@ -105,29 +108,45 @@ options:
|
|
|
105
108
|
default: mtime
|
|
106
109
|
hidden:
|
|
107
110
|
description:
|
|
108
|
-
- Set this to
|
|
111
|
+
- Set this to V(true) to include hidden files, otherwise they will be ignored.
|
|
109
112
|
type: bool
|
|
110
113
|
default: no
|
|
114
|
+
mode:
|
|
115
|
+
description:
|
|
116
|
+
- Choose objects matching a specified permission. This value is
|
|
117
|
+
restricted to modes that can be applied using the python
|
|
118
|
+
C(os.chmod) function.
|
|
119
|
+
- The mode can be provided as an octal such as V("0644") or
|
|
120
|
+
as symbolic such as V(u=rw,g=r,o=r)
|
|
121
|
+
type: raw
|
|
122
|
+
version_added: '2.16'
|
|
123
|
+
exact_mode:
|
|
124
|
+
description:
|
|
125
|
+
- Restrict mode matching to exact matches only, and not as a
|
|
126
|
+
minimum set of permissions to match.
|
|
127
|
+
type: bool
|
|
128
|
+
default: true
|
|
129
|
+
version_added: '2.16'
|
|
111
130
|
follow:
|
|
112
131
|
description:
|
|
113
|
-
- Set this to
|
|
132
|
+
- Set this to V(true) to follow symlinks in path for systems with python 2.6+.
|
|
114
133
|
type: bool
|
|
115
134
|
default: no
|
|
116
135
|
get_checksum:
|
|
117
136
|
description:
|
|
118
|
-
- Set this to
|
|
137
|
+
- Set this to V(true) to retrieve a file's SHA1 checksum.
|
|
119
138
|
type: bool
|
|
120
139
|
default: no
|
|
121
140
|
use_regex:
|
|
122
141
|
description:
|
|
123
|
-
- If
|
|
124
|
-
- If
|
|
142
|
+
- If V(false), the patterns are file globs (shell).
|
|
143
|
+
- If V(true), they are python regexes.
|
|
125
144
|
type: bool
|
|
126
145
|
default: no
|
|
127
146
|
depth:
|
|
128
147
|
description:
|
|
129
148
|
- Set the maximum number of levels to descend into.
|
|
130
|
-
- Setting recurse to
|
|
149
|
+
- Setting recurse to V(false) will override this value, which is effectively depth 1.
|
|
131
150
|
- Default is unlimited depth.
|
|
132
151
|
type: int
|
|
133
152
|
version_added: "2.6"
|
|
@@ -247,8 +266,15 @@ import re
|
|
|
247
266
|
import stat
|
|
248
267
|
import time
|
|
249
268
|
|
|
250
|
-
from ansible.module_utils.
|
|
269
|
+
from ansible.module_utils.common.text.converters import to_text, to_native
|
|
251
270
|
from ansible.module_utils.basic import AnsibleModule
|
|
271
|
+
from ansible.module_utils.six import string_types
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
class _Object:
|
|
275
|
+
def __init__(self, **kwargs):
|
|
276
|
+
for k, v in kwargs.items():
|
|
277
|
+
setattr(self, k, v)
|
|
252
278
|
|
|
253
279
|
|
|
254
280
|
def pfilter(f, patterns=None, excludes=None, use_regex=False):
|
|
@@ -341,6 +367,25 @@ def contentfilter(fsname, pattern, read_whole_file=False):
|
|
|
341
367
|
return False
|
|
342
368
|
|
|
343
369
|
|
|
370
|
+
def mode_filter(st, mode, exact, module):
|
|
371
|
+
if not mode:
|
|
372
|
+
return True
|
|
373
|
+
|
|
374
|
+
st_mode = stat.S_IMODE(st.st_mode)
|
|
375
|
+
|
|
376
|
+
try:
|
|
377
|
+
mode = int(mode, 8)
|
|
378
|
+
except ValueError:
|
|
379
|
+
mode = module._symbolic_mode_to_octal(_Object(st_mode=0), mode)
|
|
380
|
+
|
|
381
|
+
mode = stat.S_IMODE(mode)
|
|
382
|
+
|
|
383
|
+
if exact:
|
|
384
|
+
return st_mode == mode
|
|
385
|
+
|
|
386
|
+
return bool(st_mode & mode)
|
|
387
|
+
|
|
388
|
+
|
|
344
389
|
def statinfo(st):
|
|
345
390
|
pw_name = ""
|
|
346
391
|
gr_name = ""
|
|
@@ -411,12 +456,19 @@ def main():
|
|
|
411
456
|
get_checksum=dict(type='bool', default=False),
|
|
412
457
|
use_regex=dict(type='bool', default=False),
|
|
413
458
|
depth=dict(type='int'),
|
|
459
|
+
mode=dict(type='raw'),
|
|
460
|
+
exact_mode=dict(type='bool', default=True),
|
|
414
461
|
),
|
|
415
462
|
supports_check_mode=True,
|
|
416
463
|
)
|
|
417
464
|
|
|
418
465
|
params = module.params
|
|
419
466
|
|
|
467
|
+
if params['mode'] and not isinstance(params['mode'], string_types):
|
|
468
|
+
module.fail_json(
|
|
469
|
+
msg="argument 'mode' is not a string and conversion is not allowed, value is of type %s" % params['mode'].__class__.__name__
|
|
470
|
+
)
|
|
471
|
+
|
|
420
472
|
# Set the default match pattern to either a match-all glob or
|
|
421
473
|
# regex depending on use_regex being set. This makes sure if you
|
|
422
474
|
# set excludes: without a pattern pfilter gets something it can
|
|
@@ -486,7 +538,9 @@ def main():
|
|
|
486
538
|
|
|
487
539
|
r = {'path': fsname}
|
|
488
540
|
if params['file_type'] == 'any':
|
|
489
|
-
if pfilter(fsobj, params['patterns'], params['excludes'], params['use_regex']) and
|
|
541
|
+
if (pfilter(fsobj, params['patterns'], params['excludes'], params['use_regex']) and
|
|
542
|
+
agefilter(st, now, age, params['age_stamp']) and
|
|
543
|
+
mode_filter(st, params['mode'], params['exact_mode'], module)):
|
|
490
544
|
|
|
491
545
|
r.update(statinfo(st))
|
|
492
546
|
if stat.S_ISREG(st.st_mode) and params['get_checksum']:
|
|
@@ -499,15 +553,19 @@ def main():
|
|
|
499
553
|
filelist.append(r)
|
|
500
554
|
|
|
501
555
|
elif stat.S_ISDIR(st.st_mode) and params['file_type'] == 'directory':
|
|
502
|
-
if pfilter(fsobj, params['patterns'], params['excludes'], params['use_regex']) and
|
|
556
|
+
if (pfilter(fsobj, params['patterns'], params['excludes'], params['use_regex']) and
|
|
557
|
+
agefilter(st, now, age, params['age_stamp']) and
|
|
558
|
+
mode_filter(st, params['mode'], params['exact_mode'], module)):
|
|
503
559
|
|
|
504
560
|
r.update(statinfo(st))
|
|
505
561
|
filelist.append(r)
|
|
506
562
|
|
|
507
563
|
elif stat.S_ISREG(st.st_mode) and params['file_type'] == 'file':
|
|
508
|
-
if pfilter(fsobj, params['patterns'], params['excludes'], params['use_regex']) and
|
|
509
|
-
|
|
510
|
-
|
|
564
|
+
if (pfilter(fsobj, params['patterns'], params['excludes'], params['use_regex']) and
|
|
565
|
+
agefilter(st, now, age, params['age_stamp']) and
|
|
566
|
+
sizefilter(st, size) and
|
|
567
|
+
contentfilter(fsname, params['contains'], params['read_whole_file']) and
|
|
568
|
+
mode_filter(st, params['mode'], params['exact_mode'], module)):
|
|
511
569
|
|
|
512
570
|
r.update(statinfo(st))
|
|
513
571
|
if params['get_checksum']:
|
|
@@ -515,7 +573,9 @@ def main():
|
|
|
515
573
|
filelist.append(r)
|
|
516
574
|
|
|
517
575
|
elif stat.S_ISLNK(st.st_mode) and params['file_type'] == 'link':
|
|
518
|
-
if pfilter(fsobj, params['patterns'], params['excludes'], params['use_regex']) and
|
|
576
|
+
if (pfilter(fsobj, params['patterns'], params['excludes'], params['use_regex']) and
|
|
577
|
+
agefilter(st, now, age, params['age_stamp']) and
|
|
578
|
+
mode_filter(st, params['mode'], params['exact_mode'], module)):
|
|
519
579
|
|
|
520
580
|
r.update(statinfo(st))
|
|
521
581
|
filelist.append(r)
|
ansible/modules/gather_facts.py
CHANGED
|
@@ -26,13 +26,15 @@ options:
|
|
|
26
26
|
- A toggle that controls if the fact modules are executed in parallel or serially and in order.
|
|
27
27
|
This can guarantee the merge order of module facts at the expense of performance.
|
|
28
28
|
- By default it will be true if more than one fact module is used.
|
|
29
|
+
- For low cost/delay fact modules parallelism overhead might end up meaning the whole process takes longer.
|
|
30
|
+
Test your specific case to see if it is a speed improvement or not.
|
|
29
31
|
type: bool
|
|
30
32
|
attributes:
|
|
31
33
|
action:
|
|
32
34
|
support: full
|
|
33
35
|
async:
|
|
34
|
-
details:
|
|
35
|
-
support:
|
|
36
|
+
details: while this action does not support the task 'async' keywords it can do its own parallel processing using the O(parallel) option.
|
|
37
|
+
support: none
|
|
36
38
|
bypass_host_loop:
|
|
37
39
|
support: none
|
|
38
40
|
check_mode:
|
|
@@ -48,6 +50,8 @@ attributes:
|
|
|
48
50
|
notes:
|
|
49
51
|
- This is mostly a wrapper around other fact gathering modules.
|
|
50
52
|
- Options passed into this action must be supported by all the underlying fact modules configured.
|
|
53
|
+
- If using C(gather_timeout) and parallel execution, it will limit the total execution time of
|
|
54
|
+
modules that do not accept C(gather_timeout) themselves.
|
|
51
55
|
- Facts returned by each module will be merged, conflicts will favor 'last merged'.
|
|
52
56
|
Order is not guaranteed, when doing parallel gathering on multiple modules.
|
|
53
57
|
author:
|
ansible/modules/get_url.py
CHANGED
|
@@ -29,7 +29,7 @@ options:
|
|
|
29
29
|
ciphers:
|
|
30
30
|
description:
|
|
31
31
|
- SSL/TLS Ciphers to use for the request
|
|
32
|
-
- 'When a list is provided, all ciphers are joined in order with
|
|
32
|
+
- 'When a list is provided, all ciphers are joined in order with V(:)'
|
|
33
33
|
- See the L(OpenSSL Cipher List Format,https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html#CIPHER-LIST-FORMAT)
|
|
34
34
|
for more details.
|
|
35
35
|
- The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions
|
|
@@ -50,11 +50,11 @@ options:
|
|
|
50
50
|
dest:
|
|
51
51
|
description:
|
|
52
52
|
- Absolute path of where to download the file to.
|
|
53
|
-
- If
|
|
53
|
+
- If O(dest) is a directory, either the server provided filename or, if
|
|
54
54
|
none provided, the base name of the URL on the remote server will be
|
|
55
|
-
used. If a directory,
|
|
56
|
-
- If
|
|
57
|
-
(regardless of the
|
|
55
|
+
used. If a directory, O(force) has no effect.
|
|
56
|
+
- If O(dest) is a directory, the file will always be downloaded
|
|
57
|
+
(regardless of the O(force) and O(checksum) option), but
|
|
58
58
|
replaced only if the contents changed.
|
|
59
59
|
type: path
|
|
60
60
|
required: true
|
|
@@ -62,17 +62,17 @@ options:
|
|
|
62
62
|
description:
|
|
63
63
|
- Absolute path of where temporary file is downloaded to.
|
|
64
64
|
- When run on Ansible 2.5 or greater, path defaults to ansible's remote_tmp setting
|
|
65
|
-
- When run on Ansible prior to 2.5, it defaults to
|
|
65
|
+
- When run on Ansible prior to 2.5, it defaults to E(TMPDIR), E(TEMP) or E(TMP) env variables or a platform specific value.
|
|
66
66
|
- U(https://docs.python.org/3/library/tempfile.html#tempfile.tempdir)
|
|
67
67
|
type: path
|
|
68
68
|
version_added: '2.1'
|
|
69
69
|
force:
|
|
70
70
|
description:
|
|
71
|
-
- If
|
|
72
|
-
time and replace the file if the contents change. If
|
|
71
|
+
- If V(true) and O(dest) is not a directory, will download the file every
|
|
72
|
+
time and replace the file if the contents change. If V(false), the file
|
|
73
73
|
will only be downloaded if the destination does not exist. Generally
|
|
74
|
-
should be
|
|
75
|
-
- Prior to 0.6, this module behaved as if
|
|
74
|
+
should be V(true) only for small local files.
|
|
75
|
+
- Prior to 0.6, this module behaved as if V(true) was the default.
|
|
76
76
|
type: bool
|
|
77
77
|
default: no
|
|
78
78
|
version_added: '0.7'
|
|
@@ -96,22 +96,22 @@ options:
|
|
|
96
96
|
The choices vary based on Python version and OpenSSL version.
|
|
97
97
|
- On systems running in FIPS compliant mode, the ``md5`` algorithm may be unavailable.
|
|
98
98
|
- Additionally, if a checksum is passed to this parameter, and the file exist under
|
|
99
|
-
the
|
|
100
|
-
checksum equals
|
|
101
|
-
(unless
|
|
99
|
+
the O(dest) location, the C(destination_checksum) would be calculated, and if
|
|
100
|
+
checksum equals C(destination_checksum), the file download would be skipped
|
|
101
|
+
(unless O(force) is V(true)). If the checksum does not equal C(destination_checksum),
|
|
102
102
|
the destination file is deleted.
|
|
103
103
|
type: str
|
|
104
104
|
default: ''
|
|
105
105
|
version_added: "2.0"
|
|
106
106
|
use_proxy:
|
|
107
107
|
description:
|
|
108
|
-
- if
|
|
108
|
+
- if V(false), it will not use a proxy, even if one is defined in
|
|
109
109
|
an environment variable on the target hosts.
|
|
110
110
|
type: bool
|
|
111
111
|
default: yes
|
|
112
112
|
validate_certs:
|
|
113
113
|
description:
|
|
114
|
-
- If
|
|
114
|
+
- If V(false), SSL certificates will not be validated.
|
|
115
115
|
- This should only be used on personally controlled sites using self-signed certificates.
|
|
116
116
|
type: bool
|
|
117
117
|
default: yes
|
|
@@ -132,16 +132,16 @@ options:
|
|
|
132
132
|
url_username:
|
|
133
133
|
description:
|
|
134
134
|
- The username for use in HTTP basic authentication.
|
|
135
|
-
- This parameter can be used without
|
|
136
|
-
- Since version 2.8 you can also use the
|
|
135
|
+
- This parameter can be used without O(url_password) for sites that allow empty passwords.
|
|
136
|
+
- Since version 2.8 you can also use the O(username) alias for this option.
|
|
137
137
|
type: str
|
|
138
138
|
aliases: ['username']
|
|
139
139
|
version_added: '1.6'
|
|
140
140
|
url_password:
|
|
141
141
|
description:
|
|
142
142
|
- The password for use in HTTP basic authentication.
|
|
143
|
-
- If the
|
|
144
|
-
- Since version 2.8 you can also use the
|
|
143
|
+
- If the O(url_username) parameter is not specified, the O(url_password) parameter will not be used.
|
|
144
|
+
- Since version 2.8 you can also use the O(password) alias for this option.
|
|
145
145
|
type: str
|
|
146
146
|
aliases: ['password']
|
|
147
147
|
version_added: '1.6'
|
|
@@ -157,13 +157,13 @@ options:
|
|
|
157
157
|
client_cert:
|
|
158
158
|
description:
|
|
159
159
|
- PEM formatted certificate chain file to be used for SSL client authentication.
|
|
160
|
-
- This file can also include the key as well, and if the key is included,
|
|
160
|
+
- This file can also include the key as well, and if the key is included, O(client_key) is not required.
|
|
161
161
|
type: path
|
|
162
162
|
version_added: '2.4'
|
|
163
163
|
client_key:
|
|
164
164
|
description:
|
|
165
165
|
- PEM formatted file that contains your private key to be used for SSL client authentication.
|
|
166
|
-
- If
|
|
166
|
+
- If O(client_cert) contains both the certificate and key, this option is not required.
|
|
167
167
|
type: path
|
|
168
168
|
version_added: '2.4'
|
|
169
169
|
http_agent:
|
|
@@ -185,7 +185,7 @@ options:
|
|
|
185
185
|
- Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate
|
|
186
186
|
authentication.
|
|
187
187
|
- Requires the Python library L(gssapi,https://github.com/pythongssapi/python-gssapi) to be installed.
|
|
188
|
-
- Credentials for GSSAPI can be specified with
|
|
188
|
+
- Credentials for GSSAPI can be specified with O(url_username)/O(url_password) or with the GSSAPI env var
|
|
189
189
|
C(KRB5CCNAME) that specified a custom Kerberos credential cache.
|
|
190
190
|
- NTLM authentication is I(not) supported even if the GSSAPI mech for NTLM has been installed.
|
|
191
191
|
type: bool
|
|
@@ -366,7 +366,6 @@ url:
|
|
|
366
366
|
sample: https://www.ansible.com/
|
|
367
367
|
'''
|
|
368
368
|
|
|
369
|
-
import datetime
|
|
370
369
|
import os
|
|
371
370
|
import re
|
|
372
371
|
import shutil
|
|
@@ -375,7 +374,8 @@ import traceback
|
|
|
375
374
|
|
|
376
375
|
from ansible.module_utils.basic import AnsibleModule
|
|
377
376
|
from ansible.module_utils.six.moves.urllib.parse import urlsplit
|
|
378
|
-
from ansible.module_utils.
|
|
377
|
+
from ansible.module_utils.compat.datetime import utcnow, utcfromtimestamp
|
|
378
|
+
from ansible.module_utils.common.text.converters import to_native
|
|
379
379
|
from ansible.module_utils.urls import fetch_url, url_argument_spec
|
|
380
380
|
|
|
381
381
|
# ==============================================================
|
|
@@ -397,10 +397,10 @@ def url_get(module, url, dest, use_proxy, last_mod_time, force, timeout=10, head
|
|
|
397
397
|
Return (tempfile, info about the request)
|
|
398
398
|
"""
|
|
399
399
|
|
|
400
|
-
start =
|
|
400
|
+
start = utcnow()
|
|
401
401
|
rsp, info = fetch_url(module, url, use_proxy=use_proxy, force=force, last_mod_time=last_mod_time, timeout=timeout, headers=headers, method=method,
|
|
402
402
|
unredirected_headers=unredirected_headers, decompress=decompress, ciphers=ciphers, use_netrc=use_netrc)
|
|
403
|
-
elapsed = (
|
|
403
|
+
elapsed = (utcnow() - start).seconds
|
|
404
404
|
|
|
405
405
|
if info['status'] == 304:
|
|
406
406
|
module.exit_json(url=url, dest=dest, changed=False, msg=info.get('msg', ''), status_code=info['status'], elapsed=elapsed)
|
|
@@ -600,7 +600,7 @@ def main():
|
|
|
600
600
|
# If the file already exists, prepare the last modified time for the
|
|
601
601
|
# request.
|
|
602
602
|
mtime = os.path.getmtime(dest)
|
|
603
|
-
last_mod_time =
|
|
603
|
+
last_mod_time = utcfromtimestamp(mtime)
|
|
604
604
|
|
|
605
605
|
# If the checksum does not match we have to force the download
|
|
606
606
|
# because last_mod_time may be newer than on remote
|
|
@@ -608,11 +608,11 @@ def main():
|
|
|
608
608
|
force = True
|
|
609
609
|
|
|
610
610
|
# download to tmpsrc
|
|
611
|
-
start =
|
|
611
|
+
start = utcnow()
|
|
612
612
|
method = 'HEAD' if module.check_mode else 'GET'
|
|
613
613
|
tmpsrc, info = url_get(module, url, dest, use_proxy, last_mod_time, force, timeout, headers, tmp_dest, method,
|
|
614
614
|
unredirected_headers=unredirected_headers, decompress=decompress, ciphers=ciphers, use_netrc=use_netrc)
|
|
615
|
-
result['elapsed'] = (
|
|
615
|
+
result['elapsed'] = (utcnow() - start).seconds
|
|
616
616
|
result['src'] = tmpsrc
|
|
617
617
|
|
|
618
618
|
# Now the request has completed, we can finally generate the final
|
ansible/modules/getent.py
CHANGED
|
@@ -13,7 +13,7 @@ module: getent
|
|
|
13
13
|
short_description: A wrapper to the unix getent utility
|
|
14
14
|
description:
|
|
15
15
|
- Runs getent against one of its various databases and returns information into
|
|
16
|
-
the host's facts, in a getent_<database> prefixed variable.
|
|
16
|
+
the host's facts, in a C(getent_<database>) prefixed variable.
|
|
17
17
|
version_added: "1.8"
|
|
18
18
|
options:
|
|
19
19
|
database:
|
|
@@ -35,12 +35,12 @@ options:
|
|
|
35
35
|
version_added: "2.9"
|
|
36
36
|
split:
|
|
37
37
|
description:
|
|
38
|
-
- Character used to split the database values into lists/arrays such as
|
|
38
|
+
- Character used to split the database values into lists/arrays such as V(:) or V(\\t),
|
|
39
39
|
otherwise it will try to pick one depending on the database.
|
|
40
40
|
type: str
|
|
41
41
|
fail_key:
|
|
42
42
|
description:
|
|
43
|
-
- If a supplied key is missing this will make the task fail if
|
|
43
|
+
- If a supplied key is missing this will make the task fail if V(true).
|
|
44
44
|
type: bool
|
|
45
45
|
default: 'yes'
|
|
46
46
|
extends_documentation_fragment:
|
|
@@ -118,7 +118,7 @@ ansible_facts:
|
|
|
118
118
|
import traceback
|
|
119
119
|
|
|
120
120
|
from ansible.module_utils.basic import AnsibleModule
|
|
121
|
-
from ansible.module_utils.
|
|
121
|
+
from ansible.module_utils.common.text.converters import to_native
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
def main():
|
ansible/modules/git.py
CHANGED
|
@@ -29,15 +29,15 @@ options:
|
|
|
29
29
|
description:
|
|
30
30
|
- The path of where the repository should be checked out. This
|
|
31
31
|
is equivalent to C(git clone [repo_url] [directory]). The repository
|
|
32
|
-
named in
|
|
33
|
-
parameter is required, unless
|
|
32
|
+
named in O(repo) is not appended to this path and the destination directory must be empty. This
|
|
33
|
+
parameter is required, unless O(clone) is set to V(false).
|
|
34
34
|
type: path
|
|
35
35
|
required: true
|
|
36
36
|
version:
|
|
37
37
|
description:
|
|
38
38
|
- What version of the repository to check out. This can be
|
|
39
|
-
the literal string
|
|
40
|
-
It can also be a I(SHA-1) hash, in which case
|
|
39
|
+
the literal string V(HEAD), a branch name, a tag name.
|
|
40
|
+
It can also be a I(SHA-1) hash, in which case O(refspec) needs
|
|
41
41
|
to be specified if the given revision is not already available.
|
|
42
42
|
type: str
|
|
43
43
|
default: "HEAD"
|
|
@@ -45,7 +45,7 @@ options:
|
|
|
45
45
|
description:
|
|
46
46
|
- Will ensure or not that "-o StrictHostKeyChecking=no" is present as an ssh option.
|
|
47
47
|
- Be aware that this disables a protection against MITM attacks.
|
|
48
|
-
- Those using OpenSSH >= 7.5 might want to set
|
|
48
|
+
- Those using OpenSSH >= 7.5 might want to set O(ssh_opts) to V(StrictHostKeyChecking=accept-new)
|
|
49
49
|
instead, it does not remove the MITM issue but it does restrict it to the first attempt.
|
|
50
50
|
type: bool
|
|
51
51
|
default: 'no'
|
|
@@ -54,7 +54,7 @@ options:
|
|
|
54
54
|
description:
|
|
55
55
|
- As of OpenSSH 7.5, "-o StrictHostKeyChecking=accept-new" can be
|
|
56
56
|
used which is safer and will only accepts host keys which are
|
|
57
|
-
not present or are the same. if
|
|
57
|
+
not present or are the same. if V(true), ensure that
|
|
58
58
|
"-o StrictHostKeyChecking=accept-new" is present as an ssh option.
|
|
59
59
|
type: bool
|
|
60
60
|
default: 'no'
|
|
@@ -62,12 +62,12 @@ options:
|
|
|
62
62
|
ssh_opts:
|
|
63
63
|
description:
|
|
64
64
|
- Options git will pass to ssh when used as protocol, it works via C(git)'s
|
|
65
|
-
GIT_SSH/GIT_SSH_COMMAND environment variables.
|
|
66
|
-
- For older versions it appends GIT_SSH_OPTS (specific to this module) to the
|
|
65
|
+
E(GIT_SSH)/E(GIT_SSH_COMMAND) environment variables.
|
|
66
|
+
- For older versions it appends E(GIT_SSH_OPTS) (specific to this module) to the
|
|
67
67
|
variables above or via a wrapper script.
|
|
68
|
-
- Other options can add to this list, like
|
|
68
|
+
- Other options can add to this list, like O(key_file) and O(accept_hostkey).
|
|
69
69
|
- An example value could be "-o StrictHostKeyChecking=no" (although this particular
|
|
70
|
-
option is better set by
|
|
70
|
+
option is better set by O(accept_hostkey)).
|
|
71
71
|
- The module ensures that 'BatchMode=yes' is always present to avoid prompts.
|
|
72
72
|
type: str
|
|
73
73
|
version_added: "1.5"
|
|
@@ -75,7 +75,7 @@ options:
|
|
|
75
75
|
key_file:
|
|
76
76
|
description:
|
|
77
77
|
- Specify an optional private key file path, on the target host, to use for the checkout.
|
|
78
|
-
- This ensures 'IdentitiesOnly=yes' is present in ssh_opts.
|
|
78
|
+
- This ensures 'IdentitiesOnly=yes' is present in O(ssh_opts).
|
|
79
79
|
type: path
|
|
80
80
|
version_added: "1.5"
|
|
81
81
|
reference:
|
|
@@ -100,29 +100,29 @@ options:
|
|
|
100
100
|
version_added: "1.9"
|
|
101
101
|
force:
|
|
102
102
|
description:
|
|
103
|
-
- If
|
|
103
|
+
- If V(true), any modified files in the working
|
|
104
104
|
repository will be discarded. Prior to 0.7, this was always
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
V(true) and could not be disabled. Prior to 1.9, the default was
|
|
106
|
+
V(true).
|
|
107
107
|
type: bool
|
|
108
108
|
default: 'no'
|
|
109
109
|
version_added: "0.7"
|
|
110
110
|
depth:
|
|
111
111
|
description:
|
|
112
112
|
- Create a shallow clone with a history truncated to the specified
|
|
113
|
-
number or revisions. The minimum possible value is
|
|
113
|
+
number or revisions. The minimum possible value is V(1), otherwise
|
|
114
114
|
ignored. Needs I(git>=1.9.1) to work correctly.
|
|
115
115
|
type: int
|
|
116
116
|
version_added: "1.2"
|
|
117
117
|
clone:
|
|
118
118
|
description:
|
|
119
|
-
- If
|
|
119
|
+
- If V(false), do not clone the repository even if it does not exist locally.
|
|
120
120
|
type: bool
|
|
121
121
|
default: 'yes'
|
|
122
122
|
version_added: "1.9"
|
|
123
123
|
update:
|
|
124
124
|
description:
|
|
125
|
-
- If
|
|
125
|
+
- If V(false), do not retrieve new revisions from the origin repository.
|
|
126
126
|
- Operations like archive will work on the existing (old) repository and might
|
|
127
127
|
not respond to changes to the options version or remote.
|
|
128
128
|
type: bool
|
|
@@ -136,7 +136,7 @@ options:
|
|
|
136
136
|
version_added: "1.4"
|
|
137
137
|
bare:
|
|
138
138
|
description:
|
|
139
|
-
- If
|
|
139
|
+
- If V(true), repository will be created as a bare repo, otherwise
|
|
140
140
|
it will be a standard repo with a workspace.
|
|
141
141
|
type: bool
|
|
142
142
|
default: 'no'
|
|
@@ -150,7 +150,7 @@ options:
|
|
|
150
150
|
|
|
151
151
|
recursive:
|
|
152
152
|
description:
|
|
153
|
-
- If
|
|
153
|
+
- If V(false), repository will be cloned without the C(--recursive)
|
|
154
154
|
option, skipping sub-modules.
|
|
155
155
|
type: bool
|
|
156
156
|
default: 'yes'
|
|
@@ -165,10 +165,10 @@ options:
|
|
|
165
165
|
|
|
166
166
|
track_submodules:
|
|
167
167
|
description:
|
|
168
|
-
- If
|
|
168
|
+
- If V(true), submodules will track the latest commit on their
|
|
169
169
|
master branch (or other branch specified in .gitmodules). If
|
|
170
|
-
|
|
171
|
-
main project. This is equivalent to specifying the --remote flag
|
|
170
|
+
V(false), submodules will be kept at the revision specified by the
|
|
171
|
+
main project. This is equivalent to specifying the C(--remote) flag
|
|
172
172
|
to git submodule update.
|
|
173
173
|
type: bool
|
|
174
174
|
default: 'no'
|
|
@@ -176,7 +176,7 @@ options:
|
|
|
176
176
|
|
|
177
177
|
verify_commit:
|
|
178
178
|
description:
|
|
179
|
-
- If
|
|
179
|
+
- If V(true), when cloning or checking out a O(version) verify the
|
|
180
180
|
signature of a GPG signed commit. This requires git version>=2.1.0
|
|
181
181
|
to be installed. The commit MUST be signed and the public key MUST
|
|
182
182
|
be present in the GPG keyring.
|
|
@@ -197,7 +197,7 @@ options:
|
|
|
197
197
|
|
|
198
198
|
archive_prefix:
|
|
199
199
|
description:
|
|
200
|
-
- Specify a prefix to add to each file path in archive. Requires
|
|
200
|
+
- Specify a prefix to add to each file path in archive. Requires O(archive) to be specified.
|
|
201
201
|
version_added: "2.10"
|
|
202
202
|
type: str
|
|
203
203
|
|
|
@@ -212,7 +212,7 @@ options:
|
|
|
212
212
|
description:
|
|
213
213
|
- A list of trusted GPG fingerprints to compare to the fingerprint of the
|
|
214
214
|
GPG-signed commit.
|
|
215
|
-
- Only used when
|
|
215
|
+
- Only used when O(verify_commit=yes).
|
|
216
216
|
- Use of this feature requires Git 2.6+ due to its reliance on git's C(--raw) flag to C(verify-commit) and C(verify-tag).
|
|
217
217
|
type: list
|
|
218
218
|
elements: str
|
|
@@ -338,7 +338,7 @@ import shutil
|
|
|
338
338
|
import tempfile
|
|
339
339
|
from ansible.module_utils.compat.version import LooseVersion
|
|
340
340
|
|
|
341
|
-
from ansible.module_utils.
|
|
341
|
+
from ansible.module_utils.common.text.converters import to_native, to_text
|
|
342
342
|
from ansible.module_utils.basic import AnsibleModule
|
|
343
343
|
from ansible.module_utils.common.locale import get_best_parsable_locale
|
|
344
344
|
from ansible.module_utils.common.process import get_bin_path
|
|
@@ -1124,7 +1124,7 @@ def create_archive(git_path, module, dest, archive, archive_prefix, version, rep
|
|
|
1124
1124
|
""" Helper function for creating archive using git_archive """
|
|
1125
1125
|
all_archive_fmt = {'.zip': 'zip', '.gz': 'tar.gz', '.tar': 'tar',
|
|
1126
1126
|
'.tgz': 'tgz'}
|
|
1127
|
-
|
|
1127
|
+
dummy, archive_ext = os.path.splitext(archive)
|
|
1128
1128
|
archive_fmt = all_archive_fmt.get(archive_ext, None)
|
|
1129
1129
|
if archive_fmt is None:
|
|
1130
1130
|
module.fail_json(msg="Unable to get file extension from "
|