ansible-core 2.16.2__py3-none-any.whl → 2.16.3__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/config.py CHANGED
@@ -314,7 +314,7 @@ class ConfigCLI(CLI):
314
314
 
315
315
  return data
316
316
 
317
- def _get_settings_ini(self, settings):
317
+ def _get_settings_ini(self, settings, seen):
318
318
 
319
319
  sections = {}
320
320
  for o in sorted(settings.keys()):
@@ -327,7 +327,7 @@ class ConfigCLI(CLI):
327
327
 
328
328
  if not opt.get('description'):
329
329
  # its a plugin
330
- new_sections = self._get_settings_ini(opt)
330
+ new_sections = self._get_settings_ini(opt, seen)
331
331
  for s in new_sections:
332
332
  if s in sections:
333
333
  sections[s].extend(new_sections[s])
@@ -343,37 +343,45 @@ class ConfigCLI(CLI):
343
343
 
344
344
  if 'ini' in opt and opt['ini']:
345
345
  entry = opt['ini'][-1]
346
+ if entry['section'] not in seen:
347
+ seen[entry['section']] = []
346
348
  if entry['section'] not in sections:
347
349
  sections[entry['section']] = []
348
350
 
349
- default = opt.get('default', '')
350
- if opt.get('type', '') == 'list' and not isinstance(default, string_types):
351
- # python lists are not valid ini ones
352
- default = ', '.join(default)
353
- elif default is None:
354
- default = ''
351
+ # avoid dupes
352
+ if entry['key'] not in seen[entry['section']]:
353
+ seen[entry['section']].append(entry['key'])
354
+
355
+ default = opt.get('default', '')
356
+ if opt.get('type', '') == 'list' and not isinstance(default, string_types):
357
+ # python lists are not valid ini ones
358
+ default = ', '.join(default)
359
+ elif default is None:
360
+ default = ''
361
+
362
+ if context.CLIARGS['commented']:
363
+ entry['key'] = ';%s' % entry['key']
355
364
 
356
- if context.CLIARGS['commented']:
357
- entry['key'] = ';%s' % entry['key']
365
+ key = desc + '\n%s=%s' % (entry['key'], default)
358
366
 
359
- key = desc + '\n%s=%s' % (entry['key'], default)
360
- sections[entry['section']].append(key)
367
+ sections[entry['section']].append(key)
361
368
 
362
369
  return sections
363
370
 
364
371
  def execute_init(self):
365
372
  """Create initial configuration"""
366
373
 
374
+ seen = {}
367
375
  data = []
368
376
  config_entries = self._list_entries_from_args()
369
377
  plugin_types = config_entries.pop('PLUGINS', None)
370
378
 
371
379
  if context.CLIARGS['format'] == 'ini':
372
- sections = self._get_settings_ini(config_entries)
380
+ sections = self._get_settings_ini(config_entries, seen)
373
381
 
374
382
  if plugin_types:
375
383
  for ptype in plugin_types:
376
- plugin_sections = self._get_settings_ini(plugin_types[ptype])
384
+ plugin_sections = self._get_settings_ini(plugin_types[ptype], seen)
377
385
  for s in plugin_sections:
378
386
  if s in sections:
379
387
  sections[s].extend(plugin_sections[s])
ansible/cli/galaxy.py CHANGED
@@ -1792,6 +1792,7 @@ class GalaxyCLI(CLI):
1792
1792
  github_user = to_text(context.CLIARGS['github_user'], errors='surrogate_or_strict')
1793
1793
  github_repo = to_text(context.CLIARGS['github_repo'], errors='surrogate_or_strict')
1794
1794
 
1795
+ rc = 0
1795
1796
  if context.CLIARGS['check_status']:
1796
1797
  task = self.api.get_import_task(github_user=github_user, github_repo=github_repo)
1797
1798
  else:
@@ -1809,7 +1810,7 @@ class GalaxyCLI(CLI):
1809
1810
  display.display('%s.%s' % (t['summary_fields']['role']['namespace'], t['summary_fields']['role']['name']), color=C.COLOR_CHANGED)
1810
1811
  display.display(u'\nTo properly namespace this role, remove each of the above and re-import %s/%s from scratch' % (github_user, github_repo),
1811
1812
  color=C.COLOR_CHANGED)
1812
- return 0
1813
+ return rc
1813
1814
  # found a single role as expected
1814
1815
  display.display("Successfully submitted import request %d" % task[0]['id'])
1815
1816
  if not context.CLIARGS['wait']:
@@ -1826,12 +1827,13 @@ class GalaxyCLI(CLI):
1826
1827
  if msg['id'] not in msg_list:
1827
1828
  display.display(msg['message_text'], color=colors[msg['message_type']])
1828
1829
  msg_list.append(msg['id'])
1829
- if task[0]['state'] in ['SUCCESS', 'FAILED']:
1830
+ if (state := task[0]['state']) in ['SUCCESS', 'FAILED']:
1831
+ rc = ['SUCCESS', 'FAILED'].index(state)
1830
1832
  finished = True
1831
1833
  else:
1832
1834
  time.sleep(10)
1833
1835
 
1834
- return 0
1836
+ return rc
1835
1837
 
1836
1838
  def execute_setup(self):
1837
1839
  """ Setup an integration from Github or Travis for Ansible Galaxy roles"""
ansible/config/base.yml CHANGED
@@ -934,9 +934,9 @@ DEFAULT_PRIVATE_ROLE_VARS:
934
934
  name: Private role variables
935
935
  default: False
936
936
  description:
937
- - Makes role variables inaccessible from other roles.
938
- - This was introduced as a way to reset role variables to default values if
939
- a role is used more than once in a playbook.
937
+ - By default, imported roles publish their variables to the play and other roles, this setting can avoid that.
938
+ - This was introduced as a way to reset role variables to default values if a role is used more than once in a playbook.
939
+ - Included roles only make their variables public at execution, unlike imported roles which happen at playbook compile time.
940
940
  env: [{name: ANSIBLE_PRIVATE_ROLE_VARS}]
941
941
  ini:
942
942
  - {key: private_role_vars, section: defaults}
@@ -408,11 +408,7 @@ class TaskExecutor:
408
408
  """This method is responsible for effectively pre-validating Task.delegate_to and will
409
409
  happen before Task.post_validate is executed
410
410
  """
411
- delegated_vars, delegated_host_name = self._variable_manager.get_delegated_vars_and_hostname(
412
- templar,
413
- self._task,
414
- variables
415
- )
411
+ delegated_vars, delegated_host_name = self._variable_manager.get_delegated_vars_and_hostname(templar, self._task, variables)
416
412
  # At the point this is executed it is safe to mutate self._task,
417
413
  # since `self._task` is either a copy referred to by `tmp_task` in `_run_loop`
418
414
  # or just a singular non-looped task
ansible/galaxy/api.py CHANGED
@@ -483,8 +483,6 @@ class GalaxyAPI:
483
483
  }
484
484
  if role_name:
485
485
  args['alternate_role_name'] = role_name
486
- elif github_repo.startswith('ansible-role'):
487
- args['alternate_role_name'] = github_repo[len('ansible-role') + 1:]
488
486
  data = self._call_galaxy(url, args=urlencode(args), method="POST")
489
487
  if data.get('results', None):
490
488
  return data['results']
ansible/galaxy/role.py CHANGED
@@ -42,6 +42,7 @@ from ansible.module_utils.compat.version import LooseVersion
42
42
  from ansible.module_utils.urls import open_url
43
43
  from ansible.playbook.role.requirement import RoleRequirement
44
44
  from ansible.utils.display import Display
45
+ from ansible.utils.path import is_subpath, unfrackpath
45
46
 
46
47
  display = Display()
47
48
 
@@ -393,43 +394,41 @@ class GalaxyRole(object):
393
394
  # we only extract files, and remove any relative path
