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/stat.py
CHANGED
|
@@ -36,7 +36,7 @@ options:
|
|
|
36
36
|
description:
|
|
37
37
|
- Algorithm to determine checksum of file.
|
|
38
38
|
- Will throw an error if the host is unable to use specified algorithm.
|
|
39
|
-
- The remote host has to support the hashing method specified,
|
|
39
|
+
- The remote host has to support the hashing method specified, V(md5)
|
|
40
40
|
can be unavailable if the host is FIPS-140 compliant.
|
|
41
41
|
type: str
|
|
42
42
|
choices: [ md5, sha1, sha224, sha256, sha384, sha512 ]
|
|
@@ -47,8 +47,8 @@ options:
|
|
|
47
47
|
description:
|
|
48
48
|
- Use file magic and return data about the nature of the file. this uses
|
|
49
49
|
the 'file' utility found on most Linux/Unix systems.
|
|
50
|
-
- This will add both
|
|
51
|
-
- In Ansible 2.3 this option changed from
|
|
50
|
+
- This will add both RV(stat.mimetype) and RV(stat.charset) fields to the return, if possible.
|
|
51
|
+
- In Ansible 2.3 this option changed from O(mime) to O(get_mime) and the default changed to V(true).
|
|
52
52
|
type: bool
|
|
53
53
|
default: yes
|
|
54
54
|
aliases: [ mime, mime_type, mime-type ]
|
|
@@ -144,7 +144,7 @@ RETURN = r'''
|
|
|
144
144
|
stat:
|
|
145
145
|
description: Dictionary containing all the stat data, some platforms might add additional fields.
|
|
146
146
|
returned: success
|
|
147
|
-
type:
|
|
147
|
+
type: dict
|
|
148
148
|
contains:
|
|
149
149
|
exists:
|
|
150
150
|
description: If the destination path actually exists or not
|
|
@@ -307,13 +307,6 @@ stat:
|
|
|
307
307
|
type: str
|
|
308
308
|
sample: ../foobar/21102015-1445431274-908472971
|
|
309
309
|
version_added: 2.4
|
|
310
|
-
md5:
|
|
311
|
-
description: md5 hash of the file; this will be removed in Ansible 2.9 in
|
|
312
|
-
favor of the checksum return value
|
|
313
|
-
returned: success, path exists and user can read stats and path
|
|
314
|
-
supports hashing and md5 is supported
|
|
315
|
-
type: str
|
|
316
|
-
sample: f88fa92d8cf2eeecf4c0a50ccc96d0c0
|
|
317
310
|
checksum:
|
|
318
311
|
description: hash of the file
|
|
319
312
|
returned: success, path exists, user can read stats, path supports
|
|
@@ -333,15 +326,15 @@ stat:
|
|
|
333
326
|
mimetype:
|
|
334
327
|
description: file magic data or mime-type
|
|
335
328
|
returned: success, path exists and user can read stats and
|
|
336
|
-
installed python supports it and the
|
|
337
|
-
return
|
|
329
|
+
installed python supports it and the O(get_mime) option was V(true), will
|
|
330
|
+
return V(unknown) on error.
|
|
338
331
|
type: str
|
|
339
332
|
sample: application/pdf; charset=binary
|
|
340
333
|
charset:
|
|
341
334
|
description: file character set or encoding
|
|
342
335
|
returned: success, path exists and user can read stats and
|
|
343
|
-
installed python supports it and the
|
|
344
|
-
return
|
|
336
|
+
installed python supports it and the O(get_mime) option was V(true), will
|
|
337
|
+
return V(unknown) on error.
|
|
345
338
|
type: str
|
|
346
339
|
sample: us-ascii
|
|
347
340
|
readable:
|
|
@@ -384,7 +377,7 @@ import stat
|
|
|
384
377
|
|
|
385
378
|
# import module snippets
|
|
386
379
|
from ansible.module_utils.basic import AnsibleModule
|
|
387
|
-
from ansible.module_utils.
|
|
380
|
+
from ansible.module_utils.common.text.converters import to_bytes
|
|
388
381
|
|
|
389
382
|
|
|
390
383
|
def format_output(module, path, st):
|
|
@@ -454,7 +447,6 @@ def main():
|
|
|
454
447
|
argument_spec=dict(
|
|
455
448
|
path=dict(type='path', required=True, aliases=['dest', 'name']),
|
|
456
449
|
follow=dict(type='bool', default=False),
|
|
457
|
-
get_md5=dict(type='bool', default=False),
|
|
458
450
|
get_checksum=dict(type='bool', default=True),
|
|
459
451
|
get_mime=dict(type='bool', default=True, aliases=['mime', 'mime_type', 'mime-type']),
|
|
460
452
|
get_attributes=dict(type='bool', default=True, aliases=['attr', 'attributes']),
|
|
@@ -473,10 +465,6 @@ def main():
|
|
|
473
465
|
get_checksum = module.params.get('get_checksum')
|
|
474
466
|
checksum_algorithm = module.params.get('checksum_algorithm')
|
|
475
467
|
|
|
476
|
-
# NOTE: undocumented option since 2.9 to be removed at a later date if possible (3.0+)
|
|
477
|
-
# no real reason for keeping other than fear we may break older content.
|
|
478
|
-
get_md5 = module.params.get('get_md5')
|
|
479
|
-
|
|
480
468
|
# main stat data
|
|
481
469
|
try:
|
|
482
470
|
if follow:
|
|
@@ -516,15 +504,6 @@ def main():
|
|
|
516
504
|
|
|
517
505
|
# checksums
|
|
518
506
|
if output.get('isreg') and output.get('readable'):
|
|
519
|
-
|
|
520
|
-
# NOTE: see above about get_md5
|
|
521
|
-
if get_md5:
|
|
522
|
-
# Will fail on FIPS-140 compliant systems
|
|
523
|
-
try:
|
|
524
|
-
output['md5'] = module.md5(b_path)
|
|
525
|
-
except ValueError:
|
|
526
|
-
output['md5'] = None
|
|
527
|
-
|
|
528
507
|
if get_checksum:
|
|
529
508
|
output['checksum'] = module.digest_from_file(b_path, checksum_algorithm)
|
|
530
509
|
|
ansible/modules/subversion.py
CHANGED
|
@@ -26,7 +26,7 @@ options:
|
|
|
26
26
|
dest:
|
|
27
27
|
description:
|
|
28
28
|
- Absolute path where the repository should be deployed.
|
|
29
|
-
- The destination directory must be specified unless
|
|
29
|
+
- The destination directory must be specified unless O(checkout=no), O(update=no), and O(export=no).
|
|
30
30
|
type: path
|
|
31
31
|
revision:
|
|
32
32
|
description:
|
|
@@ -36,8 +36,8 @@ options:
|
|
|
36
36
|
aliases: [ rev, version ]
|
|
37
37
|
force:
|
|
38
38
|
description:
|
|
39
|
-
- If
|
|
40
|
-
Prior to 1.9 the default was
|
|
39
|
+
- If V(true), modified files will be discarded. If V(false), module will fail if it encounters modified files.
|
|
40
|
+
Prior to 1.9 the default was V(true).
|
|
41
41
|
type: bool
|
|
42
42
|
default: "no"
|
|
43
43
|
in_place:
|
|
@@ -65,32 +65,32 @@ options:
|
|
|
65
65
|
version_added: "1.4"
|
|
66
66
|
checkout:
|
|
67
67
|
description:
|
|
68
|
-
- If
|
|
68
|
+
- If V(false), do not check out the repository if it does not exist locally.
|
|
69
69
|
type: bool
|
|
70
70
|
default: "yes"
|
|
71
71
|
version_added: "2.3"
|
|
72
72
|
update:
|
|
73
73
|
description:
|
|
74
|
-
- If
|
|
74
|
+
- If V(false), do not retrieve new revisions from the origin repository.
|
|
75
75
|
type: bool
|
|
76
76
|
default: "yes"
|
|
77
77
|
version_added: "2.3"
|
|
78
78
|
export:
|
|
79
79
|
description:
|
|
80
|
-
- If
|
|
80
|
+
- If V(true), do export instead of checkout/update.
|
|
81
81
|
type: bool
|
|
82
82
|
default: "no"
|
|
83
83
|
version_added: "1.6"
|
|
84
84
|
switch:
|
|
85
85
|
description:
|
|
86
|
-
- If
|
|
86
|
+
- If V(false), do not call svn switch before update.
|
|
87
87
|
default: "yes"
|
|
88
88
|
version_added: "2.0"
|
|
89
89
|
type: bool
|
|
90
90
|
validate_certs:
|
|
91
91
|
description:
|
|
92
|
-
- If
|
|
93
|
-
- If
|
|
92
|
+
- If V(false), passes the C(--trust-server-cert) flag to svn.
|
|
93
|
+
- If V(true), does not pass the flag.
|
|
94
94
|
default: "no"
|
|
95
95
|
version_added: "2.11"
|
|
96
96
|
type: bool
|
ansible/modules/systemd.py
CHANGED
|
@@ -25,8 +25,9 @@ options:
|
|
|
25
25
|
aliases: [ service, unit ]
|
|
26
26
|
state:
|
|
27
27
|
description:
|
|
28
|
-
-
|
|
29
|
-
|
|
28
|
+
- V(started)/V(stopped) are idempotent actions that will not run commands unless necessary.
|
|
29
|
+
V(restarted) will always bounce the unit.
|
|
30
|
+
V(reloaded) will always reload and if the service is not running at the moment of the reload, it is started.
|
|
30
31
|
type: str
|
|
31
32
|
choices: [ reloaded, restarted, started, stopped ]
|
|
32
33
|
enabled:
|
|
@@ -45,7 +46,7 @@ options:
|
|
|
45
46
|
daemon_reload:
|
|
46
47
|
description:
|
|
47
48
|
- Run daemon-reload before doing any other operations, to make sure systemd has read any changes.
|
|
48
|
-
- When set to
|
|
49
|
+
- When set to V(true), runs daemon-reload even if the module does not start or stop anything.
|
|
49
50
|
type: bool
|
|
50
51
|
default: no
|
|
51
52
|
aliases: [ daemon-reload ]
|
|
@@ -58,8 +59,8 @@ options:
|
|
|
58
59
|
version_added: "2.8"
|
|
59
60
|
scope:
|
|
60
61
|
description:
|
|
61
|
-
- Run systemctl within a given service manager scope, either as the default system scope
|
|
62
|
-
the current user's scope
|
|
62
|
+
- Run systemctl within a given service manager scope, either as the default system scope V(system),
|
|
63
|
+
the current user's scope V(user), or the scope of all users V(global).
|
|
63
64
|
- "For systemd to work with 'user', the executing user must have its own instance of dbus started and accessible (systemd requirement)."
|
|
64
65
|
- "The user dbus process is normally started during normal login, but not during the run of Ansible tasks.
|
|
65
66
|
Otherwise you will probably get a 'Failed to connect to bus: no such file or directory' error."
|
|
@@ -85,9 +86,9 @@ attributes:
|
|
|
85
86
|
platform:
|
|
86
87
|
platforms: posix
|
|
87
88
|
notes:
|
|
88
|
-
- Since 2.4, one of the following options is required
|
|
89
|
-
and all except
|
|
90
|
-
- Before 2.4 you always required
|
|
89
|
+
- Since 2.4, one of the following options is required O(state), O(enabled), O(masked), O(daemon_reload), (O(daemon_reexec) since 2.8),
|
|
90
|
+
and all except O(daemon_reload) and (O(daemon_reexec) since 2.8) also require O(name).
|
|
91
|
+
- Before 2.4 you always required O(name).
|
|
91
92
|
- Globs are not supported in name, i.e C(postgres*.service).
|
|
92
93
|
- The service names might vary by specific OS/distribution
|
|
93
94
|
- The order of execution when having multiple properties is to first enable/disable, then mask/unmask and then deal with service state.
|
|
@@ -98,48 +99,48 @@ requirements:
|
|
|
98
99
|
|
|
99
100
|
EXAMPLES = '''
|
|
100
101
|
- name: Make sure a service unit is running
|
|
101
|
-
ansible.builtin.
|
|
102
|
+
ansible.builtin.systemd_service:
|
|
102
103
|
state: started
|
|
103
104
|
name: httpd
|
|
104
105
|
|
|
105
106
|
- name: Stop service cron on debian, if running
|
|
106
|
-
ansible.builtin.
|
|
107
|
+
ansible.builtin.systemd_service:
|
|
107
108
|
name: cron
|
|
108
109
|
state: stopped
|
|
109
110
|
|
|
110
111
|
- name: Restart service cron on centos, in all cases, also issue daemon-reload to pick up config changes
|
|
111
|
-
ansible.builtin.
|
|
112
|
+
ansible.builtin.systemd_service:
|
|
112
113
|
state: restarted
|
|
113
114
|
daemon_reload: true
|
|
114
115
|
name: crond
|
|
115
116
|
|
|
116
117
|
- name: Reload service httpd, in all cases
|
|
117
|
-
ansible.builtin.
|
|
118
|
+
ansible.builtin.systemd_service:
|
|
118
119
|
name: httpd.service
|
|
119
120
|
state: reloaded
|
|
120
121
|
|
|
121
122
|
- name: Enable service httpd and ensure it is not masked
|
|
122
|
-
ansible.builtin.
|
|
123
|
+
ansible.builtin.systemd_service:
|
|
123
124
|
name: httpd
|
|
124
125
|
enabled: true
|
|
125
126
|
masked: no
|
|
126
127
|
|
|
127
128
|
- name: Enable a timer unit for dnf-automatic
|
|
128
|
-
ansible.builtin.
|
|
129
|
+
ansible.builtin.systemd_service:
|
|
129
130
|
name: dnf-automatic.timer
|
|
130
131
|
state: started
|
|
131
132
|
enabled: true
|
|
132
133
|
|
|
133
134
|
- name: Just force systemd to reread configs (2.4 and above)
|
|
134
|
-
ansible.builtin.
|
|
135
|
+
ansible.builtin.systemd_service:
|
|
135
136
|
daemon_reload: true
|
|
136
137
|
|
|
137
138
|
- name: Just force systemd to re-execute itself (2.8 and above)
|
|
138
|
-
ansible.builtin.
|
|
139
|
+
ansible.builtin.systemd_service:
|
|
139
140
|
daemon_reexec: true
|
|
140
141
|
|
|
141
142
|
- name: Run a user service when XDG_RUNTIME_DIR is not set on remote login
|
|
142
|
-
ansible.builtin.
|
|
143
|
+
ansible.builtin.systemd_service:
|
|
143
144
|
name: myservice
|
|
144
145
|
state: started
|
|
145
146
|
scope: user
|
|
@@ -151,7 +152,7 @@ RETURN = '''
|
|
|
151
152
|
status:
|
|
152
153
|
description: A dictionary with the key=value pairs returned from C(systemctl show).
|
|
153
154
|
returned: success
|
|
154
|
-
type:
|
|
155
|
+
type: dict
|
|
155
156
|
sample: {
|
|
156
157
|
"ActiveEnterTimestamp": "Sun 2016-05-15 18:28:49 EDT",
|
|
157
158
|
"ActiveEnterTimestampMonotonic": "8135942",
|
|
@@ -282,7 +283,7 @@ import os
|
|
|
282
283
|
from ansible.module_utils.basic import AnsibleModule
|
|
283
284
|
from ansible.module_utils.facts.system.chroot import is_chroot
|
|
284
285
|
from ansible.module_utils.service import sysv_exists, sysv_is_enabled, fail_if_missing
|
|
285
|
-
from ansible.module_utils.
|
|
286
|
+
from ansible.module_utils.common.text.converters import to_native
|
|
286
287
|
|
|
287
288
|
|
|
288
289
|
def is_running_service(service_status):
|
|
@@ -25,8 +25,9 @@ options:
|
|
|
25
25
|
aliases: [ service, unit ]
|
|
26
26
|
state:
|
|
27
27
|
description:
|
|
28
|
-
-
|
|
29
|
-
|
|
28
|
+
- V(started)/V(stopped) are idempotent actions that will not run commands unless necessary.
|
|
29
|
+
V(restarted) will always bounce the unit.
|
|
30
|
+
V(reloaded) will always reload and if the service is not running at the moment of the reload, it is started.
|
|
30
31
|
type: str
|
|
31
32
|
choices: [ reloaded, restarted, started, stopped ]
|
|
32
33
|
enabled:
|
|
@@ -45,7 +46,7 @@ options:
|
|
|
45
46
|
daemon_reload:
|
|
46
47
|
description:
|
|
47
48
|
- Run daemon-reload before doing any other operations, to make sure systemd has read any changes.
|
|
48
|
-
- When set to
|
|
49
|
+
- When set to V(true), runs daemon-reload even if the module does not start or stop anything.
|
|
49
50
|
type: bool
|
|
50
51
|
default: no
|
|
51
52
|
aliases: [ daemon-reload ]
|
|
@@ -58,8 +59,8 @@ options:
|
|
|
58
59
|
version_added: "2.8"
|
|
59
60
|
scope:
|
|
60
61
|
description:
|
|
61
|
-
- Run systemctl within a given service manager scope, either as the default system scope
|
|
62
|
-
the current user's scope
|
|
62
|
+
- Run systemctl within a given service manager scope, either as the default system scope V(system),
|
|
63
|
+
the current user's scope V(user), or the scope of all users V(global).
|
|
63
64
|
- "For systemd to work with 'user', the executing user must have its own instance of dbus started and accessible (systemd requirement)."
|
|
64
65
|
- "The user dbus process is normally started during normal login, but not during the run of Ansible tasks.
|
|
65
66
|
Otherwise you will probably get a 'Failed to connect to bus: no such file or directory' error."
|
|
@@ -85,9 +86,9 @@ attributes:
|
|
|
85
86
|
platform:
|
|
86
87
|
platforms: posix
|
|
87
88
|
notes:
|
|
88
|
-
- Since 2.4, one of the following options is required
|
|
89
|
-
and all except
|
|
90
|
-
- Before 2.4 you always required
|
|
89
|
+
- Since 2.4, one of the following options is required O(state), O(enabled), O(masked), O(daemon_reload), (O(daemon_reexec) since 2.8),
|
|
90
|
+
and all except O(daemon_reload) and (O(daemon_reexec) since 2.8) also require O(name).
|
|
91
|
+
- Before 2.4 you always required O(name).
|
|
91
92
|
- Globs are not supported in name, i.e C(postgres*.service).
|
|
92
93
|
- The service names might vary by specific OS/distribution
|
|
93
94
|
- The order of execution when having multiple properties is to first enable/disable, then mask/unmask and then deal with service state.
|
|
@@ -98,48 +99,48 @@ requirements:
|
|
|
98
99
|
|
|
99
100
|
EXAMPLES = '''
|
|
100
101
|
- name: Make sure a service unit is running
|
|
101
|
-
ansible.builtin.
|
|
102
|
+
ansible.builtin.systemd_service:
|
|
102
103
|
state: started
|
|
103
104
|
name: httpd
|
|
104
105
|
|
|
105
106
|
- name: Stop service cron on debian, if running
|
|
106
|
-
ansible.builtin.
|
|
107
|
+
ansible.builtin.systemd_service:
|
|
107
108
|
name: cron
|
|
108
109
|
state: stopped
|
|
109
110
|
|
|
110
111
|
- name: Restart service cron on centos, in all cases, also issue daemon-reload to pick up config changes
|
|
111
|
-
ansible.builtin.
|
|
112
|
+
ansible.builtin.systemd_service:
|
|
112
113
|
state: restarted
|
|
113
114
|
daemon_reload: true
|
|
114
115
|
name: crond
|
|
115
116
|
|
|
116
117
|
- name: Reload service httpd, in all cases
|
|
117
|
-
ansible.builtin.
|
|
118
|
+
ansible.builtin.systemd_service:
|
|
118
119
|
name: httpd.service
|
|
119
120
|
state: reloaded
|
|
120
121
|
|
|
121
122
|
- name: Enable service httpd and ensure it is not masked
|
|
122
|
-
ansible.builtin.
|
|
123
|
+
ansible.builtin.systemd_service:
|
|
123
124
|
name: httpd
|
|
124
125
|
enabled: true
|
|
125
126
|
masked: no
|
|
126
127
|
|
|
127
128
|
- name: Enable a timer unit for dnf-automatic
|
|
128
|
-
ansible.builtin.
|
|
129
|
+
ansible.builtin.systemd_service:
|
|
129
130
|
name: dnf-automatic.timer
|
|
130
131
|
state: started
|
|
131
132
|
enabled: true
|
|
132
133
|
|
|
133
134
|
- name: Just force systemd to reread configs (2.4 and above)
|
|
134
|
-
ansible.builtin.
|
|
135
|
+
ansible.builtin.systemd_service:
|
|
135
136
|
daemon_reload: true
|
|
136
137
|
|
|
137
138
|
- name: Just force systemd to re-execute itself (2.8 and above)
|
|
138
|
-
ansible.builtin.
|
|
139
|
+
ansible.builtin.systemd_service:
|
|
139
140
|
daemon_reexec: true
|
|
140
141
|
|
|
141
142
|
- name: Run a user service when XDG_RUNTIME_DIR is not set on remote login
|
|
142
|
-
ansible.builtin.
|
|
143
|
+
ansible.builtin.systemd_service:
|
|
143
144
|
name: myservice
|
|
144
145
|
state: started
|
|
145
146
|
scope: user
|
|
@@ -151,7 +152,7 @@ RETURN = '''
|
|
|
151
152
|
status:
|
|
152
153
|
description: A dictionary with the key=value pairs returned from C(systemctl show).
|
|
153
154
|
returned: success
|
|
154
|
-
type:
|
|
155
|
+
type: dict
|
|
155
156
|
sample: {
|
|
156
157
|
"ActiveEnterTimestamp": "Sun 2016-05-15 18:28:49 EDT",
|
|
157
158
|
"ActiveEnterTimestampMonotonic": "8135942",
|
|
@@ -282,7 +283,7 @@ import os
|
|
|
282
283
|
from ansible.module_utils.basic import AnsibleModule
|
|
283
284
|
from ansible.module_utils.facts.system.chroot import is_chroot
|
|
284
285
|
from ansible.module_utils.service import sysv_exists, sysv_is_enabled, fail_if_missing
|
|
285
|
-
from ansible.module_utils.
|
|
286
|
+
from ansible.module_utils.common.text.converters import to_native
|
|
286
287
|
|
|
287
288
|
|
|
288
289
|
def is_running_service(service_status):
|
ansible/modules/sysvinit.py
CHANGED
|
@@ -26,8 +26,8 @@ options:
|
|
|
26
26
|
state:
|
|
27
27
|
choices: [ 'started', 'stopped', 'restarted', 'reloaded' ]
|
|
28
28
|
description:
|
|
29
|
-
-
|
|
30
|
-
Not all init scripts support
|
|
29
|
+
- V(started)/V(stopped) are idempotent actions that will not run commands unless necessary.
|
|
30
|
+
Not all init scripts support V(restarted) nor V(reloaded) natively, so these will both trigger a stop and start as needed.
|
|
31
31
|
type: str
|
|
32
32
|
enabled:
|
|
33
33
|
type: bool
|
|
@@ -36,7 +36,7 @@ options:
|
|
|
36
36
|
sleep:
|
|
37
37
|
default: 1
|
|
38
38
|
description:
|
|
39
|
-
- If the service is being
|
|
39
|
+
- If the service is being V(restarted) or V(reloaded) then sleep this many seconds between the stop and start command.
|
|
40
40
|
This helps to workaround badly behaving services.
|
|
41
41
|
type: int
|
|
42
42
|
pattern:
|
|
@@ -102,24 +102,29 @@ results:
|
|
|
102
102
|
description: results from actions taken
|
|
103
103
|
returned: always
|
|
104
104
|
type: complex
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
105
|
+
contains:
|
|
106
|
+
name:
|
|
107
|
+
description: Name of the service
|
|
108
|
+
type: str
|
|
109
|
+
returned: always
|
|
110
|
+
sample: "apache2"
|
|
111
|
+
status:
|
|
112
|
+
description: Status of the service
|
|
113
|
+
type: dict
|
|
114
|
+
returned: changed
|
|
115
|
+
sample: {
|
|
116
|
+
"enabled": {
|
|
117
|
+
"changed": true,
|
|
118
|
+
"rc": 0,
|
|
119
|
+
"stderr": "",
|
|
120
|
+
"stdout": ""
|
|
121
|
+
},
|
|
122
|
+
"stopped": {
|
|
123
|
+
"changed": true,
|
|
124
|
+
"rc": 0,
|
|
125
|
+
"stderr": "",
|
|
126
|
+
"stdout": "Stopping web server: apache2.\n"
|
|
127
|
+
}
|
|
123
128
|
}
|
|
124
129
|
'''
|
|
125
130
|
|
ansible/modules/tempfile.py
CHANGED
|
@@ -14,9 +14,10 @@ module: tempfile
|
|
|
14
14
|
version_added: "2.3"
|
|
15
15
|
short_description: Creates temporary files and directories
|
|
16
16
|
description:
|
|
17
|
-
- The
|
|
18
|
-
|
|
19
|
-
you need to
|
|
17
|
+
- The M(ansible.builtin.tempfile) module creates temporary files and directories. C(mktemp) command
|
|
18
|
+
takes different parameters on various systems, this module helps to avoid troubles related to that.
|
|
19
|
+
Files/directories created by module are accessible only by creator. In case you need to make them
|
|
20
|
+
world-accessible you need to use M(ansible.builtin.file) module.
|
|
20
21
|
- For Windows targets, use the M(ansible.windows.win_tempfile) module instead.
|
|
21
22
|
options:
|
|
22
23
|
state:
|
|
@@ -87,7 +88,7 @@ from tempfile import mkstemp, mkdtemp
|
|
|
87
88
|
from traceback import format_exc
|
|
88
89
|
|
|
89
90
|
from ansible.module_utils.basic import AnsibleModule
|
|
90
|
-
from ansible.module_utils.
|
|
91
|
+
from ansible.module_utils.common.text.converters import to_native
|
|
91
92
|
|
|
92
93
|
|
|
93
94
|
def main():
|
ansible/modules/template.py
CHANGED
|
@@ -18,16 +18,17 @@ options:
|
|
|
18
18
|
follow:
|
|
19
19
|
description:
|
|
20
20
|
- Determine whether symbolic links should be followed.
|
|
21
|
-
- When set to
|
|
22
|
-
- When set to
|
|
23
|
-
- Previous to Ansible 2.4, this was hardcoded as
|
|
21
|
+
- When set to V(true) symbolic links will be followed, if they exist.
|
|
22
|
+
- When set to V(false) symbolic links will not be followed.
|
|
23
|
+
- Previous to Ansible 2.4, this was hardcoded as V(true).
|
|
24
24
|
type: bool
|
|
25
25
|
default: no
|
|
26
26
|
version_added: '2.4'
|
|
27
27
|
notes:
|
|
28
|
-
- For Windows you can use M(ansible.windows.win_template) which uses
|
|
29
|
-
- The C(jinja2_native) setting has no effect. Native types are never used in the
|
|
30
|
-
For working with templates and utilizing Jinja2 native types see
|
|
28
|
+
- For Windows you can use M(ansible.windows.win_template) which uses V(\\r\\n) as O(newline_sequence) by default.
|
|
29
|
+
- The C(jinja2_native) setting has no effect. Native types are never used in the M(ansible.builtin.template) module
|
|
30
|
+
which is by design used for generating text files. For working with templates and utilizing Jinja2 native types see
|
|
31
|
+
the O(ansible.builtin.template#lookup:jinja2_native) parameter of the P(ansible.builtin.template#lookup) lookup.
|
|
31
32
|
seealso:
|
|
32
33
|
- module: ansible.builtin.copy
|
|
33
34
|
- module: ansible.windows.win_copy
|
|
@@ -109,3 +110,56 @@ EXAMPLES = r'''
|
|
|
109
110
|
validate: /usr/sbin/sshd -t -f %s
|
|
110
111
|
backup: yes
|
|
111
112
|
'''
|
|
113
|
+
|
|
114
|
+
RETURN = r'''
|
|
115
|
+
dest:
|
|
116
|
+
description: Destination file/path, equal to the value passed to I(dest).
|
|
117
|
+
returned: success
|
|
118
|
+
type: str
|
|
119
|
+
sample: /path/to/file.txt
|
|
120
|
+
checksum:
|
|
121
|
+
description: SHA1 checksum of the rendered file
|
|
122
|
+
returned: always
|
|
123
|
+
type: str
|
|
124
|
+
sample: 373296322247ab85d26d5d1257772757e7afd172
|
|
125
|
+
uid:
|
|
126
|
+
description: Numeric id representing the file owner
|
|
127
|
+
returned: success
|
|
128
|
+
type: int
|
|
129
|
+
sample: 1003
|
|
130
|
+
gid:
|
|
131
|
+
description: Numeric id representing the group of the owner
|
|
132
|
+
returned: success
|
|
133
|
+
type: int
|
|
134
|
+
sample: 1003
|
|
135
|
+
owner:
|
|
136
|
+
description: User name of owner
|
|
137
|
+
returned: success
|
|
138
|
+
type: str
|
|
139
|
+
sample: httpd
|
|
140
|
+
group:
|
|
141
|
+
description: Group name of owner
|
|
142
|
+
returned: success
|
|
143
|
+
type: str
|
|
144
|
+
sample: www-data
|
|
145
|
+
md5sum:
|
|
146
|
+
description: MD5 checksum of the rendered file
|
|
147
|
+
returned: changed
|
|
148
|
+
type: str
|
|
149
|
+
sample: d41d8cd98f00b204e9800998ecf8427e
|
|
150
|
+
mode:
|
|
151
|
+
description: Unix permissions of the file in octal representation as a string
|
|
152
|
+
returned: success
|
|
153
|
+
type: str
|
|
154
|
+
sample: 1755
|
|
155
|
+
size:
|
|
156
|
+
description: Size of the rendered file in bytes
|
|
157
|
+
returned: success
|
|
158
|
+
type: int
|
|
159
|
+
sample: 42
|
|
160
|
+
src:
|
|
161
|
+
description: Source file used for the copy on the target machine.
|
|
162
|
+
returned: changed
|
|
163
|
+
type: str
|
|
164
|
+
sample: /home/httpd/.ansible/tmp/ansible-tmp-1423796390.97-147729857856000/source
|
|
165
|
+
'''
|