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
|
@@ -12,7 +12,7 @@ class ModuleDocFragment(object):
|
|
|
12
12
|
options:
|
|
13
13
|
strict:
|
|
14
14
|
description:
|
|
15
|
-
- If
|
|
15
|
+
- If V(yes) make invalid entries a fatal error, otherwise skip and continue.
|
|
16
16
|
- Since it is possible to use facts in the expressions they might not always be available
|
|
17
17
|
and we ignore those errors by default.
|
|
18
18
|
type: bool
|
|
@@ -49,13 +49,13 @@ options:
|
|
|
49
49
|
default_value:
|
|
50
50
|
description:
|
|
51
51
|
- The default value when the host variable's value is an empty string.
|
|
52
|
-
- This option is mutually exclusive with
|
|
52
|
+
- This option is mutually exclusive with O(keyed_groups[].trailing_separator).
|
|
53
53
|
type: str
|
|
54
54
|
version_added: '2.12'
|
|
55
55
|
trailing_separator:
|
|
56
56
|
description:
|
|
57
|
-
- Set this option to
|
|
58
|
-
- This option is mutually exclusive with
|
|
57
|
+
- Set this option to V(False) to omit the O(keyed_groups[].separator) after the host variable when the value is an empty string.
|
|
58
|
+
- This option is mutually exclusive with O(keyed_groups[].default_value).
|
|
59
59
|
type: bool
|
|
60
60
|
default: True
|
|
61
61
|
version_added: '2.12'
|
|
@@ -19,17 +19,17 @@ options:
|
|
|
19
19
|
- The permissions the resulting filesystem object should have.
|
|
20
20
|
- For those used to I(/usr/bin/chmod) remember that modes are actually octal numbers.
|
|
21
21
|
You must give Ansible enough information to parse them correctly.
|
|
22
|
-
For consistent results, quote octal numbers (for example,
|
|
22
|
+
For consistent results, quote octal numbers (for example, V('644') or V('1777')) so Ansible receives
|
|
23
23
|
a string and can do its own conversion from string into number.
|
|
24
|
-
Adding a leading zero (for example,
|
|
24
|
+
Adding a leading zero (for example, V(0755)) works sometimes, but can fail in loops and some other circumstances.
|
|
25
25
|
- Giving Ansible a number without following either of these rules will end up with a decimal
|
|
26
26
|
number which will have unexpected results.
|
|
27
|
-
- As of Ansible 1.8, the mode may be specified as a symbolic mode (for example,
|
|
28
|
-
|
|
29
|
-
- If
|
|
27
|
+
- As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, V(u+rwx) or
|
|
28
|
+
V(u=rw,g=r,o=r)).
|
|
29
|
+
- If O(mode) is not specified and the destination filesystem object B(does not) exist, the default C(umask) on the system will be used
|
|
30
30
|
when setting the mode for the newly created filesystem object.
|
|
31
|
-
- If
|
|
32
|
-
- Specifying
|
|
31
|
+
- If O(mode) is not specified and the destination filesystem object B(does) exist, the mode of the existing filesystem object will be used.
|
|
32
|
+
- Specifying O(mode) is the best way to ensure filesystem objects are created with the correct permissions.
|
|
33
33
|
See CVE-2020-1736 for further details.
|
|
34
34
|
type: raw
|
|
35
35
|
owner:
|
|
@@ -49,24 +49,24 @@ options:
|
|
|
49
49
|
seuser:
|
|
50
50
|
description:
|
|
51
51
|
- The user part of the SELinux filesystem object context.
|
|
52
|
-
- By default it uses the
|
|
53
|
-
- When set to
|
|
52
|
+
- By default it uses the V(system) policy, where applicable.
|
|
53
|
+
- When set to V(_default), it will use the C(user) portion of the policy if available.
|
|
54
54
|
type: str
|
|
55
55
|
serole:
|
|
56
56
|
description:
|
|
57
57
|
- The role part of the SELinux filesystem object context.
|
|
58
|
-
- When set to
|
|
58
|
+
- When set to V(_default), it will use the C(role) portion of the policy if available.
|
|
59
59
|
type: str
|
|
60
60
|
setype:
|
|
61
61
|
description:
|
|
62
62
|
- The type part of the SELinux filesystem object context.
|
|
63
|
-
- When set to
|
|
63
|
+
- When set to V(_default), it will use the C(type) portion of the policy if available.
|
|
64
64
|
type: str
|
|
65
65
|
selevel:
|
|
66
66
|
description:
|
|
67
67
|
- The level part of the SELinux filesystem object context.
|
|
68
68
|
- This is the MLS/MCS attribute, sometimes known as the C(range).
|
|
69
|
-
- When set to
|
|
69
|
+
- When set to V(_default), it will use the C(level) portion of the policy if available.
|
|
70
70
|
type: str
|
|
71
71
|
unsafe_writes:
|
|
72
72
|
description:
|
|
@@ -67,12 +67,6 @@ options:
|
|
|
67
67
|
- name: ANSIBLE_CACHE_PLUGIN_PREFIX
|
|
68
68
|
- name: ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX
|
|
69
69
|
ini:
|
|
70
|
-
- section: default
|
|
71
|
-
key: fact_caching_prefix
|
|
72
|
-
deprecated:
|
|
73
|
-
alternatives: Use the 'defaults' section instead
|
|
74
|
-
why: Fixes typing error in INI section name
|
|
75
|
-
version: '2.16'
|
|
76
70
|
- section: defaults
|
|
77
71
|
key: fact_caching_prefix
|
|
78
72
|
- section: inventory
|
|
@@ -31,14 +31,14 @@ class ModuleDocFragment(object):
|
|
|
31
31
|
name: Configure output for readability
|
|
32
32
|
description:
|
|
33
33
|
- Configure the result format to be more readable
|
|
34
|
-
- When
|
|
35
|
-
to
|
|
36
|
-
- Setting this option to
|
|
34
|
+
- When O(result_format) is set to V(yaml) this option defaults to V(True), and defaults
|
|
35
|
+
to V(False) when configured to V(json).
|
|
36
|
+
- Setting this option to V(True) will force V(json) and V(yaml) results to always be pretty
|
|
37
37
|
printed regardless of verbosity.
|
|
38
|
-
- When set to
|
|
38
|
+
- When set to V(True) and used with the V(yaml) result format, this option will
|
|
39
39
|
modify module responses in an attempt to produce a more human friendly output at the expense
|
|
40
40
|
of correctness, and should not be relied upon to aid in writing variable manipulations
|
|
41
|
-
or conditionals. For correctness, set this option to
|
|
41
|
+
or conditionals. For correctness, set this option to V(False) or set O(result_format) to V(json).
|
|
42
42
|
type: bool
|
|
43
43
|
default: null
|
|
44
44
|
env:
|
|
@@ -35,11 +35,11 @@ options:
|
|
|
35
35
|
system_tmpdirs:
|
|
36
36
|
description:
|
|
37
37
|
- "List of valid system temporary directories on the managed machine for Ansible to validate
|
|
38
|
-
|
|
38
|
+
O(remote_tmp) against, when specific permissions are needed. These must be world
|
|
39
39
|
readable, writable, and executable. This list should only contain directories which the
|
|
40
40
|
system administrator has pre-created with the proper ownership and permissions otherwise
|
|
41
41
|
security issues can arise."
|
|
42
|
-
- When
|
|
42
|
+
- When O(remote_tmp) is required to be a system temp dir and it does not match any in the list,
|
|
43
43
|
the first one from the list will be used instead.
|
|
44
44
|
default: [ /var/tmp, /tmp ]
|
|
45
45
|
type: list
|
|
@@ -29,7 +29,7 @@ options:
|
|
|
29
29
|
description:
|
|
30
30
|
- Path of a Jinja2 formatted template on the Ansible controller.
|
|
31
31
|
- This can be a relative or an absolute path.
|
|
32
|
-
- The file must be encoded with C(utf-8) but
|
|
32
|
+
- The file must be encoded with C(utf-8) but O(output_encoding) can be used to control the encoding of the output
|
|
33
33
|
template.
|
|
34
34
|
type: path
|
|
35
35
|
required: yes
|
|
@@ -82,14 +82,14 @@ options:
|
|
|
82
82
|
trim_blocks:
|
|
83
83
|
description:
|
|
84
84
|
- Determine when newlines should be removed from blocks.
|
|
85
|
-
- When set to
|
|
85
|
+
- When set to V(yes) the first newline after a block is removed (block, not variable tag!).
|
|
86
86
|
type: bool
|
|
87
87
|
default: yes
|
|
88
88
|
version_added: '2.4'
|
|
89
89
|
lstrip_blocks:
|
|
90
90
|
description:
|
|
91
91
|
- Determine when leading spaces and tabs should be stripped.
|
|
92
|
-
- When set to
|
|
92
|
+
- When set to V(yes) leading spaces and tabs are stripped from the start of a line to a block.
|
|
93
93
|
type: bool
|
|
94
94
|
default: no
|
|
95
95
|
version_added: '2.6'
|
|
@@ -102,7 +102,7 @@ options:
|
|
|
102
102
|
default: yes
|
|
103
103
|
output_encoding:
|
|
104
104
|
description:
|
|
105
|
-
- Overrides the encoding used to write the template file defined by
|
|
105
|
+
- Overrides the encoding used to write the template file defined by O(dest).
|
|
106
106
|
- It defaults to C(utf-8), but any encoding supported by python can be used.
|
|
107
107
|
- The source template file must always be encoded using C(utf-8), for homogeneity.
|
|
108
108
|
type: str
|
|
@@ -110,10 +110,10 @@ options:
|
|
|
110
110
|
version_added: '2.7'
|
|
111
111
|
notes:
|
|
112
112
|
- Including a string that uses a date in the template will result in the template being marked 'changed' each time.
|
|
113
|
-
- Since Ansible 0.9, templates are loaded with
|
|
113
|
+
- Since Ansible 0.9, templates are loaded with O(trim_blocks=True).
|
|
114
114
|
- >
|
|
115
115
|
Also, you can override jinja2 settings by adding a special header to template file.
|
|
116
|
-
|
|
116
|
+
that is C(#jinja2:variable_start_string:'[%', variable_end_string:'%]', trim_blocks: False)
|
|
117
117
|
which changes the variable interpolation markers to C([% var %]) instead of C({{ var }}).
|
|
118
118
|
This is the best way to prevent evaluation of things that look like, but should not be Jinja2.
|
|
119
119
|
- To find Byte Order Marks in files, use C(Format-Hex <file> -Count 16) on Windows, and use C(od -a -t x1 -N 16 <file>)
|
|
@@ -17,7 +17,7 @@ options:
|
|
|
17
17
|
type: str
|
|
18
18
|
force:
|
|
19
19
|
description:
|
|
20
|
-
- If
|
|
20
|
+
- If V(yes) do not get a cached copy.
|
|
21
21
|
type: bool
|
|
22
22
|
default: no
|
|
23
23
|
http_agent:
|
|
@@ -27,48 +27,48 @@ options:
|
|
|
27
27
|
default: ansible-httpget
|
|
28
28
|
use_proxy:
|
|
29
29
|
description:
|
|
30
|
-
- If
|
|
30
|
+
- If V(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
|
|
31
31
|
type: bool
|
|
32
32
|
default: yes
|
|
33
33
|
validate_certs:
|
|
34
34
|
description:
|
|
35
|
-
- If
|
|
35
|
+
- If V(no), SSL certificates will not be validated.
|
|
36
36
|
- This should only be used on personally controlled sites using self-signed certificates.
|
|
37
37
|
type: bool
|
|
38
38
|
default: yes
|
|
39
39
|
url_username:
|
|
40
40
|
description:
|
|
41
41
|
- The username for use in HTTP basic authentication.
|
|
42
|
-
- This parameter can be used without
|
|
42
|
+
- This parameter can be used without O(url_password) for sites that allow empty passwords
|
|
43
43
|
type: str
|
|
44
44
|
url_password:
|
|
45
45
|
description:
|
|
46
46
|
- The password for use in HTTP basic authentication.
|
|
47
|
-
- If the
|
|
47
|
+
- If the O(url_username) parameter is not specified, the O(url_password) parameter will not be used.
|
|
48
48
|
type: str
|
|
49
49
|
force_basic_auth:
|
|
50
50
|
description:
|
|
51
|
-
- Credentials specified with
|
|
51
|
+
- Credentials specified with O(url_username) and O(url_password) should be passed in HTTP Header.
|
|
52
52
|
type: bool
|
|
53
53
|
default: no
|
|
54
54
|
client_cert:
|
|
55
55
|
description:
|
|
56
56
|
- PEM formatted certificate chain file to be used for SSL client authentication.
|
|
57
|
-
- This file can also include the key as well, and if the key is included,
|
|
57
|
+
- This file can also include the key as well, and if the key is included, O(client_key) is not required.
|
|
58
58
|
type: path
|
|
59
59
|
client_key:
|
|
60
60
|
description:
|
|
61
61
|
- PEM formatted file that contains your private key to be used for SSL client authentication.
|
|
62
|
-
- If
|
|
62
|
+
- If O(client_cert) contains both the certificate and key, this option is not required.
|
|
63
63
|
type: path
|
|
64
64
|
use_gssapi:
|
|
65
65
|
description:
|
|
66
66
|
- Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate
|
|
67
67
|
authentication.
|
|
68
68
|
- Requires the Python library L(gssapi,https://github.com/pythongssapi/python-gssapi) to be installed.
|
|
69
|
-
- Credentials for GSSAPI can be specified with
|
|
69
|
+
- Credentials for GSSAPI can be specified with O(url_username)/O(url_password) or with the GSSAPI env var
|
|
70
70
|
C(KRB5CCNAME) that specified a custom Kerberos credential cache.
|
|
71
|
-
- NTLM authentication is
|
|
71
|
+
- NTLM authentication is B(not) supported even if the GSSAPI mech for NTLM has been installed.
|
|
72
72
|
type: bool
|
|
73
73
|
default: no
|
|
74
74
|
version_added: '2.11'
|
|
@@ -19,9 +19,9 @@ options:
|
|
|
19
19
|
follow_redirects:
|
|
20
20
|
description:
|
|
21
21
|
- Whether or the module should follow redirects.
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
22
|
+
- V(all) will follow all redirect.
|
|
23
|
+
- V(none) will not follow any redirect.
|
|
24
|
+
- V(safe) will follow only "safe" redirects, where "safe" means that the
|
|
25
25
|
client is only doing a C(GET) or C(HEAD) on the URI to which it is being
|
|
26
26
|
redirected.
|
|
27
27
|
- When following a redirected URL, the C(Authorization) header and any
|
|
@@ -48,7 +48,7 @@ options:
|
|
|
48
48
|
description:
|
|
49
49
|
- Specify how many times the module will redirect a connection to an
|
|
50
50
|
alternative URI before the connection fails.
|
|
51
|
-
- If set to
|
|
51
|
+
- If set to V(0) or O(follow_redirects) is set to V(none), or V(safe) when
|
|
52
52
|
not doing a C(GET) or C(HEAD) it prevents all redirection.
|
|
53
53
|
default: 50
|
|
54
54
|
type: int
|
|
@@ -56,12 +56,12 @@ options:
|
|
|
56
56
|
description:
|
|
57
57
|
- Specifies how long the request can be pending before it times out (in
|
|
58
58
|
seconds).
|
|
59
|
-
- Set to
|
|
59
|
+
- Set to V(0) to specify an infinite timeout.
|
|
60
60
|
default: 30
|
|
61
61
|
type: int
|
|
62
62
|
validate_certs:
|
|
63
63
|
description:
|
|
64
|
-
- If
|
|
64
|
+
- If V(no), SSL certificates will not be validated.
|
|
65
65
|
- This should only be used on personally controlled sites using self-signed
|
|
66
66
|
certificates.
|
|
67
67
|
default: yes
|
|
@@ -74,12 +74,12 @@ options:
|
|
|
74
74
|
C(Cert:\CurrentUser\My\<thumbprint>).
|
|
75
75
|
- The WinRM connection must be authenticated with C(CredSSP) or C(become)
|
|
76
76
|
is used on the task if the certificate file is not password protected.
|
|
77
|
-
- Other authentication types can set
|
|
77
|
+
- Other authentication types can set O(client_cert_password) when the cert
|
|
78
78
|
is password protected.
|
|
79
79
|
type: str
|
|
80
80
|
client_cert_password:
|
|
81
81
|
description:
|
|
82
|
-
- The password for
|
|
82
|
+
- The password for O(client_cert) if the cert is password protected.
|
|
83
83
|
type: str
|
|
84
84
|
force_basic_auth:
|
|
85
85
|
description:
|
|
@@ -96,14 +96,14 @@ options:
|
|
|
96
96
|
type: str
|
|
97
97
|
url_password:
|
|
98
98
|
description:
|
|
99
|
-
- The password for
|
|
99
|
+
- The password for O(url_username).
|
|
100
100
|
type: str
|
|
101
101
|
use_default_credential:
|
|
102
102
|
description:
|
|
103
103
|
- Uses the current user's credentials when authenticating with a server
|
|
104
104
|
protected with C(NTLM), C(Kerberos), or C(Negotiate) authentication.
|
|
105
105
|
- Sites that use C(Basic) auth will still require explicit credentials
|
|
106
|
-
through the
|
|
106
|
+
through the O(url_username) and O(url_password) options.
|
|
107
107
|
- The module will only have access to the user's credentials if using
|
|
108
108
|
C(become) with a password, you are connecting with SSH using a password,
|
|
109
109
|
or connecting with WinRM using C(CredSSP) or C(Kerberos with delegation).
|
|
@@ -114,14 +114,14 @@ options:
|
|
|
114
114
|
type: bool
|
|
115
115
|
use_proxy:
|
|
116
116
|
description:
|
|
117
|
-
- If
|
|
117
|
+
- If V(no), it will not use the proxy defined in IE for the current user.
|
|
118
118
|
default: yes
|
|
119
119
|
type: bool
|
|
120
120
|
proxy_url:
|
|
121
121
|
description:
|
|
122
122
|
- An explicit proxy to use for the request.
|
|
123
|
-
- By default, the request will use the IE defined proxy unless
|
|
124
|
-
is set to
|
|
123
|
+
- By default, the request will use the IE defined proxy unless O(use_proxy)
|
|
124
|
+
is set to V(no).
|
|
125
125
|
type: str
|
|
126
126
|
proxy_username:
|
|
127
127
|
description:
|
|
@@ -129,14 +129,14 @@ options:
|
|
|
129
129
|
type: str
|
|
130
130
|
proxy_password:
|
|
131
131
|
description:
|
|
132
|
-
- The password for
|
|
132
|
+
- The password for O(proxy_username).
|
|
133
133
|
type: str
|
|
134
134
|
proxy_use_default_credential:
|
|
135
135
|
description:
|
|
136
136
|
- Uses the current user's credentials when authenticating with a proxy host
|
|
137
137
|
protected with C(NTLM), C(Kerberos), or C(Negotiate) authentication.
|
|
138
138
|
- Proxies that use C(Basic) auth will still require explicit credentials
|
|
139
|
-
through the
|
|
139
|
+
through the O(proxy_username) and O(proxy_password) options.
|
|
140
140
|
- The module will only have access to the user's credentials if using
|
|
141
141
|
C(become) with a password, you are connecting with SSH using a password,
|
|
142
142
|
or connecting with WinRM using C(CredSSP) or C(Kerberos with delegation).
|
|
@@ -14,10 +14,10 @@ options:
|
|
|
14
14
|
stage:
|
|
15
15
|
description:
|
|
16
16
|
- Control when this vars plugin may be executed.
|
|
17
|
-
- Setting this option to
|
|
18
|
-
- Setting this option to
|
|
19
|
-
- Setting this option to
|
|
20
|
-
- If this option is omitted, the global
|
|
17
|
+
- Setting this option to V(all) will run the vars plugin after importing inventory and whenever it is demanded by a task.
|
|
18
|
+
- Setting this option to V(task) will only run the vars plugin whenever it is demanded by a task.
|
|
19
|
+
- Setting this option to V(inventory) will only run the vars plugin after parsing inventory.
|
|
20
|
+
- If this option is omitted, the global C(RUN_VARS_PLUGINS) configuration is used to determine when to execute the vars plugin.
|
|
21
21
|
choices: ['all', 'task', 'inventory']
|
|
22
22
|
version_added: "2.10"
|
|
23
23
|
type: str
|
|
@@ -14,10 +14,10 @@ DOCUMENTATION:
|
|
|
14
14
|
|
|
15
15
|
EXAMPLES: |
|
|
16
16
|
# b64 encode a string
|
|
17
|
-
b64lola: "{{ 'lola'|b64encode }}"
|
|
17
|
+
b64lola: "{{ 'lola'| b64encode }}"
|
|
18
18
|
|
|
19
19
|
# b64 encode the content of 'stuff' variable
|
|
20
|
-
b64stuff: "{{ stuff|b64encode }}"
|
|
20
|
+
b64stuff: "{{ stuff | b64encode }}"
|
|
21
21
|
|
|
22
22
|
RETURN:
|
|
23
23
|
_value:
|
ansible/plugins/filter/bool.yml
CHANGED
|
@@ -3,7 +3,7 @@ DOCUMENTATION:
|
|
|
3
3
|
version_added: "historical"
|
|
4
4
|
short_description: cast into a boolean
|
|
5
5
|
description:
|
|
6
|
-
- Attempt to cast the input into a boolean (
|
|
6
|
+
- Attempt to cast the input into a boolean (V(True) or V(False)) value.
|
|
7
7
|
positional: _input
|
|
8
8
|
options:
|
|
9
9
|
_input:
|
|
@@ -13,10 +13,10 @@ DOCUMENTATION:
|
|
|
13
13
|
|
|
14
14
|
EXAMPLES: |
|
|
15
15
|
|
|
16
|
-
#
|
|
16
|
+
# in vars
|
|
17
17
|
vars:
|
|
18
|
-
isbool: "{{ (a == b)|bool }} "
|
|
19
|
-
otherbool: "{{ anothervar|bool }} "
|
|
18
|
+
isbool: "{{ (a == b) | bool }} "
|
|
19
|
+
otherbool: "{{ anothervar | bool }} "
|
|
20
20
|
|
|
21
21
|
# in a task
|
|
22
22
|
...
|
|
@@ -24,5 +24,5 @@ EXAMPLES: |
|
|
|
24
24
|
|
|
25
25
|
RETURN:
|
|
26
26
|
_value:
|
|
27
|
-
description: The boolean resulting of casting the input expression into a
|
|
27
|
+
description: The boolean resulting of casting the input expression into a V(True) or V(False) value.
|
|
28
28
|
type: bool
|
|
@@ -16,7 +16,8 @@ DOCUMENTATION:
|
|
|
16
16
|
plugin_type: filter
|
|
17
17
|
EXAMPLES: |
|
|
18
18
|
|
|
19
|
-
# To get the longest common path (
|
|
19
|
+
# To get the longest common path (for example - '/foo/bar') from the given list of paths
|
|
20
|
+
# (for example - ['/foo/bar/foobar','/foo/bar'])
|
|
20
21
|
{{ listofpaths | commonpath }}
|
|
21
22
|
|
|
22
23
|
RETURN:
|
ansible/plugins/filter/core.py
CHANGED
|
@@ -27,14 +27,14 @@ from jinja2.filters import pass_environment
|
|
|
27
27
|
|
|
28
28
|
from ansible.errors import AnsibleError, AnsibleFilterError, AnsibleFilterTypeError
|
|
29
29
|
from ansible.module_utils.six import string_types, integer_types, reraise, text_type
|
|
30
|
-
from ansible.module_utils.
|
|
30
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
|
31
31
|
from ansible.module_utils.common.collections import is_sequence
|
|
32
32
|
from ansible.module_utils.common.yaml import yaml_load, yaml_load_all
|
|
33
33
|
from ansible.parsing.ajson import AnsibleJSONEncoder
|
|
34
34
|
from ansible.parsing.yaml.dumper import AnsibleDumper
|
|
35
35
|
from ansible.template import recursive_check_defined
|
|
36
36
|
from ansible.utils.display import Display
|
|
37
|
-
from ansible.utils.encrypt import
|
|
37
|
+
from ansible.utils.encrypt import do_encrypt, PASSLIB_AVAILABLE
|
|
38
38
|
from ansible.utils.hashing import md5s, checksum_s
|
|
39
39
|
from ansible.utils.unicode import unicode_wrap
|
|
40
40
|
from ansible.utils.vars import merge_hash
|
|
@@ -292,7 +292,7 @@ def get_encrypted_password(password, hashtype='sha512', salt=None, salt_size=Non
|
|
|
292
292
|
)
|
|
293
293
|
|
|
294
294
|
try:
|
|
295
|
-
return
|
|
295
|
+
return do_encrypt(password, hashtype, salt=salt, salt_size=salt_size, rounds=rounds, ident=ident)
|
|
296
296
|
except AnsibleError as e:
|
|
297
297
|
reraise(AnsibleFilterError, AnsibleFilterError(to_native(e), orig_exc=e), sys.exc_info()[2])
|
|
298
298
|
except Exception as e:
|
|
@@ -327,8 +327,7 @@ def mandatory(a, msg=None):
|
|
|
327
327
|
|
|
328
328
|
if msg is not None:
|
|
329
329
|
raise AnsibleFilterError(to_native(msg))
|
|
330
|
-
|
|
331
|
-
raise AnsibleFilterError("Mandatory variable %s not defined." % name)
|
|
330
|
+
raise AnsibleFilterError("Mandatory variable %s not defined." % name)
|
|
332
331
|
|
|
333
332
|
return a
|
|
334
333
|
|
|
@@ -576,10 +575,9 @@ def path_join(paths):
|
|
|
576
575
|
of the different members '''
|
|
577
576
|
if isinstance(paths, string_types):
|
|
578
577
|
return os.path.join(paths)
|
|
579
|
-
|
|
578
|
+
if is_sequence(paths):
|
|
580
579
|
return os.path.join(*paths)
|
|
581
|
-
|
|
582
|
-
raise AnsibleFilterTypeError("|path_join expects string or sequence, got %s instead." % type(paths))
|
|
580
|
+
raise AnsibleFilterTypeError("|path_join expects string or sequence, got %s instead." % type(paths))
|
|
583
581
|
|
|
584
582
|
|
|
585
583
|
def commonpath(paths):
|
|
@@ -30,8 +30,18 @@ DOCUMENTATION:
|
|
|
30
30
|
EXAMPLES: |
|
|
31
31
|
|
|
32
32
|
# items => [ { "key": "a", "value": 1 }, { "key": "b", "value": 2 } ]
|
|
33
|
-
items: "{{ {'a': 1, 'b': 2}| dict2items}}"
|
|
33
|
+
items: "{{ {'a': 1, 'b': 2}| dict2items }}"
|
|
34
34
|
|
|
35
|
+
# files_dicts: [
|
|
36
|
+
# {
|
|
37
|
+
# "file": "users",
|
|
38
|
+
# "path": "/etc/passwd"
|
|
39
|
+
# },
|
|
40
|
+
# {
|
|
41
|
+
# "file": "groups",
|
|
42
|
+
# "path": "/etc/group"
|
|
43
|
+
# }
|
|
44
|
+
# ]
|
|
35
45
|
vars:
|
|
36
46
|
files:
|
|
37
47
|
users: /etc/passwd
|
|
@@ -5,6 +5,7 @@ DOCUMENTATION:
|
|
|
5
5
|
short_description: the difference of one list from another
|
|
6
6
|
description:
|
|
7
7
|
- Provide a unique list of all the elements of the first list that do not appear in the second one.
|
|
8
|
+
- Items in the resulting list are returned in arbitrary order.
|
|
8
9
|
options:
|
|
9
10
|
_input:
|
|
10
11
|
description: A list.
|
|
@@ -8,7 +8,7 @@ from jinja2.runtime import Undefined
|
|
|
8
8
|
from jinja2.exceptions import UndefinedError
|
|
9
9
|
|
|
10
10
|
from ansible.errors import AnsibleFilterError, AnsibleFilterTypeError
|
|
11
|
-
from ansible.module_utils.
|
|
11
|
+
from ansible.module_utils.common.text.converters import to_native, to_bytes
|
|
12
12
|
from ansible.module_utils.six import string_types, binary_type
|
|
13
13
|
from ansible.parsing.yaml.objects import AnsibleVaultEncryptedUnicode
|
|
14
14
|
from ansible.parsing.vault import is_encrypted, VaultSecret, VaultLib
|
|
@@ -14,7 +14,7 @@ DOCUMENTATION:
|
|
|
14
14
|
description: Number of recursive list depths to flatten.
|
|
15
15
|
type: int
|
|
16
16
|
skip_nulls:
|
|
17
|
-
description: Skip
|
|
17
|
+
description: Skip V(null)/V(None) elements when inserting into the top list.
|
|
18
18
|
type: bool
|
|
19
19
|
default: true
|
|
20
20
|
|
|
@@ -14,7 +14,7 @@ DOCUMENTATION:
|
|
|
14
14
|
required: true
|
|
15
15
|
EXAMPLES: |
|
|
16
16
|
# variable from string variable containing a YAML document
|
|
17
|
-
{{ github_workflow | from_yaml}}
|
|
17
|
+
{{ github_workflow | from_yaml }}
|
|
18
18
|
|
|
19
19
|
# variable from string JSON document
|
|
20
20
|
{{ '{"a": true, "b": 54, "c": [1,2,3]}' | from_yaml }}
|
|
@@ -8,7 +8,7 @@ DOCUMENTATION:
|
|
|
8
8
|
- If multiple YAML documents are not supplied, this is the equivalend of using C(from_yaml).
|
|
9
9
|
notes:
|
|
10
10
|
- This filter functions as a wrapper to the Python C(yaml.safe_load_all) function, part of the L(pyyaml Python library, https://pypi.org/project/PyYAML/).
|
|
11
|
-
- Possible conflicts in variable names from the
|
|
11
|
+
- Possible conflicts in variable names from the multiple documents are resolved directly by the pyyaml library.
|
|
12
12
|
options:
|
|
13
13
|
_input:
|
|
14
14
|
description: A YAML string.
|
|
@@ -20,7 +20,7 @@ EXAMPLES: |
|
|
|
20
20
|
{{ multidoc_yaml_string | from_yaml_all }}
|
|
21
21
|
|
|
22
22
|
# variable from multidocument YAML string
|
|
23
|
-
{{ '---\n{"a": true, "b": 54, "c": [1,2,3]}\n...\n---{"x": 1}\n...\n' | from_yaml_all}}
|
|
23
|
+
{{ '---\n{"a": true, "b": 54, "c": [1,2,3]}\n...\n---{"x": 1}\n...\n' | from_yaml_all }}
|
|
24
24
|
|
|
25
25
|
RETURN:
|
|
26
26
|
_value:
|
ansible/plugins/filter/hash.yml
CHANGED
|
@@ -15,7 +15,7 @@ DOCUMENTATION:
|
|
|
15
15
|
type: str
|
|
16
16
|
choices: ['Y', 'Z', 'E', 'P', 'T', 'G', 'M', 'K', 'B']
|
|
17
17
|
isbits:
|
|
18
|
-
description: If
|
|
18
|
+
description: If V(True), force to interpret only bit input; if V(False), force bytes. Otherwise use the notation to guess.
|
|
19
19
|
type: bool
|
|
20
20
|
EXAMPLES: |
|
|
21
21
|
|
|
@@ -23,7 +23,7 @@ EXAMPLES: |
|
|
|
23
23
|
size: '{{ "1.15 GB" | human_to_bytes }}'
|
|
24
24
|
|
|
25
25
|
# size => 1234803098
|
|
26
|
-
size: '{{ "1.15" | human_to_bytes(
|
|
26
|
+
size: '{{ "1.15" | human_to_bytes(default_unit="G") }}'
|
|
27
27
|
|
|
28
28
|
# this is an error, wants bits, got bytes
|
|
29
29
|
ERROR: '{{ "1.15 GB" | human_to_bytes(isbits=true) }}'
|