ansible-core 2.19.3rc1__py3-none-any.whl → 2.20.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.

Files changed (201) hide show
  1. ansible/_internal/__init__.py +1 -4
  2. ansible/_internal/_ansiballz/_builder.py +1 -3
  3. ansible/_internal/_collection_proxy.py +7 -9
  4. ansible/_internal/_json/__init__.py +3 -4
  5. ansible/_internal/_templating/_engine.py +1 -1
  6. ansible/_internal/_templating/_jinja_plugins.py +1 -2
  7. ansible/_internal/_wrapt.py +105 -301
  8. ansible/cli/__init__.py +11 -10
  9. ansible/cli/adhoc.py +1 -2
  10. ansible/cli/arguments/option_helpers.py +1 -1
  11. ansible/cli/config.py +5 -6
  12. ansible/cli/doc.py +70 -68
  13. ansible/cli/galaxy.py +15 -24
  14. ansible/cli/inventory.py +0 -1
  15. ansible/cli/playbook.py +0 -1
  16. ansible/cli/pull.py +0 -1
  17. ansible/cli/scripts/ansible_connection_cli_stub.py +1 -1
  18. ansible/collections/list.py +4 -2
  19. ansible/config/base.yml +1 -25
  20. ansible/config/manager.py +0 -2
  21. ansible/executor/play_iterator.py +42 -20
  22. ansible/executor/playbook_executor.py +0 -9
  23. ansible/executor/task_executor.py +26 -18
  24. ansible/executor/task_queue_manager.py +1 -3
  25. ansible/galaxy/api.py +33 -80
  26. ansible/galaxy/collection/__init__.py +4 -17
  27. ansible/galaxy/dependency_resolution/dataclasses.py +0 -10
  28. ansible/galaxy/dependency_resolution/providers.py +24 -118
  29. ansible/galaxy/role.py +1 -33
  30. ansible/inventory/manager.py +2 -3
  31. ansible/keyword_desc.yml +0 -3
  32. ansible/module_utils/_internal/_datatag/__init__.py +2 -10
  33. ansible/module_utils/_internal/_no_six.py +86 -0
  34. ansible/module_utils/_text.py +28 -8
  35. ansible/module_utils/ansible_release.py +2 -2
  36. ansible/module_utils/basic.py +26 -23
  37. ansible/module_utils/common/_collections_compat.py +11 -2
  38. ansible/module_utils/common/collections.py +8 -3
  39. ansible/module_utils/common/dict_transformations.py +1 -2
  40. ansible/module_utils/common/network.py +4 -2
  41. ansible/module_utils/common/parameters.py +32 -41
  42. ansible/module_utils/common/text/converters.py +109 -23
  43. ansible/module_utils/common/text/formatters.py +6 -2
  44. ansible/module_utils/common/validation.py +11 -9
  45. ansible/module_utils/connection.py +8 -3
  46. ansible/module_utils/facts/hardware/linux.py +23 -7
  47. ansible/module_utils/facts/hardware/netbsd.py +1 -1
  48. ansible/module_utils/facts/hardware/sunos.py +2 -1
  49. ansible/module_utils/facts/packages.py +6 -2
  50. ansible/module_utils/facts/system/distribution.py +2 -1
  51. ansible/module_utils/facts/system/env.py +6 -3
  52. ansible/module_utils/facts/system/local.py +3 -1
  53. ansible/module_utils/parsing/convert_bool.py +6 -2
  54. ansible/module_utils/service.py +2 -3
  55. ansible/module_utils/six/__init__.py +19 -6
  56. ansible/module_utils/yumdnf.py +0 -5
  57. ansible/modules/apt.py +18 -13
  58. ansible/modules/apt_repository.py +1 -1
  59. ansible/modules/assemble.py +5 -9
  60. ansible/modules/blockinfile.py +39 -23
  61. ansible/modules/cron.py +26 -35
  62. ansible/modules/deb822_repository.py +83 -12
  63. ansible/modules/dnf.py +3 -7
  64. ansible/modules/dnf5.py +4 -6
  65. ansible/modules/expect.py +0 -3
  66. ansible/modules/find.py +1 -2
  67. ansible/modules/get_url.py +1 -1
  68. ansible/modules/git.py +4 -5
  69. ansible/modules/include_vars.py +1 -1
  70. ansible/modules/known_hosts.py +7 -1
  71. ansible/modules/lineinfile.py +71 -63
  72. ansible/modules/package_facts.py +1 -1
  73. ansible/modules/pip.py +8 -2
  74. ansible/modules/replace.py +6 -6
  75. ansible/modules/service.py +3 -4
  76. ansible/modules/stat.py +20 -0
  77. ansible/modules/uri.py +9 -10
  78. ansible/modules/user.py +1 -2
  79. ansible/modules/wait_for.py +2 -2
  80. ansible/modules/wait_for_connection.py +2 -1
  81. ansible/modules/yum_repository.py +1 -16
  82. ansible/parsing/dataloader.py +24 -31
  83. ansible/parsing/mod_args.py +3 -0
  84. ansible/parsing/vault/__init__.py +1 -2
  85. ansible/playbook/base.py +8 -56
  86. ansible/playbook/block.py +1 -63
  87. ansible/playbook/collectionsearch.py +1 -2
  88. ansible/playbook/handler.py +1 -7
  89. ansible/playbook/helpers.py +15 -20
  90. ansible/playbook/included_file.py +1 -1
  91. ansible/playbook/play.py +105 -49
  92. ansible/playbook/play_context.py +4 -0
  93. ansible/playbook/role/__init__.py +10 -65
  94. ansible/playbook/role/definition.py +3 -4
  95. ansible/playbook/role/include.py +2 -3
  96. ansible/playbook/role/metadata.py +1 -12
  97. ansible/playbook/role/requirement.py +1 -2
  98. ansible/playbook/role_include.py +1 -2
  99. ansible/playbook/taggable.py +16 -5
  100. ansible/playbook/task.py +51 -55
  101. ansible/plugins/action/__init__.py +20 -19
  102. ansible/plugins/action/add_host.py +1 -2
  103. ansible/plugins/action/fetch.py +3 -5
  104. ansible/plugins/action/group_by.py +1 -2
  105. ansible/plugins/action/include_vars.py +20 -22
  106. ansible/plugins/action/script.py +1 -3
  107. ansible/plugins/action/template.py +1 -2
  108. ansible/plugins/action/uri.py +4 -2
  109. ansible/plugins/cache/__init__.py +1 -0
  110. ansible/plugins/callback/__init__.py +13 -6
  111. ansible/plugins/connection/__init__.py +3 -7
  112. ansible/plugins/connection/local.py +2 -3
  113. ansible/plugins/connection/psrp.py +0 -2
  114. ansible/plugins/connection/ssh.py +2 -7
  115. ansible/plugins/connection/winrm.py +0 -2
  116. ansible/plugins/doc_fragments/result_format_callback.py +15 -0
  117. ansible/plugins/filter/core.py +4 -5
  118. ansible/plugins/filter/encryption.py +3 -27
  119. ansible/plugins/filter/mathstuff.py +1 -2
  120. ansible/plugins/filter/to_nice_yaml.yml +31 -3
  121. ansible/plugins/filter/to_yaml.yml +29 -12
  122. ansible/plugins/inventory/__init__.py +1 -2
  123. ansible/plugins/inventory/toml.py +3 -6
  124. ansible/plugins/inventory/yaml.py +1 -2
  125. ansible/plugins/loader.py +3 -4
  126. ansible/plugins/lookup/password.py +1 -2
  127. ansible/plugins/lookup/subelements.py +2 -3
  128. ansible/plugins/lookup/url.py +1 -1
  129. ansible/plugins/lookup/varnames.py +1 -2
  130. ansible/plugins/shell/__init__.py +9 -4
  131. ansible/plugins/shell/powershell.py +8 -24
  132. ansible/plugins/strategy/__init__.py +6 -3
  133. ansible/plugins/test/core.py +4 -1
  134. ansible/plugins/test/falsy.yml +1 -1
  135. ansible/plugins/test/regex.yml +18 -6
  136. ansible/plugins/test/truthy.yml +1 -1
  137. ansible/release.py +2 -2
  138. ansible/template/__init__.py +3 -7
  139. ansible/utils/collection_loader/_collection_config.py +5 -0
  140. ansible/utils/collection_loader/_collection_finder.py +11 -14
  141. ansible/utils/context_objects.py +7 -4
  142. ansible/utils/display.py +7 -6
  143. ansible/utils/encrypt.py +0 -5
  144. ansible/utils/helpers.py +6 -2
  145. ansible/utils/jsonrpc.py +7 -3
  146. ansible/utils/plugin_docs.py +49 -38
  147. ansible/utils/ssh_functions.py +0 -19
  148. ansible/utils/unsafe_proxy.py +7 -7
  149. ansible/vars/clean.py +2 -3
  150. ansible/vars/manager.py +28 -22
  151. ansible/vars/plugins.py +1 -31
  152. {ansible_core-2.19.3rc1.dist-info → ansible_core-2.20.0b2.dist-info}/METADATA +3 -3
  153. {ansible_core-2.19.3rc1.dist-info → ansible_core-2.20.0b2.dist-info}/RECORD +199 -200
  154. ansible_test/_data/completion/docker.txt +7 -7
  155. ansible_test/_data/completion/network.txt +0 -1
  156. ansible_test/_data/completion/remote.txt +4 -4
  157. ansible_test/_data/requirements/ansible-test.txt +1 -1
  158. ansible_test/_data/requirements/sanity.changelog.txt +1 -1
  159. ansible_test/_data/requirements/sanity.pep8.txt +1 -1
  160. ansible_test/_data/requirements/sanity.pylint.txt +4 -4
  161. ansible_test/_internal/cache.py +2 -5
  162. ansible_test/_internal/cli/compat.py +1 -1
  163. ansible_test/_internal/commands/coverage/combine.py +1 -3
  164. ansible_test/_internal/commands/integration/__init__.py +3 -7
  165. ansible_test/_internal/commands/integration/cloud/httptester.py +1 -1
  166. ansible_test/_internal/commands/integration/coverage.py +1 -3
  167. ansible_test/_internal/commands/integration/filters.py +5 -10
  168. ansible_test/_internal/commands/sanity/validate_modules.py +1 -5
  169. ansible_test/_internal/commands/units/__init__.py +1 -13
  170. ansible_test/_internal/completion.py +2 -5
  171. ansible_test/_internal/config.py +2 -7
  172. ansible_test/_internal/coverage_util.py +1 -1
  173. ansible_test/_internal/delegation.py +2 -0
  174. ansible_test/_internal/docker_util.py +1 -1
  175. ansible_test/_internal/host_profiles.py +6 -11
  176. ansible_test/_internal/provider/__init__.py +2 -5
  177. ansible_test/_internal/provisioning.py +2 -5
  178. ansible_test/_internal/pypi_proxy.py +1 -1
  179. ansible_test/_internal/target.py +2 -6
  180. ansible_test/_internal/thread.py +1 -4
  181. ansible_test/_internal/util.py +9 -14
  182. ansible_test/_util/controller/sanity/code-smell/runtime-metadata.py +14 -19
  183. ansible_test/_util/controller/sanity/pylint/plugins/unwanted.py +40 -27
  184. ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py +31 -18
  185. ansible_test/_util/controller/sanity/validate-modules/validate_modules/module_args.py +1 -2
  186. ansible_test/_util/controller/sanity/validate-modules/validate_modules/schema.py +59 -71
  187. ansible_test/_util/controller/sanity/validate-modules/validate_modules/utils.py +1 -2
  188. ansible_test/_util/target/cli/ansible_test_cli_stub.py +4 -2
  189. ansible_test/_util/target/common/constants.py +2 -2
  190. ansible_test/_util/target/setup/bootstrap.sh +0 -6
  191. ansible/utils/py3compat.py +0 -27
  192. ansible_test/_data/pytest/config/legacy.ini +0 -4
  193. {ansible_core-2.19.3rc1.dist-info → ansible_core-2.20.0b2.dist-info}/WHEEL +0 -0
  194. {ansible_core-2.19.3rc1.dist-info → ansible_core-2.20.0b2.dist-info}/entry_points.txt +0 -0
  195. {ansible_core-2.19.3rc1.dist-info → ansible_core-2.20.0b2.dist-info}/licenses/COPYING +0 -0
  196. {ansible_core-2.19.3rc1.dist-info → ansible_core-2.20.0b2.dist-info}/licenses/licenses/Apache-License.txt +0 -0
  197. {ansible_core-2.19.3rc1.dist-info → ansible_core-2.20.0b2.dist-info}/licenses/licenses/BSD-3-Clause.txt +0 -0
  198. {ansible_core-2.19.3rc1.dist-info → ansible_core-2.20.0b2.dist-info}/licenses/licenses/MIT-license.txt +0 -0
  199. {ansible_core-2.19.3rc1.dist-info → ansible_core-2.20.0b2.dist-info}/licenses/licenses/PSF-license.txt +0 -0
  200. {ansible_core-2.19.3rc1.dist-info → ansible_core-2.20.0b2.dist-info}/licenses/licenses/simplified_bsd.txt +0 -0
  201. {ansible_core-2.19.3rc1.dist-info → ansible_core-2.20.0b2.dist-info}/top_level.txt +0 -0