394
395
  # bits that might be in the file for security purposes
395
396
  # and drop any containing directory, as mentioned above
396
- if member.isreg() or member.issym():
397
- for attr in ('name', 'linkname'):
398
- attr_value = getattr(member, attr, None)
399
- if not attr_value:
400
- continue
401
- n_attr_value = to_native(attr_value)
402
- n_archive_parent_dir = to_native(archive_parent_dir)
403
- n_parts = n_attr_value.replace(n_archive_parent_dir, "", 1).split(os.sep)
404
- n_final_parts = []
405
- for n_part in n_parts:
406
- # TODO if the condition triggers it produces a broken installation.
407
- # It will create the parent directory as an empty file and will
408
- # explode if the directory contains valid files.
409
- # Leaving this as is since the whole module needs a rewrite.
410
- #
411
- # Check if we have any files with illegal names,
412
- # and display a warning if so. This could help users
413
- # to debug a broken installation.
414
- if not n_part:
415
- continue
416
- if n_part == '..':
417
- display.warning(f"Illegal filename '{n_part}': '..' is not allowed")
418
- continue
419
- if n_part.startswith('~'):
420
- display.warning(f"Illegal filename '{n_part}': names cannot start with '~'")
421
- continue
422
- if '$' in n_part:
423
- display.warning(f"Illegal filename '{n_part}': names cannot contain '$'")
424
- continue
425
- n_final_parts.append(n_part)
426
- setattr(member, attr, os.path.join(*n_final_parts))
427
-
428
- if _check_working_data_filter():
429
- # deprecated: description='extract fallback without filter' python_version='3.11'
430
- role_tar_file.extract(member, to_native(self.path), filter='data') # type: ignore[call-arg]
397
+ if not (member.isreg() or member.issym()):
398
+ continue
399
+
400
+ for attr in ('name', 'linkname'):
401
+ if not (attr_value := getattr(member, attr, None)):
402
+ continue
403
+
404
+ if attr_value.startswith(os.sep) and not is_subpath(attr_value, archive_parent_dir):
405
+ err = f"Invalid {attr} for tarfile member: path {attr_value} is not a subpath of the role {archive_parent_dir}"
406
+ raise AnsibleError(err)
407
+
408
+ if attr == 'linkname':
409
+ # Symlinks are relative to the link
410
+ relative_to_archive_dir = os.path.dirname(getattr(member, 'name', ''))
411
+ archive_dir_path = os.path.join(archive_parent_dir, relative_to_archive_dir, attr_value)
431
412
  else:
432
- role_tar_file.extract(member, to_native(self.path))
413
+ # Normalize paths that start with the archive dir
414
+ attr_value = attr_value.replace(archive_parent_dir, "", 1)
415
+ attr_value = os.path.join(*attr_value.split(os.sep)) # remove leading os.sep
416
+ archive_dir_path = os.path.join(archive_parent_dir, attr_value)
417
+
418
+ resolved_archive = unfrackpath(archive_parent_dir)
419
+ resolved_path = unfrackpath(archive_dir_path)
420
+ if not is_subpath(resolved_path, resolved_archive):
421
+ err = f"Invalid {attr} for tarfile member: path {resolved_path} is not a subpath of the role {resolved_archive}"
422
+ raise AnsibleError(err)
423
+
424
+ relative_path = os.path.join(*resolved_path.replace(resolved_archive, "", 1).split(os.sep)) or '.'
425
+ setattr(member, attr, relative_path)
426
+
427
+ if _check_working_data_filter():
428
+ # deprecated: description='extract fallback without filter' python_version='3.11'
429
+ role_tar_file.extract(member, to_native(self.path), filter='data') # type: ignore[call-arg]
430
+ else:
431
+ role_tar_file.extract(member, to_native(self.path))
433
432
 
434
433
  # write out the install info file for later use
435
434
  self._write_galaxy_install_info()
@@ -19,6 +19,6 @@
19
19
  from __future__ import (absolute_import, division, print_function)
20
20
  __metaclass__ = type
21
21
 
22
- __version__ = '2.16.2'
22
+ __version__ = '2.16.3'
23
23
  __author__ = 'Ansible, Inc.'
24
24
  __codename__ = "All My Love"
@@ -41,7 +41,7 @@ seealso:
41
41
  - module: ansible.builtin.import_tasks
42
42
  - module: ansible.builtin.include_role
43
43
  - module: ansible.builtin.include_tasks
44
- - ref: playbooks_reuse_includes
44
+ - ref: playbooks_reuse
45
45
  description: More information related to including and importing playbooks, roles and tasks.
46
46
  '''
47
47
 
@@ -78,7 +78,7 @@ seealso:
78
78
  - module: ansible.builtin.import_tasks
79
79
  - module: ansible.builtin.include_role
80
80
  - module: ansible.builtin.include_tasks
81
- - ref: playbooks_reuse_includes
81
+ - ref: playbooks_reuse
82
82
  description: More information related to including and importing playbooks, roles and tasks.
83
83
  '''
84
84
 
@@ -45,7 +45,7 @@ seealso:
45
45
  - module: ansible.builtin.import_role
46
46
  - module: ansible.builtin.include_role
47
47
  - module: ansible.builtin.include_tasks
48
- - ref: playbooks_reuse_includes
48
+ - ref: playbooks_reuse
49
49
  description: More information related to including and importing playbooks, roles and tasks.
50
50
  '''
51
51
 
@@ -91,7 +91,7 @@ seealso:
91
91
  - module: ansible.builtin.import_role
92
92
  - module: ansible.builtin.import_tasks
93
93
  - module: ansible.builtin.include_tasks
94
- - ref: playbooks_reuse_includes
94
+ - ref: playbooks_reuse
95
95
  description: More information related to including and importing playbooks, roles and tasks.
96
96
  '''
97
97
 
@@ -49,7 +49,7 @@ seealso:
49
49
  - module: ansible.builtin.import_role
50
50
  - module: ansible.builtin.import_tasks
51
51
  - module: ansible.builtin.include_role
52
- - ref: playbooks_reuse_includes
52
+ - ref: playbooks_reuse
53
53
  description: More information related to including and importing playbooks, roles and tasks.
