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/yum.py
CHANGED
|
@@ -21,9 +21,9 @@ description:
|
|
|
21
21
|
options:
|
|
22
22
|
use_backend:
|
|
23
23
|
description:
|
|
24
|
-
- This module supports
|
|
24
|
+
- This module supports V(yum) (as it always has), this is known as C(yum3)/C(YUM3)/C(yum-deprecated) by
|
|
25
25
|
upstream yum developers. As of Ansible 2.7+, this module also supports C(YUM4), which is the
|
|
26
|
-
"new yum" and it has an
|
|
26
|
+
"new yum" and it has an V(dnf) backend. As of ansible-core 2.15+, this module will auto select the backend
|
|
27
27
|
based on the C(ansible_pkg_mgr) fact.
|
|
28
28
|
- By default, this module will select the backend based on the C(ansible_pkg_mgr) fact.
|
|
29
29
|
default: "auto"
|
|
@@ -32,12 +32,12 @@ options:
|
|
|
32
32
|
version_added: "2.7"
|
|
33
33
|
name:
|
|
34
34
|
description:
|
|
35
|
-
- A package name or package specifier with version, like
|
|
36
|
-
- Comparison operators for package version are valid here C(>), C(<), C(>=), C(<=). Example -
|
|
37
|
-
- If a previous version is specified, the task also needs to turn
|
|
38
|
-
See the
|
|
39
|
-
- When using state=latest, this can be
|
|
40
|
-
- You can also pass a url or a local path to
|
|
35
|
+
- A package name or package specifier with version, like V(name-1.0).
|
|
36
|
+
- Comparison operators for package version are valid here C(>), C(<), C(>=), C(<=). Example - V(name>=1.0)
|
|
37
|
+
- If a previous version is specified, the task also needs to turn O(allow_downgrade) on.
|
|
38
|
+
See the O(allow_downgrade) documentation for caveats with downgrading packages.
|
|
39
|
+
- When using O(state=latest), this can be V('*') which means run C(yum -y update).
|
|
40
|
+
- You can also pass a url or a local path to an rpm file (using O(state=present)).
|
|
41
41
|
To operate on several packages this can accept a comma separated string of packages or (as of 2.0) a list of packages.
|
|
42
42
|
aliases: [ pkg ]
|
|
43
43
|
type: list
|
|
@@ -53,17 +53,17 @@ options:
|
|
|
53
53
|
list:
|
|
54
54
|
description:
|
|
55
55
|
- "Package name to run the equivalent of C(yum list --show-duplicates <package>) against. In addition to listing packages,
|
|
56
|
-
use can also list the following:
|
|
57
|
-
- This parameter is mutually exclusive with
|
|
56
|
+
use can also list the following: V(installed), V(updates), V(available) and V(repos)."
|
|
57
|
+
- This parameter is mutually exclusive with O(name).
|
|
58
58
|
type: str
|
|
59
59
|
state:
|
|
60
60
|
description:
|
|
61
|
-
- Whether to install (
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
- Default is
|
|
66
|
-
enabled for this module, then
|
|
61
|
+
- Whether to install (V(present) or V(installed), V(latest)), or remove (V(absent) or V(removed)) a package.
|
|
62
|
+
- V(present) and V(installed) will simply ensure that a desired package is installed.
|
|
63
|
+
- V(latest) will update the specified package if it's not of the latest available version.
|
|
64
|
+
- V(absent) and V(removed) will remove the specified package.
|
|
65
|
+
- Default is V(None), however in effect the default action is V(present) unless the O(autoremove) option is
|
|
66
|
+
enabled for this module, then V(absent) is inferred.
|
|
67
67
|
type: str
|
|
68
68
|
choices: [ absent, installed, latest, present, removed ]
|
|
69
69
|
enablerepo:
|
|
@@ -96,7 +96,7 @@ options:
|
|
|
96
96
|
disable_gpg_check:
|
|
97
97
|
description:
|
|
98
98
|
- Whether to disable the GPG checking of signatures of packages being
|
|
99
|
-
installed. Has an effect only if state is
|
|
99
|
+
installed. Has an effect only if O(state) is V(present) or V(latest).
|
|
100
100
|
type: bool
|
|
101
101
|
default: "no"
|
|
102
102
|
version_added: "1.2"
|
|
@@ -110,30 +110,30 @@ options:
|
|
|
110
110
|
update_cache:
|
|
111
111
|
description:
|
|
112
112
|
- Force yum to check if cache is out of date and redownload if needed.
|
|
113
|
-
Has an effect only if state is
|
|
113
|
+
Has an effect only if O(state) is V(present) or V(latest).
|
|
114
114
|
type: bool
|
|
115
115
|
default: "no"
|
|
116
116
|
aliases: [ expire-cache ]
|
|
117
117
|
version_added: "1.9"
|
|
118
118
|
validate_certs:
|
|
119
119
|
description:
|
|
120
|
-
- This only applies if using a https url as the source of the rpm. e.g. for localinstall. If set to
|
|
121
|
-
- This should only set to
|
|
122
|
-
- Prior to 2.1 the code worked as if this was set to
|
|
120
|
+
- This only applies if using a https url as the source of the rpm. e.g. for localinstall. If set to V(false), the SSL certificates will not be validated.
|
|
121
|
+
- This should only set to V(false) used on personally controlled sites using self-signed certificates as it avoids verifying the source site.
|
|
122
|
+
- Prior to 2.1 the code worked as if this was set to V(true).
|
|
123
123
|
type: bool
|
|
124
124
|
default: "yes"
|
|
125
125
|
version_added: "2.1"
|
|
126
126
|
sslverify:
|
|
127
127
|
description:
|
|
128
128
|
- Disables SSL validation of the repository server for this transaction.
|
|
129
|
-
- This should be set to
|
|
129
|
+
- This should be set to V(false) if one of the configured repositories is using an untrusted or self-signed certificate.
|
|
130
130
|
type: bool
|
|
131
131
|
default: "yes"
|
|
132
132
|
version_added: "2.13"
|
|
133
133
|
update_only:
|
|
134
134
|
description:
|
|
135
135
|
- When using latest, only update installed packages. Do not install packages.
|
|
136
|
-
- Has an effect only if state is
|
|
136
|
+
- Has an effect only if O(state) is V(latest)
|
|
137
137
|
default: "no"
|
|
138
138
|
type: bool
|
|
139
139
|
version_added: "2.5"
|
|
@@ -147,13 +147,13 @@ options:
|
|
|
147
147
|
version_added: "2.3"
|
|
148
148
|
security:
|
|
149
149
|
description:
|
|
150
|
-
- If set to
|
|
150
|
+
- If set to V(true), and O(state=latest) then only installs updates that have been marked security related.
|
|
151
151
|
type: bool
|
|
152
152
|
default: "no"
|
|
153
153
|
version_added: "2.4"
|
|
154
154
|
bugfix:
|
|
155
155
|
description:
|
|
156
|
-
- If set to
|
|
156
|
+
- If set to V(true), and O(state=latest) then only installs updates that have been marked bugfix related.
|
|
157
157
|
default: "no"
|
|
158
158
|
type: bool
|
|
159
159
|
version_added: "2.6"
|
|
@@ -194,9 +194,9 @@ options:
|
|
|
194
194
|
version_added: "2.7"
|
|
195
195
|
autoremove:
|
|
196
196
|
description:
|
|
197
|
-
- If
|
|
197
|
+
- If V(true), removes all "leaf" packages from the system that were originally
|
|
198
198
|
installed as dependencies of user-installed packages but which are no longer
|
|
199
|
-
required by any such package. Should be used alone or when state is
|
|
199
|
+
required by any such package. Should be used alone or when O(state) is V(absent)
|
|
200
200
|
- "NOTE: This feature requires yum >= 3.4.3 (RHEL/CentOS 7+)"
|
|
201
201
|
type: bool
|
|
202
202
|
default: "no"
|
|
@@ -204,9 +204,9 @@ options:
|
|
|
204
204
|
disable_excludes:
|
|
205
205
|
description:
|
|
206
206
|
- Disable the excludes defined in YUM config files.
|
|
207
|
-
- If set to
|
|
208
|
-
- If set to
|
|
209
|
-
- If set to
|
|
207
|
+
- If set to V(all), disables all excludes.
|
|
208
|
+
- If set to V(main), disable excludes defined in [main] in yum.conf.
|
|
209
|
+
- If set to V(repoid), disable excludes defined for given repo id.
|
|
210
210
|
type: str
|
|
211
211
|
version_added: "2.7"
|
|
212
212
|
download_only:
|
|
@@ -232,7 +232,7 @@ options:
|
|
|
232
232
|
download_dir:
|
|
233
233
|
description:
|
|
234
234
|
- Specifies an alternate directory to store packages.
|
|
235
|
-
- Has an effect only if
|
|
235
|
+
- Has an effect only if O(download_only) is specified.
|
|
236
236
|
type: str
|
|
237
237
|
version_added: "2.8"
|
|
238
238
|
install_repoquery:
|
|
@@ -274,7 +274,7 @@ attributes:
|
|
|
274
274
|
platforms: rhel
|
|
275
275
|
notes:
|
|
276
276
|
- When used with a C(loop:) each package will be processed individually,
|
|
277
|
-
it is much more efficient to pass the list directly to the
|
|
277
|
+
it is much more efficient to pass the list directly to the O(name) option.
|
|
278
278
|
- In versions prior to 1.9.2 this module installed and removed each package
|
|
279
279
|
given to the yum module separately. This caused problems when packages
|
|
280
280
|
specified by filename or url had to be installed or removed together. In
|
|
@@ -408,7 +408,7 @@ EXAMPLES = '''
|
|
|
408
408
|
from ansible.module_utils.basic import AnsibleModule
|
|
409
409
|
from ansible.module_utils.common.locale import get_best_parsable_locale
|
|
410
410
|
from ansible.module_utils.common.respawn import has_respawned, respawn_module
|
|
411
|
-
from ansible.module_utils.
|
|
411
|
+
from ansible.module_utils.common.text.converters import to_native, to_text
|
|
412
412
|
from ansible.module_utils.yumdnf import YumDnf, yumdnf_argument_spec
|
|
413
413
|
|
|
414
414
|
import errno
|
|
@@ -618,7 +618,7 @@ class YumModule(YumDnf):
|
|
|
618
618
|
if not repoq:
|
|
619
619
|
pkgs = []
|
|
620
620
|
try:
|
|
621
|
-
e, m,
|
|
621
|
+
e, m, dummy = self.yum_base.rpmdb.matchPackageNames([pkgspec])
|
|
622
622
|
pkgs = e + m
|
|
623
623
|
if not pkgs and not is_pkg:
|
|
624
624
|
pkgs.extend(self.yum_base.returnInstalledPackagesByDep(pkgspec))
|
|
@@ -670,7 +670,7 @@ class YumModule(YumDnf):
|
|
|
670
670
|
|
|
671
671
|
pkgs = []
|
|
672
672
|
try:
|
|
673
|
-
e, m,
|
|
673
|
+
e, m, dummy = self.yum_base.pkgSack.matchPackageNames([pkgspec])
|
|
674
674
|
pkgs = e + m
|
|
675
675
|
if not pkgs:
|
|
676
676
|
pkgs.extend(self.yum_base.returnPackagesByDep(pkgspec))
|
|
@@ -710,7 +710,7 @@ class YumModule(YumDnf):
|
|
|
710
710
|
pkgs = self.yum_base.returnPackagesByDep(pkgspec) + \
|
|
711
711
|
self.yum_base.returnInstalledPackagesByDep(pkgspec)
|
|
712
712
|
if not pkgs:
|
|
713
|
-
e, m,
|
|
713
|
+
e, m, dummy = self.yum_base.pkgSack.matchPackageNames([pkgspec])
|
|
714
714
|
pkgs = e + m
|
|
715
715
|
updates = self.yum_base.doPackageLists(pkgnarrow='updates').updates
|
|
716
716
|
except Exception as e:
|
|
@@ -928,7 +928,7 @@ class YumModule(YumDnf):
|
|
|
928
928
|
cmd = repoq + ["--qf", qf, "-a"]
|
|
929
929
|
if self.releasever:
|
|
930
930
|
cmd.extend(['--releasever=%s' % self.releasever])
|
|
931
|
-
rc, out,
|
|
931
|
+
rc, out, err = self.module.run_command(cmd)
|
|
932
932
|
if rc == 0:
|
|
933
933
|
return set(p for p in out.split('\n') if p.strip())
|
|
934
934
|
else:
|
|
@@ -1419,7 +1419,7 @@ class YumModule(YumDnf):
|
|
|
1419
1419
|
# this contains the full NVR and spec could contain wildcards
|
|
1420
1420
|
# or virtual provides (like "python-*" or "smtp-daemon") while
|
|
1421
1421
|
# updates contains name only.
|
|
1422
|
-
pkgname,
|
|
1422
|
+
(pkgname, ver, rel, epoch, arch) = splitFilename(pkg)
|
|
1423
1423
|
if spec in pkgs['update'] and pkgname in updates:
|
|
1424
1424
|
nothing_to_do = False
|
|
1425
1425
|
will_update.add(spec)
|
|
@@ -21,9 +21,9 @@ description:
|
|
|
21
21
|
options:
|
|
22
22
|
async:
|
|
23
23
|
description:
|
|
24
|
-
- If set to
|
|
24
|
+
- If set to V(true) Yum will download packages and metadata from this
|
|
25
25
|
repo in parallel, if possible.
|
|
26
|
-
- In ansible-core 2.11, 2.12, and 2.13 the default value is
|
|
26
|
+
- In ansible-core 2.11, 2.12, and 2.13 the default value is V(true).
|
|
27
27
|
- This option has been deprecated in RHEL 8. If you're using one of the
|
|
28
28
|
versions listed above, you can set this option to None to avoid passing an
|
|
29
29
|
unknown configuration option.
|
|
@@ -31,20 +31,19 @@ options:
|
|
|
31
31
|
bandwidth:
|
|
32
32
|
description:
|
|
33
33
|
- Maximum available network bandwidth in bytes/second. Used with the
|
|
34
|
-
|
|
35
|
-
- If
|
|
36
|
-
throttling will be disabled. If
|
|
37
|
-
(bytes/sec) then this option is ignored. Default is
|
|
34
|
+
O(throttle) option.
|
|
35
|
+
- If O(throttle) is a percentage and bandwidth is V(0) then bandwidth
|
|
36
|
+
throttling will be disabled. If O(throttle) is expressed as a data rate
|
|
37
|
+
(bytes/sec) then this option is ignored. Default is V(0) (no bandwidth
|
|
38
38
|
throttling).
|
|
39
39
|
type: str
|
|
40
|
-
default: '0'
|
|
41
40
|
baseurl:
|
|
42
41
|
description:
|
|
43
42
|
- URL to the directory where the yum repository's 'repodata' directory
|
|
44
43
|
lives.
|
|
45
44
|
- It can also be a list of multiple URLs.
|
|
46
|
-
- This, the
|
|
47
|
-
|
|
45
|
+
- This, the O(metalink) or O(mirrorlist) parameters are required if O(state) is set to
|
|
46
|
+
V(present).
|
|
48
47
|
type: list
|
|
49
48
|
elements: str
|
|
50
49
|
cost:
|
|
@@ -52,61 +51,57 @@ options:
|
|
|
52
51
|
- Relative cost of accessing this repository. Useful for weighing one
|
|
53
52
|
repo's packages as greater/less than any other.
|
|
54
53
|
type: str
|
|
55
|
-
default: '1000'
|
|
56
54
|
deltarpm_metadata_percentage:
|
|
57
55
|
description:
|
|
58
56
|
- When the relative size of deltarpm metadata vs pkgs is larger than
|
|
59
57
|
this, deltarpm metadata is not downloaded from the repo. Note that you
|
|
60
|
-
can give values over
|
|
61
|
-
required to be half the size of the packages. Use
|
|
58
|
+
can give values over V(100), so V(200) means that the metadata is
|
|
59
|
+
required to be half the size of the packages. Use V(0) to turn off
|
|
62
60
|
this check, and always download metadata.
|
|
63
61
|
type: str
|
|
64
|
-
default: '100'
|
|
65
62
|
deltarpm_percentage:
|
|
66
63
|
description:
|
|
67
64
|
- When the relative size of delta vs pkg is larger than this, delta is
|
|
68
|
-
not used. Use
|
|
69
|
-
(with file://
|
|
65
|
+
not used. Use V(0) to turn off delta rpm processing. Local repositories
|
|
66
|
+
(with file://O(baseurl)) have delta rpms turned off by default.
|
|
70
67
|
type: str
|
|
71
|
-
default: '75'
|
|
72
68
|
description:
|
|
73
69
|
description:
|
|
74
70
|
- A human readable string describing the repository. This option corresponds to the "name" property in the repo file.
|
|
75
|
-
- This parameter is only required if
|
|
71
|
+
- This parameter is only required if O(state) is set to V(present).
|
|
76
72
|
type: str
|
|
77
73
|
enabled:
|
|
78
74
|
description:
|
|
79
75
|
- This tells yum whether or not use this repository.
|
|
80
|
-
- Yum default value is
|
|
76
|
+
- Yum default value is V(true).
|
|
81
77
|
type: bool
|
|
82
78
|
enablegroups:
|
|
83
79
|
description:
|
|
84
80
|
- Determines whether yum will allow the use of package groups for this
|
|
85
81
|
repository.
|
|
86
|
-
- Yum default value is
|
|
82
|
+
- Yum default value is V(true).
|
|
87
83
|
type: bool
|
|
88
84
|
exclude:
|
|
89
85
|
description:
|
|
90
86
|
- List of packages to exclude from updates or installs. This should be a
|
|
91
|
-
space separated list. Shell globs using wildcards (
|
|
87
|
+
space separated list. Shell globs using wildcards (for example V(*) and V(?))
|
|
92
88
|
are allowed.
|
|
93
89
|
- The list can also be a regular YAML array.
|
|
94
90
|
type: list
|
|
95
91
|
elements: str
|
|
96
92
|
failovermethod:
|
|
97
93
|
choices: [roundrobin, priority]
|
|
98
|
-
default: roundrobin
|
|
99
94
|
description:
|
|
100
|
-
-
|
|
95
|
+
- V(roundrobin) randomly selects a URL out of the list of URLs to start
|
|
101
96
|
with and proceeds through each of them as it encounters a failure
|
|
102
97
|
contacting the host.
|
|
103
|
-
-
|
|
98
|
+
- V(priority) starts from the first O(baseurl) listed and reads through
|
|
104
99
|
them sequentially.
|
|
105
100
|
type: str
|
|
106
101
|
file:
|
|
107
102
|
description:
|
|
108
103
|
- File name without the C(.repo) extension to save the repo in. Defaults
|
|
109
|
-
to the value of
|
|
104
|
+
to the value of O(name).
|
|
110
105
|
type: str
|
|
111
106
|
gpgcakey:
|
|
112
107
|
description:
|
|
@@ -117,7 +112,7 @@ options:
|
|
|
117
112
|
- Tells yum whether or not it should perform a GPG signature check on
|
|
118
113
|
packages.
|
|
119
114
|
- No default setting. If the value is not set, the system setting from
|
|
120
|
-
C(/etc/yum.conf) or system default of
|
|
115
|
+
C(/etc/yum.conf) or system default of V(false) will be used.
|
|
121
116
|
type: bool
|
|
122
117
|
gpgkey:
|
|
123
118
|
description:
|
|
@@ -128,32 +123,31 @@ options:
|
|
|
128
123
|
module_hotfixes:
|
|
129
124
|
description:
|
|
130
125
|
- Disable module RPM filtering and make all RPMs from the repository
|
|
131
|
-
available. The default is
|
|
126
|
+
available. The default is V(None).
|
|
132
127
|
version_added: '2.11'
|
|
133
128
|
type: bool
|
|
134
129
|
http_caching:
|
|
135
130
|
description:
|
|
136
131
|
- Determines how upstream HTTP caches are instructed to handle any HTTP
|
|
137
132
|
downloads that Yum does.
|
|
138
|
-
-
|
|
139
|
-
-
|
|
133
|
+
- V(all) means that all HTTP downloads should be cached.
|
|
134
|
+
- V(packages) means that only RPM package downloads should be cached (but
|
|
140
135
|
not repository metadata downloads).
|
|
141
|
-
-
|
|
136
|
+
- V(none) means that no HTTP downloads should be cached.
|
|
142
137
|
choices: [all, packages, none]
|
|
143
138
|
type: str
|
|
144
|
-
default: all
|
|
145
139
|
include:
|
|
146
140
|
description:
|
|
147
141
|
- Include external configuration file. Both, local path and URL is
|
|
148
142
|
supported. Configuration file will be inserted at the position of the
|
|
149
|
-
|
|
143
|
+
C(include=) line. Included files may contain further include lines.
|
|
150
144
|
Yum will abort with an error if an inclusion loop is detected.
|
|
151
145
|
type: str
|
|
152
146
|
includepkgs:
|
|
153
147
|
description:
|
|
154
148
|
- List of packages you want to only use from a repository. This should be
|
|
155
|
-
a space separated list. Shell globs using wildcards (
|
|
156
|
-
are allowed. Substitution variables (
|
|
149
|
+
a space separated list. Shell globs using wildcards (for example V(*) and V(?))
|
|
150
|
+
are allowed. Substitution variables (for example V($releasever)) are honored
|
|
157
151
|
here.
|
|
158
152
|
- The list can also be a regular YAML array.
|
|
159
153
|
type: list
|
|
@@ -161,65 +155,61 @@ options:
|
|
|
161
155
|
ip_resolve:
|
|
162
156
|
description:
|
|
163
157
|
- Determines how yum resolves host names.
|
|
164
|
-
-
|
|
165
|
-
-
|
|
158
|
+
- V(4) or V(IPv4) - resolve to IPv4 addresses only.
|
|
159
|
+
- V(6) or V(IPv6) - resolve to IPv6 addresses only.
|
|
166
160
|
choices: ['4', '6', IPv4, IPv6, whatever]
|
|
167
161
|
type: str
|
|
168
|
-
default: whatever
|
|
169
162
|
keepalive:
|
|
170
163
|
description:
|
|
171
164
|
- This tells yum whether or not HTTP/1.1 keepalive should be used with
|
|
172
165
|
this repository. This can improve transfer speeds by using one
|
|
173
166
|
connection when downloading multiple files from a repository.
|
|
174
167
|
type: bool
|
|
175
|
-
default: 'no'
|
|
176
168
|
keepcache:
|
|
177
169
|
description:
|
|
178
|
-
- Either
|
|
170
|
+
- Either V(1) or V(0). Determines whether or not yum keeps the cache of
|
|
179
171
|
headers and packages after successful installation.
|
|
172
|
+
- This parameter is deprecated and will be removed in version 2.20.
|
|
180
173
|
choices: ['0', '1']
|
|
181
174
|
type: str
|
|
182
|
-
default: '1'
|
|
183
175
|
metadata_expire:
|
|
184
176
|
description:
|
|
185
177
|
- Time (in seconds) after which the metadata will expire.
|
|
186
178
|
- Default value is 6 hours.
|
|
187
179
|
type: str
|
|
188
|
-
default: '21600'
|
|
189
180
|
metadata_expire_filter:
|
|
190
181
|
description:
|
|
191
|
-
- Filter the
|
|
182
|
+
- Filter the O(metadata_expire) time, allowing a trade of speed for
|
|
192
183
|
accuracy if a command doesn't require it. Each yum command can specify
|
|
193
184
|
that it requires a certain level of timeliness quality from the remote
|
|
194
185
|
repos. from "I'm about to install/upgrade, so this better be current"
|
|
195
186
|
to "Anything that's available is good enough".
|
|
196
|
-
-
|
|
197
|
-
-
|
|
198
|
-
filtered from metadata expiring. Eg.
|
|
187
|
+
- V(never) - Nothing is filtered, always obey O(metadata_expire).
|
|
188
|
+
- V(read-only:past) - Commands that only care about past information are
|
|
189
|
+
filtered from metadata expiring. Eg. C(yum history) info (if history
|
|
199
190
|
needs to lookup anything about a previous transaction, then by
|
|
200
191
|
definition the remote package was available in the past).
|
|
201
|
-
-
|
|
202
|
-
future. Eg.
|
|
203
|
-
-
|
|
192
|
+
- V(read-only:present) - Commands that are balanced between past and
|
|
193
|
+
future. Eg. C(yum list yum).
|
|
194
|
+
- V(read-only:future) - Commands that are likely to result in running
|
|
204
195
|
other commands which will require the latest metadata. Eg.
|
|
205
|
-
|
|
196
|
+
C(yum check-update).
|
|
206
197
|
- Note that this option does not override "yum clean expire-cache".
|
|
207
198
|
choices: [never, 'read-only:past', 'read-only:present', 'read-only:future']
|
|
208
199
|
type: str
|
|
209
|
-
default: 'read-only:present'
|
|
210
200
|
metalink:
|
|
211
201
|
description:
|
|
212
202
|
- Specifies a URL to a metalink file for the repomd.xml, a list of
|
|
213
203
|
mirrors for the entire repository are generated by converting the
|
|
214
|
-
mirrors for the repomd.xml file to a
|
|
215
|
-
- This, the
|
|
216
|
-
|
|
204
|
+
mirrors for the repomd.xml file to a O(baseurl).
|
|
205
|
+
- This, the O(baseurl) or O(mirrorlist) parameters are required if O(state) is set to
|
|
206
|
+
V(present).
|
|
217
207
|
type: str
|
|
218
208
|
mirrorlist:
|
|
219
209
|
description:
|
|
220
210
|
- Specifies a URL to a file containing a list of baseurls.
|
|
221
|
-
- This, the
|
|
222
|
-
|
|
211
|
+
- This, the O(baseurl) or O(metalink) parameters are required if O(state) is set to
|
|
212
|
+
V(present).
|
|
223
213
|
type: str
|
|
224
214
|
mirrorlist_expire:
|
|
225
215
|
description:
|
|
@@ -227,12 +217,11 @@ options:
|
|
|
227
217
|
expire.
|
|
228
218
|
- Default value is 6 hours.
|
|
229
219
|
type: str
|
|
230
|
-
default: '21600'
|
|
231
220
|
name:
|
|
232
221
|
description:
|
|
233
222
|
- Unique repository ID. This option builds the section name of the repository in the repo file.
|
|
234
|
-
- This parameter is only required if
|
|
235
|
-
|
|
223
|
+
- This parameter is only required if O(state) is set to V(present) or
|
|
224
|
+
V(absent).
|
|
236
225
|
type: str
|
|
237
226
|
required: true
|
|
238
227
|
password:
|
|
@@ -245,15 +234,13 @@ options:
|
|
|
245
234
|
from 1 to 99.
|
|
246
235
|
- This option only works if the YUM Priorities plugin is installed.
|
|
247
236
|
type: str
|
|
248
|
-
default: '99'
|
|
249
237
|
protect:
|
|
250
238
|
description:
|
|
251
239
|
- Protect packages from updates from other repositories.
|
|
252
240
|
type: bool
|
|
253
|
-
default: 'no'
|
|
254
241
|
proxy:
|
|
255
242
|
description:
|
|
256
|
-
- URL to the proxy server that yum should use. Set to
|
|
243
|
+
- URL to the proxy server that yum should use. Set to V(_none_) to
|
|
257
244
|
disable the global proxy setting.
|
|
258
245
|
type: str
|
|
259
246
|
proxy_password:
|
|
@@ -269,7 +256,6 @@ options:
|
|
|
269
256
|
- This tells yum whether or not it should perform a GPG signature check
|
|
270
257
|
on the repodata from this repository.
|
|
271
258
|
type: bool
|
|
272
|
-
default: 'no'
|
|
273
259
|
reposdir:
|
|
274
260
|
description:
|
|
275
261
|
- Directory where the C(.repo) files will be stored.
|
|
@@ -278,32 +264,28 @@ options:
|
|
|
278
264
|
retries:
|
|
279
265
|
description:
|
|
280
266
|
- Set the number of times any attempt to retrieve a file should retry
|
|
281
|
-
before returning an error. Setting this to
|
|
267
|
+
before returning an error. Setting this to V(0) makes yum try forever.
|
|
282
268
|
type: str
|
|
283
|
-
default: '10'
|
|
284
269
|
s3_enabled:
|
|
285
270
|
description:
|
|
286
271
|
- Enables support for S3 repositories.
|
|
287
272
|
- This option only works if the YUM S3 plugin is installed.
|
|
288
273
|
type: bool
|
|
289
|
-
default: 'no'
|
|
290
274
|
skip_if_unavailable:
|
|
291
275
|
description:
|
|
292
|
-
- If set to
|
|
276
|
+
- If set to V(true) yum will continue running if this repository cannot be
|
|
293
277
|
contacted for any reason. This should be set carefully as all repos are
|
|
294
278
|
consulted for any given command.
|
|
295
279
|
type: bool
|
|
296
|
-
default: 'no'
|
|
297
280
|
ssl_check_cert_permissions:
|
|
298
281
|
description:
|
|
299
282
|
- Whether yum should check the permissions on the paths for the
|
|
300
283
|
certificates on the repository (both remote and local).
|
|
301
284
|
- If we can't read any of the files then yum will force
|
|
302
|
-
|
|
285
|
+
O(skip_if_unavailable) to be V(true). This is most useful for non-root
|
|
303
286
|
processes which use yum on repos that have client cert files which are
|
|
304
287
|
readable only by root.
|
|
305
288
|
type: bool
|
|
306
|
-
default: 'no'
|
|
307
289
|
sslcacert:
|
|
308
290
|
description:
|
|
309
291
|
- Path to the directory containing the databases of the certificate
|
|
@@ -326,7 +308,6 @@ options:
|
|
|
326
308
|
description:
|
|
327
309
|
- Defines whether yum should verify SSL certificates/hosts at all.
|
|
328
310
|
type: bool
|
|
329
|
-
default: 'yes'
|
|
330
311
|
aliases: [ validate_certs ]
|
|
331
312
|
state:
|
|
332
313
|
description:
|
|
@@ -344,14 +325,12 @@ options:
|
|
|
344
325
|
description:
|
|
345
326
|
- Number of seconds to wait for a connection before timing out.
|
|
346
327
|
type: str
|
|
347
|
-
default: '30'
|
|
348
328
|
ui_repoid_vars:
|
|
349
329
|
description:
|
|
350
330
|
- When a repository id is displayed, append these yum variables to the
|
|
351
|
-
string if they are used in the
|
|
331
|
+
string if they are used in the O(baseurl)/etc. Variables are appended
|
|
352
332
|
in the order listed (and found).
|
|
353
333
|
type: str
|
|
354
|
-
default: releasever basearch
|
|
355
334
|
username:
|
|
356
335
|
description:
|
|
357
336
|
- Username to use for basic authentication to a repo or really any url.
|
|
@@ -375,7 +354,7 @@ notes:
|
|
|
375
354
|
- The repo file will be automatically deleted if it contains no repository.
|
|
376
355
|
- When removing a repository, beware that the metadata cache may still remain
|
|
377
356
|
on disk until you run C(yum clean all). Use a notification handler for this.
|
|
378
|
-
- "The
|
|
357
|
+
- "The O(ignore:params) parameter was removed in Ansible 2.5 due to circumventing Ansible's parameter
|
|
379
358
|
handling"
|
|
380
359
|
'''
|
|
381
360
|
|
|
@@ -438,7 +417,7 @@ import os
|
|
|
438
417
|
|
|
439
418
|
from ansible.module_utils.basic import AnsibleModule
|
|
440
419
|
from ansible.module_utils.six.moves import configparser
|
|
441
|
-
from ansible.module_utils.
|
|
420
|
+
from ansible.module_utils.common.text.converters import to_native
|
|
442
421
|
|
|
443
422
|
|
|
444
423
|
class YumRepo(object):
|
|
@@ -549,6 +528,11 @@ class YumRepo(object):
|
|
|
549
528
|
|
|
550
529
|
# Set the value only if it was defined (default is None)
|
|
551
530
|
if value is not None and key in self.allowed_params:
|
|
531
|
+
if key == 'keepcache':
|
|
532
|
+
self.module.deprecate(
|
|
533
|
+
"'keepcache' parameter is deprecated.",
|
|
534
|
+
version='2.20'
|
|
535
|
+
)
|
|
552
536
|
self.repofile.set(self.section, key, value)
|
|
553
537
|
|
|
554
538
|
def save(self):
|
|
@@ -627,7 +611,6 @@ def main():
|
|
|
627
611
|
mirrorlist=dict(),
|
|
628
612
|
mirrorlist_expire=dict(),
|
|
629
613
|
name=dict(required=True),
|
|
630
|
-
params=dict(type='dict'),
|
|
631
614
|
password=dict(no_log=True),
|
|
632
615
|
priority=dict(),
|
|
633
616
|
protect=dict(type='bool'),
|
|
@@ -659,11 +642,6 @@ def main():
|
|
|
659
642
|
supports_check_mode=True,
|
|
660
643
|
)
|
|
661
644
|
|
|
662
|
-
# Params was removed
|
|
663
|
-
# https://meetbot.fedoraproject.org/ansible-meeting/2017-09-28/ansible_dev_meeting.2017-09-28-15.00.log.html
|
|
664
|
-
if module.params['params']:
|
|
665
|
-
module.fail_json(msg="The params option to yum_repository was removed in Ansible 2.5 since it circumvents Ansible's option handling")
|
|
666
|
-
|
|
667
645
|
name = module.params['name']
|
|
668
646
|
state = module.params['state']
|
|
669
647
|
|