@@ -20,9 +20,7 @@ from __future__ import annotations
20
20
 
21
21
  import subprocess
22
22
 
23
- from ansible import constants as C
24
23
  from ansible.module_utils.common.text.converters import to_bytes
25
- from ansible.module_utils.compat.paramiko import _paramiko as paramiko
26
24
  from ansible.utils.display import Display
27
25
 
28
26
  display = Display()
@@ -50,20 +48,3 @@ def check_for_controlpersist(ssh_executable):
50
48
 
51
49
  _HAS_CONTROLPERSIST[ssh_executable] = has_cp
52
50
  return has_cp
53
-
54
-
55
- def set_default_transport():
56
-
57
- # deal with 'smart' connection .. one time ..
58
- if C.DEFAULT_TRANSPORT == 'smart':
59
- display.deprecated(
60
- msg="The `smart` option for connections is deprecated.",
61
- version="2.20",
62
- help_text="Set the connection plugin directly instead.",
63
- )
64
-
65
- # see if SSH can support ControlPersist if not use paramiko
66
- if not check_for_controlpersist('ssh') and paramiko is not None:
67
- C.DEFAULT_TRANSPORT = "paramiko"
68
- else:
69
- C.DEFAULT_TRANSPORT = "ssh"
@@ -7,17 +7,13 @@ from __future__ import annotations
7
7
 