54
54
  '''
55
55
 
ansible/playbook/base.py CHANGED
@@ -731,7 +731,7 @@ class Base(FieldAttributeBase):
731
731
 
732
732
  # flags and misc. settings
733
733
  environment = FieldAttribute(isa='list', extend=True, prepend=True)
734
- no_log = FieldAttribute(isa='bool')
734
+ no_log = FieldAttribute(isa='bool', default=C.DEFAULT_NO_LOG)
735
735
  run_once = FieldAttribute(isa='bool')
736
736
  ignore_errors = FieldAttribute(isa='bool')
737
737
  ignore_unreachable = FieldAttribute(isa='bool')
@@ -318,10 +318,6 @@ class PlayContext(Base):
318
318
  display.warning('The "%s" connection plugin has an improperly configured remote target value, '
319
319
  'forcing "inventory_hostname" templated value instead of the string' % new_info.connection)
320
320
 
321
- # set no_log to default if it was not previously set
322
- if new_info.no_log is None:
323
- new_info.no_log = C.DEFAULT_NO_LOG
324
-
325
321
  if task.check_mode is not None:
326
322
  new_info.check_mode = task.check_mode
327
323
 
@@ -100,19 +100,30 @@ def hash_params(params):
100
100
 
101
101
  class Role(Base, Conditional, Taggable, CollectionSearch, Delegatable):
102
102
 
103
- def __init__(self, play=None, from_files=None, from_include=False, validate=True, public=True):
103
+ def __init__(self, play=None, from_files=None, from_include=False, validate=True, public=None, static=True):
104
104
  self._role_name = None
105
105
  self._role_path = None
106
106
  self._role_collection = None
107
107
  self._role_params = dict()
108
108
  self._loader = None
109
- self.public = public
110
- self.static = True
109
+ self.static = static
110
+
111
+ # includes (static=false) default to private, while imports (static=true) default to public
112
+ # but both can be overriden by global config if set
113
+ if public is None:
114
+ global_private, origin = C.config.get_config_value_and_origin('DEFAULT_PRIVATE_ROLE_VARS')
115
+ if origin == 'default':
116
+ self.public = static
117
+ else:
118
+ self.public = not global_private
119
+ else:
120
+ self.public = public
111
121
 
112
122
  self._metadata = RoleMetadata()
113
123
  self._play = play
114
124
  self._parents = []
115
125
  self._dependencies = []
126
+ self._all_dependencies = None
116
127
  self._task_blocks = []
117
128
  self._handler_blocks = []
118
129
  self._compiled_handler_blocks = None
@@ -169,7 +180,7 @@ class Role(Base, Conditional, Taggable, CollectionSearch, Delegatable):
169
180
  return self._get_hash_dict() == other._get_hash_dict()
170
181
 
171
182
  @staticmethod
172
- def load(role_include, play, parent_role=None, from_files=None, from_include=False, validate=True, public=True):
183
+ def load(role_include, play, parent_role=None, from_files=None, from_include=False, validate=True, public=None, static=True):
173
184
  if from_files is None:
174
185
  from_files = {}
175
186
  try:
@@ -177,7 +188,7 @@ class Role(Base, Conditional, Taggable, CollectionSearch, Delegatable):
177
188
  # for the in-flight in role cache as a sentinel that we're already trying to load
178
189
  # that role?)
179
190
  # see https://github.com/ansible/ansible/issues/61527
180
- r = Role(play=play, from_files=from_files, from_include=from_include, validate=validate, public=public)
191
+ r = Role(play=play, from_files=from_files, from_include=from_include, validate=validate, public=public, static=static)
181
192
  r._load_role_data(role_include, parent_role=parent_role)
182
193
 
183
194
  role_path = r.get_role_path()
@@ -428,7 +439,7 @@ class Role(Base, Conditional, Taggable, CollectionSearch, Delegatable):
428
439
 
429
440
  deps = []
430
441
  for role_include in self._metadata.dependencies:
431
- r = Role.load(role_include, play=self._play, parent_role=self)
442
+ r = Role.load(role_include, play=self._play, parent_role=self, static=self.static)
432
443
  deps.append(r)
433
444
 
434
445
  return deps
@@ -528,15 +539,15 @@ class Role(Base, Conditional, Taggable, CollectionSearch, Delegatable):
528
539
  Returns a list of all deps, built recursively from all child dependencies,
529
540
  in the proper order in which they should be executed or evaluated.
530
541
  '''
542
+ if self._all_dependencies is None:
531
543
 
532
- child_deps = []
533
-
534
- for dep in self.get_direct_dependencies():
535
- for child_dep in dep.get_all_dependencies():
536
- child_deps.append(child_dep)
537
- child_deps.append(dep)
544
+ self._all_dependencies = []
545
+ for dep in self.get_direct_dependencies():
546
+ for child_dep in dep.get_all_dependencies():
547
+ self._all_dependencies.append(child_dep)
548
+ self._all_dependencies.append(dep)
538
549
 
539
- return child_deps
550
+ return self._all_dependencies
540
551
 
541
552
  def get_task_blocks(self):
542
553
  return self._task_blocks[:]
@@ -88,11 +88,11 @@ class IncludeRole(TaskInclude):
88
88
 
89
89
  # build role
90
90
  actual_role = Role.load(ri, myplay, parent_role=self._parent_role, from_files=from_files,
91
- from_include=True, validate=self.rolespec_validate, public=self.public)
91
+ from_include=True, validate=self.rolespec_validate, public=self.public, static=self.statically_loaded)
92
92
  actual_role._metadata.allow_duplicates = self.allow_duplicates
93
93
 
94
- if self.statically_loaded or self.public:
95
- myplay.roles.append(actual_role)
94
+ # add role to play
95
+ myplay.roles.append(actual_role)
96
96
 
97
97
  # save this for later use
98
98
  self._role_path = actual_role._role_path
@@ -124,10 +124,6 @@ class IncludeRole(TaskInclude):
124
124
 
125
125
  ir = IncludeRole(block, role, task_include=task_include).load_data(data, variable_manager=variable_manager, loader=loader)
126
126
 
127
- # dyanmic role!
128
- if ir.action in C._ACTION_INCLUDE_ROLE:
129
- ir.static = False
130
-
131
127
  # Validate options
132
128
  my_arg_names = frozenset(ir.args.keys())
133
129
 
@@ -117,7 +117,7 @@ class LookupBase(AnsiblePlugin):
117
117
 
118
118
  result = None
119
119
  try:
120
- result = self._loader.path_dwim_relative_stack(paths, subdir, needle)
120
+ result = self._loader.path_dwim_relative_stack(paths, subdir, needle, is_role=bool('role_path' in myvars))
121
121
  except AnsibleFileNotFound:
122
122
  if not ignore_missing:
123
123
  self._display.warning("Unable to find '%s' in expected paths (use -vvvvv to see paths)" % needle)
@@ -55,6 +55,7 @@ from ansible.template import Templar
55
55
  from ansible.utils.display import Display
56
56
  from ansible.utils.fqcn import add_internal_fqcns
57
57
  from ansible.utils.unsafe_proxy import wrap_var
58
+ from ansible.utils.sentinel import Sentinel
58
59
  from ansible.utils.vars import combine_vars, isidentifier
59
60
  from ansible.vars.clean import strip_internal_keys, module_response_deepcopy
60
61
 
@@ -658,6 +659,7 @@ class StrategyBase:
658
659
  # otherwise depending on the setting either error or warn
659
660
  host_state = iterator.get_state_for_host(original_host.name)
660
661
  for notification in result_item['_ansible_notify']:
662
+ handler = Sentinel
661
663
  for handler in self.search_handlers_by_notification(notification, iterator):
662
664
  if host_state.run_state == IteratingStates.HANDLERS:
663
665
  # we're currently iterating handlers, so we need to expand this now
@@ -668,8 +670,8 @@ class StrategyBase:
668
670
  else:
669
671
  iterator.add_notification(original_host.name, notification)
670
672
  display.vv(f"Notification for handler {notification} has been saved.")
