ansible-core 2.15.4rc1__py3-none-any.whl → 2.16.0b2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ansible-core might be problematic. Click here for more details.
- ansible/cli/__init__.py +3 -3
- ansible/cli/adhoc.py +1 -1
- ansible/cli/arguments/option_helpers.py +15 -5
- ansible/cli/config.py +2 -2
- ansible/cli/console.py +21 -17
- ansible/cli/doc.py +8 -9
- ansible/cli/galaxy.py +60 -27
- ansible/cli/inventory.py +1 -1
- ansible/cli/playbook.py +1 -1
- ansible/cli/pull.py +2 -2
- ansible/cli/scripts/ansible_connection_cli_stub.py +1 -1
- ansible/cli/vault.py +11 -6
- ansible/collections/__init__.py +0 -29
- ansible/collections/list.py +23 -44
- ansible/config/ansible_builtin_runtime.yml +8 -4
- ansible/config/base.yml +34 -22
- ansible/config/manager.py +1 -1
- ansible/constants.py +3 -5
- ansible/errors/__init__.py +1 -1
- ansible/executor/interpreter_discovery.py +1 -1
- ansible/executor/module_common.py +39 -32
- ansible/executor/play_iterator.py +0 -15
- ansible/executor/playbook_executor.py +3 -3
- ansible/executor/powershell/module_manifest.py +1 -1
- ansible/executor/powershell/module_wrapper.ps1 +4 -1
- ansible/executor/process/worker.py +22 -7
- ansible/executor/task_executor.py +39 -40
- ansible/executor/task_queue_manager.py +8 -11
- ansible/galaxy/__init__.py +1 -1
- ansible/galaxy/api.py +8 -11
- ansible/galaxy/collection/__init__.py +17 -4
- ansible/galaxy/collection/concrete_artifact_manager.py +7 -2
- ansible/galaxy/collection/galaxy_api_proxy.py +1 -1
- ansible/galaxy/data/container/README.md +3 -5
- ansible/galaxy/dependency_resolution/__init__.py +1 -6
- ansible/galaxy/dependency_resolution/dataclasses.py +22 -1
- ansible/galaxy/dependency_resolution/providers.py +61 -69
- ansible/galaxy/role.py +31 -13
- ansible/galaxy/token.py +2 -2
- ansible/inventory/group.py +1 -1
- ansible/inventory/manager.py +1 -1
- ansible/module_utils/ansible_release.py +2 -2
- ansible/module_utils/basic.py +11 -41
- ansible/module_utils/common/file.py +0 -100
- ansible/module_utils/common/json.py +1 -1
- ansible/module_utils/common/locale.py +1 -1
- ansible/module_utils/common/text/converters.py +2 -2
- ansible/module_utils/common/validation.py +1 -1
- ansible/module_utils/compat/_selectors2.py +4 -4
- ansible/module_utils/compat/datetime.py +40 -0
- ansible/module_utils/compat/selinux.py +1 -1
- ansible/module_utils/compat/typing.py +1 -1
- ansible/module_utils/connection.py +1 -1
- ansible/module_utils/facts/hardware/linux.py +2 -2
- ansible/module_utils/facts/hardware/openbsd.py +1 -1
- ansible/module_utils/facts/network/linux.py +3 -3
- ansible/module_utils/facts/other/facter.py +8 -15
- ansible/module_utils/facts/sysctl.py +1 -1
- ansible/module_utils/facts/system/date_time.py +2 -2
- ansible/module_utils/facts/system/distribution.py +1 -1
- ansible/module_utils/facts/system/local.py +6 -2
- ansible/module_utils/facts/system/pkg_mgr.py +6 -1
- ansible/module_utils/facts/system/service_mgr.py +4 -2
- ansible/module_utils/parsing/convert_bool.py +1 -1
- ansible/module_utils/service.py +9 -6
- ansible/module_utils/urls.py +40 -22
- ansible/modules/add_host.py +2 -2
- ansible/modules/apt.py +48 -31
- ansible/modules/apt_key.py +4 -4
- ansible/modules/apt_repository.py +5 -5
- ansible/modules/assemble.py +7 -7
- ansible/modules/assert.py +1 -1
- ansible/modules/async_status.py +11 -7
- ansible/modules/async_wrapper.py +1 -1
- ansible/modules/blockinfile.py +60 -17
- ansible/modules/command.py +37 -15
- ansible/modules/copy.py +35 -30
- ansible/modules/cron.py +14 -14
- ansible/modules/deb822_repository.py +4 -3
- ansible/modules/debconf.py +35 -14
- ansible/modules/debug.py +1 -1
- ansible/modules/dnf.py +29 -27
- ansible/modules/dnf5.py +22 -22
- ansible/modules/dpkg_selections.py +9 -2
- ansible/modules/expect.py +4 -4
- ansible/modules/fetch.py +7 -7
- ansible/modules/file.py +30 -30
- ansible/modules/find.py +82 -22
- ansible/modules/gather_facts.py +6 -2
- ansible/modules/get_url.py +29 -29
- ansible/modules/getent.py +4 -4
- ansible/modules/git.py +27 -27
- ansible/modules/group.py +5 -12
- ansible/modules/hostname.py +21 -2
- ansible/modules/include_role.py +5 -5
- ansible/modules/include_tasks.py +2 -2
- ansible/modules/include_vars.py +5 -5
- ansible/modules/iptables.py +70 -65
- ansible/modules/known_hosts.py +7 -7
- ansible/modules/lineinfile.py +33 -33
- ansible/modules/meta.py +13 -13
- ansible/modules/package.py +8 -8
- ansible/modules/package_facts.py +3 -3
- ansible/modules/pause.py +2 -2
- ansible/modules/ping.py +5 -5
- ansible/modules/pip.py +80 -46
- ansible/modules/reboot.py +8 -4
- ansible/modules/replace.py +20 -15
- ansible/modules/rpm_key.py +2 -2
- ansible/modules/script.py +16 -10
- ansible/modules/service.py +26 -98
- ansible/modules/service_facts.py +36 -12
- ansible/modules/set_fact.py +2 -2
- ansible/modules/set_stats.py +2 -2
- ansible/modules/setup.py +18 -18
- ansible/modules/shell.py +3 -3
- ansible/modules/stat.py +9 -30
- ansible/modules/subversion.py +9 -9
- ansible/modules/systemd.py +20 -19
- ansible/modules/systemd_service.py +20 -19
- ansible/modules/sysvinit.py +26 -21
- ansible/modules/tempfile.py +5 -4
- ansible/modules/template.py +60 -6
- ansible/modules/unarchive.py +21 -18
- ansible/modules/uri.py +39 -39
- ansible/modules/user.py +81 -53
- ansible/modules/wait_for.py +22 -21
- ansible/modules/wait_for_connection.py +4 -4
- ansible/modules/yum.py +38 -38
- ansible/modules/yum_repository.py +58 -80
- ansible/parsing/dataloader.py +27 -27
- ansible/parsing/mod_args.py +1 -1
- ansible/parsing/plugin_docs.py +3 -3
- ansible/parsing/splitter.py +14 -16
- ansible/parsing/utils/yaml.py +1 -1
- ansible/parsing/vault/__init__.py +8 -6
- ansible/parsing/yaml/constructor.py +1 -1
- ansible/parsing/yaml/objects.py +1 -1
- ansible/playbook/__init__.py +1 -1
- ansible/playbook/base.py +2 -2
- ansible/playbook/block.py +0 -1
- ansible/playbook/conditional.py +40 -114
- ansible/playbook/helpers.py +5 -28
- ansible/playbook/included_file.py +8 -7
- ansible/playbook/play.py +1 -1
- ansible/playbook/play_context.py +2 -2
- ansible/playbook/playbook_include.py +2 -2
- ansible/playbook/role/__init__.py +1 -1
- ansible/playbook/role/include.py +1 -1
- ansible/playbook/role/metadata.py +1 -1
- ansible/playbook/role_include.py +1 -1
- ansible/playbook/task.py +2 -2
- ansible/playbook/task_include.py +1 -24
- ansible/plugins/__init__.py +13 -5
- ansible/plugins/action/__init__.py +17 -43
- ansible/plugins/action/add_host.py +2 -3
- ansible/plugins/action/assemble.py +1 -1
- ansible/plugins/action/assert.py +2 -1
- ansible/plugins/action/copy.py +2 -2
- ansible/plugins/action/debug.py +2 -1
- ansible/plugins/action/fail.py +1 -0
- ansible/plugins/action/fetch.py +3 -1
- ansible/plugins/action/gather_facts.py +37 -13
- ansible/plugins/action/group_by.py +1 -0
- ansible/plugins/action/include_vars.py +3 -2
- ansible/plugins/action/normal.py +3 -3
- ansible/plugins/action/pause.py +1 -1
- ansible/plugins/action/reboot.py +21 -16
- ansible/plugins/action/script.py +23 -8
- ansible/plugins/action/set_fact.py +1 -0
- ansible/plugins/action/set_stats.py +1 -0
- ansible/plugins/action/shell.py +6 -0
- ansible/plugins/action/template.py +1 -1
- ansible/plugins/action/unarchive.py +1 -1
- ansible/plugins/action/uri.py +1 -1
- ansible/plugins/action/validate_argument_spec.py +1 -0
- ansible/plugins/action/wait_for_connection.py +4 -4
- ansible/plugins/become/__init__.py +1 -1
- ansible/plugins/become/su.py +1 -1
- ansible/plugins/cache/__init__.py +1 -1
- ansible/plugins/callback/junit.py +1 -1
- ansible/plugins/callback/oneline.py +1 -1
- ansible/plugins/callback/tree.py +1 -1
- ansible/plugins/cliconf/__init__.py +2 -2
- ansible/plugins/connection/__init__.py +65 -37
- ansible/plugins/connection/local.py +9 -8
- ansible/plugins/connection/paramiko_ssh.py +34 -28
- ansible/plugins/connection/psrp.py +56 -43
- ansible/plugins/connection/ssh.py +67 -43
- ansible/plugins/connection/winrm.py +77 -30
- ansible/plugins/doc_fragments/constructed.py +4 -4
- ansible/plugins/doc_fragments/files.py +12 -12
- ansible/plugins/doc_fragments/inventory_cache.py +0 -6
- ansible/plugins/doc_fragments/result_format_callback.py +5 -5
- ansible/plugins/doc_fragments/shell_common.py +2 -2
- ansible/plugins/doc_fragments/shell_windows.py +1 -1
- ansible/plugins/doc_fragments/template_common.py +6 -6
- ansible/plugins/doc_fragments/url.py +10 -10
- ansible/plugins/doc_fragments/url_windows.py +15 -15
- ansible/plugins/doc_fragments/vars_plugin_staging.py +4 -4
- ansible/plugins/filter/b64decode.yml +1 -1
- ansible/plugins/filter/b64encode.yml +2 -2
- ansible/plugins/filter/bool.yml +5 -5
- ansible/plugins/filter/combine.yml +1 -1
- ansible/plugins/filter/commonpath.yml +2 -1
- ansible/plugins/filter/core.py +6 -8
- ansible/plugins/filter/dict2items.yml +11 -1
- ansible/plugins/filter/difference.yml +1 -0
- ansible/plugins/filter/encryption.py +1 -1
- ansible/plugins/filter/extract.yml +1 -1
- ansible/plugins/filter/flatten.yml +1 -1
- ansible/plugins/filter/from_yaml.yml +1 -1
- ansible/plugins/filter/from_yaml_all.yml +2 -2
- ansible/plugins/filter/hash.yml +1 -1
- ansible/plugins/filter/human_readable.yml +1 -1
- ansible/plugins/filter/human_to_bytes.yml +2 -2
- ansible/plugins/filter/intersect.yml +1 -0
- ansible/plugins/filter/mandatory.yml +7 -0
- ansible/plugins/filter/mathstuff.py +15 -17
- ansible/plugins/filter/normpath.yml +1 -1
- ansible/plugins/filter/path_join.yml +8 -1
- ansible/plugins/filter/realpath.yml +3 -2
- ansible/plugins/filter/regex_findall.yml +8 -2
- ansible/plugins/filter/regex_replace.yml +9 -3
- ansible/plugins/filter/regex_search.yml +8 -2
- ansible/plugins/filter/relpath.yml +2 -2
- ansible/plugins/filter/root.yml +1 -1
- ansible/plugins/filter/splitext.yml +1 -1
- ansible/plugins/filter/subelements.yml +2 -2
- ansible/plugins/filter/symmetric_difference.yml +1 -0
- ansible/plugins/filter/ternary.yml +5 -5
- ansible/plugins/filter/to_json.yml +7 -7
- ansible/plugins/filter/to_nice_json.yml +5 -5
- ansible/plugins/filter/to_yaml.yml +2 -2
- ansible/plugins/filter/type_debug.yml +1 -1
- ansible/plugins/filter/union.yml +1 -0
- ansible/plugins/filter/unvault.yml +2 -2
- ansible/plugins/filter/urldecode.yml +13 -32
- ansible/plugins/filter/urlsplit.py +1 -1
- ansible/plugins/filter/vault.yml +1 -1
- ansible/plugins/filter/zip.yml +1 -1
- ansible/plugins/filter/zip_longest.yml +1 -1
- ansible/plugins/inventory/__init__.py +1 -1
- ansible/plugins/inventory/advanced_host_list.py +1 -1
- ansible/plugins/inventory/constructed.py +2 -2
- ansible/plugins/inventory/host_list.py +1 -1
- ansible/plugins/inventory/ini.py +6 -3
- ansible/plugins/inventory/script.py +8 -2
- ansible/plugins/inventory/toml.py +1 -1
- ansible/plugins/inventory/yaml.py +1 -1
- ansible/plugins/list.py +21 -17
- ansible/plugins/loader.py +66 -88
- ansible/plugins/lookup/__init__.py +1 -1
- ansible/plugins/lookup/config.py +16 -6
- ansible/plugins/lookup/csvfile.py +7 -4
- ansible/plugins/lookup/env.py +1 -1
- ansible/plugins/lookup/file.py +5 -2
- ansible/plugins/lookup/fileglob.py +5 -2
- ansible/plugins/lookup/first_found.py +20 -14
- ansible/plugins/lookup/ini.py +6 -3
- ansible/plugins/lookup/lines.py +2 -1
- ansible/plugins/lookup/password.py +7 -7
- ansible/plugins/lookup/pipe.py +1 -0
- ansible/plugins/lookup/random_choice.py +2 -2
- ansible/plugins/lookup/sequence.py +1 -1
- ansible/plugins/lookup/subelements.py +2 -2
- ansible/plugins/lookup/template.py +4 -1
- ansible/plugins/lookup/unvault.py +4 -1
- ansible/plugins/lookup/url.py +6 -6
- ansible/plugins/lookup/varnames.py +1 -1
- ansible/plugins/netconf/__init__.py +3 -3
- ansible/plugins/shell/__init__.py +1 -1
- ansible/plugins/shell/cmd.py +7 -7
- ansible/plugins/shell/powershell.py +1 -1
- ansible/plugins/strategy/__init__.py +8 -10
- ansible/plugins/strategy/free.py +1 -1
- ansible/plugins/strategy/linear.py +3 -3
- ansible/plugins/terminal/__init__.py +2 -2
- ansible/plugins/test/abs.yml +1 -1
- ansible/plugins/test/all.yml +1 -1
- ansible/plugins/test/any.yml +1 -1
- ansible/plugins/test/change.yml +2 -2
- ansible/plugins/test/changed.yml +2 -2
- ansible/plugins/test/contains.yml +1 -1
- ansible/plugins/test/core.py +1 -1
- ansible/plugins/test/directory.yml +1 -1
- ansible/plugins/test/exists.yml +3 -2
- ansible/plugins/test/failed.yml +2 -2
- ansible/plugins/test/failure.yml +2 -2
- ansible/plugins/test/falsy.yml +2 -2
- ansible/plugins/test/file.yml +1 -1
- ansible/plugins/test/finished.yml +2 -2
- ansible/plugins/test/is_abs.yml +1 -1
- ansible/plugins/test/is_dir.yml +1 -1
- ansible/plugins/test/is_file.yml +1 -1
- ansible/plugins/test/is_link.yml +1 -1
- ansible/plugins/test/is_mount.yml +1 -1
- ansible/plugins/test/is_same_file.yml +1 -1
- ansible/plugins/test/isnan.yml +1 -1
- ansible/plugins/test/issubset.yml +1 -2
- ansible/plugins/test/issuperset.yml +1 -2
- ansible/plugins/test/link.yml +1 -1
- ansible/plugins/test/link_exists.yml +1 -1
- ansible/plugins/test/match.yml +2 -2
- ansible/plugins/test/mount.yml +1 -1
- ansible/plugins/test/nan.yml +1 -1
- ansible/plugins/test/reachable.yml +2 -2
- ansible/plugins/test/regex.yml +1 -1
- ansible/plugins/test/same_file.yml +1 -1
- ansible/plugins/test/search.yml +2 -2
- ansible/plugins/test/skip.yml +3 -3
- ansible/plugins/test/skipped.yml +3 -3
- ansible/plugins/test/started.yml +2 -2
- ansible/plugins/test/subset.yml +1 -2
- ansible/plugins/test/succeeded.yml +2 -2
- ansible/plugins/test/success.yml +2 -2
- ansible/plugins/test/successful.yml +2 -2
- ansible/plugins/test/superset.yml +1 -2
- ansible/plugins/test/truthy.yml +3 -3
- ansible/plugins/test/unreachable.yml +2 -2
- ansible/plugins/test/uri.yml +1 -1
- ansible/plugins/test/url.yml +1 -1
- ansible/plugins/test/urn.yml +1 -1
- ansible/plugins/test/vault_encrypted.yml +1 -1
- ansible/plugins/test/version.yml +7 -7
- ansible/plugins/test/version_compare.yml +7 -7
- ansible/plugins/vars/host_group_vars.py +1 -1
- ansible/release.py +2 -2
- ansible/template/__init__.py +24 -26
- ansible/template/native_helpers.py +1 -1
- ansible/template/vars.py +1 -1
- ansible/utils/_junit_xml.py +1 -1
- ansible/utils/cmd_functions.py +1 -1
- ansible/utils/collection_loader/_collection_finder.py +12 -1
- ansible/utils/display.py +113 -62
- ansible/utils/encrypt.py +11 -14
- ansible/utils/hashing.py +1 -1
- ansible/utils/jsonrpc.py +1 -1
- ansible/utils/path.py +1 -1
- ansible/utils/plugin_docs.py +1 -1
- ansible/utils/py3compat.py +1 -1
- ansible/utils/shlex.py +2 -10
- ansible/utils/ssh_functions.py +5 -4
- ansible/utils/unicode.py +1 -1
- ansible/utils/unsafe_proxy.py +1 -1
- ansible/utils/vars.py +4 -29
- ansible/vars/hostvars.py +1 -2
- ansible/vars/manager.py +13 -9
- ansible/vars/plugins.py +2 -2
- {ansible_core-2.15.4rc1.dist-info → ansible_core-2.16.0b2.dist-info}/COPYING +4 -5
- {ansible_core-2.15.4rc1.dist-info → ansible_core-2.16.0b2.dist-info}/METADATA +2 -4
- {ansible_core-2.15.4rc1.dist-info → ansible_core-2.16.0b2.dist-info}/RECORD +424 -425
- ansible_test/_data/completion/docker.txt +9 -9
- ansible_test/_data/completion/remote.txt +4 -7
- ansible_test/_data/completion/windows.txt +0 -2
- ansible_test/_data/requirements/ansible-test.txt +2 -1
- ansible_test/_data/requirements/ansible.txt +0 -3
- ansible_test/_data/requirements/constraints.txt +0 -2
- ansible_test/_data/requirements/sanity.ansible-doc.txt +3 -5
- ansible_test/_data/requirements/sanity.changelog.in +1 -2
- ansible_test/_data/requirements/sanity.changelog.txt +4 -6
- ansible_test/_data/requirements/sanity.import.plugin.txt +2 -4
- ansible_test/_data/requirements/sanity.import.txt +1 -3
- ansible_test/_data/requirements/sanity.integration-aliases.txt +1 -3
- ansible_test/_data/requirements/sanity.mypy.txt +12 -12
- ansible_test/_data/requirements/sanity.pep8.txt +1 -1
- ansible_test/_data/requirements/sanity.pylint.txt +6 -12
- ansible_test/_data/requirements/sanity.runtime-metadata.txt +1 -3
- ansible_test/_data/requirements/sanity.validate-modules.in +1 -1
- ansible_test/_data/requirements/sanity.validate-modules.txt +3 -5
- ansible_test/_data/requirements/sanity.yamllint.txt +3 -5
- ansible_test/_data/requirements/units.txt +0 -1
- ansible_test/_internal/ci/azp.py +4 -4
- ansible_test/_internal/cli/environments.py +0 -13
- ansible_test/_internal/commands/coverage/analyze/targets/__init__.py +4 -4
- ansible_test/_internal/commands/coverage/combine.py +1 -1
- ansible_test/_internal/commands/integration/cloud/acme.py +6 -8
- ansible_test/_internal/commands/integration/cloud/cs.py +4 -9
- ansible_test/_internal/commands/integration/cloud/galaxy.py +103 -96
- ansible_test/_internal/commands/integration/cloud/httptester.py +0 -3
- ansible_test/_internal/commands/integration/cloud/nios.py +7 -9
- ansible_test/_internal/commands/integration/cloud/openshift.py +2 -7
- ansible_test/_internal/commands/integration/cloud/vcenter.py +11 -95
- ansible_test/_internal/commands/sanity/__init__.py +10 -0
- ansible_test/_internal/commands/sanity/import.py +8 -2
- ansible_test/_internal/commands/sanity/pylint.py +27 -1
- ansible_test/_internal/commands/units/__init__.py +2 -1
- ansible_test/_internal/config.py +0 -7
- ansible_test/_internal/containers.py +11 -56
- ansible_test/_internal/core_ci.py +0 -7
- ansible_test/_internal/coverage_util.py +8 -3
- ansible_test/_internal/delegation.py +0 -1
- ansible_test/_internal/diff.py +1 -1
- ansible_test/_internal/docker_util.py +9 -2
- ansible_test/_internal/host_profiles.py +6 -6
- ansible_test/_internal/http.py +1 -1
- ansible_test/_internal/junit_xml.py +1 -1
- ansible_test/_internal/pypi_proxy.py +1 -1
- ansible_test/_internal/python_requirements.py +3 -8
- ansible_test/_internal/util.py +1 -6
- ansible_test/_util/controller/sanity/code-smell/no-get-exception.json +4 -0
- ansible_test/_util/controller/sanity/code-smell/replace-urlopen.json +4 -0
- ansible_test/_util/controller/sanity/code-smell/use-compat-six.json +4 -0
- ansible_test/_util/controller/sanity/mypy/ansible-core.ini +3 -0
- ansible_test/_util/controller/sanity/pylint/config/ansible-test-target.cfg +2 -0
- ansible_test/_util/controller/sanity/pylint/config/ansible-test.cfg +0 -1
- ansible_test/_util/controller/sanity/pylint/config/collection.cfg +1 -0
- ansible_test/_util/controller/sanity/pylint/plugins/deprecated.py +172 -10
- ansible_test/_util/controller/sanity/pylint/plugins/string_format.py +13 -2
- ansible_test/_util/controller/sanity/pylint/plugins/unwanted.py +7 -1
- ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py +6 -6
- ansible_test/_util/controller/sanity/validate-modules/validate_modules/module_args.py +1 -1
- ansible_test/_util/controller/sanity/validate-modules/validate_modules/utils.py +1 -1
- ansible_test/_util/controller/sanity/yamllint/yamllinter.py +3 -3
- ansible_test/_util/controller/tools/collection_detail.py +2 -2
- ansible_test/_util/target/common/constants.py +2 -2
- ansible_test/_util/target/pytest/plugins/ansible_forked.py +103 -0
- ansible_test/_util/target/sanity/import/importer.py +0 -8
- ansible_test/_util/target/setup/bootstrap.sh +36 -16
- ansible_test/_util/target/setup/quiet_pip.py +0 -4
- ansible/modules/_include.py +0 -80
- ansible_test/_internal/commands/integration/cloud/foreman.py +0 -102
- ansible_test/_util/target/setup/ConfigureRemotingForAnsible.ps1 +0 -435
- {ansible_core-2.15.4rc1.data → ansible_core-2.16.0b2.data}/scripts/ansible-test +0 -0
- {ansible_core-2.15.4rc1.dist-info → ansible_core-2.16.0b2.dist-info}/WHEEL +0 -0
- {ansible_core-2.15.4rc1.dist-info → ansible_core-2.16.0b2.dist-info}/entry_points.txt +0 -0
- {ansible_core-2.15.4rc1.dist-info → ansible_core-2.16.0b2.dist-info}/top_level.txt +0 -0
|
@@ -10,11 +10,18 @@ DOCUMENTATION:
|
|
|
10
10
|
description: Mandatory expression.
|
|
11
11
|
type: raw
|
|
12
12
|
required: true
|
|
13
|
+
msg:
|
|
14
|
+
description: The customized message that is printed when the given variable is not defined.
|
|
15
|
+
type: str
|
|
16
|
+
required: false
|
|
13
17
|
EXAMPLES: |
|
|
14
18
|
|
|
15
19
|
# results in a Filter Error
|
|
16
20
|
{{ notdefined | mandatory }}
|
|
17
21
|
|
|
22
|
+
# print a custom error message
|
|
23
|
+
{{ notdefined | mandatory(msg='This variable is required.') }}
|
|
24
|
+
|
|
18
25
|
RETURN:
|
|
19
26
|
_value:
|
|
20
27
|
description: The input if defined, otherwise an error.
|
|
@@ -18,21 +18,19 @@
|
|
|
18
18
|
# You should have received a copy of the GNU General Public License
|
|
19
19
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
from __future__ import (absolute_import, division, print_function)
|
|
23
|
-
__metaclass__ = type
|
|
21
|
+
from __future__ import annotations
|
|
24
22
|
|
|
25
23
|
import itertools
|
|
26
24
|
import math
|
|
27
25
|
|
|
28
|
-
from collections.abc import
|
|
26
|
+
from collections.abc import Mapping, Iterable
|
|
29
27
|
|
|
30
28
|
from jinja2.filters import pass_environment
|
|
31
29
|
|
|
32
30
|
from ansible.errors import AnsibleFilterError, AnsibleFilterTypeError
|
|
33
31
|
from ansible.module_utils.common.text import formatters
|
|
34
32
|
from ansible.module_utils.six import binary_type, text_type
|
|
35
|
-
from ansible.module_utils.
|
|
33
|
+
from ansible.module_utils.common.text.converters import to_native, to_text
|
|
36
34
|
from ansible.utils.display import Display
|
|
37
35
|
|
|
38
36
|
try:
|
|
@@ -84,27 +82,27 @@ def unique(environment, a, case_sensitive=None, attribute=None):
|
|
|
84
82
|
|
|
85
83
|
@pass_environment
|
|
86
84
|
def intersect(environment, a, b):
|
|
87
|
-
|
|
88
|
-
c = set(a) & set(b)
|
|
89
|
-
|
|
85
|
+
try:
|
|
86
|
+
c = list(set(a) & set(b))
|
|
87
|
+
except TypeError:
|
|
90
88
|
c = unique(environment, [x for x in a if x in b], True)
|
|
91
89
|
return c
|
|
92
90
|
|
|
93
91
|
|
|
94
92
|
@pass_environment
|
|
95
93
|
def difference(environment, a, b):
|
|
96
|
-
|
|
97
|
-
c = set(a) - set(b)
|
|
98
|
-
|
|
94
|
+
try:
|
|
95
|
+
c = list(set(a) - set(b))
|
|
96
|
+
except TypeError:
|
|
99
97
|
c = unique(environment, [x for x in a if x not in b], True)
|
|
100
98
|
return c
|
|
101
99
|
|
|
102
100
|
|
|
103
101
|
@pass_environment
|
|
104
102
|
def symmetric_difference(environment, a, b):
|
|
105
|
-
|
|
106
|
-
c = set(a) ^ set(b)
|
|
107
|
-
|
|
103
|
+
try:
|
|
104
|
+
c = list(set(a) ^ set(b))
|
|
105
|
+
except TypeError:
|
|
108
106
|
isect = intersect(environment, a, b)
|
|
109
107
|
c = [x for x in union(environment, a, b) if x not in isect]
|
|
110
108
|
return c
|
|
@@ -112,9 +110,9 @@ def symmetric_difference(environment, a, b):
|
|
|
112
110
|
|
|
113
111
|
@pass_environment
|
|
114
112
|
def union(environment, a, b):
|
|
115
|
-
|
|
116
|
-
c = set(a) | set(b)
|
|
117
|
-
|
|
113
|
+
try:
|
|
114
|
+
c = list(set(a) | set(b))
|
|
115
|
+
except TypeError:
|
|
118
116
|
c = unique(environment, a + b, True)
|
|
119
117
|
return c
|
|
120
118
|
|
|
@@ -15,7 +15,7 @@ DOCUMENTATION:
|
|
|
15
15
|
plugin_type: filter
|
|
16
16
|
EXAMPLES: |
|
|
17
17
|
|
|
18
|
-
# To get a normalized path (
|
|
18
|
+
# To get a normalized path (for example - '/foo/bar') from the path (for example - '/foo//bar')
|
|
19
19
|
{{ path | normpath }}
|
|
20
20
|
|
|
21
21
|
RETURN:
|
|
@@ -6,6 +6,8 @@ DOCUMENTATION:
|
|
|
6
6
|
positional: _input
|
|
7
7
|
description:
|
|
8
8
|
- Returns a path obtained by joining one or more path components.
|
|
9
|
+
- If a path component is an absolute path, then all previous components
|
|
10
|
+
are ignored and joining continues from the absolute path. See examples for details.
|
|
9
11
|
options:
|
|
10
12
|
_input:
|
|
11
13
|
description: A path, or a list of paths.
|
|
@@ -21,9 +23,14 @@ EXAMPLES: |
|
|
|
21
23
|
# equivalent to '/etc/subdir/{{filename}}'
|
|
22
24
|
wheremyfile: "{{ ['/etc', 'subdir', filename] | path_join }}"
|
|
23
25
|
|
|
24
|
-
# trustme => '/etc/apt/trusted.d/mykey.
|
|
26
|
+
# trustme => '/etc/apt/trusted.d/mykey.gpg'
|
|
25
27
|
trustme: "{{ ['/etc', 'apt', 'trusted.d', 'mykey.gpg'] | path_join }}"
|
|
26
28
|
|
|
29
|
+
# If one of the paths is absolute, then path_join ignores all previous path components
|
|
30
|
+
# If backup_dir == '/tmp' and backup_file == '/sample/baz.txt', the result is '/sample/baz.txt'
|
|
31
|
+
# backup_path => "/sample/baz.txt"
|
|
32
|
+
backup_path: "{{ ('/etc', backup_dir, backup_file) | path_join }}"
|
|
33
|
+
|
|
27
34
|
RETURN:
|
|
28
35
|
_value:
|
|
29
36
|
description: The concatenated path.
|
|
@@ -4,8 +4,8 @@ DOCUMENTATION:
|
|
|
4
4
|
version_added: "1.8"
|
|
5
5
|
short_description: Turn path into real path
|
|
6
6
|
description:
|
|
7
|
-
- Resolves/follows
|
|
8
|
-
- Filters
|
|
7
|
+
- Resolves/follows symlinks to return the 'real path' from a given path.
|
|
8
|
+
- Filters always run on the controller so this path is resolved using the controller's filesystem.
|
|
9
9
|
options:
|
|
10
10
|
_input:
|
|
11
11
|
description: A path.
|
|
@@ -13,6 +13,7 @@ DOCUMENTATION:
|
|
|
13
13
|
required: true
|
|
14
14
|
EXAMPLES: |
|
|
15
15
|
|
|
16
|
+
# realpath => /usr/bin/somebinary
|
|
16
17
|
realpath: {{ '/path/to/synlink' | realpath }}
|
|
17
18
|
|
|
18
19
|
RETURN:
|
|
@@ -14,11 +14,11 @@ DOCUMENTATION:
|
|
|
14
14
|
description: Regular expression string that defines the match.
|
|
15
15
|
type: str
|
|
16
16
|
multiline:
|
|
17
|
-
description: Search across line endings if
|
|
17
|
+
description: Search across line endings if V(True), do not if otherwise.
|
|
18
18
|
type: bool
|
|
19
19
|
default: no
|
|
20
20
|
ignorecase:
|
|
21
|
-
description: Force the search to be case insensitive if
|
|
21
|
+
description: Force the search to be case insensitive if V(True), case sensitive otherwise.
|
|
22
22
|
type: bool
|
|
23
23
|
default: no
|
|
24
24
|
|
|
@@ -27,6 +27,12 @@ EXAMPLES: |
|
|
|
27
27
|
# all_pirates => ['CAR', 'tar', 'bar']
|
|
28
28
|
all_pirates: "{{ 'CAR\ntar\nfoo\nbar\n' | regex_findall('^.ar$', multiline=True, ignorecase=True) }}"
|
|
29
29
|
|
|
30
|
+
# Using inline regex flags instead of passing options to filter
|
|
31
|
+
# See https://docs.python.org/3/library/re.html for more information
|
|
32
|
+
# on inline regex flags
|
|
33
|
+
# all_pirates => ['CAR', 'tar', 'bar']
|
|
34
|
+
all_pirates: "{{ 'CAR\ntar\nfoo\nbar\n' | regex_findall('(?im)^.ar$') }}"
|
|
35
|
+
|
|
30
36
|
# get_ips => ['8.8.8.8', '8.8.4.4']
|
|
31
37
|
get_ips: "{{ 'Some DNS servers are 8.8.8.8 and 8.8.4.4' | regex_findall('\\b(?:[0-9]{1,3}\\.){3}[0-9]{1,3}\\b') }}"
|
|
32
38
|
|
|
@@ -5,7 +5,7 @@ DOCUMENTATION:
|
|
|
5
5
|
description:
|
|
6
6
|
- Replace a substring defined by a regular expression with another defined by another regular expression based on the first match.
|
|
7
7
|
notes:
|
|
8
|
-
- Maps to Python's C(re.
|
|
8
|
+
- Maps to Python's C(re.sub).
|
|
9
9
|
positional: _input, _regex_match, _regex_replace
|
|
10
10
|
options:
|
|
11
11
|
_input:
|
|
@@ -21,11 +21,11 @@ DOCUMENTATION:
|
|
|
21
21
|
type: int
|
|
22
22
|
required: true
|
|
23
23
|
multiline:
|
|
24
|
-
description: Search across line endings if
|
|
24
|
+
description: Search across line endings if V(True), do not if otherwise.
|
|
25
25
|
type: bool
|
|
26
26
|
default: no
|
|
27
27
|
ignorecase:
|
|
28
|
-
description: Force the search to be case insensitive if
|
|
28
|
+
description: Force the search to be case insensitive if V(True), case sensitive otherwise.
|
|
29
29
|
type: bool
|
|
30
30
|
default: no
|
|
31
31
|
|
|
@@ -40,6 +40,12 @@ EXAMPLES: |
|
|
|
40
40
|
# piratecomment => '#CAR\n#tar\nfoo\n#bar\n'
|
|
41
41
|
piratecomment: "{{ 'CAR\ntar\nfoo\nbar\n' | regex_replace('^(.ar)$', '#\\1', multiline=True, ignorecase=True) }}"
|
|
42
42
|
|
|
43
|
+
# Using inline regex flags instead of passing options to filter
|
|
44
|
+
# See https://docs.python.org/3/library/re.html for more information
|
|
45
|
+
# on inline regex flags
|
|
46
|
+
# piratecomment => '#CAR\n#tar\nfoo\n#bar\n'
|
|
47
|
+
piratecomment: "{{ 'CAR\ntar\nfoo\nbar\n' | regex_replace('(?im)^(.ar)$', '#\\1') }}"
|
|
48
|
+
|
|
43
49
|
RETURN:
|
|
44
50
|
_value:
|
|
45
51
|
description: String with substitution (or original if no match).
|
|
@@ -16,11 +16,11 @@ DOCUMENTATION:
|
|
|
16
16
|
description: Regular expression string that defines the match.
|
|
17
17
|
type: str
|
|
18
18
|
multiline:
|
|
19
|
-
description: Search across line endings if
|
|
19
|
+
description: Search across line endings if V(True), do not if otherwise.
|
|
20
20
|
type: bool
|
|
21
21
|
default: no
|
|
22
22
|
ignorecase:
|
|
23
|
-
description: Force the search to be case insensitive if
|
|
23
|
+
description: Force the search to be case insensitive if V(True), case sensitive otherwise.
|
|
24
24
|
type: bool
|
|
25
25
|
default: no
|
|
26
26
|
|
|
@@ -29,6 +29,12 @@ EXAMPLES: |
|
|
|
29
29
|
# db => 'database42'
|
|
30
30
|
db: "{{ 'server1/database42' | regex_search('database[0-9]+') }}"
|
|
31
31
|
|
|
32
|
+
# Using inline regex flags instead of passing options to filter
|
|
33
|
+
# See https://docs.python.org/3/library/re.html for more information
|
|
34
|
+
# on inline regex flags
|
|
35
|
+
# server => 'sErver1'
|
|
36
|
+
db: "{{ 'sErver1/database42' | regex_search('(?i)server([0-9]+)') }}"
|
|
37
|
+
|
|
32
38
|
# drinkat => 'BAR'
|
|
33
39
|
drinkat: "{{ 'foo\nBAR' | regex_search('^bar', multiline=True, ignorecase=True) }}"
|
|
34
40
|
|
|
@@ -5,8 +5,8 @@ DOCUMENTATION:
|
|
|
5
5
|
short_description: Make a path relative
|
|
6
6
|
positional: _input, start
|
|
7
7
|
description:
|
|
8
|
-
- Converts the given path to a relative path from the
|
|
9
|
-
or relative to the directory given in
|
|
8
|
+
- Converts the given path to a relative path from the O(start),
|
|
9
|
+
or relative to the directory given in O(start).
|
|
10
10
|
options:
|
|
11
11
|
_input:
|
|
12
12
|
description: A path.
|
ansible/plugins/filter/root.yml
CHANGED
|
@@ -4,7 +4,7 @@ DOCUMENTATION:
|
|
|
4
4
|
short_description: returns a product of a list and its elements
|
|
5
5
|
positional: _input, _subelement, skip_missing
|
|
6
6
|
description:
|
|
7
|
-
- This produces a product of an object and the subelement values of that object, similar to the subelements lookup. This lets you specify individual subelements to use in a template
|
|
7
|
+
- This produces a product of an object and the subelement values of that object, similar to the subelements lookup. This lets you specify individual subelements to use in a template O(_input).
|
|
8
8
|
options:
|
|
9
9
|
_input:
|
|
10
10
|
description: Original list.
|
|
@@ -16,7 +16,7 @@ DOCUMENTATION:
|
|
|
16
16
|
type: str
|
|
17
17
|
required: yes
|
|
18
18
|
skip_missing:
|
|
19
|
-
description: If
|
|
19
|
+
description: If V(True), ignore missing subelements, otherwise missing subelements generate an error.
|
|
20
20
|
type: bool
|
|
21
21
|
default: no
|
|
22
22
|
|
|
@@ -4,22 +4,22 @@ DOCUMENTATION:
|
|
|
4
4
|
version_added: '1.9'
|
|
5
5
|
short_description: Ternary operation filter
|
|
6
6
|
description:
|
|
7
|
-
- Return the first value if the input is
|
|
7
|
+
- Return the first value if the input is V(True), the second if V(False).
|
|
8
8
|
positional: true_val, false_val
|
|
9
9
|
options:
|
|
10
10
|
_input:
|
|
11
|
-
description: A boolean expression, must evaluate to
|
|
11
|
+
description: A boolean expression, must evaluate to V(True) or V(False).
|
|
12
12
|
type: bool
|
|
13
13
|
required: true
|
|
14
14
|
true_val:
|
|
15
|
-
description: Value to return if the input is
|
|
15
|
+
description: Value to return if the input is V(True).
|
|
16
16
|
type: any
|
|
17
17
|
required: true
|
|
18
18
|
false_val:
|
|
19
|
-
description: Value to return if the input is
|
|
19
|
+
description: Value to return if the input is V(False).
|
|
20
20
|
type: any
|
|
21
21
|
none_val:
|
|
22
|
-
description: Value to return if the input is
|
|
22
|
+
description: Value to return if the input is V(None). If not set, V(None) will be treated as V(False).
|
|
23
23
|
type: any
|
|
24
24
|
version_added: '2.8'
|
|
25
25
|
notes:
|
|
@@ -23,8 +23,8 @@ DOCUMENTATION:
|
|
|
23
23
|
default: True
|
|
24
24
|
version_added: '2.9'
|
|
25
25
|
allow_nan:
|
|
26
|
-
description: When
|
|
27
|
-
When
|
|
26
|
+
description: When V(False), strict adherence to float value limits of the JSON specifications, so C(nan), C(inf) and C(-inf) values will produce errors.
|
|
27
|
+
When V(True), JavaScript equivalents will be used (C(NaN), C(Infinity), C(-Infinity)).
|
|
28
28
|
default: True
|
|
29
29
|
type: bool
|
|
30
30
|
check_circular:
|
|
@@ -41,11 +41,11 @@ DOCUMENTATION:
|
|
|
41
41
|
type: integer
|
|
42
42
|
separators:
|
|
43
43
|
description: The C(item) and C(key) separator to be used in the serialized output,
|
|
44
|
-
default may change depending on
|
|
44
|
+
default may change depending on O(indent) and Python version.
|
|
45
45
|
default: "(', ', ': ')"
|
|
46
46
|
type: tuple
|
|
47
47
|
skipkeys:
|
|
48
|
-
description: If
|
|
48
|
+
description: If V(True), keys that are not basic Python types will be skipped.
|
|
49
49
|
default: False
|
|
50
50
|
type: bool
|
|
51
51
|
sort_keys:
|
|
@@ -53,15 +53,15 @@ DOCUMENTATION:
|
|
|
53
53
|
default: False
|
|
54
54
|
type: bool
|
|
55
55
|
notes:
|
|
56
|
-
- Both
|
|
56
|
+
- Both O(vault_to_text) and O(preprocess_unsafe) defaulted to V(False) between Ansible 2.9 and 2.12.
|
|
57
57
|
- 'These parameters to C(json.dumps) will be ignored, as they are overridden internally: I(cls), I(default)'
|
|
58
58
|
|
|
59
59
|
EXAMPLES: |
|
|
60
60
|
# dump variable in a template to create a JSON document
|
|
61
|
-
{{ docker_config|to_json }}
|
|
61
|
+
{{ docker_config | to_json }}
|
|
62
62
|
|
|
63
63
|
# same as above but 'prettier' (equivalent to to_nice_json filter)
|
|
64
|
-
{{ docker_config|to_json(indent=4, sort_keys=True) }}
|
|
64
|
+
{{ docker_config | to_json(indent=4, sort_keys=True) }}
|
|
65
65
|
|
|
66
66
|
RETURN:
|
|
67
67
|
_value:
|
|
@@ -23,8 +23,8 @@ DOCUMENTATION:
|
|
|
23
23
|
default: True
|
|
24
24
|
version_added: '2.9'
|
|
25
25
|
allow_nan:
|
|
26
|
-
description: When
|
|
27
|
-
When
|
|
26
|
+
description: When V(False), strict adherence to float value limits of the JSON specification, so C(nan), C(inf) and C(-inf) values will produce errors.
|
|
27
|
+
When V(True), JavaScript equivalents will be used (C(NaN), C(Infinity), C(-Infinity)).
|
|
28
28
|
default: True
|
|
29
29
|
type: bool
|
|
30
30
|
check_circular:
|
|
@@ -36,16 +36,16 @@ DOCUMENTATION:
|
|
|
36
36
|
default: True
|
|
37
37
|
type: bool
|
|
38
38
|
skipkeys:
|
|
39
|
-
description: If
|
|
39
|
+
description: If V(True), keys that are not basic Python types will be skipped.
|
|
40
40
|
default: False
|
|
41
41
|
type: bool
|
|
42
42
|
notes:
|
|
43
|
-
- Both
|
|
43
|
+
- Both O(vault_to_text) and O(preprocess_unsafe) defaulted to V(False) between Ansible 2.9 and 2.12.
|
|
44
44
|
- 'These parameters to C(json.dumps) will be ignored, they are overridden for internal use: I(cls), I(default), I(indent), I(separators), I(sort_keys).'
|
|
45
45
|
|
|
46
46
|
EXAMPLES: |
|
|
47
47
|
# dump variable in a template to create a nicely formatted JSON document
|
|
48
|
-
{{ docker_config|to_nice_json }}
|
|
48
|
+
{{ docker_config | to_nice_json }}
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
RETURN:
|
|
@@ -41,10 +41,10 @@ DOCUMENTATION:
|
|
|
41
41
|
|
|
42
42
|
EXAMPLES: |
|
|
43
43
|
# dump variable in a template to create a YAML document
|
|
44
|
-
{{ github_workflow |to_yaml}}
|
|
44
|
+
{{ github_workflow | to_yaml }}
|
|
45
45
|
|
|
46
46
|
# same as above but 'prettier' (equivalent to to_nice_yaml filter)
|
|
47
|
-
{{ docker_config|to_yaml(indent=4) }}
|
|
47
|
+
{{ docker_config | to_yaml(indent=4) }}
|
|
48
48
|
|
|
49
49
|
RETURN:
|
|
50
50
|
_value:
|
ansible/plugins/filter/union.yml
CHANGED
|
@@ -23,12 +23,12 @@ DOCUMENTATION:
|
|
|
23
23
|
EXAMPLES: |
|
|
24
24
|
# simply decrypt my key from a vault
|
|
25
25
|
vars:
|
|
26
|
-
mykey: "{{ myvaultedkey|unvault(passphrase) }} "
|
|
26
|
+
mykey: "{{ myvaultedkey | unvault(passphrase) }} "
|
|
27
27
|
|
|
28
28
|
- name: save templated unvaulted data
|
|
29
29
|
template: src=dump_template_data.j2 dest=/some/key/clear.txt
|
|
30
30
|
vars:
|
|
31
|
-
template_data: '{{ secretdata|unvault(vaultsecret) }}'
|
|
31
|
+
template_data: '{{ secretdata | unvault(vaultsecret) }}'
|
|
32
32
|
|
|
33
33
|
RETURN:
|
|
34
34
|
_value:
|
|
@@ -1,48 +1,29 @@
|
|
|
1
1
|
DOCUMENTATION:
|
|
2
|
-
name:
|
|
2
|
+
name: urldecode
|
|
3
3
|
version_added: "2.4"
|
|
4
|
-
short_description:
|
|
4
|
+
short_description: Decode percent-encoded sequences
|
|
5
5
|
description:
|
|
6
|
-
-
|
|
7
|
-
|
|
6
|
+
- Replace %xx escapes with their single-character equivalent in the given string.
|
|
7
|
+
- Also replace plus signs with spaces, as required for unquoting HTML form values.
|
|
8
|
+
positional: _input
|
|
8
9
|
options:
|
|
9
10
|
_input:
|
|
10
|
-
description: URL string to
|
|
11
|
+
description: URL encoded string to decode.
|
|
11
12
|
type: str
|
|
12
13
|
required: true
|
|
13
|
-
query:
|
|
14
|
-
description: Specify a single component to return.
|
|
15
|
-
type: str
|
|
16
|
-
choices: ["fragment", "hostname", "netloc", "password", "path", "port", "query", "scheme", "username"]
|
|
17
14
|
|
|
18
15
|
RETURN:
|
|
19
16
|
_value:
|
|
20
17
|
description:
|
|
21
|
-
-
|
|
22
|
-
- If I(query) is provided, a string or integer will be returned instead, depending on I(query).
|
|
18
|
+
- URL decoded value for the given string
|
|
23
19
|
type: any
|
|
24
20
|
|
|
25
21
|
EXAMPLES: |
|
|
26
22
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
#
|
|
30
|
-
# "fragment": "fragment",
|
|
31
|
-
# "hostname": "www.acme.com",
|
|
32
|
-
# "netloc": "user:password@www.acme.com:9000",
|
|
33
|
-
# "password": "password",
|
|
34
|
-
# "path": "/dir/index.html",
|
|
35
|
-
# "port": 9000,
|
|
36
|
-
# "query": "query=term",
|
|
37
|
-
# "scheme": "http",
|
|
38
|
-
# "username": "user"
|
|
39
|
-
# }
|
|
40
|
-
|
|
41
|
-
{{ "http://user:password@www.acme.com:9000/dir/index.html?query=term#fragment" | urlsplit('hostname') }}
|
|
42
|
-
# => 'www.acme.com'
|
|
43
|
-
|
|
44
|
-
{{ "http://user:password@www.acme.com:9000/dir/index.html?query=term#fragment" | urlsplit('query') }}
|
|
45
|
-
# => 'query=term'
|
|
23
|
+
# Decode urlencoded string
|
|
24
|
+
{{ '%7e/abc+def' | urldecode }}
|
|
25
|
+
# => "~/abc def"
|
|
46
26
|
|
|
47
|
-
|
|
48
|
-
|
|
27
|
+
# Decode plus sign as well
|
|
28
|
+
{{ 'El+Ni%C3%B1o' | urldecode }}
|
|
29
|
+
# => "El Niño"
|
|
@@ -53,7 +53,7 @@ RETURN = r'''
|
|
|
53
53
|
_value:
|
|
54
54
|
description:
|
|
55
55
|
- A dictionary with components as keyword and their value.
|
|
56
|
-
- If
|
|
56
|
+
- If O(query) is provided, a string or integer will be returned instead, depending on O(query).
|
|
57
57
|
type: any
|
|
58
58
|
'''
|
|
59
59
|
|
ansible/plugins/filter/vault.yml
CHANGED
|
@@ -26,7 +26,7 @@ DOCUMENTATION:
|
|
|
26
26
|
default: 'filter_default'
|
|
27
27
|
wrap_object:
|
|
28
28
|
description:
|
|
29
|
-
- This toggle can force the return of an C(AnsibleVaultEncryptedUnicode) string object, when
|
|
29
|
+
- This toggle can force the return of an C(AnsibleVaultEncryptedUnicode) string object, when V(False), you get a simple string.
|
|
30
30
|
- Mostly useful when combining with the C(to_yaml) filter to output the 'inline vault' format.
|
|
31
31
|
type: bool
|
|
32
32
|
default: False
|
ansible/plugins/filter/zip.yml
CHANGED
|
@@ -18,7 +18,7 @@ DOCUMENTATION:
|
|
|
18
18
|
elements: any
|
|
19
19
|
required: yes
|
|
20
20
|
strict:
|
|
21
|
-
description: If
|
|
21
|
+
description: If V(True) return an error on mismatching list length, otherwise shortest list determines output.
|
|
22
22
|
type: bool
|
|
23
23
|
default: no
|
|
24
24
|
|
|
@@ -5,7 +5,7 @@ DOCUMENTATION:
|
|
|
5
5
|
positional: _input, _additional_lists
|
|
6
6
|
description:
|
|
7
7
|
- Make an iterator that aggregates elements from each of the iterables.
|
|
8
|
-
If the iterables are of uneven length, missing values are filled-in with
|
|
8
|
+
If the iterables are of uneven length, missing values are filled-in with O(fillvalue).
|
|
9
9
|
Iteration continues until the longest iterable is exhausted.
|
|
10
10
|
notes:
|
|
11
11
|
- This is mostly a passhtrough to Python's C(itertools.zip_longest) function
|
|
@@ -30,7 +30,7 @@ from ansible.inventory.group import to_safe_group_name as original_safe
|
|
|
30
30
|
from ansible.parsing.utils.addresses import parse_address
|
|
31
31
|
from ansible.plugins import AnsiblePlugin
|
|
32
32
|
from ansible.plugins.cache import CachePluginAdjudicator as CacheObject
|
|
33
|
-
from ansible.module_utils.
|
|
33
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
|
34
34
|
from ansible.module_utils.parsing.convert_bool import boolean
|
|
35
35
|
from ansible.module_utils.six import string_types
|
|
36
36
|
from ansible.template import Templar
|
|
@@ -24,7 +24,7 @@ EXAMPLES = '''
|
|
|
24
24
|
import os
|
|
25
25
|
|
|
26
26
|
from ansible.errors import AnsibleError, AnsibleParserError
|
|
27
|
-
from ansible.module_utils.
|
|
27
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
|
28
28
|
from ansible.plugins.inventory import BaseInventoryPlugin
|
|
29
29
|
|
|
30
30
|
|
|
@@ -13,7 +13,7 @@ DOCUMENTATION = '''
|
|
|
13
13
|
- The Jinja2 conditionals that qualify a host for membership.
|
|
14
14
|
- The Jinja2 expressions are calculated and assigned to the variables
|
|
15
15
|
- Only variables already available from previous inventories or the fact cache can be used for templating.
|
|
16
|
-
- When
|
|
16
|
+
- When O(strict) is False, failed expressions will be ignored (assumes vars were missing).
|
|
17
17
|
options:
|
|
18
18
|
plugin:
|
|
19
19
|
description: token that ensures this is a source file for the 'constructed' plugin.
|
|
@@ -84,7 +84,7 @@ from ansible import constants as C
|
|
|
84
84
|
from ansible.errors import AnsibleParserError, AnsibleOptionsError
|
|
85
85
|
from ansible.inventory.helpers import get_group_vars
|
|
86
86
|
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
|
|
87
|
-
from ansible.module_utils.
|
|
87
|
+
from ansible.module_utils.common.text.converters import to_native
|
|
88
88
|
from ansible.utils.vars import combine_vars
|
|
89
89
|
from ansible.vars.fact_cache import FactCache
|
|
90
90
|
from ansible.vars.plugins import get_vars_from_inventory_sources
|
|
@@ -27,7 +27,7 @@ EXAMPLES = r'''
|
|
|
27
27
|
import os
|
|
28
28
|
|
|
29
29
|
from ansible.errors import AnsibleError, AnsibleParserError
|
|
30
|
-
from ansible.module_utils.
|
|
30
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
|
31
31
|
from ansible.parsing.utils.addresses import parse_address
|
|
32
32
|
from ansible.plugins.inventory import BaseInventoryPlugin
|
|
33
33
|
|
ansible/plugins/inventory/ini.py
CHANGED
|
@@ -75,12 +75,13 @@ host4 # same host as above, but member of 2 groups, will inherit vars from both
|
|
|
75
75
|
|
|
76
76
|
import ast
|
|
77
77
|
import re
|
|
78
|
+
import warnings
|
|
78
79
|
|
|
79
80
|
from ansible.inventory.group import to_safe_group_name
|
|
80
81
|
from ansible.plugins.inventory import BaseFileInventoryPlugin
|
|
81
82
|
|
|
82
83
|
from ansible.errors import AnsibleError, AnsibleParserError
|
|
83
|
-
from ansible.module_utils.
|
|
84
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
|
84
85
|
from ansible.utils.shlex import shlex_split
|
|
85
86
|
|
|
86
87
|
|
|
@@ -341,9 +342,11 @@ class InventoryModule(BaseFileInventoryPlugin):
|
|
|
341
342
|
(int, dict, list, unicode string, etc).
|
|
342
343
|
'''
|
|
343
344
|
try:
|
|
344
|
-
|
|
345
|
+
with warnings.catch_warnings():
|
|
346
|
+
warnings.simplefilter("ignore", SyntaxWarning)
|
|
347
|
+
v = ast.literal_eval(v)
|
|
345
348
|
# Using explicit exceptions.
|
|
346
|
-
# Likely a string that literal_eval does not like. We
|
|
349
|
+
# Likely a string that literal_eval does not like. We will then just set it.
|
|
347
350
|
except ValueError:
|
|
348
351
|
# For some reason this was thought to be malformed.
|
|
349
352
|
pass
|