8
8
  from collections.abc import Mapping, Set
9
9
 
10
+ from ansible.module_utils._internal import _no_six
10
11
  from ansible.module_utils.common.text.converters import to_bytes, to_text
11
12
  from ansible.module_utils.common.collections import is_sequence
12
13
  from ansible._internal._datatag._tags import TrustedAsTemplate
13
- from ansible.module_utils.six import binary_type, text_type
14
-
15
- import typing as t
16
14
 
17
15
  __all__ = ['AnsibleUnsafe', 'wrap_var']
18
16
 
19
- T = t.TypeVar('T')
20
-
21
17
 
22
18
  class AnsibleUnsafe:
23
19
  def __new__(cls, value):
@@ -66,9 +62,9 @@ def wrap_var(v):
66
62
  v = _wrap_set(v)
67
63
  elif is_sequence(v):
68
64
  v = _wrap_sequence(v)
69
- elif isinstance(v, binary_type):
65
+ elif isinstance(v, bytes):
70
66
  v = AnsibleUnsafeBytes(v)
71
- elif isinstance(v, text_type):
67
+ elif isinstance(v, str):
72
68
  v = AnsibleUnsafeText(v)
73
69
 
74
70
  return v
@@ -80,3 +76,7 @@ def to_unsafe_bytes(*args, **kwargs):
80
76
 