671
- break
672
- else:
673
+ break
674
+ if handler is Sentinel:
673
675
  msg = (
674
676
  f"The requested handler '{notification}' was not found in either the main handlers"
675
677
  " list nor in the listening handlers list"
ansible/release.py CHANGED
@@ -19,6 +19,6 @@
19
19
  from __future__ import (absolute_import, division, print_function)
20
20
  __metaclass__ = type
21
21
 
22
- __version__ = '2.16.2'
22
+ __version__ = '2.16.3'
23
23
  __author__ = 'Ansible, Inc.'
24
24
  __codename__ = "All My Love"
@@ -53,6 +53,10 @@
53
53
  from __future__ import (absolute_import, division, print_function)
54
54
  __metaclass__ = type
55
55
 
56
+ import sys
57
+ import types
58
+ import warnings
59
+ from sys import intern as _sys_intern
56
60
  from collections.abc import Mapping, Set
57
61
 
58
62
  from ansible.module_utils.common.text.converters import to_bytes, to_text
@@ -369,3 +373,20 @@ def to_unsafe_text(*args, **kwargs):
369
373
 
370
374
  def _is_unsafe(obj):
371
375
  return getattr(obj, '__UNSAFE__', False) is True
376
+
377
+
378
+ def _intern(string):
379
+ """This is a monkey patch for ``sys.intern`` that will strip
380
+ the unsafe wrapper prior to interning the string.
381
+
382
+ This will not exist in future versions.
383
+ """
384
+ if isinstance(string, AnsibleUnsafeText):
385
+ string = string._strip_unsafe()
386
+ return _sys_intern(string)
387
+
388
+
389
+ if isinstance(sys.intern, types.BuiltinFunctionType):
390
+ sys.intern = _intern
391
+ else:
392
+ warnings.warn("skipped sys.intern patch; appears to have already been patched", RuntimeWarning)
ansible/vars/manager.py CHANGED
@@ -199,14 +199,10 @@ class VariableManager:
199
199
  basedirs = [self._loader.get_basedir()]
200
200
 
201
201
  if play:
202
- if not C.DEFAULT_PRIVATE_ROLE_VARS:
203
- for role in play.get_roles():
204
- # role is public and
205
- # either static or dynamic and completed
206
- # role is not set
207
- # use config option as default
208
- if role.static or role.public and role._completed.get(host.name, False):
209
- all_vars = _combine_and_track(all_vars, role.get_default_vars(), "role '%s' defaults" % role.name)
202
+ # get role defaults (lowest precedence)
203
+ for role in play.roles:
204
+ if role.public:
205
+ all_vars = _combine_and_track(all_vars, role.get_default_vars(), "role '%s' defaults" % role.name)
210
206
  if task:
211
207
  # set basedirs
212
208
  if C.PLAYBOOK_VARS_ROOT == 'all': # should be default
@@ -222,8 +218,7 @@ class VariableManager:
222
218
  # (v1) made sure each task had a copy of its roles default vars
223
219
  # TODO: investigate why we need play or include_role check?
224
220
  if task._role is not None and (play or task.action in C._ACTION_INCLUDE_ROLE):
225
- all_vars = _combine_and_track(all_vars, task._role.get_default_vars(dep_chain=task.get_dep_chain()),
226
- "role '%s' defaults" % task._role.name)
221
+ all_vars = _combine_and_track(all_vars, task._role.get_default_vars(dep_chain=task.get_dep_chain()), "role '%s' defaults" % task._role.name)
227
222
 
228
223
  if host:
229
224
  # THE 'all' group and the rest of groups for a host, used below
@@ -389,16 +384,10 @@ class VariableManager:
389
384
  raise AnsibleParserError("Error while reading vars files - please supply a list of file names. "
390
385
  "Got '%s' of type %s" % (vars_files, type(vars_files)))
391
386
 
392
- # We now merge in all exported vars from all roles in the play,
393
- # unless the user has disabled this
394
- # role is public and
395
- # either static or dynamic and completed
396
- # role is not set
397
- # use config option as default
398
- if not C.DEFAULT_PRIVATE_ROLE_VARS:
399
- for role in play.get_roles():
400
- if role.static or role.public and role._completed.get(host.name, False):
401
- all_vars = _combine_and_track(all_vars, role.get_vars(include_params=False, only_exports=True), "role '%s' exported vars" % role.name)
387
+ # We now merge in all exported vars from all roles in the play (very high precedence)
388
+ for role in play.roles:
389
+ if role.public:
390
+ all_vars = _combine_and_track(all_vars, role.get_vars(include_params=False, only_exports=True), "role '%s' exported vars" % role.name)
402
391
 
403
392
  # next, we merge in the vars from the role, which will specifically
404
393
  # follow the role dependency chain, and then we merge in the tasks
@@ -466,9 +455,8 @@ class VariableManager:
466
455
  variables['ansible_config_file'] = C.CONFIG_FILE
467
456
 
468
457
  if play:
469
- # This is a list of all role names of all dependencies for all roles for this play
458
+ # using role_cache as play.roles only has 'public' roles for vars exporting
470
459
  dependency_role_names = list({d.get_name() for r in play.roles for d in r.get_all_dependencies()})
471
- # This is a list of all role names of all roles for this play
472
460
  play_role_names = [r.get_name() for r in play.roles]
473
461
 
474
462
  # ansible_role_names includes all role names, dependent or directly referenced by the play
@@ -480,7 +468,7 @@ class VariableManager:
480
468
  # dependencies that are also explicitly named as roles are included in this list
481
469
  variables['ansible_dependent_role_names'] = dependency_role_names
482
470
 
483
- # DEPRECATED: role_names should be deprecated in favor of ansible_role_names or ansible_play_role_names
471
+ # TODO: data tagging!!! DEPRECATED: role_names should be deprecated in favor of ansible_ prefixed ones
484
472
  variables['role_names'] = variables['ansible_play_role_names']
485
473
 
486
474
  variables['ansible_play_name'] = play.get_name()
@@ -536,27 +524,35 @@ class VariableManager:
536
524
  delegated_host_name = None
537
525
  if task.delegate_to:
538
526
  delegated_host_name = templar.template(task.delegate_to, fail_on_undefined=False)
539
- delegated_host = self._inventory.get_host(delegated_host_name)
540
- if delegated_host is None:
541
- for h in self._inventory.get_hosts(ignore_limits=True, ignore_restrictions=True):
542
- # check if the address matches, or if both the delegated_to host
543
- # and the current host are in the list of localhost aliases
544
- if h.address == delegated_host_name:
545
- delegated_host = h
546
- break
547
- else:
548
- delegated_host = Host(name=delegated_host_name)
549
-
550
- delegated_vars['ansible_delegated_vars'] = {
551
- delegated_host_name: self.get_vars(
552
- play=task.get_play(),
553
- host=delegated_host,
554
- task=task,
555
- include_delegate_to=False,
556
- include_hostvars=True,
557
- )
558
- }
559
- delegated_vars['ansible_delegated_vars'][delegated_host_name]['inventory_hostname'] = variables.get('inventory_hostname')
527
+
528
+ # no need to do work if omitted
529
+ if delegated_host_name != self._omit_token:
530
+
531
+ if not delegated_host_name:
532
+ raise AnsibleError('Empty hostname produced from delegate_to: "%s"' % task.delegate_to)
533
+
534
+ delegated_host = self._inventory.get_host(delegated_host_name)
535
+ if delegated_host is None:
536
+ for h in self._inventory.get_hosts(ignore_limits=True, ignore_restrictions=True):
537
+ # check if the address matches, or if both the delegated_to host
538
+ # and the current host are in the list of localhost aliases
539
+ if h.address == delegated_host_name:
540
+ delegated_host = h
541
+ break
542
+ else:
543
+ delegated_host = Host(name=delegated_host_name)
544
+
545
+ delegated_vars['ansible_delegated_vars'] = {
546
+ delegated_host_name: self.get_vars(
547
+ play=task.get_play(),
548
+ host=delegated_host,
549
+ task=task,
550
+ include_delegate_to=False,
551
+ include_hostvars=True,
552
+ )
553
+ }
554
+ delegated_vars['ansible_delegated_vars'][delegated_host_name]['inventory_hostname'] = variables.get('inventory_hostname')
555
+
560
556
  return delegated_vars, delegated_host_name
561
557
 
562
558
  def _get_delegated_vars(self, play, task, existing_variables):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ansible-core
3
- Version: 2.16.2
3
+ Version: 2.16.3
4
4
  Summary: Radically simple IT automation
5
5
  Home-page: https://ansible.com/
6
6
  Author: Ansible, Inc.
@@ -3,14 +3,14 @@ ansible/__main__.py,sha256=IvyRvY64pT0on94qCLibxgDJ0-7_2CRoaZ5kfGOl54Q,1395
3
3
  ansible/constants.py,sha256=guPiQ4Iqm5M9zPArRR9rT5CTzDbEhIBEgqCvVLqYecs,8154
4
4
  ansible/context.py,sha256=OzSlaA_GgGRyyf5I209sy19_eGOX6HXn441W9w_FcvU,2018
5
5
  ansible/keyword_desc.yml,sha256=vE9joFgSeHR4Djl7Bd-HHVCrGByRCrTUmWYZ8LKPZKk,7412
6
- ansible/release.py,sha256=2zV9wEaD9mUw3xb1d9tCNHaxWQtyEeQiS-YXzjJOEPY,915
6
+ ansible/release.py,sha256=lNelneQ4VmVhXWvekxVaM94tr9wnz_rSJRHX-gnPpRQ,915
7
7
  ansible/_vendor/__init__.py,sha256=wJRKH7kI9OzYVY9hgSchOsTNTmTnugpPLGYj9Y5akX0,2086
8
8
  ansible/cli/__init__.py,sha256=6jaX6SS-UBM7pjiUlDsC0y07k3klUjxTR5ZEnDiCmP8,28706
9
9
  ansible/cli/adhoc.py,sha256=suzo4QnsaMjJBk5JlAUd-cpQLs8Ckj6A55CiG9Y8Gns,8247
10
- ansible/cli/config.py,sha256=oN_pPQhWoBpNAfNLodncAVUd6-U8N4-ZTk83t5RoHFU,22165
10
+ ansible/cli/config.py,sha256=rsf3Y8MB7rlehSG2jOojr1iqaMBhJXOoEqF-XCwu8NE,22503
11
11
  ansible/cli/console.py,sha256=Y3KVFNSEwHLeTJ2aBXv-sDAlg8PY9A-LnqyvrJuLPpI,22040
12
12
  ansible/cli/doc.py,sha256=t4KfhTv96R0bVLGm7FZE6cyiTSYxNfGqjh9aKLP4XQY,64080
13
- ansible/cli/galaxy.py,sha256=4V5G3akJZE0U1lmVFW_5QaaB5ppkKmpcuKWQ7LJfeBI,95027
13
+ ansible/cli/galaxy.py,sha256=Ot45ARa20cMsVTb4uo_Zz8ClZpGl-mvsjBPAJxhwcA4,95115
14
14
  ansible/cli/inventory.py,sha256=uCXZ24iLIik2Z_QJLYaA45jmwVGqKLOp00YC4_S9PQ0,17735
15
15
  ansible/cli/playbook.py,sha256=1CmwCE3K1eH_UFebIp0M59r4LPDJ5KMzCLxxM41lst0,10918
16
16
  ansible/cli/pull.py,sha256=fqGi-kBWM_B7jdKgA3XcO67znUK1rvhT9t9JjUialjQ,17336
@@ -26,7 +26,7 @@ ansible/compat/importlib_resources.py,sha256=tDxWjvtfaEU6si-OTjc41PYfnmTIZ2Lc8oh
26
26
  ansible/compat/selectors/__init__.py,sha256=dD8KQZBa0NUi-hxhGx0eppTE3wHdMIchORAp2YV8rSo,1251
27
27
  ansible/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  ansible/config/ansible_builtin_runtime.yml,sha256=TSP32-cHB3kKhRJ_3whBwtCr2Dtry2i-7HY4gERUWeA,376031
29
- ansible/config/base.yml,sha256=hGCv8HsPLNLBHFPgHp2L7qtu5Ut7BbMOhCVfsU3-NUo,84819
29
+ ansible/config/base.yml,sha256=1WH7epi5BW-lrSU_K-BRvwnLh-OgQwadwucjnO75Oxw,84999
30
30
  ansible/config/manager.py,sha256=v5SU-iBeL9zN5hLR1wlEwROr_3AKpPebcBlryXttEJY,25379
31
31
  ansible/errors/__init__.py,sha256=f8N3525uEu2b9Kw98ze_ngLITalq5MbrJn2b1oR_NeQ,14823
32
32
  ansible/errors/yaml_strings.py,sha256=p8WIWbjKSIvr_MWx3jOyGyUZMXoKttTPzuWVbHMwdmY,3942
@@ -37,7 +37,7 @@ ansible/executor/module_common.py,sha256=HIGcoxKs7fCJf0UTidYEvmvSEXVkTYqEncO17Pu
37
37
  ansible/executor/play_iterator.py,sha256=6Sf7im1-6rZjzF6ewQJNONkIVfv8VkIZy4jPvVfK9jc,30507
38
38
  ansible/executor/playbook_executor.py,sha256=RYYgI82wviDOE1o8zrIB5WWsSEg13KdxEVMXLGPKK7A,15098
39
39
  ansible/executor/stats.py,sha256=757UK8wDzLCXq4ltI9PqpoMNAdtRsd9D9-GS-5Al_Hs,3264
40
- ansible/executor/task_executor.py,sha256=0iqg8G-VHmgmcGwk6tzPChFI2cRuYVzRgyV0sXdpjN8,60353
40
+ ansible/executor/task_executor.py,sha256=ok7ra8k24MCnQ9Q6ej7vgDHUDY2XyfQFglDqCJua8uE,60307
41
41
  ansible/executor/task_queue_manager.py,sha256=DUWwK8RZuUJPY66to8kplFBFcUPAJwLB3kW8vfl1IOM,18724
42
42
  ansible/executor/task_result.py,sha256=DvshMci5i9-qCXs0m_vScSa6BJMbPwwNQBV7L2DTCzE,5748
43
43
  ansible/executor/discovery/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -56,8 +56,8 @@ ansible/executor/powershell/module_wrapper.ps1,sha256=KFIQHPNnzA88Y4lkzn3B3LH3oz
56
56
  ansible/executor/process/__init__.py,sha256=1lMXN1i2fFqslda4BmeI5tpYMFP95D5Wpr1AjDJi-SQ,833
57
57
  ansible/executor/process/worker.py,sha256=rTLNZeKhW91zlx9izZlPkAn6afsSj6rdKm1xIj78LGI,10125
58
58
  ansible/galaxy/__init__.py,sha256=E80kenF78N0K9cKZybnGMMjgG_kFlITuhxFf8gyBfAU,2550
59
- ansible/galaxy/api.py,sha256=toG5c23r2kLy2MuR41BpMF7f0ObEnTOgwOIJYEraSus,39922
60
- ansible/galaxy/role.py,sha256=xhY4fXkgQ9cb4REE2eaRPT51GZ9DO-Mw_rMAdkIw6qY,21658
59
+ ansible/galaxy/api.py,sha256=mGsxCKWvUF5wheObXtdMR-xHNVrs7J3AZ9_97XZuL1w,39789
60
+ ansible/galaxy/role.py,sha256=lLeqwV82-Zin-JoUqpqZZB8WWxLJfXsHZAWiiigVsFU,21414
61
61
  ansible/galaxy/token.py,sha256=X21edFoqAq4DyA6Xm8MaVu-PNYhVjw-yWkFRxRdWZOw,6184
62
62
  ansible/galaxy/user_agent.py,sha256=x7cJzzpnTngHcwqSUd2hg0i28Dv0tbAyBdke5CSiNhM,813
63
63
  ansible/galaxy/collection/__init__.py,sha256=4tljAb0RxxglfHDbQpWZfHkYc__KsogyETCDTCW3BdI,78192
@@ -140,7 +140,7 @@ ansible/inventory/host.py,sha256=7RZjLiB7M74bejFRflOTa8XPHxMC334qhSo_5VmZrKI,512
140
140
  ansible/inventory/manager.py,sha256=ZwmEF3E2BKOJi9SMVQNz83A2f3raQn6Nyo-rfSNMn2k,29507
141
141
  ansible/module_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
142
142
  ansible/module_utils/_text.py,sha256=F_YfeaxhwmTI16HICAzQS9ZmlKgBDdQ4mqR-Kh--okg,597
143
- ansible/module_utils/ansible_release.py,sha256=2zV9wEaD9mUw3xb1d9tCNHaxWQtyEeQiS-YXzjJOEPY,915
143
+ ansible/module_utils/ansible_release.py,sha256=lNelneQ4VmVhXWvekxVaM94tr9wnz_rSJRHX-gnPpRQ,915
144
144
  ansible/module_utils/api.py,sha256=BTo7stVOANbtd-ngZslaqx70r9t5gfvo44cKyu5SFjU,5837
145
145
  ansible/module_utils/basic.py,sha256=7xL3IsZK68gyyYm2x8yB2s1V7Sx77-vK3rkXmp2mlCM,87489
146
146
  ansible/module_utils/connection.py,sha256=9Us-d-y1bhC3zNnziQxvYNT4umIaN0OYv8zPaUSdEf0,8447
@@ -306,11 +306,11 @@ ansible/modules/git.py,sha256=2tXx3YC33z0gkBqad9Dnf_tVt8UYd_uNFt5QB4N6Ln4,56595
306
306
  ansible/modules/group.py,sha256=IvjR7Q6VBKaJIMzMkPT-OyfuDyM-CpiRyuYzgebZZzo,20983
307
307
  ansible/modules/group_by.py,sha256=RMC1jSnV1htlU_QLTZKYXWtUOdtDWXcHRFHBAqVsRMY,2467
308
308
  ansible/modules/hostname.py,sha256=B5dUMRC2j8wtulX9M5SeU2G3ge1Z_7RY-esnkhEsGYw,29609
309
- ansible/modules/import_playbook.py,sha256=xDtdGpAdCah-0mfnDDoFxMMmR2oTx01P6ua6QFztkBQ,2116
310
- ansible/modules/import_role.py,sha256=JT9Vp1Tm5KgwyFXYF_g7Eae2LyNkMisQuVJ_wHBfP0o,3354
311
- ansible/modules/import_tasks.py,sha256=6HGZ_g9VWSTU01qhLC7F3Y0hZIIOJ5ZUBDOoXf_jv2M,2197
312
- ansible/modules/include_role.py,sha256=JgnHYHHJNDtUSVgVWQ7cxs-VPbhSK8Lzys_sRxbDZY8,4283
313
- ansible/modules/include_tasks.py,sha256=wq0pjMCRgXe8RlO0SJuhaMXal0Hz6qTmMUXzSlcOLfY,2719
309
+ ansible/modules/import_playbook.py,sha256=2Ekq8SsYeIOyrwIpt6822xv2ZHRBqe4QNToLOACRDYU,2107
310
+ ansible/modules/import_role.py,sha256=ybsJfXKKxW-Gncs_gIAE32JP2FfZxrbavqp6-lrGg-k,3345
311
+ ansible/modules/import_tasks.py,sha256=K28dgE-ENrPYCkfhwHX92nMFrGZ92RPv6zBKv4u16l8,2188
312
+ ansible/modules/include_role.py,sha256=dK3EGSk0UnqXOFT_RWllgiouyON5cYdzfrrtkOTcuRE,4274
313
+ ansible/modules/include_tasks.py,sha256=z6L4YPmLlsqUA3WZ0lCe9ip1guADE1c3hlDXCC-5FNw,2710
314
314
  ansible/modules/include_vars.py,sha256=aKOVX3LtRUJ6LWhlRe-OJ_-yggk-FsMGeYG2ADI1Unw,6755
315
315
  ansible/modules/iptables.py,sha256=cyLzQGRTiryXb5LmcjuR2cgQ3Yigwlf0-nw03D2HLoY,34066
316
316
  ansible/modules/known_hosts.py,sha256=1qY_H9qvB1smta5jKvpxE9g31yebSydSAMVWB-T1NZo,13852
@@ -367,7 +367,7 @@ ansible/parsing/yaml/loader.py,sha256=mYJ5c8WgwKlc5a8dv8mcPwMMifOY0cJrKiAqaRIWPu
367
367
  ansible/parsing/yaml/objects.py,sha256=eLJduoWbiay8-1gCFn6EDPuAQ1bT1cI-eFWgTaRIXEI,10540
368
368
  ansible/playbook/__init__.py,sha256=slsMa2gKuYb_Mj-DRp1l75SF-lTstR_JSFwRhABsZqQ,4824
369
369
  ansible/playbook/attribute.py,sha256=ntK8od_S4MZs5JXWMzkFmr_qWL5eY2zRDVbs4cUk_V4,7733
370
- ansible/playbook/base.py,sha256=bqP406rtsfBYoBkYumuOGukC22aqI_FGo7aMliF_CIo,33916
370
+ ansible/playbook/base.py,sha256=xDUDz63ZZXSoxllpffmCOG6JM7zQ_RY6mhRsTyF_OfM,33942
371
371
  ansible/playbook/block.py,sha256=YMX7nRIlxHAHYWARayBYzCZRP0fy3f1dhVsPRsYiJ8M,16599
372
372
  ansible/playbook/collectionsearch.py,sha256=dfTz79Af_3iurr0YZDcNWsAffaRlbrffXz_KZ3xZlpQ,2654
373
373
  ansible/playbook/conditional.py,sha256=er3ya2pKSBWKRftJTcQ-F6wya0kdzzBmXO5XL_2kJjk,4966
@@ -379,13 +379,13 @@ ansible/playbook/included_file.py,sha256=S5XgbPgl3lC3AWv8Gpoan4TdRVeoIbQeDXRVA2q
379
379
  ansible/playbook/loop_control.py,sha256=nd6BDDd1Sqfk-HYYg8VjF8B2v1ob6yExNKUlMZFmeiU,1773
380
380
  ansible/playbook/notifiable.py,sha256=V6cvqy4H1Ti_kmTEw1YOgZOAulI9WgAAnfHeLOGyB5I,264
381
381
  ansible/playbook/play.py,sha256=5kz2BvfCbnopMnATTbqjFP4NDMhbYXZ8loxc6iuq6Aw,16343
382
- ansible/playbook/play_context.py,sha256=iJEssstLelnwaki3nY9AiCGrd7D6dFfpWVeGQbQOGPE,14591
382
+ ansible/playbook/play_context.py,sha256=vocmas7gJXDlJB8Hm5CLdCSEbE6eCRhor4sskA1lD2s,14446
383
383
  ansible/playbook/playbook_include.py,sha256=M0CZ7nGCvCNQuZQXwNHSXi9IhKXJLV74Bd9YvcarrZ4,7577
384
- ansible/playbook/role_include.py,sha256=zdEtObpYpm303eS6iGabgSGE8heI3QbsNXIbP61vGDI,8067
384
+ ansible/playbook/role_include.py,sha256=9IsYSolvScuzBREoDh2lg-S6mN7_WAF-usQMZvVX2dQ,7968
385
385
  ansible/playbook/taggable.py,sha256=QpIS7BXQ9N48Vu1HW96OdSMyrQHckYtCgsVL9-mv-Ts,3249
386
386
  ansible/playbook/task.py,sha256=Vxn471kaQYgVckQ27MxZfNvs5luEo8HLUcXSlXmbU30,21490
387
387
  ansible/playbook/task_include.py,sha256=C3x_tTzbRLTMsXCGonzp3SAzE7VuslvcAlwN4WqF-KM,5318
388
- ansible/playbook/role/__init__.py,sha256=Cxkb4xTaCjBwvIbZnMbJGspXftk2iICipfv_ydFhZf0,29161
388
+ ansible/playbook/role/__init__.py,sha256=bz8lmY2Ah8dsae0nxcRAsfFg0uiXBzv3l5yAMHbLz-Y,29821
389
389
  ansible/playbook/role/definition.py,sha256=MGvEmAsOUYj2geHD5H7JG4N5O3wCxQwmtlH7IpgZqfk,9634
390
390
  ansible/playbook/role/include.py,sha256=Vq5ywSkMeIAHYgEH0M9B-HOOTSq2AkyU5tksmHyKc9k,2426
391
391
  ansible/playbook/role/metadata.py,sha256=5rWZ3ET9-xUCxHL2371o8nRS2aYTn4Ni8fU5_T09Evg,5158
@@ -549,7 +549,7 @@ ansible/plugins/inventory/ini.py,sha256=BsWrS0k6HN3w0mi82SNVAUJ5aTX9QYly9sHygSL0
549
549
  ansible/plugins/inventory/script.py,sha256=QM8hWmCdnYiEtIbVHiCcdXMDR5bjHJzm45uRldh5rug,8283
550
550
  ansible/plugins/inventory/toml.py,sha256=-x-PFHoqKrBFqjp0ZP3kZ9xQYm5hjG4b--_rjoKlHDc,9640
551
551
  ansible/plugins/inventory/yaml.py,sha256=uAUIGNLLJ8V56RbS5IQwH9FpcAcf9N-iT631p-P_biY,7468
552
- ansible/plugins/lookup/__init__.py,sha256=IYUPb8rhgubXaKFc9n27R3_CvZHjt-MrzCgUHJ0FwT4,4727
552
+ ansible/plugins/lookup/__init__.py,sha256=b6ZrYYaYa4M7h09WtRl5QcspqRF17tvHdnhaOiT46A0,4764
553
553
  ansible/plugins/lookup/config.py,sha256=wTreKdYRLEOcjRbAs-E-bBT1vVSncqKHgG7wJcEq4ck,6413
554
554
  ansible/plugins/lookup/csvfile.py,sha256=aCyNy9yAo-gNoOY2OkLxkuf0PNxTHBxHheF71etFg8M,6424
555
555
  ansible/plugins/lookup/dict.py,sha256=44P9TxDwzxd5yTFP1VRf8KINCzikw6VmSEPGmpdSQwo,2250
@@ -580,7 +580,7 @@ ansible/plugins/shell/__init__.py,sha256=207VqtEpJsvwHGG2HkCtvA9JpeAWscUnwEM-ohJ
580
580
  ansible/plugins/shell/cmd.py,sha256=vQcWC8CGmnSEyUVmX0X1QSObBbkmqePmLRLvv7Mj_5s,2223
581
581
  ansible/plugins/shell/powershell.py,sha256=y0cBJeaNplF8sqwu2YxhWcUHR7eeZAeEODBeDG3zspM,11393
582
582
  ansible/plugins/shell/sh.py,sha256=1nhiMv0_c8zu2MaDHvOCr--dG8b-iUVEPPnpMh_Hx8I,3952
583
- ansible/plugins/strategy/__init__.py,sha256=SF2DDOE2tLjRk4iGnmbSk81xADeMY09-_JGFJAD0OTg,56988
583
+ ansible/plugins/strategy/__init__.py,sha256=eS8JSyb3zFrTK8qm0-tK-bk8fNtG_tmbmUZ10bJsyZk,57101
584
584
  ansible/plugins/strategy/debug.py,sha256=GxUS0bSiaWInIK8zgB7rMREEqvgrZhVlFUzOCJtnjFo,1258
585
585
  ansible/plugins/strategy/free.py,sha256=OhUm6uahTmROd-KMJ14axrl9eV7WITK44IvLjNnh1T4,15895
586
586
  ansible/plugins/strategy/host_pinned.py,sha256=3-q5l-tpheMlU-BXGm6ZQNgHvQv5IMvOCDZBLibl1L4,1959
@@ -668,7 +668,7 @@ ansible/utils/shlex.py,sha256=5htd8xlsi8eaTDGvRC4T6M_glKOXvfHgQhL2HUzJQGM,925
668
668
  ansible/utils/singleton.py,sha256=fzXOd2ql_zrjCmnWR8Qx2WF_lmO5A8r46U81v7tePSo,949
669
669
  ansible/utils/ssh_functions.py,sha256=GWySu84yXZR_L8DkZWPZBpWoRiojVCEtpyD_DeYKezk,2300
670
670
  ansible/utils/unicode.py,sha256=5NoXNgXD4zP1cRJKoaN0h-qoX03yt8sfsAF1x9CGl5Y,1184
671
- ansible/utils/unsafe_proxy.py,sha256=lJSFyl0U3JHrKuXwX6Qarji-UZbdFYFoWVDVG5RQOJI,12173
671
+ ansible/utils/unsafe_proxy.py,sha256=bpeNRwWfcxLkVoMc4fpUMWuOrHM1k41ik_V_kEDPh0c,12750
672
672
  ansible/utils/vars.py,sha256=UCxzbkjeXkZM27QAfUDd78K0c3W-r2Q5J4ostcTdws0,9952
673
673
  ansible/utils/version.py,sha256=LHBI8I_ifkG2Pp4Y_NALEOlumNpp1ruG3LPS9h8Ny5k,7789
674
674
  ansible/utils/collection_loader/__init__.py,sha256=l6gUbk5MzfUXlySWrj4xi4IF9UBIrOrEpRQ52-xfGsA,1118
@@ -679,10 +679,10 @@ ansible/vars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
679
679
  ansible/vars/clean.py,sha256=TeNDx7skJFqR0K1ok_cQuvKDjzTrCc7u2qGWTNambQo,6083
680
680
  ansible/vars/fact_cache.py,sha256=4lxkYru1qucTDQ0aSmtc5UDWP-gm3edPmDSuTZ2GCmE,1956
681
681
  ansible/vars/hostvars.py,sha256=8Gs8lcVT6U8hJISEjKIyohIyaTrpnVWo5Tq8VMHDOL0,5134
682
- ansible/vars/manager.py,sha256=QBHen38NXgoyi4f1pzbmZ4CGD89gn9r1mDsCxcTBb8E,38554
682
+ ansible/vars/manager.py,sha256=lIfISTPyRcNfJVWJhhNof36Zmk6xSMUkf9sFxrzCzcI,38180
683
683
  ansible/vars/plugins.py,sha256=OidKyw9hTzy9Za8C5OM8hfmBxUFsuIzFR4gQ96X1PM0,5413
684
684
  ansible/vars/reserved.py,sha256=FBD7n2dnA0CW4I0J1LtWwk2hQqvGW0KTRPcxaRtMKWo,2615
685
- ansible_core-2.16.2.data/scripts/ansible-test,sha256=CYIYL99IxWdVTtDIj3avilIJXhGAmtjuKPPWNuLWuc8,1690
685
+ ansible_core-2.16.3.data/scripts/ansible-test,sha256=CYIYL99IxWdVTtDIj3avilIJXhGAmtjuKPPWNuLWuc8,1690
686
686
  ansible_test/__init__.py,sha256=6e721yAyyyocRKzbCKtQXloAfFP7Aqv0L3zG70uh-4A,190
687
687
  ansible_test/_data/ansible.cfg,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
688
688
  ansible_test/_data/coveragerc,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -926,7 +926,7 @@ ansible_test/_util/controller/sanity/code-smell/no-unicode-literals.py,sha256=-5
926
926
  ansible_test/_util/controller/sanity/code-smell/replace-urlopen.json,sha256=w9--s9c-2F26o7JBJbTJjVGPnvlwGNfSu7KNDSmL9Qw,179
927
927
  ansible_test/_util/controller/sanity/code-smell/replace-urlopen.py,sha256=PSLEuYW5SBrcC7YIt8jdvJ3arxLL7SK7Mxbsvz1UfXc,624
928
928
  ansible_test/_util/controller/sanity/code-smell/runtime-metadata.json,sha256=H2E2-01YXLlSWjvLJT5Vtj3Gn4zB6xhPXsDJh4a7EH0,225
929
- ansible_test/_util/controller/sanity/code-smell/runtime-metadata.py,sha256=f8qydXHd8HrxBj23cciII7z7z0jYIkFfcT-OHkhb-zI,11889
929
+ ansible_test/_util/controller/sanity/code-smell/runtime-metadata.py,sha256=Hjf8KqEgEa-K2pZ8E0hKQ80BMTX1slCz0Hp2P1CZWn8,12183
930
930
  ansible_test/_util/controller/sanity/code-smell/shebang.json,sha256=3vtNzoowM53gi2KZi9peIKVIU79ulQY3FE0jYcSP77M,63
931
931
  ansible_test/_util/controller/sanity/code-smell/shebang.py,sha256=AKCti3RCgZy0GWB3bXgimr_OhqfVPOp_I7345UN_DV8,4672
932
932
  ansible_test/_util/controller/sanity/code-smell/symlinks.json,sha256=JkalgX52aKGUKqjKG5P-68F0tXmUMgldPrNAknMN2Fk,96
@@ -979,7 +979,7 @@ ansible_test/_util/target/pytest/plugins/ansible_forked.py,sha256=xtDWSfEa4vpnQZ
979
979
  ansible_test/_util/target/pytest/plugins/ansible_pytest_collections.py,sha256=HpAtq0mjSj-SqvEpNphpDiiISuwKcsffFnhBA99TFW0,5130
980
980
  ansible_test/_util/target/pytest/plugins/ansible_pytest_coverage.py,sha256=Nr52YbVP7BwI4u6mZZptZIYGAfmqzzytdbC98lTr5Ks,1599
981
981
  ansible_test/_util/target/sanity/compile/compile.py,sha256=X1WHH2iLT4K8kyYJKlr-6AL6EAzKisL_hYrjvGrHCZ8,1637
982
- ansible_test/_util/target/sanity/import/importer.py,sha256=YcbKebb_7gKmFrFBmN7bdciCvXvUjP0gVv_qJc24pmI,25497
982
+ ansible_test/_util/target/sanity/import/importer.py,sha256=LIcGIOyRa9UJ_HPClIknLAKZ6uIRJi81CQW-4KpRFeg,25773
983
983
  ansible_test/_util/target/setup/bootstrap.sh,sha256=HJyuaTaEwJeH55HGZEBbqDGYyq3_kfOqcFdLV6GVxgg,13501
984
984
  ansible_test/_util/target/setup/check_systemd_cgroup_v1.sh,sha256=Aq0T62x_KLtkGaWzYqWjvhchTqYFflrTbQET3h6xrT0,395
985
985
  ansible_test/_util/target/setup/probe_cgroups.py,sha256=ygqTkZc_YDH6EkZqp95rk_xkqsYcy_9IslPHKZO2A-8,712
@@ -1001,9 +1001,9 @@ ansible_test/config/cloud-config-vultr.ini.template,sha256=XLKHk3lg_8ReQMdWfZzhh
1001
1001
  ansible_test/config/config.yml,sha256=wb3knoBmZewG3GWOMnRHoVPQWW4vPixKLPMNS6vJmTc,2620
1002
1002
  ansible_test/config/inventory.networking.template,sha256=bFNSk8zNQOaZ_twaflrY0XZ9mLwUbRLuNT0BdIFwvn4,1335
1003
1003
  ansible_test/config/inventory.winrm.template,sha256=1QU8W-GFLnYEw8yY9bVIvUAVvJYPM3hyoijf6-M7T00,1098
1004
- ansible_core-2.16.2.dist-info/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
1005
- ansible_core-2.16.2.dist-info/METADATA,sha256=ocnecis_1OjBgGdNPcC8fkha24GXG8VPq0zYgNrhKUM,6905
1006
- ansible_core-2.16.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
1007
- ansible_core-2.16.2.dist-info/entry_points.txt,sha256=0mpmsrIhODChxKl3eS-NcVQCaMetBn8KdPLtVxQgR64,453
1008
- ansible_core-2.16.2.dist-info/top_level.txt,sha256=IFbRLjAvih1DYzJWg3_F6t4sCzEMxRO7TOMNs6GkYHo,21
1009
- ansible_core-2.16.2.dist-info/RECORD,,
1004
+ ansible_core-2.16.3.dist-info/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
1005
+ ansible_core-2.16.3.dist-info/METADATA,sha256=61KsroXzOO2-CsRVL-nM_wyqN_rF5M8PBSYoNM38UGM,6905
1006
+ ansible_core-2.16.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
1007
+ ansible_core-2.16.3.dist-info/entry_points.txt,sha256=0mpmsrIhODChxKl3eS-NcVQCaMetBn8KdPLtVxQgR64,453
1008
+ ansible_core-2.16.3.dist-info/top_level.txt,sha256=IFbRLjAvih1DYzJWg3_F6t4sCzEMxRO7TOMNs6GkYHo,21
1009
+ ansible_core-2.16.3.dist-info/RECORD,,
@@ -197,21 +197,26 @@ def validate_metadata_file(path, is_ansible, check_deprecation_dates=False):
197
197
  avoid_additional_data
198
198
  )
