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-06-19 16:40:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ansible-core (Old) and /work/SRC/openSUSE:Factory/.ansible-core.new.18349 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ansible-core" Wed Jun 19 16:40:23 2024 rev:29 rq:1181657 version:2.16.8 Changes: -------- --- /work/SRC/openSUSE:Factory/ansible-core/ansible-core.changes 2024-05-24 19:51:37.910586907 +0200 +++ /work/SRC/openSUSE:Factory/.ansible-core.new.18349/ansible-core.changes 2024-06-19 16:40:36.745993145 +0200 @@ -1,0 +2,22 @@ +Wed Jun 19 05:05:30 UTC 2024 - Johannes Kastl <opensuse_buildserv...@ojkastl.de> + +- update to 2.16.8: + https://github.com/ansible/ansible/blob/v2.16.8/changelogs/CHANGELOG-v2.16.rst + * Minor Changes + - ansible-test - Update pypi-test-container to version 3.1.0. + * Bugfixes + - Fix the task attribute resolved_action to show the FQCN + instead of None when action or local_action is used in the + playbook. + - Fix using module_defaults with local_action/action (#81905). + - fixed unit test test_borken_cowsay to address mock not been + properly applied when existing unix system already have + cowsay installed. + - powershell - Implement more robust deletion mechanism for C# + code compilation temporary files. This should avoid scenarios + where the underlying temporary directory may be temporarily + locked by antivirus tools or other IO problems. A failure to + delete one of these temporary directories will result in a + warning rather than an outright failure. + +------------------------------------------------------------------- Old: ---- ansible_core-2.16.7.tar.gz ansible_core-2.16.7.tar.gz.sha256 New: ---- ansible_core-2.16.8.tar.gz ansible_core-2.16.8.tar.gz.sha256 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ansible-core.spec ++++++ --- /var/tmp/diff_new_pack.UOvERs/_old 2024-06-19 16:40:37.698027039 +0200 +++ /var/tmp/diff_new_pack.UOvERs/_new 2024-06-19 16:40:37.702027182 +0200 @@ -38,7 +38,7 @@ %endif Name: ansible-core -Version: 2.16.7 +Version: 2.16.8 Release: 0 Summary: Radically simple IT automation License: GPL-3.0-or-later ++++++ ansible_core-2.16.7.tar.gz -> ansible_core-2.16.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/PKG-INFO new/ansible_core-2.16.8/PKG-INFO --- old/ansible_core-2.16.7/PKG-INFO 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/PKG-INFO 2024-06-17 20:10:21.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ansible-core -Version: 2.16.7 +Version: 2.16.8 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.7/changelogs/CHANGELOG-v2.16.rst new/ansible_core-2.16.8/changelogs/CHANGELOG-v2.16.rst --- old/ansible_core-2.16.7/changelogs/CHANGELOG-v2.16.rst 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/changelogs/CHANGELOG-v2.16.rst 2024-06-17 20:10:21.000000000 +0200 @@ -5,6 +5,29 @@ .. contents:: Topics +v2.16.8 +======= + +Release Summary +--------------- + +| Release Date: 2024-06-17 +| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__ + + +Minor Changes +------------- + +- ansible-test - Update ``pypi-test-container`` to version 3.1.0. + +Bugfixes +-------- + +- Fix the task attribute ``resolved_action`` to show the FQCN instead of ``None`` when ``action`` or ``local_action`` is used in the playbook. +- Fix using ``module_defaults`` with ``local_action``/``action`` (https://github.com/ansible/ansible/issues/81905). +- fixed unit test test_borken_cowsay to address mock not been properly applied when existing unix system already have cowsay installed. +- powershell - Implement more robust deletion mechanism for C# code compilation temporary files. This should avoid scenarios where the underlying temporary directory may be temporarily locked by antivirus tools or other IO problems. A failure to delete one of these temporary directories will result in a warning rather than an outright failure. + v2.16.7 ======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/changelogs/changelog.yaml new/ansible_core-2.16.8/changelogs/changelog.yaml --- old/ansible_core-2.16.7/changelogs/changelog.yaml 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/changelogs/changelog.yaml 2024-06-17 20:10:21.000000000 +0200 @@ -1085,3 +1085,42 @@ - psrp-version-req.yml - uri_follow_redirect_bool.yml release_date: '2024-05-13' + 2.16.8: + changes: + minor_changes: + - ansible-test - Update ``pypi-test-container`` to version 3.1.0. + release_summary: '| Release Date: 2024-06-17 + + | `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.8_summary.yaml + - ansible-test-pypi-test-container-update.yml + release_date: '2024-06-17' + 2.16.8rc1: + changes: + bugfixes: + - Fix the task attribute ``resolved_action`` to show the FQCN instead of ``None`` + when ``action`` or ``local_action`` is used in the playbook. + - Fix using ``module_defaults`` with ``local_action``/``action`` (https://github.com/ansible/ansible/issues/81905). + - fixed unit test test_borken_cowsay to address mock not been properly applied + when existing unix system already have cowsay installed. + - powershell - Implement more robust deletion mechanism for C# code compilation + temporary files. This should avoid scenarios where the underlying temporary + directory may be temporarily locked by antivirus tools or other IO problems. + A failure to delete one of these temporary directories will result in a warning + rather than an outright failure. + release_summary: '| Release Date: 2024-06-10 + + | `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.8rc1_summary.yaml + - 83327.yml + - PowerShell-AddType-temp.yml + - correct-callback-fqcn-old-style-action-invocation.yml + release_date: '2024-06-10' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/lib/ansible/executor/powershell/exec_wrapper.ps1 new/ansible_core-2.16.8/lib/ansible/executor/powershell/exec_wrapper.ps1 --- old/ansible_core-2.16.7/lib/ansible/executor/powershell/exec_wrapper.ps1 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/lib/ansible/executor/powershell/exec_wrapper.ps1 2024-06-17 20:10:21.000000000 +0200 @@ -178,6 +178,7 @@ Write-AnsibleLog "INFO - converting json raw to a payload" "exec_wrapper" $payload = ConvertFrom-AnsibleJson -InputObject $json_raw + $payload.module_args._ansible_exec_wrapper_warnings = [System.Collections.Generic.List[string]]@() # TODO: handle binary modules # TODO: handle persistence diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/lib/ansible/executor/powershell/module_powershell_wrapper.ps1 new/ansible_core-2.16.8/lib/ansible/executor/powershell/module_powershell_wrapper.ps1 --- old/ansible_core-2.16.7/lib/ansible/executor/powershell/module_powershell_wrapper.ps1 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/lib/ansible/executor/powershell/module_powershell_wrapper.ps1 2024-06-17 20:10:21.000000000 +0200 @@ -29,7 +29,18 @@ # add any C# references so the module does not have to do so $new_tmp = [System.Environment]::ExpandEnvironmentVariables($Payload.module_args["_ansible_remote_tmp"]) - Add-CSharpType -References $csharp_utils -TempPath $new_tmp -IncludeDebugInfo + + # We use a fake module object to capture warnings + $fake_module = [PSCustomObject]@{ + Tmpdir = $new_tmp + Verbosity = 3 + } + $warning_func = New-Object -TypeName System.Management.Automation.PSScriptMethod -ArgumentList Warn, { + param($message) + $Payload.module_args._ansible_exec_wrapper_warnings.Add($message) + } + $fake_module.PSObject.Members.Add($warning_func) + Add-CSharpType -References $csharp_utils -AnsibleModule $fake_module } if ($Payload.ContainsKey("coverage") -and $null -ne $host.Runspace -and $null -ne $host.Runspace.Debugger) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/lib/ansible/module_utils/ansible_release.py new/ansible_core-2.16.8/lib/ansible/module_utils/ansible_release.py --- old/ansible_core-2.16.7/lib/ansible/module_utils/ansible_release.py 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/lib/ansible/module_utils/ansible_release.py 2024-06-17 20:10:21.000000000 +0200 @@ -19,6 +19,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -__version__ = '2.16.7' +__version__ = '2.16.8' __author__ = 'Ansible, Inc.' __codename__ = "All My Love" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/lib/ansible/module_utils/csharp/Ansible.Basic.cs new/ansible_core-2.16.8/lib/ansible/module_utils/csharp/Ansible.Basic.cs --- old/ansible_core-2.16.7/lib/ansible/module_utils/csharp/Ansible.Basic.cs 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/lib/ansible/module_utils/csharp/Ansible.Basic.cs 2024-06-17 20:10:21.000000000 +0200 @@ -1008,7 +1008,16 @@ foreach (DictionaryEntry entry in param) { string paramKey = (string)entry.Key; - if (!legalInputs.Contains(paramKey, StringComparer.OrdinalIgnoreCase)) + if (paramKey == "_ansible_exec_wrapper_warnings") + { + // Special key used in module_powershell_wrapper to pass + // along any warnings that should be returned back to + // Ansible. + removedParameters.Add(paramKey); + foreach (string warning in (IList<string>)entry.Value) + Warn(warning); + } + else if (!legalInputs.Contains(paramKey, StringComparer.OrdinalIgnoreCase)) unsupportedParameters.Add(paramKey); else if (!legalInputs.Contains(paramKey)) // For backwards compatibility we do not care about the case but we need to warn the users as this will diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/lib/ansible/module_utils/powershell/Ansible.ModuleUtils.AddType.psm1 new/ansible_core-2.16.8/lib/ansible/module_utils/powershell/Ansible.ModuleUtils.AddType.psm1 --- old/ansible_core-2.16.7/lib/ansible/module_utils/powershell/Ansible.ModuleUtils.AddType.psm1 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/lib/ansible/module_utils/powershell/Ansible.ModuleUtils.AddType.psm1 2024-06-17 20:10:21.000000000 +0200 @@ -75,7 +75,7 @@ [Switch]$IgnoreWarnings, [Switch]$PassThru, [Parameter(Mandatory = $true, ParameterSetName = "Module")][Object]$AnsibleModule, - [Parameter(ParameterSetName = "Manual")][String]$TempPath = $env:TMP, + [Parameter(ParameterSetName = "Manual")][String]$TempPath, [Parameter(ParameterSetName = "Manual")][Switch]$IncludeDebugInfo, [String[]]$CompileSymbols = @() ) @@ -280,9 +280,11 @@ $include_debug = $AnsibleModule.Verbosity -ge 3 } else { - $temp_path = $TempPath + $temp_path = [System.IO.Path]::GetTempPath() $include_debug = $IncludeDebugInfo.IsPresent } + $temp_path = Join-Path -Path $temp_path -ChildPath ([Guid]::NewGuid().Guid) + $compiler_options = [System.Collections.ArrayList]@("/optimize") if ($defined_symbols.Count -gt 0) { $compiler_options.Add("/define:" + ([String]::Join(";", $defined_symbols.ToArray()))) > $null @@ -304,8 +306,12 @@ ) # create a code snippet for each reference and check if we need - # to reference any extra assemblies - $ignore_warnings = [System.Collections.ArrayList]@() + # to reference any extra assemblies. + # CS1610 is a warning when csc.exe failed to delete temporary files. + # We use our own temp dir deletion mechanism so this doesn't become a + # fatal error. + # https://github.com/ansible-collections/ansible.windows/issues/598 + $ignore_warnings = [System.Collections.ArrayList]@('1610') $compile_units = [System.Collections.Generic.List`1[System.CodeDom.CodeSnippetCompileUnit]]@() foreach ($reference in $References) { # scan through code and add any assemblies that match @@ -373,7 +379,26 @@ } } - $compile = $provider.CompileAssemblyFromDom($compile_parameters, $compile_units) + $null = New-Item -Path $temp_path -ItemType Directory -Force + try { + $compile = $provider.CompileAssemblyFromDom($compile_parameters, $compile_units) + } + finally { + # Try to delete the temp path, if this fails and we are running + # with a module object write a warning instead of failing. + try { + [System.IO.Directory]::Delete($temp_path, $true) + } + catch { + $msg = "Failed to cleanup temporary directory '$temp_path' used for compiling C# code." + if ($AnsibleModule) { + $AnsibleModule.Warn("$msg Files may still be present after the task is complete. Error: $_") + } + else { + throw "$msg Error: $_" + } + } + } } finally { foreach ($kvp in $originalEnv.GetEnumerator()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/lib/ansible/parsing/mod_args.py new/ansible_core-2.16.8/lib/ansible/parsing/mod_args.py --- old/ansible_core-2.16.7/lib/ansible/parsing/mod_args.py 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/lib/ansible/parsing/mod_args.py 2024-06-17 20:10:21.000000000 +0200 @@ -55,6 +55,17 @@ ))) +def _get_action_context(action_or_module, collection_list): + module_context = module_loader.find_plugin_with_context(action_or_module, collection_list=collection_list) + if module_context and module_context.resolved and module_context.action_plugin: + action_or_module = module_context.action_plugin + + context = action_loader.find_plugin_with_context(action_or_module, collection_list=collection_list) + if not context or not context.resolved: + context = module_context + return context + + class ModuleArgsParser: """ @@ -289,6 +300,11 @@ delegate_to = 'localhost' action, args = self._normalize_parameters(thing, action=action, additional_args=additional_args) + if action is not None and not skip_action_validation: + context = _get_action_context(action, self._collection_list) + if context is not None and context.resolved: + self.resolved_action = context.resolved_fqcn + # module: <stuff> is the more new-style invocation # filter out task attributes so we're only querying unrecognized keys as actions/modules @@ -304,9 +320,7 @@ is_action_candidate = True else: try: - context = action_loader.find_plugin_with_context(item, collection_list=self._collection_list) - if not context.resolved: - context = module_loader.find_plugin_with_context(item, collection_list=self._collection_list) + context = _get_action_context(item, self._collection_list) except AnsibleError as e: if e.obj is None: e.obj = self._task_ds diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/lib/ansible/playbook/task.py new/ansible_core-2.16.8/lib/ansible/playbook/task.py --- old/ansible_core-2.16.7/lib/ansible/playbook/task.py 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/lib/ansible/playbook/task.py 2024-06-17 20:10:21.000000000 +0200 @@ -210,6 +210,7 @@ # But if it wasn't, we can add the yaml object now to get more detail raise AnsibleParserError(to_native(e), obj=ds, orig_exc=e) else: + # Set the resolved action plugin (or if it does not exist, module) for callbacks. self.resolved_action = args_parser.resolved_action # the command/shell/script modules used to support the `cmd` arg, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/lib/ansible/plugins/filter/splitext.yml new/ansible_core-2.16.8/lib/ansible/plugins/filter/splitext.yml --- old/ansible_core-2.16.7/lib/ansible/plugins/filter/splitext.yml 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/lib/ansible/plugins/filter/splitext.yml 2024-06-17 20:10:21.000000000 +0200 @@ -14,14 +14,14 @@ EXAMPLES: | - # gobble => [ '/etc/make', 'conf' ] + # gobble => [ '/etc/make', '.conf' ] gobble: "{{ '/etc/make.conf' | splitext }}" - # file_n_ext => [ 'ansible', 'cfg' ] + # file_n_ext => [ 'ansible', '.cfg' ] file_n_ext: "{{ 'ansible.cfg' | splitext }}" - # hoax => ['/etc/hoasdf', ''] - hoax: '{{ "/etc//hoasdf/" | splitext }}' + # hoax => [ '/etc/hoasdf', '' ] + hoax: "{{ '/etc/hoasdf' | splitext }}" RETURN: _value: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/lib/ansible/plugins/filter/win_splitdrive.yml new/ansible_core-2.16.8/lib/ansible/plugins/filter/win_splitdrive.yml --- old/ansible_core-2.16.7/lib/ansible/plugins/filter/win_splitdrive.yml 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/lib/ansible/plugins/filter/win_splitdrive.yml 2024-06-17 20:10:21.000000000 +0200 @@ -5,6 +5,8 @@ short_description: Split a Windows path by the drive letter description: - Returns a list with the first component being the drive letter and the second, the rest of the path. + - If the path contains a drive letter, drive will contain everything up to and including the colon. + - If the path contains a UNC (Universal Naming Convention) path, drive will contain the host name and share, up to but not including the fourth separator. options: _input: description: A Windows path. @@ -13,17 +15,27 @@ EXAMPLES: | - # To get the last name of a file Windows path, like ['C', '\Users\asdf\foo.txt'] out of 'C:\Users\asdf\foo.txt' + # To get the last name of a file Windows path, like ['C:', '\Users\asdf\foo.txt'] out of 'C:\Users\asdf\foo.txt' {{ mypath | win_splitdrive }} - # just the drive letter + # To get path from UNC (Universal Naming Convention) path, like ['//host/computer', '/dir/a'] out of '//host/computer/dir/a' + + # just the drive letter, like ['C:'] out of 'C:\Users\asdf\foo.txt' + {{ mypath | win_splitdrive | first }} + + # path w/o drive letter, like ['\Users\asdf\foo.txt'] out of 'C:\Users\asdf\foo.txt' + {{ mypath | win_splitdrive | last }} + + # just the hostname and share, like ['//host/computer'] out of '//host/computer/dir/a' {{ mypath | win_splitdrive | first }} - # path w/o drive letter + # path w/o hostname and share, like ['/dir/a'] out of '//host/computer/dir/a' {{ mypath | win_splitdrive | last }} RETURN: _value: - description: List in which the first element is the drive letter and the second the rest of the path. + description: + - List in which the first element is the drive letter with colon and the second the rest of the path. + - In case of UNC path, first element is the hostname and share and the second the rest of the path. type: list elements: str diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/lib/ansible/release.py new/ansible_core-2.16.8/lib/ansible/release.py --- old/ansible_core-2.16.7/lib/ansible/release.py 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/lib/ansible/release.py 2024-06-17 20:10:21.000000000 +0200 @@ -19,6 +19,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -__version__ = '2.16.7' +__version__ = '2.16.8' __author__ = 'Ansible, Inc.' __codename__ = "All My Love" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/lib/ansible_core.egg-info/PKG-INFO new/ansible_core-2.16.8/lib/ansible_core.egg-info/PKG-INFO --- old/ansible_core-2.16.7/lib/ansible_core.egg-info/PKG-INFO 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/lib/ansible_core.egg-info/PKG-INFO 2024-06-17 20:10:21.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ansible-core -Version: 2.16.7 +Version: 2.16.8 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.7/test/integration/targets/collections/test_task_resolved_plugin/unqualified_and_collections_kw.yml new/ansible_core-2.16.8/test/integration/targets/collections/test_task_resolved_plugin/unqualified_and_collections_kw.yml --- old/ansible_core-2.16.7/test/integration/targets/collections/test_task_resolved_plugin/unqualified_and_collections_kw.yml 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/test/integration/targets/collections/test_task_resolved_plugin/unqualified_and_collections_kw.yml 2024-06-17 20:10:21.000000000 +0200 @@ -10,5 +10,7 @@ - ping: - collection_action: - collection_module: - - formerly_action: - - formerly_module: + - local_action: + module: formerly_action + - action: + module: formerly_module diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/test/integration/targets/module_defaults/tasks/main.yml new/ansible_core-2.16.8/test/integration/targets/module_defaults/tasks/main.yml --- old/ansible_core-2.16.7/test/integration/targets/module_defaults/tasks/main.yml 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/test/integration/targets/module_defaults/tasks/main.yml 2024-06-17 20:10:21.000000000 +0200 @@ -10,16 +10,23 @@ - debug: register: foo + - local_action: + module: debug + register: local_action_foo + - name: test that 'debug' task used default 'msg' param assert: - that: foo.msg == "test default" + that: + - foo.msg == "test default" + - local_action_foo.msg == "test default" - name: remove test file file: state: absent - name: touch test file - file: + local_action: + module: file state: touch - name: stat test file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/test/integration/targets/module_utils_Ansible.Basic/library/ansible_basic_tests.ps1 new/ansible_core-2.16.8/test/integration/targets/module_utils_Ansible.Basic/library/ansible_basic_tests.ps1 --- old/ansible_core-2.16.7/test/integration/targets/module_utils_Ansible.Basic/library/ansible_basic_tests.ps1 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/test/integration/targets/module_utils_Ansible.Basic/library/ansible_basic_tests.ps1 2024-06-17 20:10:21.000000000 +0200 @@ -1322,6 +1322,37 @@ $actual | Assert-DictionaryEqual -Expected $expected } + "Run with exec wrapper warnings" = { + Set-Variable -Name complex_args -Scope Global -Value @{ + _ansible_exec_wrapper_warnings = [System.Collections.Generic.List[string]]@( + 'Warning 1', + 'Warning 2' + ) + } + $m = [Ansible.Basic.AnsibleModule]::Create(@(), @{}) + $m.Warn("Warning 3") + + $failed = $false + try { + $m.ExitJson() + } + catch [System.Management.Automation.RuntimeException] { + $failed = $true + $_.Exception.Message | Assert-Equal -Expected "exit: 0" + $actual = [Ansible.Basic.AnsibleModule]::FromJson($_.Exception.InnerException.Output) + } + $failed | Assert-Equal -Expected $true + + $expected = @{ + changed = $false + invocation = @{ + module_args = @{} + } + warnings = @("Warning 1", "Warning 2", "Warning 3") + } + $actual | Assert-DictionaryEqual -Expected $expected + } + "FailJson with message" = { $m = [Ansible.Basic.AnsibleModule]::Create(@(), @{}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/test/integration/targets/win_exec_wrapper/tasks/main.yml new/ansible_core-2.16.8/test/integration/targets/win_exec_wrapper/tasks/main.yml --- old/ansible_core-2.16.7/test/integration/targets/win_exec_wrapper/tasks/main.yml 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/test/integration/targets/win_exec_wrapper/tasks/main.yml 2024-06-17 20:10:21.000000000 +0200 @@ -194,16 +194,33 @@ become_test_username: ansible_become_test gen_pw: "{{ 'password123!' + lookup('password', '/dev/null chars=ascii_letters,digits length=8') }}" -- name: create unprivileged user - win_user: - name: "{{ become_test_username }}" - password: "{{ gen_pw }}" - update_password: always - groups: Users - register: become_test_user_result - - name: execute tests and ensure that test user is deleted regardless of success/failure block: + - name: create unprivileged user + win_user: + name: "{{ become_test_username }}" + password: "{{ gen_pw }}" + update_password: always + groups: Users + register: become_test_user_result + + - name: create tempdir for test user + win_file: + path: C:\Windows\TEMP\test-dir + state: directory + + - name: deny delete permissions on new temp dir for test user + win_acl: + path: C:\Windows\TEMP\test-dir + user: '{{ become_test_user_result.sid }}' + type: '{{ item.type }}' + rights: '{{ item.rights }}' + loop: + - type: allow + rights: ListDirectory, CreateFiles, CreateDirectories, ReadAttributes, ReadExtendedAttributes, WriteData, WriteAttributes, WriteExtendedAttributes, Synchronize + - type: deny + rights: DeleteSubdirectoriesAndFiles, Delete + - name: ensure current user is not the become user win_shell: whoami register: whoami_out @@ -238,6 +255,21 @@ - become_system is successful - become_system.output == become_test_user_result.sid + - name: run module with tempdir with no delete access + win_ping: + register: temp_deletion_warning + vars: + <<: *become_vars + ansible_remote_tmp: C:\Windows\TEMP\test-dir + + - name: assert warning about tmpdir deletion is present + assert: + that: + - temp_deletion_warning.warnings | count == 1 + - >- + temp_deletion_warning.warnings[0] is + regex("(?i).*Failed to cleanup temporary directory 'C:\\\\Windows\\\\TEMP\\\\test-dir\\\\.*' used for compiling C# code\\. Files may still be present after the task is complete\\..*") + always: - name: ensure test user is deleted win_user: @@ -249,7 +281,12 @@ win_shell: rmdir /S /Q {{ profile_dir_out.stdout_lines[0] }} args: executable: cmd.exe - when: become_test_username in profile_dir_out.stdout_lines[0] + when: become_test_username in profile_dir_out.stdout_lines[0] | default("") + + - name: remove test tempdir + win_file: + path: C:\Windows\TEMP\test-dir + state: absent - name: test common functions in exec test_common_functions: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/test/lib/ansible_test/_internal/pypi_proxy.py new/ansible_core-2.16.8/test/lib/ansible_test/_internal/pypi_proxy.py --- old/ansible_core-2.16.7/test/lib/ansible_test/_internal/pypi_proxy.py 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/test/lib/ansible_test/_internal/pypi_proxy.py 2024-06-17 20:10:21.000000000 +0200 @@ -76,7 +76,7 @@ display.warning('Unable to use the PyPI proxy because Docker is not available. Installation of packages using `pip` may fail.') return - image = 'quay.io/ansible/pypi-test-container:2.0.0' + image = 'quay.io/ansible/pypi-test-container:3.1.0' port = 3141 run_support_container( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/test/units/playbook/test_block.py new/ansible_core-2.16.8/test/units/playbook/test_block.py --- old/ansible_core-2.16.7/test/units/playbook/test_block.py 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/test/units/playbook/test_block.py 2024-06-17 20:10:21.000000000 +0200 @@ -22,6 +22,10 @@ from units.compat import unittest from ansible.playbook.block import Block from ansible.playbook.task import Task +from ansible.plugins.loader import init_plugin_loader + + +init_plugin_loader() class TestBlock(unittest.TestCase): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/test/units/playbook/test_helpers.py new/ansible_core-2.16.8/test/units/playbook/test_helpers.py --- old/ansible_core-2.16.7/test/units/playbook/test_helpers.py 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/test/units/playbook/test_helpers.py 2024-06-17 20:10:21.000000000 +0200 @@ -26,13 +26,16 @@ from units.mock.loader import DictDataLoader from ansible import errors +from ansible.playbook import helpers from ansible.playbook.block import Block from ansible.playbook.handler import Handler from ansible.playbook.task import Task from ansible.playbook.task_include import TaskInclude from ansible.playbook.role.include import RoleInclude +from ansible.plugins.loader import init_plugin_loader -from ansible.playbook import helpers + +init_plugin_loader() class MixinForMocks(object): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible_core-2.16.7/test/units/utils/display/test_broken_cowsay.py new/ansible_core-2.16.8/test/units/utils/display/test_broken_cowsay.py --- old/ansible_core-2.16.7/test/units/utils/display/test_broken_cowsay.py 2024-05-20 20:41:55.000000000 +0200 +++ new/ansible_core-2.16.8/test/units/utils/display/test_broken_cowsay.py 2024-06-17 20:10:21.000000000 +0200 @@ -12,13 +12,12 @@ def test_display_with_fake_cowsay_binary(capsys, mocker): - display = Display() mocker.patch("ansible.constants.ANSIBLE_COW_PATH", "./cowsay.sh") - mock_popen = MagicMock() mock_popen.return_value.returncode = 1 mocker.patch("subprocess.Popen", mock_popen) + display = Display() assert not hasattr(display, "cows_available") assert display.b_cowsay is None ++++++ ansible_core-2.16.7.tar.gz.sha256 -> ansible_core-2.16.8.tar.gz.sha256 ++++++ --- /work/SRC/openSUSE:Factory/ansible-core/ansible_core-2.16.7.tar.gz.sha256 2024-05-24 19:51:38.058592321 +0200 +++ /work/SRC/openSUSE:Factory/.ansible-core.new.18349/ansible_core-2.16.8.tar.gz.sha256 2024-06-19 16:40:36.901998699 +0200 @@ -1 +1 @@ -a8c8f4facba30514571d47abec5c62a5768b86fef3d80d724911c8f20b7b34b7 ansible_core-2.16.7.tar.gz +59e4aa40ed5acdb4ef9bbf3d058918fff93f66a149373d8159c8a29604410bda ansible_core-2.16.8.tar.gz