81
77
  def to_unsafe_text(*args, **kwargs):
82
78
  return wrap_var(to_text(*args, **kwargs))
79
+
80
+
81
+ def __getattr__(importable_name):
82
+ return _no_six.deprecate(importable_name, __name__, "binary_type", "text_type")
ansible/vars/clean.py CHANGED
@@ -10,7 +10,6 @@ from collections.abc import MutableMapping, MutableSequence
10
10
 
11
11
  from ansible import constants as C
12
12
  from ansible.errors import AnsibleError
13
- from ansible.module_utils import six
14
13
  from ansible.plugins.loader import connection_loader
15
14
  from ansible.utils.display import Display
16
15
 
@@ -48,7 +47,7 @@ def module_response_deepcopy(v):
48
47
  """
49
48
  if isinstance(v, dict):
50
49
  ret = v.copy()
51
- items = six.iteritems(ret)
50
+ items = ret.items()
52
51
  elif isinstance(v, list):
53
52
  ret = v[:]
54
53
  items = enumerate(ret)
@@ -80,7 +79,7 @@ def strip_internal_keys(dirty, exceptions=None):
80
79
 
81
80
  # listify to avoid updating dict while iterating over it
82
81
  for k in list(dirty.keys()):
83
- if isinstance(k, six.string_types):
82
+ if isinstance(k, str):
84
83
  if k.startswith('_ansible_') and k not in exceptions:
85
84
  del dirty[k]
86
85
  continue
ansible/vars/manager.py CHANGED
@@ -17,7 +17,6 @@
17
17
 
18
18
  from __future__ import annotations
19
19
 
20
- import os
21
20
  import sys
22
21
  import typing as t
23
22
 
@@ -33,7 +32,6 @@ from ansible.inventory.host import Host
33
32
  from ansible.inventory.helpers import sort_groups, get_group_vars
34
33
  from ansible.inventory.manager import InventoryManager
35
34
  from ansible.module_utils.datatag import native_type_name
36
- from ansible.module_utils.six import text_type
37
35
  from ansible.parsing.dataloader import DataLoader
38
36
  from ansible._internal._templating._engine import TemplateEngine
39
37
  from ansible.plugins.loader import cache_loader
@@ -50,13 +48,18 @@ if t.TYPE_CHECKING:
50
48
 
51
49
  display = Display()
52
50
 
53
- # deprecated: description='enable top-level facts deprecation' core_version='2.20'
54
- # _DEPRECATE_TOP_LEVEL_FACT_TAG = _tags.Deprecated(
55
- # msg='Top-level facts are deprecated.',
56
- # version='2.24',
57
- # deprecator=_deprecator.ANSIBLE_CORE_DEPRECATOR,
58
- # help_text='Use `ansible_facts` instead.',
59
- # )
51
+ _DEPRECATE_TOP_LEVEL_FACT_TAG = _tags.Deprecated(
52
+ msg='INJECT_FACTS_AS_VARS default to `True` is deprecated, top-level facts will not be auto injected after the change.',
53
+ version='2.24',
54
+ deprecator=_deprecator.ANSIBLE_CORE_DEPRECATOR,
55
+ help_text='Use `ansible_facts["fact_name"]` (no `ansible_` prefix) instead.',
56
+ )
57
+ _DEPRECATE_VARS = _tags.Deprecated(
58
+ msg='The internal "vars" dictionary is deprecated.',
59
+ version='2.24',
60
+ deprecator=_deprecator.ANSIBLE_CORE_DEPRECATOR,
61
+ help_text='Use the `vars` and `varnames` lookups instead.',
62
+ )
60
63
 
61
64
 
62
65
  def _deprecate_top_level_fact(value: t.Any) -> t.Any:
@@ -65,9 +68,7 @@ def _deprecate_top_level_fact(value: t.Any) -> t.Any:
65
68
  The inner values are shared to aid in message de-duplication across hosts/values, and reduce intra-process memory usage.
66
69
  Unique tag instances are required to achieve the correct de-duplication within a top-level templating operation.
67
70
  """
68
- # deprecated: description='enable top-level facts deprecation' core_version='2.20'
69
- # return _DEPRECATE_TOP_LEVEL_FACT_TAG.tag(value)
70
- return value
71
+ return _DEPRECATE_TOP_LEVEL_FACT_TAG.tag(value)
71
72
 
72
73
 
73
74
  def preprocess_vars(a):
@@ -285,8 +286,7 @@ class VariableManager:
285
286
  all_vars = _combine_and_track(all_vars, _plugins_inventory([host]), "inventory host_vars for '%s'" % host)
286
287
  all_vars = _combine_and_track(all_vars, _plugins_play([host]), "playbook host_vars for '%s'" % host)
287
288
 
288
- # finally, the facts caches for this host, if it exists
289
- # TODO: cleaning of facts should eventually become part of taskresults instead of vars
289
+ # finally, the facts caches for this host, if they exist
290
290
  try:
291
291
  try:
292
292
  facts = self._fact_cache.get(host.name)
@@ -295,12 +295,16 @@ class VariableManager:
295
295
 
296
296
  all_vars |= namespace_facts(facts)
297
297
 
298
+ inject, origin = C.config.get_config_value_and_origin('INJECT_FACTS_AS_VARS')
298
299
  # push facts to main namespace
299
- if C.INJECT_FACTS_AS_VARS:
300
- deprecated_facts_vars = {k: _deprecate_top_level_fact(v) for k, v in clean_facts(facts).items()}
301
- all_vars = _combine_and_track(all_vars, deprecated_facts_vars, "facts")
300
+ if inject:
301
+ if origin == 'default':
302
+ clean_top = {k: _deprecate_top_level_fact(v) for k, v in clean_facts(facts).items()}
303
+ else:
304
+ clean_top = clean_facts(facts)
305
+ all_vars = _combine_and_track(all_vars, clean_top, "facts")
302
306
  else:
303
- # always 'promote' ansible_local
307
+ # always 'promote' ansible_local, even if empty
304
308
  all_vars = _combine_and_track(all_vars, {'ansible_local': facts.get('ansible_local', {})}, "facts")
305
309
  except KeyError:
306
310
  pass
@@ -419,8 +423,10 @@ class VariableManager:
419
423
 
420
424
  # 'vars' magic var
421
425
  if task or play:
422
- # has to be copy, otherwise recursive ref
423
- all_vars['vars'] = all_vars.copy()
426
+ all_vars['vars'] = _DEPRECATE_VARS.tag({})
427
+ for k, v in all_vars.items():
428
+ # has to be copy, otherwise recursive ref
429
+ all_vars['vars'][k] = _DEPRECATE_VARS.tag(v)
424
430
 
425
431
  display.debug("done with get_vars()")
426
432
  return all_vars
@@ -440,7 +446,7 @@ class VariableManager:
440
446
  """
441
447
 
442
448
  variables = {}
443
- variables['playbook_dir'] = os.path.abspath(self._loader.get_basedir())
449
+ variables['playbook_dir'] = self._loader.get_basedir()
444
450
  variables['ansible_playbook_python'] = sys.executable
445
451
  variables['ansible_config_file'] = C.CONFIG_FILE
446
452
 
@@ -467,7 +473,7 @@ class VariableManager:
467
473
  if task._role:
468
474
  variables['role_name'] = task._role.get_name(include_role_fqcn=False)
469
475
  variables['role_path'] = task._role._role_path
470
- variables['role_uuid'] = text_type(task._role._uuid)
476
+ variables['role_uuid'] = str(task._role._uuid)
471
477
  variables['ansible_collection_name'] = task._role._role_collection
472
478
  variables['ansible_role_name'] = task._role.get_name()
473
479
 
ansible/vars/plugins.py CHANGED
@@ -8,8 +8,6 @@ import os
8
8
  from functools import lru_cache
9
9
 
10
10
  from ansible import constants as C
11
- from ansible.errors import AnsibleError
12
- from ansible.inventory.group import InventoryObjectType
13
11
  from ansible.plugins.loader import vars_loader
14
12
  from ansible.utils.display import Display
15
13
  from ansible.utils.vars import combine_vars
@@ -26,34 +24,6 @@ def _prime_vars_loader():
26
24
  vars_loader.get(plugin_name)
27
25
 
28
26
 
29
- def get_plugin_vars(loader, plugin, path, entities):
30
-
31
- data = {}
32
- try:
33
- data = plugin.get_vars(loader, path, entities)
34
- except AttributeError:
35
- if hasattr(plugin, 'get_host_vars') or hasattr(plugin, 'get_group_vars'):
36
- display.deprecated(
37
- msg=f"The vars plugin {plugin.ansible_name} from {plugin._original_path} is relying "
38
- "on the deprecated entrypoints `get_host_vars` and `get_group_vars`.",
39
- version="2.20",
40
- help_text="This plugin should be updated to inherit from `BaseVarsPlugin` and define "
41
- "a `get_vars` method as the main entrypoint instead.",
42
- )
43
- try:
44
- for entity in entities:
45
- if entity.base_type is InventoryObjectType.HOST:
46
- data |= plugin.get_host_vars(entity.name)
47
- else:
48
- data |= plugin.get_group_vars(entity.name)
49
- except AttributeError:
50
- if hasattr(plugin, 'run'):
51
- raise AnsibleError("Cannot use v1 type vars plugin %s from %s" % (plugin._load_name, plugin._original_path))
52
- else:
53
- raise AnsibleError("Invalid vars plugin %s from %s" % (plugin._load_name, plugin._original_path))
54
- return data
55
-
56
-
57
27
  # optimized for stateless plugins; non-stateless plugin instances will fall out quickly
58
28
  @lru_cache(maxsize=10)
59
29
  def _plugin_should_run(plugin, stage):
@@ -99,7 +69,7 @@ def get_vars_from_path(loader, path, entities, stage):
99
69
  if not _plugin_should_run(plugin, stage):
100
70
  continue
101
71
 
102
- if (new_vars := get_plugin_vars(loader, plugin, path, entities)) != {}:
72
+ if (new_vars := plugin.get_vars(loader, path, entities)) != {}:
103
73
  data = combine_vars(data, new_vars)
104
74
 
105
75
  return data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ansible-core
3
- Version: 2.19.3rc1
3
+ Version: 2.20.0b2
4
4
  Summary: Radically simple IT automation
5
5
  Author: Ansible Project
6
6
  Project-URL: Homepage, https://ansible.com/
@@ -18,14 +18,14 @@ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (G
18
18
  Classifier: Natural Language :: English
19
19
  Classifier: Operating System :: POSIX
20
20
  Classifier: Programming Language :: Python :: 3
21
- Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
23
22
  Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
24
  Classifier: Programming Language :: Python :: 3 :: Only
25
25
  Classifier: Topic :: System :: Installation/Setup
26
26
  Classifier: Topic :: System :: Systems Administration
27
27
  Classifier: Topic :: Utilities
28
- Requires-Python: >=3.11
28
+ Requires-Python: >=3.12
29
29
  Description-Content-Type: text/markdown
30
30
  License-File: COPYING
31
31
  License-File: licenses/Apache-License.txt