199
199
 
200
- plugin_routing_schema = Any(
201
- Schema({
202
- ('deprecation'): Any(deprecation_schema),
203
- ('tombstone'): Any(tombstoning_schema),
204
- ('redirect'): fqcr,
205
- }, extra=PREVENT_EXTRA),
200
+ plugins_routing_common_schema = Schema({
201
+ ('deprecation'): Any(deprecation_schema),
202
+ ('tombstone'): Any(tombstoning_schema),
203
+ ('redirect'): fqcr,
204
+ }, extra=PREVENT_EXTRA)
205
+
206
+ plugin_routing_schema = Any(plugins_routing_common_schema)
207
+
208
+ # Adjusted schema for modules only
209
+ plugin_routing_schema_modules = Any(
210
+ plugins_routing_common_schema.extend({
211
+ ('action_plugin'): fqcr}
212
+ )
206
213
  )
207
214
 
208
215
  # Adjusted schema for module_utils
209
216
  plugin_routing_schema_mu = Any(
210
- Schema({
211
- ('deprecation'): Any(deprecation_schema),
212
- ('tombstone'): Any(tombstoning_schema),
213
- ('redirect'): Any(*string_types),
214
- }, extra=PREVENT_EXTRA),
217
+ plugins_routing_common_schema.extend({
218
+ ('redirect'): Any(*string_types)}
219
+ ),
215
220
  )
216
221
 
217
222
  list_dict_plugin_routing_schema = [{str_type: plugin_routing_schema}
@@ -220,6 +225,9 @@ def validate_metadata_file(path, is_ansible, check_deprecation_dates=False):
220
225
  list_dict_plugin_routing_schema_mu = [{str_type: plugin_routing_schema_mu}
221
226
  for str_type in string_types]
222
227
 
228
+ list_dict_plugin_routing_schema_modules = [{str_type: plugin_routing_schema_modules}
229
+ for str_type in string_types]
230
+
223
231
  plugin_schema = Schema({
224
232
  ('action'): Any(None, *list_dict_plugin_routing_schema),
225
233
  ('become'): Any(None, *list_dict_plugin_routing_schema),
@@ -233,7 +241,7 @@ def validate_metadata_file(path, is_ansible, check_deprecation_dates=False):
233
241
  ('inventory'): Any(None, *list_dict_plugin_routing_schema),
234
242
  ('lookup'): Any(None, *list_dict_plugin_routing_schema),
235
243
  ('module_utils'): Any(None, *list_dict_plugin_routing_schema_mu),
236
- ('modules'): Any(None, *list_dict_plugin_routing_schema),
244
+ ('modules'): Any(None, *list_dict_plugin_routing_schema_modules),
237
245
  ('netconf'): Any(None, *list_dict_plugin_routing_schema),
238
246
  ('shell'): Any(None, *list_dict_plugin_routing_schema),
239
247
  ('strategy'): Any(None, *list_dict_plugin_routing_schema),
@@ -552,6 +552,12 @@ def main():
552
552
  "Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography,"
553
553
  " and will be removed in the next release.")
554
554
 
555
+ # ansible.utils.unsafe_proxy attempts patching sys.intern generating a warning if it was already patched
556
+ warnings.filterwarnings(
557
+ "ignore",
558
+ "skipped sys.intern patch; appears to have already been patched"
559
+ )
560
+
555
561
  try:
556
562
  yield
557
563
  finally: