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
|
@@ -28,7 +28,7 @@ import time
|
|
|
28
28
|
from multiprocessing import cpu_count
|
|
29
29
|
from multiprocessing.pool import ThreadPool
|
|
30
30
|
|
|
31
|
-
from ansible.module_utils.
|
|
31
|
+
from ansible.module_utils.common.text.converters import to_text
|
|
32
32
|
from ansible.module_utils.common.locale import get_best_parsable_locale
|
|
33
33
|
from ansible.module_utils.common.process import get_bin_path
|
|
34
34
|
from ansible.module_utils.common.text.formatters import bytes_to_human
|
|
@@ -550,7 +550,7 @@ class LinuxHardware(Hardware):
|
|
|
550
550
|
# start threads to query each mount
|
|
551
551
|
results = {}
|
|
552
552
|
pool = ThreadPool(processes=min(len(mtab_entries), cpu_count()))
|
|
553
|
-
maxtime =
|
|
553
|
+
maxtime = timeout.GATHER_TIMEOUT or timeout.DEFAULT_GATHER_TIMEOUT
|
|
554
554
|
for fields in mtab_entries:
|
|
555
555
|
# Transform octal escape sequences
|
|
556
556
|
fields = [self._replace_octal_escapes(field) for field in fields]
|
|
@@ -19,7 +19,7 @@ __metaclass__ = type
|
|
|
19
19
|
import re
|
|
20
20
|
import time
|
|
21
21
|
|
|
22
|
-
from ansible.module_utils.
|
|
22
|
+
from ansible.module_utils.common.text.converters import to_text
|
|
23
23
|
|
|
24
24
|
from ansible.module_utils.facts.hardware.base import Hardware, HardwareCollector
|
|
25
25
|
from ansible.module_utils.facts import timeout
|
|
@@ -89,11 +89,11 @@ class LinuxNetwork(Network):
|
|
|
89
89
|
locally_reachable_ips['ipv4'].append(address)
|
|
90
90
|
|
|
91
91
|
args = [ip_path, '-4', 'route', 'show', 'table', 'local']
|
|
92
|
-
rc, routes,
|
|
92
|
+
rc, routes, dummy = self.module.run_command(args)
|
|
93
93
|
if rc == 0:
|
|
94
94
|
parse_locally_reachable_ips(routes)
|
|
95
95
|
args = [ip_path, '-6', 'route', 'show', 'table', 'local']
|
|
96
|
-
rc, routes,
|
|
96
|
+
rc, routes, dummy = self.module.run_command(args)
|
|
97
97
|
if rc == 0:
|
|
98
98
|
parse_locally_reachable_ips(routes)
|
|
99
99
|
|
|
@@ -274,7 +274,7 @@ class LinuxNetwork(Network):
|
|
|
274
274
|
elif words[0] == 'inet6':
|
|
275
275
|
if 'peer' == words[2]:
|
|
276
276
|
address = words[1]
|
|
277
|
-
|
|
277
|
+
dummy, prefix = words[3].split('/')
|
|
278
278
|
scope = words[5]
|
|
279
279
|
else:
|
|
280
280
|
address, prefix = words[1].split('/')
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Ansible is free software: you can redistribute it and/or modify
|
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
|
6
|
-
# (at your option) any later version.
|
|
7
|
-
#
|
|
8
|
-
# Ansible is distributed in the hope that it will be useful,
|
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
-
# GNU General Public License for more details.
|
|
12
|
-
#
|
|
13
|
-
# You should have received a copy of the GNU General Public License
|
|
14
|
-
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
1
|
+
# Copyright (c) 2023 Ansible Project
|
|
2
|
+
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
15
3
|
|
|
16
4
|
from __future__ import (absolute_import, division, print_function)
|
|
17
5
|
__metaclass__ = type
|
|
@@ -21,7 +9,6 @@ import json
|
|
|
21
9
|
import ansible.module_utils.compat.typing as t
|
|
22
10
|
|
|
23
11
|
from ansible.module_utils.facts.namespace import PrefixFactNamespace
|
|
24
|
-
|
|
25
12
|
from ansible.module_utils.facts.collector import BaseFactCollector
|
|
26
13
|
|
|
27
14
|
|
|
@@ -49,6 +36,12 @@ class FacterFactCollector(BaseFactCollector):
|
|
|
49
36
|
# if facter is installed, and we can use --json because
|
|
50
37
|
# ruby-json is ALSO installed, include facter data in the JSON
|
|
51
38
|
rc, out, err = module.run_command(facter_path + " --puppet --json")
|
|
39
|
+
|
|
40
|
+
# for some versions of facter, --puppet returns an error if puppet is not present,
|
|
41
|
+
# try again w/o it, other errors should still appear and be sent back
|
|
42
|
+
if rc != 0:
|
|
43
|
+
rc, out, err = module.run_command(facter_path + " --json")
|
|
44
|
+
|
|
52
45
|
return rc, out, err
|
|
53
46
|
|
|
54
47
|
def get_facter_output(self, module):
|
|
@@ -22,8 +22,8 @@ import datetime
|
|
|
22
22
|
import time
|
|
23
23
|
|
|
24
24
|
import ansible.module_utils.compat.typing as t
|
|
25
|
-
|
|
26
25
|
from ansible.module_utils.facts.collector import BaseFactCollector
|
|
26
|
+
from ansible.module_utils.compat.datetime import utcfromtimestamp
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
class DateTimeFactCollector(BaseFactCollector):
|
|
@@ -37,7 +37,7 @@ class DateTimeFactCollector(BaseFactCollector):
|
|
|
37
37
|
# Store the timestamp once, then get local and UTC versions from that
|
|
38
38
|
epoch_ts = time.time()
|
|
39
39
|
now = datetime.datetime.fromtimestamp(epoch_ts)
|
|
40
|
-
utcnow =
|
|
40
|
+
utcnow = utcfromtimestamp(epoch_ts).replace(tzinfo=None)
|
|
41
41
|
|
|
42
42
|
date_time_facts['year'] = now.strftime('%Y')
|
|
43
43
|
date_time_facts['month'] = now.strftime('%m')
|
|
@@ -524,7 +524,7 @@ class Distribution(object):
|
|
|
524
524
|
'Solaris': ['Solaris', 'Nexenta', 'OmniOS', 'OpenIndiana', 'SmartOS'],
|
|
525
525
|
'Slackware': ['Slackware'],
|
|
526
526
|
'Altlinux': ['Altlinux'],
|
|
527
|
-
'
|
|
527
|
+
'SMGL': ['SMGL'],
|
|
528
528
|
'Gentoo': ['Gentoo', 'Funtoo'],
|
|
529
529
|
'Alpine': ['Alpine'],
|
|
530
530
|
'AIX': ['AIX'],
|
|
@@ -23,9 +23,10 @@ import stat
|
|
|
23
23
|
|
|
24
24
|
import ansible.module_utils.compat.typing as t
|
|
25
25
|
|
|
26
|
-
from ansible.module_utils.
|
|
26
|
+
from ansible.module_utils.common.text.converters import to_text
|
|
27
27
|
from ansible.module_utils.facts.utils import get_file_content
|
|
28
28
|
from ansible.module_utils.facts.collector import BaseFactCollector
|
|
29
|
+
from ansible.module_utils.six import PY3
|
|
29
30
|
from ansible.module_utils.six.moves import configparser, StringIO
|
|
30
31
|
|
|
31
32
|
|
|
@@ -91,7 +92,10 @@ class LocalFactCollector(BaseFactCollector):
|
|
|
91
92
|
# if that fails read it with ConfigParser
|
|
92
93
|
cp = configparser.ConfigParser()
|
|
93
94
|
try:
|
|
94
|
-
|
|
95
|
+
if PY3:
|
|
96
|
+
cp.read_file(StringIO(out))
|
|
97
|
+
else:
|
|
98
|
+
cp.readfp(StringIO(out))
|
|
95
99
|
except configparser.Error:
|
|
96
100
|
fact = "error loading facts as JSON or ini - please check content: %s" % fn
|
|
97
101
|
module.warn(fact)
|
|
@@ -85,14 +85,19 @@ class PkgMgrFactCollector(BaseFactCollector):
|
|
|
85
85
|
break
|
|
86
86
|
|
|
87
87
|
try:
|
|
88
|
-
|
|
88
|
+
major_version = collected_facts['ansible_distribution_major_version']
|
|
89
|
+
if collected_facts['ansible_distribution'] == 'Kylin Linux Advanced Server':
|
|
90
|
+
major_version = major_version.lstrip('V')
|
|
91
|
+
distro_major_ver = int(major_version)
|
|
89
92
|
except ValueError:
|
|
90
93
|
# a non integer magical future version
|
|
91
94
|
return self._default_unknown_pkg_mgr
|
|
92
95
|
|
|
93
96
|
if (
|
|
94
97
|
(collected_facts['ansible_distribution'] == 'Fedora' and distro_major_ver < 23)
|
|
98
|
+
or (collected_facts['ansible_distribution'] == 'Kylin Linux Advanced Server' and distro_major_ver < 10)
|
|
95
99
|
or (collected_facts['ansible_distribution'] == 'Amazon' and distro_major_ver < 2022)
|
|
100
|
+
or (collected_facts['ansible_distribution'] == 'TencentOS' and distro_major_ver < 3)
|
|
96
101
|
or distro_major_ver < 8 # assume RHEL or a clone
|
|
97
102
|
) and any(pm for pm in PKG_MGRS if pm['name'] == 'yum' and os.path.exists(pm['path'])):
|
|
98
103
|
pkg_mgr_name = 'yum'
|
|
@@ -24,7 +24,7 @@ import re
|
|
|
24
24
|
|
|
25
25
|
import ansible.module_utils.compat.typing as t
|
|
26
26
|
|
|
27
|
-
from ansible.module_utils.
|
|
27
|
+
from ansible.module_utils.common.text.converters import to_native
|
|
28
28
|
|
|
29
29
|
from ansible.module_utils.facts.utils import get_file_content
|
|
30
30
|
from ansible.module_utils.facts.collector import BaseFactCollector
|
|
@@ -47,7 +47,7 @@ class ServiceMgrFactCollector(BaseFactCollector):
|
|
|
47
47
|
# tools must be installed
|
|
48
48
|
if module.get_bin_path('systemctl'):
|
|
49
49
|
|
|
50
|
-
# this should show if systemd is the boot init system, if checking init
|
|
50
|
+
# this should show if systemd is the boot init system, if checking init failed to mark as systemd
|
|
51
51
|
# these mirror systemd's own sd_boot test http://www.freedesktop.org/software/systemd/man/sd_booted.html
|
|
52
52
|
for canary in ["/run/systemd/system/", "/dev/.run/systemd/", "/dev/.systemd/"]:
|
|
53
53
|
if os.path.exists(canary):
|
|
@@ -131,6 +131,8 @@ class ServiceMgrFactCollector(BaseFactCollector):
|
|
|
131
131
|
service_mgr_name = 'smf'
|
|
132
132
|
elif collected_facts.get('ansible_distribution') == 'OpenWrt':
|
|
133
133
|
service_mgr_name = 'openwrt_init'
|
|
134
|
+
elif collected_facts.get('ansible_distribution') == 'SMGL':
|
|
135
|
+
service_mgr_name = 'simpleinit_msb'
|
|
134
136
|
elif collected_facts.get('ansible_system') == 'Linux':
|
|
135
137
|
# FIXME: mv is_systemd_managed
|
|
136
138
|
if self.is_systemd_managed(module=module):
|
|
@@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function)
|
|
|
5
5
|
__metaclass__ = type
|
|
6
6
|
|
|
7
7
|
from ansible.module_utils.six import binary_type, text_type
|
|
8
|
-
from ansible.module_utils.
|
|
8
|
+
from ansible.module_utils.common.text.converters import to_text
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
BOOLEANS_TRUE = frozenset(('y', 'yes', 'on', '1', 'true', 't', 1, 1.0, True))
|
ansible/module_utils/service.py
CHANGED
|
@@ -39,7 +39,7 @@ import subprocess
|
|
|
39
39
|
import traceback
|
|
40
40
|
|
|
41
41
|
from ansible.module_utils.six import PY2, b
|
|
42
|
-
from ansible.module_utils.
|
|
42
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
def sysv_is_enabled(name, runlevel=None):
|
|
@@ -207,17 +207,20 @@ def daemonize(module, cmd):
|
|
|
207
207
|
p = subprocess.Popen(run_cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, preexec_fn=lambda: os.close(pipe[1]))
|
|
208
208
|
fds = [p.stdout, p.stderr]
|
|
209
209
|
|
|
210
|
-
# loop reading output till
|
|
210
|
+
# loop reading output till it is done
|
|
211
211
|
output = {p.stdout: b(""), p.stderr: b("")}
|
|
212
212
|
while fds:
|
|
213
213
|
rfd, wfd, efd = select.select(fds, [], fds, 1)
|
|
214
|
-
if (rfd + wfd + efd) or p.poll():
|
|
214
|
+
if (rfd + wfd + efd) or p.poll() is None:
|
|
215
215
|
for out in list(fds):
|
|
216
216
|
if out in rfd:
|
|
217
217
|
data = os.read(out.fileno(), chunk)
|
|
218
|
-
if
|
|
218
|
+
if data:
|
|
219
|
+
output[out] += to_bytes(data, errors=errors)
|
|
220
|
+
else:
|
|
219
221
|
fds.remove(out)
|
|
220
|
-
|
|
222
|
+
else:
|
|
223
|
+
break
|
|
221
224
|
|
|
222
225
|
# even after fds close, we might want to wait for pid to die
|
|
223
226
|
p.wait()
|
|
@@ -246,7 +249,7 @@ def daemonize(module, cmd):
|
|
|
246
249
|
data = os.read(pipe[0], chunk)
|
|
247
250
|
if not data:
|
|
248
251
|
break
|
|
249
|
-
return_data +=
|
|
252
|
+
return_data += to_bytes(data, errors=errors)
|
|
250
253
|
|
|
251
254
|
# Note: no need to specify encoding on py3 as this module sends the
|
|
252
255
|
# pickle to itself (thus same python interpreter so we aren't mixing
|
ansible/module_utils/urls.py
CHANGED
|
@@ -88,7 +88,7 @@ from ansible.module_utils.common.collections import Mapping, is_sequence
|
|
|
88
88
|
from ansible.module_utils.six import PY2, PY3, string_types
|
|
89
89
|
from ansible.module_utils.six.moves import cStringIO
|
|
90
90
|
from ansible.module_utils.basic import get_distribution, missing_required_lib
|
|
91
|
-
from ansible.module_utils.
|
|
91
|
+
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
|
92
92
|
|
|
93
93
|
try:
|
|
94
94
|
# python3
|
|
@@ -129,13 +129,13 @@ if not HAS_SSLCONTEXT:
|
|
|
129
129
|
try:
|
|
130
130
|
from urllib3.contrib.pyopenssl import PyOpenSSLContext
|
|
131
131
|
except Exception:
|
|
132
|
-
from requests.packages.urllib3.contrib.pyopenssl import PyOpenSSLContext
|
|
132
|
+
from requests.packages.urllib3.contrib.pyopenssl import PyOpenSSLContext # type: ignore[no-redef]
|
|
133
133
|
HAS_URLLIB3_PYOPENSSLCONTEXT = True
|
|
134
134
|
except Exception:
|
|
135
135
|
# urllib3<1.15,>=1.6
|
|
136
136
|
try:
|
|
137
137
|
try:
|
|
138
|
-
from urllib3.contrib.pyopenssl import ssl_wrap_socket
|
|
138
|
+
from urllib3.contrib.pyopenssl import ssl_wrap_socket # type: ignore[attr-defined]
|
|
139
139
|
except Exception:
|
|
140
140
|
from requests.packages.urllib3.contrib.pyopenssl import ssl_wrap_socket
|
|
141
141
|
HAS_URLLIB3_SSL_WRAP_SOCKET = True
|
|
@@ -771,6 +771,18 @@ def extract_pem_certs(b_data):
|
|
|
771
771
|
yield match.group(0)
|
|
772
772
|
|
|
773
773
|
|
|
774
|
+
def _py2_get_param(headers, param, header='content-type'):
|
|
775
|
+
m = httplib.HTTPMessage(io.StringIO())
|
|
776
|
+
cd = headers.getheader(header) or ''
|
|
777
|
+
try:
|
|
778
|
+
m.plisttext = cd[cd.index(';'):]
|
|
779
|
+
m.parseplist()
|
|
780
|
+
except ValueError:
|
|
781
|
+
return None
|
|
782
|
+
|
|
783
|
+
return m.getparam(param)
|
|
784
|
+
|
|
785
|
+
|
|
774
786
|
def get_response_filename(response):
|
|
775
787
|
url = response.geturl()
|
|
776
788
|
path = urlparse(url)[2]
|
|
@@ -778,7 +790,12 @@ def get_response_filename(response):
|
|
|
778
790
|
if filename:
|
|
779
791
|
filename = unquote(filename)
|
|
780
792
|
|
|
781
|
-
|
|
793
|
+
if PY2:
|
|
794
|
+
get_param = functools.partial(_py2_get_param, response.headers)
|
|
795
|
+
else:
|
|
796
|
+
get_param = response.headers.get_param
|
|
797
|
+
|
|
798
|
+
return get_param('filename', header='content-disposition') or filename
|
|
782
799
|
|
|
783
800
|
|
|
784
801
|
def parse_content_type(response):
|
|
@@ -865,7 +882,7 @@ def RedirectHandlerFactory(follow_redirects=None, validate_certs=True, ca_path=N
|
|
|
865
882
|
to determine how redirects should be handled in urllib2.
|
|
866
883
|
"""
|
|
867
884
|
|
|
868
|
-
def redirect_request(self, req, fp, code, msg,
|
|
885
|
+
def redirect_request(self, req, fp, code, msg, headers, newurl):
|
|
869
886
|
if not any((HAS_SSLCONTEXT, HAS_URLLIB3_PYOPENSSLCONTEXT)):
|
|
870
887
|
handler = maybe_add_ssl_handler(newurl, validate_certs, ca_path=ca_path, ciphers=ciphers)
|
|
871
888
|
if handler:
|
|
@@ -873,23 +890,23 @@ def RedirectHandlerFactory(follow_redirects=None, validate_certs=True, ca_path=N
|
|
|
873
890
|
|
|
874
891
|
# Preserve urllib2 compatibility
|
|
875
892
|
if follow_redirects == 'urllib2':
|
|
876
|
-
return urllib_request.HTTPRedirectHandler.redirect_request(self, req, fp, code, msg,
|
|
893
|
+
return urllib_request.HTTPRedirectHandler.redirect_request(self, req, fp, code, msg, headers, newurl)
|
|
877
894
|
|
|
878
895
|
# Handle disabled redirects
|
|
879
896
|
elif follow_redirects in ['no', 'none', False]:
|
|
880
|
-
raise urllib_error.HTTPError(newurl, code, msg,
|
|
897
|
+
raise urllib_error.HTTPError(newurl, code, msg, headers, fp)
|
|
881
898
|
|
|
882
899
|
method = req.get_method()
|
|
883
900
|
|
|
884
901
|
# Handle non-redirect HTTP status or invalid follow_redirects
|
|
885
902
|
if follow_redirects in ['all', 'yes', True]:
|
|
886
903
|
if code < 300 or code >= 400:
|
|
887
|
-
raise urllib_error.HTTPError(req.get_full_url(), code, msg,
|
|
904
|
+
raise urllib_error.HTTPError(req.get_full_url(), code, msg, headers, fp)
|
|
888
905
|
elif follow_redirects == 'safe':
|
|
889
906
|
if code < 300 or code >= 400 or method not in ('GET', 'HEAD'):
|
|
890
|
-
raise urllib_error.HTTPError(req.get_full_url(), code, msg,
|
|
907
|
+
raise urllib_error.HTTPError(req.get_full_url(), code, msg, headers, fp)
|
|
891
908
|
else:
|
|
892
|
-
raise urllib_error.HTTPError(req.get_full_url(), code, msg,
|
|
909
|
+
raise urllib_error.HTTPError(req.get_full_url(), code, msg, headers, fp)
|
|
893
910
|
|
|
894
911
|
try:
|
|
895
912
|
# Python 2-3.3
|
|
@@ -906,12 +923,12 @@ def RedirectHandlerFactory(follow_redirects=None, validate_certs=True, ca_path=N
|
|
|
906
923
|
# Support redirect with payload and original headers
|
|
907
924
|
if code in (307, 308):
|
|
908
925
|
# Preserve payload and headers
|
|
909
|
-
|
|
926
|
+
req_headers = req.headers
|
|
910
927
|
else:
|
|
911
928
|
# Do not preserve payload and filter headers
|
|
912
929
|
data = None
|
|
913
|
-
|
|
914
|
-
|
|
930
|
+
req_headers = dict((k, v) for k, v in req.headers.items()
|
|
931
|
+
if k.lower() not in ("content-length", "content-type", "transfer-encoding"))
|
|
915
932
|
|
|
916
933
|
# http://tools.ietf.org/html/rfc7231#section-6.4.4
|
|
917
934
|
if code == 303 and method != 'HEAD':
|
|
@@ -928,7 +945,7 @@ def RedirectHandlerFactory(follow_redirects=None, validate_certs=True, ca_path=N
|
|
|
928
945
|
|
|
929
946
|
return RequestWithMethod(newurl,
|
|
930
947
|
method=method,
|
|
931
|
-
headers=
|
|
948
|
+
headers=req_headers,
|
|
932
949
|
data=data,
|
|
933
950
|
origin_req_host=origin_req_host,
|
|
934
951
|
unverifiable=True,
|
|
@@ -1497,7 +1514,7 @@ class Request:
|
|
|
1497
1514
|
login = None
|
|
1498
1515
|
|
|
1499
1516
|
if login:
|
|
1500
|
-
username,
|
|
1517
|
+
username, dummy, password = login
|
|
1501
1518
|
if username and password:
|
|
1502
1519
|
headers["Authorization"] = basic_auth_header(username, password)
|
|
1503
1520
|
|
|
@@ -1869,12 +1886,8 @@ def fetch_url(module, url, data=None, headers=None, method=None,
|
|
|
1869
1886
|
if not HAS_URLPARSE:
|
|
1870
1887
|
module.fail_json(msg='urlparse is not installed')
|
|
1871
1888
|
|
|
1872
|
-
if not HAS_GZIP
|
|
1873
|
-
|
|
1874
|
-
module.deprecate(
|
|
1875
|
-
'%s. "decompress" has been automatically disabled to prevent a failure' % GzipDecodedReader.missing_gzip_error(),
|
|
1876
|
-
version='2.16'
|
|
1877
|
-
)
|
|
1889
|
+
if not HAS_GZIP:
|
|
1890
|
+
module.fail_json(msg=GzipDecodedReader.missing_gzip_error())
|
|
1878
1891
|
|
|
1879
1892
|
# ensure we use proper tempdir
|
|
1880
1893
|
old_tempdir = tempfile.tempdir
|
|
@@ -1888,7 +1901,7 @@ def fetch_url(module, url, data=None, headers=None, method=None,
|
|
|
1888
1901
|
|
|
1889
1902
|
username = module.params.get('url_username', '')
|
|
1890
1903
|
password = module.params.get('url_password', '')
|
|
1891
|
-
http_agent = module.params.get('http_agent',
|
|
1904
|
+
http_agent = module.params.get('http_agent', get_user_agent())
|
|
1892
1905
|
force_basic_auth = module.params.get('force_basic_auth', '')
|
|
1893
1906
|
|
|
1894
1907
|
follow_redirects = module.params.get('follow_redirects', 'urllib2')
|
|
@@ -2072,3 +2085,8 @@ def fetch_file(module, url, data=None, headers=None, method=None,
|
|
|
2072
2085
|
except Exception as e:
|
|
2073
2086
|
module.fail_json(msg="Failure downloading %s, %s" % (url, to_native(e)))
|
|
2074
2087
|
return fetch_temp_file.name
|
|
2088
|
+
|
|
2089
|
+
|
|
2090
|
+
def get_user_agent():
|
|
2091
|
+
"""Returns a user agent used by open_url"""
|
|
2092
|
+
return u"ansible-httpget"
|
ansible/modules/add_host.py
CHANGED
|
@@ -59,8 +59,8 @@ attributes:
|
|
|
59
59
|
platform:
|
|
60
60
|
platforms: all
|
|
61
61
|
notes:
|
|
62
|
-
- The alias
|
|
63
|
-
- Since Ansible 2.4, the C(inventory_dir) variable is now set to
|
|
62
|
+
- The alias O(host) of the parameter O(name) is only available on Ansible 2.4 and newer.
|
|
63
|
+
- Since Ansible 2.4, the C(inventory_dir) variable is now set to V(None) instead of the 'global inventory source',
|
|
64
64
|
because you can now have multiple sources. An example was added that shows how to partially restore the previous behaviour.
|
|
65
65
|
- Though this module does not change the remote host, we do provide 'changed' status as it can be useful for those trying to track inventory changes.
|
|
66
66
|
- The hosts added will not bypass the C(--limit) from the command line, so both of those need to be in agreement to make them available as play targets.
|