Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ansible-core for openSUSE:Factory checked in at 2024-03-17 22:15:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ansible-core (Old) and /work/SRC/openSUSE:Factory/.ansible-core.new.1905 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ansible-core" Sun Mar 17 22:15:54 2024 rev:25 rq:1158529 version:2.16.4 Changes: -------- --- /work/SRC/openSUSE:Factory/ansible-core/ansible-core.changes 2024-01-31 23:54:21.982323377 +0100 +++ /work/SRC/openSUSE:Factory/.ansible-core.new.1905/ansible-core.changes 2024-03-17 22:16:38.569795484 +0100 @@ -1,0 +2,14 @@ +Sat Mar 16 16:09:28 UTC 2024 - Johannes Kastl <opensuse_buildserv...@ojkastl.de> + +- update to 2.16.4: + https://github.com/ansible/ansible/blob/v2.16.4/changelogs/CHANGELOG-v2.16.rst + * Bugfixes + - Fix loading vars_plugins in roles (#82239). + - expect - fix argument spec error using timeout=null (#80982). + - include_vars - fix calculating depth relative to the root and + ensure all files are included (#80987). + - templating - ensure syntax errors originating from a template + being compiled into Python code object result in a failure + (#82606) + +------------------------------------------------------------------- Old: ---- ansible-core-2.16.3.tar.gz New: ---- ansible-core-2.16.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ansible-core.spec ++++++ --- /var/tmp/diff_new_pack.lzri5G/_old 2024-03-17 22:16:40.861881181 +0100 +++ /var/tmp/diff_new_pack.lzri5G/_new 2024-03-17 22:16:40.865881331 +0100 @@ -38,7 +38,7 @@ %endif Name: ansible-core -Version: 2.16.3 +Version: 2.16.4 Release: 0 Summary: Radically simple IT automation License: GPL-3.0-or-later ++++++ ansible-core-2.16.3.tar.gz -> ansible-core-2.16.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/PKG-INFO new/ansible-core-2.16.4/PKG-INFO --- old/ansible-core-2.16.3/PKG-INFO 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/PKG-INFO 2024-02-26 22:04:58.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ansible-core -Version: 2.16.3 +Version: 2.16.4 Summary: Radically simple IT automation Home-page: https://ansible.com/ Author: Ansible, Inc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/changelogs/CHANGELOG-v2.16.rst new/ansible-core-2.16.4/changelogs/CHANGELOG-v2.16.rst --- old/ansible-core-2.16.3/changelogs/CHANGELOG-v2.16.rst 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/changelogs/CHANGELOG-v2.16.rst 2024-02-26 22:04:58.000000000 +0100 @@ -5,6 +5,24 @@ .. contents:: Topics +v2.16.4 +======= + +Release Summary +--------------- + +| Release Date: 2024-02-26 +| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__ + + +Bugfixes +-------- + +- Fix loading vars_plugins in roles (https://github.com/ansible/ansible/issues/82239). +- expect - fix argument spec error using timeout=null (https://github.com/ansible/ansible/issues/80982). +- include_vars - fix calculating ``depth`` relative to the root and ensure all files are included (https://github.com/ansible/ansible/issues/80987). +- templating - ensure syntax errors originating from a template being compiled into Python code object result in a failure (https://github.com/ansible/ansible/issues/82606) + v2.16.3 ======= @@ -206,7 +224,7 @@ - Old style vars plugins which use the entrypoints `get_host_vars` or `get_group_vars` are deprecated. The plugin should be updated to inherit from `BaseVarsPlugin` and define a `get_vars` method as the entrypoint. - Support for Windows Server 2012 and 2012 R2 has been removed as the support end of life from Microsoft is October 10th 2023. These versions of Windows will no longer be tested in this Ansible release and it cannot be guaranteed that they will continue to work going forward. - ``STRING_CONVERSION_ACTION`` config option is deprecated as it is no longer used in the Ansible Core code base. -- the 'smart' option for setting a connection plugin is being removed as it's main purpose (choosing between ssh and paramiko) is now irrelevant. +- the 'smart' option for setting a connection plugin is being removed as its main purpose (choosing between ssh and paramiko) is now irrelevant. - vault and unfault filters - the undocumented ``vaultid`` parameter is deprecated and will be removed in ansible-core 2.20. Use ``vault_id`` instead. - yum_repository - deprecated parameter 'keepcache' (https://github.com/ansible/ansible/issues/78693). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/changelogs/changelog.yaml new/ansible-core-2.16.4/changelogs/changelog.yaml --- old/ansible-core-2.16.3/changelogs/changelog.yaml 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/changelogs/changelog.yaml 2024-02-26 22:04:58.000000000 +0100 @@ -293,7 +293,7 @@ that they will continue to work going forward. - '``STRING_CONVERSION_ACTION`` config option is deprecated as it is no longer used in the Ansible Core code base.' - - the 'smart' option for setting a connection plugin is being removed as it's + - the 'smart' option for setting a connection plugin is being removed as its main purpose (choosing between ssh and paramiko) is now irrelevant. - vault and unfault filters - the undocumented ``vaultid`` parameter is deprecated and will be removed in ansible-core 2.20. Use ``vault_id`` instead. @@ -900,3 +900,36 @@ - role_fixes.yml - unsafe-intern.yml release_date: '2024-01-22' + 2.16.4: + changes: + release_summary: '| Release Date: 2024-02-26 + + | `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__ + + ' + codename: All My Love + fragments: + - 2.16.4_summary.yaml + release_date: '2024-02-26' + 2.16.4rc1: + changes: + bugfixes: + - Fix loading vars_plugins in roles (https://github.com/ansible/ansible/issues/82239). + - expect - fix argument spec error using timeout=null (https://github.com/ansible/ansible/issues/80982). + - include_vars - fix calculating ``depth`` relative to the root and ensure all + files are included (https://github.com/ansible/ansible/issues/80987). + - templating - ensure syntax errors originating from a template being compiled + into Python code object result in a failure (https://github.com/ansible/ansible/issues/82606) + release_summary: '| Release Date: 2024-02-19 + + | `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__ + + ' + codename: All My Love + fragments: + - 2.16.4rc1_summary.yaml + - 80995-include-all-var-files.yml + - 82606-template-python-syntax-error.yml + - fix-expect-indefinite-timeout.yml + - fix-vars-plugins-in-roles.yml + release_date: '2024-02-19' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/lib/ansible/module_utils/ansible_release.py new/ansible-core-2.16.4/lib/ansible/module_utils/ansible_release.py --- old/ansible-core-2.16.3/lib/ansible/module_utils/ansible_release.py 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/lib/ansible/module_utils/ansible_release.py 2024-02-26 22:04:58.000000000 +0100 @@ -19,6 +19,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -__version__ = '2.16.3' +__version__ = '2.16.4' __author__ = 'Ansible, Inc.' __codename__ = "All My Love" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/lib/ansible/modules/expect.py new/ansible-core-2.16.4/lib/ansible/modules/expect.py --- old/ansible-core-2.16.3/lib/ansible/modules/expect.py 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/lib/ansible/modules/expect.py 2024-02-26 22:04:58.000000000 +0100 @@ -43,7 +43,7 @@ responses. List functionality is new in 2.1. required: true timeout: - type: int + type: raw description: - Amount of time in seconds to wait for the expected strings. Use V(null) to disable timeout. @@ -122,6 +122,7 @@ from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.common.text.converters import to_bytes, to_native +from ansible.module_utils.common.validation import check_type_int def response_closure(module, question, responses): @@ -147,7 +148,7 @@ creates=dict(type='path'), removes=dict(type='path'), responses=dict(type='dict', required=True), - timeout=dict(type='int', default=30), + timeout=dict(type='raw', default=30), echo=dict(type='bool', default=False), ) ) @@ -162,6 +163,13 @@ removes = module.params['removes'] responses = module.params['responses'] timeout = module.params['timeout'] + if timeout is not None: + try: + timeout = check_type_int(timeout) + except TypeError as te: + module.fail_json( + msg="argument 'timeout' is of type {timeout_type} and we were unable to convert to int: {te}".format(timeout_type=type(timeout), te=te) + ) echo = module.params['echo'] events = dict() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/lib/ansible/plugins/action/include_vars.py new/ansible-core-2.16.4/lib/ansible/plugins/action/include_vars.py --- old/ansible-core-2.16.3/lib/ansible/plugins/action/include_vars.py 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/lib/ansible/plugins/action/include_vars.py 2024-02-26 22:04:58.000000000 +0100 @@ -6,6 +6,7 @@ from os import path, walk import re +import pathlib import ansible.constants as C from ansible.errors import AnsibleError @@ -182,16 +183,15 @@ alphabetical order. Do not iterate pass the set depth. The default depth is unlimited. """ - current_depth = 0 sorted_walk = list(walk(self.source_dir, onerror=self._log_walk, followlinks=True)) sorted_walk.sort(key=lambda x: x[0]) for current_root, current_dir, current_files in sorted_walk: - current_depth += 1 - if current_depth <= self.depth or self.depth == 0: - current_files.sort() - yield (current_root, current_files) - else: - break + # Depth 1 is the root, relative_to omits the root + current_depth = len(pathlib.Path(current_root).relative_to(self.source_dir).parts) + 1 + if self.depth != 0 and current_depth > self.depth: + continue + current_files.sort() + yield (current_root, current_files) def _ignore_file(self, filename): """ Return True if a file matches the list of ignore_files. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/lib/ansible/plugins/loader.py new/ansible-core-2.16.4/lib/ansible/plugins/loader.py --- old/ansible-core-2.16.3/lib/ansible/plugins/loader.py 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/lib/ansible/plugins/loader.py 2024-02-26 22:04:58.000000000 +0100 @@ -238,10 +238,7 @@ self._module_cache = MODULE_CACHE[class_name] self._paths = PATH_CACHE[class_name] self._plugin_path_cache = PLUGIN_PATH_CACHE[class_name] - try: - self._plugin_instance_cache = {} if self.type == 'vars' else None - except ValueError: - self._plugin_instance_cache = None + self._plugin_instance_cache = {} if self.subdir == 'vars_plugins' else None self._searched_paths = set() @@ -266,7 +263,7 @@ self._module_cache = MODULE_CACHE[self.class_name] self._paths = PATH_CACHE[self.class_name] self._plugin_path_cache = PLUGIN_PATH_CACHE[self.class_name] - self._plugin_instance_cache = {} if self.type == 'vars' else None + self._plugin_instance_cache = {} if self.subdir == 'vars_plugins' else None self._searched_paths = set() def __setstate__(self, data): @@ -872,12 +869,12 @@ if name in self.aliases: name = self.aliases[name] - if self._plugin_instance_cache and (cached_load_result := self._plugin_instance_cache.get(name)): + if (cached_result := (self._plugin_instance_cache or {}).get(name)) and cached_result[1].resolved: # Resolving the FQCN is slow, even if we've passed in the resolved FQCN. # Short-circuit here if we've previously resolved this name. # This will need to be restricted if non-vars plugins start using the cache, since # some non-fqcn plugin need to be resolved again with the collections list. - return get_with_context_result(*cached_load_result) + return get_with_context_result(*cached_result) plugin_load_context = self.find_plugin_with_context(name, collection_list=collection_list) if not plugin_load_context.resolved or not plugin_load_context.plugin_resolved_path: @@ -889,10 +886,10 @@ fq_name = '.'.join((plugin_load_context.plugin_resolved_collection, fq_name)) resolved_type_name = plugin_load_context.plugin_resolved_name path = plugin_load_context.plugin_resolved_path - if self._plugin_instance_cache and (cached_load_result := self._plugin_instance_cache.get(fq_name)): + if (cached_result := (self._plugin_instance_cache or {}).get(fq_name)) and cached_result[1].resolved: # This is unused by vars plugins, but it's here in case the instance cache expands to other plugin types. # We get here if we've seen this plugin before, but it wasn't called with the resolved FQCN. - return get_with_context_result(*cached_load_result) + return get_with_context_result(*cached_result) redirected_names = plugin_load_context.redirect_list or [] if path not in self._module_cache: @@ -935,8 +932,10 @@ self._update_object(obj, resolved_type_name, path, redirected_names, fq_name) if self._plugin_instance_cache is not None and getattr(obj, 'is_stateless', False): - # store under both the originally requested name and the resolved FQ name - self._plugin_instance_cache[name] = self._plugin_instance_cache[fq_name] = (obj, plugin_load_context) + self._plugin_instance_cache[fq_name] = (obj, plugin_load_context) + elif self._plugin_instance_cache is not None: + # The cache doubles as the load order, so record the FQCN even if the plugin hasn't set is_stateless = True + self._plugin_instance_cache[fq_name] = (None, PluginLoadContext()) return get_with_context_result(obj, plugin_load_context) def _display_plugin_load(self, class_name, name, searched_paths, path, found_in_cache=None, class_only=None): @@ -1042,9 +1041,9 @@ else: fqcn = f"ansible.builtin.{basename}" - if self._plugin_instance_cache is not None and fqcn in self._plugin_instance_cache: + if (cached_result := (self._plugin_instance_cache or {}).get(fqcn)) and cached_result[1].resolved: # Here just in case, but we don't call all() multiple times for vars plugins, so this should not be used. - yield self._plugin_instance_cache[basename][0] + yield cached_result[0] continue if path not in self._module_cache: @@ -1096,9 +1095,17 @@ self._update_object(obj, basename, path, resolved=fqcn) - if self._plugin_instance_cache is not None and fqcn not in self._plugin_instance_cache: - # Use get_with_context to cache the plugin the first time we see it. - self.get_with_context(fqcn)[0] + if self._plugin_instance_cache is not None: + needs_enabled = False + if hasattr(obj, 'REQUIRES_ENABLED'): + needs_enabled = obj.REQUIRES_ENABLED + elif hasattr(obj, 'REQUIRES_WHITELIST'): + needs_enabled = obj.REQUIRES_WHITELIST + display.deprecated("The VarsModule class variable 'REQUIRES_WHITELIST' is deprecated. " + "Use 'REQUIRES_ENABLED' instead.", version=2.18) + if not needs_enabled: + # Use get_with_context to cache the plugin the first time we see it. + self.get_with_context(fqcn)[0] yield obj diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/lib/ansible/release.py new/ansible-core-2.16.4/lib/ansible/release.py --- old/ansible-core-2.16.3/lib/ansible/release.py 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/lib/ansible/release.py 2024-02-26 22:04:58.000000000 +0100 @@ -19,6 +19,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -__version__ = '2.16.3' +__version__ = '2.16.4' __author__ = 'Ansible, Inc.' __codename__ = "All My Love" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/lib/ansible/template/__init__.py new/ansible-core-2.16.4/lib/ansible/template/__init__.py --- old/ansible-core-2.16.3/lib/ansible/template/__init__.py 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/lib/ansible/template/__init__.py 2024-02-26 22:04:58.000000000 +0100 @@ -973,7 +973,7 @@ try: t = myenv.from_string(data) - except TemplateSyntaxError as e: + except (TemplateSyntaxError, SyntaxError) as e: raise AnsibleError("template error while templating string: %s. String: %s" % (to_native(e), to_native(data)), orig_exc=e) except Exception as e: if 'recursion' in to_native(e): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/lib/ansible/vars/plugins.py new/ansible-core-2.16.4/lib/ansible/vars/plugins.py --- old/ansible-core-2.16.3/lib/ansible/vars/plugins.py 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/lib/ansible/vars/plugins.py 2024-02-26 22:04:58.000000000 +0100 @@ -16,41 +16,14 @@ display = Display() -cached_vars_plugin_order = None - -def _load_vars_plugins_order(): +def _prime_vars_loader(): # find 3rd party legacy vars plugins once, and look them up by name subsequently - auto = [] - for auto_run_plugin in vars_loader.all(class_only=True): - needs_enabled = False - if hasattr(auto_run_plugin, 'REQUIRES_ENABLED'): - needs_enabled = auto_run_plugin.REQUIRES_ENABLED - elif hasattr(auto_run_plugin, 'REQUIRES_WHITELIST'): - needs_enabled = auto_run_plugin.REQUIRES_WHITELIST - display.deprecated("The VarsModule class variable 'REQUIRES_WHITELIST' is deprecated. " - "Use 'REQUIRES_ENABLED' instead.", version=2.18) - if needs_enabled: - continue - auto.append(auto_run_plugin._load_name) - - # find enabled plugins once so we can look them up by resolved fqcn subsequently - enabled = [] + list(vars_loader.all(class_only=True)) for plugin_name in C.VARIABLE_PLUGINS_ENABLED: - if (plugin := vars_loader.get(plugin_name)) is None: - enabled.append(plugin_name) - else: - collection = '.' in plugin.ansible_name and not plugin.ansible_name.startswith('ansible.builtin.') - # Warn if a collection plugin has REQUIRES_ENABLED because it has no effect. - if collection and (hasattr(plugin, 'REQUIRES_ENABLED') or hasattr(plugin, 'REQUIRES_WHITELIST')): - display.warning( - "Vars plugins in collections must be enabled to be loaded, REQUIRES_ENABLED is not supported. " - "This should be removed from the plugin %s." % plugin.ansible_name - ) - enabled.append(plugin.ansible_name) - - global cached_vars_plugin_order - cached_vars_plugin_order = auto + enabled + if not plugin_name: + continue + vars_loader.get(plugin_name) def get_plugin_vars(loader, plugin, path, entities): @@ -106,16 +79,23 @@ def get_vars_from_path(loader, path, entities, stage): - data = {} + if vars_loader._paths is None: + # cache has been reset, reload all() + _prime_vars_loader() - if cached_vars_plugin_order is None: - _load_vars_plugins_order() - - for plugin_name in cached_vars_plugin_order: + for plugin_name in vars_loader._plugin_instance_cache: if (plugin := vars_loader.get(plugin_name)) is None: continue + collection = '.' in plugin.ansible_name and not plugin.ansible_name.startswith('ansible.builtin.') + # Warn if a collection plugin has REQUIRES_ENABLED because it has no effect. + if collection and (hasattr(plugin, 'REQUIRES_ENABLED') or hasattr(plugin, 'REQUIRES_WHITELIST')): + display.warning( + "Vars plugins in collections must be enabled to be loaded, REQUIRES_ENABLED is not supported. " + "This should be removed from the plugin %s." % plugin.ansible_name + ) + if not _plugin_should_run(plugin, stage): continue diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/lib/ansible_core.egg-info/PKG-INFO new/ansible-core-2.16.4/lib/ansible_core.egg-info/PKG-INFO --- old/ansible-core-2.16.3/lib/ansible_core.egg-info/PKG-INFO 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/lib/ansible_core.egg-info/PKG-INFO 2024-02-26 22:04:58.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ansible-core -Version: 2.16.3 +Version: 2.16.4 Summary: Radically simple IT automation Home-page: https://ansible.com/ Author: Ansible, Inc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/lib/ansible_core.egg-info/SOURCES.txt new/ansible-core-2.16.4/lib/ansible_core.egg-info/SOURCES.txt --- old/ansible-core-2.16.3/lib/ansible_core.egg-info/SOURCES.txt 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/lib/ansible_core.egg-info/SOURCES.txt 2024-02-26 22:04:58.000000000 +0100 @@ -913,6 +913,7 @@ test/integration/targets/ansible-playbook-callbacks/aliases test/integration/targets/ansible-playbook-callbacks/all-callbacks.yml test/integration/targets/ansible-playbook-callbacks/callbacks_list.expected +test/integration/targets/ansible-playbook-callbacks/include_me.yml test/integration/targets/ansible-playbook-callbacks/runme.sh test/integration/targets/ansible-pull/aliases test/integration/targets/ansible-pull/cleanup.yml @@ -2384,6 +2385,14 @@ test/integration/targets/include_vars-ad-hoc/runme.sh test/integration/targets/include_vars-ad-hoc/dir/inc.yml test/integration/targets/include_vars/defaults/main.yml +test/integration/targets/include_vars/files/test_depth/sub1/sub11.yml +test/integration/targets/include_vars/files/test_depth/sub1/sub12.yml +test/integration/targets/include_vars/files/test_depth/sub1/sub11/config11.yml +test/integration/targets/include_vars/files/test_depth/sub1/sub11/config112.yml +test/integration/targets/include_vars/files/test_depth/sub2/sub21.yml +test/integration/targets/include_vars/files/test_depth/sub2/sub21/config211.yml +test/integration/targets/include_vars/files/test_depth/sub2/sub21/config212.yml +test/integration/targets/include_vars/files/test_depth/sub3/config3.yml test/integration/targets/include_vars/tasks/main.yml test/integration/targets/include_vars/vars/no_auto_unsafe.yml test/integration/targets/include_vars/vars/all/all.yml @@ -2977,6 +2986,8 @@ test/integration/targets/old_style_vars_plugins/runme.sh test/integration/targets/old_style_vars_plugins/deprecation_warning/v2_vars_plugin.py test/integration/targets/old_style_vars_plugins/deprecation_warning/vars.py +test/integration/targets/old_style_vars_plugins/roles/a/tasks/main.yml +test/integration/targets/old_style_vars_plugins/roles/a/vars_plugins/auto_role_vars.py test/integration/targets/old_style_vars_plugins/vars_plugins/auto_enabled.py test/integration/targets/old_style_vars_plugins/vars_plugins/implicitly_auto_enabled.py test/integration/targets/old_style_vars_plugins/vars_plugins/require_enabled.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/ansible-playbook-callbacks/all-callbacks.yml new/ansible-core-2.16.4/test/integration/targets/ansible-playbook-callbacks/all-callbacks.yml --- old/ansible-core-2.16.3/test/integration/targets/ansible-playbook-callbacks/all-callbacks.yml 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/ansible-playbook-callbacks/all-callbacks.yml 2024-02-26 22:04:58.000000000 +0100 @@ -96,14 +96,14 @@ ignore_errors: true - name: async poll ok - command: sleep 2 - async: 3 - poll: 1 + command: sleep 3 + async: 5 + poll: 2 - name: async poll failed - shell: sleep 2; false - async: 3 - poll: 1 + shell: sleep 3; false + async: 5 + poll: 2 ignore_errors: true - include_tasks: include_me.yml @@ -111,7 +111,7 @@ - name: diff copy: content: diff - dest: '{{ remote_tmp_dir.path }}/diff.txt' + dest: '{{ remote_tmp_dir }}/diff.txt' diff: true - hosts: i_dont_exist diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/ansible-playbook-callbacks/callbacks_list.expected new/ansible-core-2.16.4/test/integration/targets/ansible-playbook-callbacks/callbacks_list.expected --- old/ansible-core-2.16.3/test/integration/targets/ansible-playbook-callbacks/callbacks_list.expected 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/ansible-playbook-callbacks/callbacks_list.expected 2024-02-26 22:04:58.000000000 +0100 @@ -1,12 +1,14 @@ 1 __init__ -83 v2_on_any +92 v2_on_any + 1 v2_on_file_diff 4 v2_playbook_on_handler_task_start 2 v2_playbook_on_include + 1 v2_playbook_on_no_hosts_matched 3 v2_playbook_on_notify - 1 v2_playbook_on_play_start + 3 v2_playbook_on_play_start 1 v2_playbook_on_start 1 v2_playbook_on_stats -17 v2_playbook_on_task_start +19 v2_playbook_on_task_start 1 v2_playbook_on_vars_prompt 1 v2_runner_item_on_failed 2 v2_runner_item_on_ok @@ -15,8 +17,8 @@ 1 v2_runner_on_async_ok 2 v2_runner_on_async_poll 5 v2_runner_on_failed -15 v2_runner_on_ok +16 v2_runner_on_ok 1 v2_runner_on_skipped -21 v2_runner_on_start +23 v2_runner_on_start 1 v2_runner_on_unreachable 2 v2_runner_retry diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/ansible-playbook-callbacks/runme.sh new/ansible-core-2.16.4/test/integration/targets/ansible-playbook-callbacks/runme.sh --- old/ansible-core-2.16.3/test/integration/targets/ansible-playbook-callbacks/runme.sh 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/ansible-playbook-callbacks/runme.sh 2024-02-26 22:04:58.000000000 +0100 @@ -5,6 +5,7 @@ export ANSIBLE_CALLBACK_PLUGINS=../support-callback_plugins/callback_plugins export ANSIBLE_ROLES_PATH=../ export ANSIBLE_STDOUT_CALLBACK=callback_debug +export ANSIBLE_HOST_PATTERN_MISMATCH=warning ansible-playbook all-callbacks.yml 2>/dev/null | sort | uniq -c | tee callbacks_list.out diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/ansible-test-container/runme.py new/ansible-core-2.16.4/test/integration/targets/ansible-test-container/runme.py --- old/ansible-core-2.16.3/test/integration/targets/ansible-test-container/runme.py 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/ansible-test-container/runme.py 2024-02-26 22:04:58.000000000 +0100 @@ -996,7 +996,7 @@ @classmethod def install_podman(cls) -> bool: """Return True if podman will be installed.""" - return not (os_release.id == 'ubuntu' and os_release.version_id == '20.04') + return not (os_release.id == 'ubuntu' and os_release.version_id in {'20.04', '22.04'}) @classmethod def install_docker(cls) -> bool: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/expect/tasks/main.yml new/ansible-core-2.16.4/test/integration/targets/expect/tasks/main.yml --- old/ansible-core-2.16.3/test/integration/targets/expect/tasks/main.yml 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/expect/tasks/main.yml 2024-02-26 22:04:58.000000000 +0100 @@ -148,6 +148,15 @@ - "echo_result.stdout_lines[-2] == 'foobar'" - "echo_result.stdout_lines[-1] == 'bar'" +- name: test timeout is valid as null + expect: + command: "{{ansible_python_interpreter}} {{test_command_file}}" + responses: + foo: bar + echo: true + timeout: null # wait indefinitely + timeout: 2 # but shouldn't be waiting long + - name: test response list expect: command: "{{ansible_python_interpreter}} {{test_command_file}} foo foo" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub1/sub11/config11.yml new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub1/sub11/config11.yml --- old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub1/sub11/config11.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub1/sub11/config11.yml 2024-02-26 22:04:58.000000000 +0100 @@ -0,0 +1 @@ +config11: defined diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub1/sub11/config112.yml new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub1/sub11/config112.yml --- old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub1/sub11/config112.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub1/sub11/config112.yml 2024-02-26 22:04:58.000000000 +0100 @@ -0,0 +1 @@ +config112: defined diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub1/sub11.yml new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub1/sub11.yml --- old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub1/sub11.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub1/sub11.yml 2024-02-26 22:04:58.000000000 +0100 @@ -0,0 +1 @@ +sub11: defined diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub1/sub12.yml new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub1/sub12.yml --- old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub1/sub12.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub1/sub12.yml 2024-02-26 22:04:58.000000000 +0100 @@ -0,0 +1 @@ +sub12: defined diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub2/sub21/config211.yml new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub2/sub21/config211.yml --- old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub2/sub21/config211.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub2/sub21/config211.yml 2024-02-26 22:04:58.000000000 +0100 @@ -0,0 +1 @@ +config211: defined diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub2/sub21/config212.yml new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub2/sub21/config212.yml --- old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub2/sub21/config212.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub2/sub21/config212.yml 2024-02-26 22:04:58.000000000 +0100 @@ -0,0 +1 @@ +config212: defined diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub2/sub21.yml new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub2/sub21.yml --- old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub2/sub21.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub2/sub21.yml 2024-02-26 22:04:58.000000000 +0100 @@ -0,0 +1 @@ +sub21: defined diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub3/config3.yml new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub3/config3.yml --- old/ansible-core-2.16.3/test/integration/targets/include_vars/files/test_depth/sub3/config3.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/include_vars/files/test_depth/sub3/config3.yml 2024-02-26 22:04:58.000000000 +0100 @@ -0,0 +1 @@ +config3: defined diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/include_vars/tasks/main.yml new/ansible-core-2.16.4/test/integration/targets/include_vars/tasks/main.yml --- old/ansible-core-2.16.3/test/integration/targets/include_vars/tasks/main.yml 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/include_vars/tasks/main.yml 2024-02-26 22:04:58.000000000 +0100 @@ -255,3 +255,15 @@ vars: hash1: "{{ role_path }}/test_symlink/symlink/hashes/hash1.yml" hash2: "{{ role_path }}/test_symlink/symlink/hashes/hash2.yml" + +- name: Test include_vars includes everything to the correct depth + ansible.builtin.include_vars: + dir: "{{ role_path }}/files/test_depth" + depth: 3 + name: test_depth_var + register: test_depth + +- assert: + that: + - "test_depth.ansible_included_var_files|length == 8" + - "test_depth_var.keys()|length == 8" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/old_style_vars_plugins/roles/a/tasks/main.yml new/ansible-core-2.16.4/test/integration/targets/old_style_vars_plugins/roles/a/tasks/main.yml --- old/ansible-core-2.16.3/test/integration/targets/old_style_vars_plugins/roles/a/tasks/main.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/old_style_vars_plugins/roles/a/tasks/main.yml 2024-02-26 22:04:58.000000000 +0100 @@ -0,0 +1,3 @@ +- assert: + that: + - auto_role_var is defined diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/old_style_vars_plugins/roles/a/vars_plugins/auto_role_vars.py new/ansible-core-2.16.4/test/integration/targets/old_style_vars_plugins/roles/a/vars_plugins/auto_role_vars.py --- old/ansible-core-2.16.3/test/integration/targets/old_style_vars_plugins/roles/a/vars_plugins/auto_role_vars.py 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/old_style_vars_plugins/roles/a/vars_plugins/auto_role_vars.py 2024-02-26 22:04:58.000000000 +0100 @@ -0,0 +1,11 @@ +from __future__ import annotations + +from ansible.plugins.vars import BaseVarsPlugin + + +class VarsModule(BaseVarsPlugin): + # Implicitly + # REQUIRES_ENABLED = False + + def get_vars(self, loader, path, entities): + return {'auto_role_var': True} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/old_style_vars_plugins/runme.sh new/ansible-core-2.16.4/test/integration/targets/old_style_vars_plugins/runme.sh --- old/ansible-core-2.16.3/test/integration/targets/old_style_vars_plugins/runme.sh 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/old_style_vars_plugins/runme.sh 2024-02-26 22:04:58.000000000 +0100 @@ -46,3 +46,5 @@ [ "$(grep -c "Loading VarsModule 'host_group_vars'" out.txt)" -eq 1 ] [ "$(grep -c "Loading VarsModule 'require_enabled'" out.txt)" -lt 3 ] [ "$(grep -c "Loading VarsModule 'auto_enabled'" out.txt)" -gt 50 ] + +ansible localhost -m include_role -a 'name=a' "$@" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-core-2.16.3/test/integration/targets/templating/tasks/main.yml new/ansible-core-2.16.4/test/integration/targets/templating/tasks/main.yml --- old/ansible-core-2.16.3/test/integration/targets/templating/tasks/main.yml 2024-01-29 21:40:01.000000000 +0100 +++ new/ansible-core-2.16.4/test/integration/targets/templating/tasks/main.yml 2024-02-26 22:04:58.000000000 +0100 @@ -33,3 +33,14 @@ - result is failed - >- "TemplateSyntaxError: Could not load \"asdf \": 'invalid plugin name: ansible.builtin.asdf '" in result.msg + +- name: Make sure syntax errors originating from a template being compiled into Python code object result in a failure + debug: + msg: "{{ lookup('vars', 'v1', default='', default='') }}" + ignore_errors: true + register: r + +- assert: + that: + - r is failed + - "'keyword argument repeated' in r.msg"