12 Commits

Author SHA256 Message Date
f44b02a976 Accepting request 1322178 from systemsmanagement:ansible
OBS-URL: https://build.opensuse.org/request/show/1322178
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ansible-core?expand=0&rev=51
2025-12-11 17:41:22 +00:00
e5eb8620e6 update to 2.20.1
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:ansible/ansible-core?expand=0&rev=109
2025-12-11 09:59:30 +00:00
365ff3cd6e Accepting request 1318787 from systemsmanagement:ansible
OBS-URL: https://build.opensuse.org/request/show/1318787
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ansible-core?expand=0&rev=50
2025-11-21 15:54:45 +00:00
8c0af92b2f update to 2.20.0
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:ansible/ansible-core?expand=0&rev=107
2025-11-20 06:29:52 +00:00
2c3dc9165c Accepting request 1315706 from systemsmanagement:ansible
OBS-URL: https://build.opensuse.org/request/show/1315706
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ansible-core?expand=0&rev=49
2025-11-06 17:12:52 +00:00
28d7f2f6b8 update to 2.19.4
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:ansible/ansible-core?expand=0&rev=105
2025-11-05 10:50:58 +00:00
5618f9e6c4 Accepting request 1309466 from systemsmanagement:ansible
OBS-URL: https://build.opensuse.org/request/show/1309466
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ansible-core?expand=0&rev=48
2025-10-07 16:28:26 +00:00
0dd4110d06 update to 2.19.3
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:ansible/ansible-core?expand=0&rev=103
2025-10-07 07:06:10 +00:00
ba7e6d982f Accepting request 1306418 from systemsmanagement:ansible
OBS-URL: https://build.opensuse.org/request/show/1306418
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ansible-core?expand=0&rev=47
2025-09-22 14:40:39 +00:00
e7dbaeaca8 update to 2.19.2, disable lots of test on 15.x
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:ansible/ansible-core?expand=0&rev=101
2025-09-22 06:45:46 +00:00
ae35c1fa3d Accepting request 1300686 from systemsmanagement:ansible
OBS-URL: https://build.opensuse.org/request/show/1300686
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ansible-core?expand=0&rev=46
2025-08-21 18:31:03 +00:00
bcae429b16 update to 2.18.8
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:ansible/ansible-core?expand=0&rev=99
2025-08-21 06:37:56 +00:00
9 changed files with 884 additions and 272 deletions

View File

@@ -1,87 +0,0 @@
From 771f7ad29ca4d259761eaa88673c2e32f6412bbe Mon Sep 17 00:00:00 2001
From: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Date: Wed, 6 Nov 2024 10:20:26 -0500
Subject: [PATCH] update ansible-galaxy resolvelib requirement to >= 0.5.3, <
2.0.0 (#84218)
* Update resolvelib upperbound to 2.0.0
Minor SemVer releases should not contain breaking changes
* Test the latest minor release and reduce number of resolvelib versions tested for efficiency
---
.../fragments/update-resolvelib-lt-2_0_0.yml | 2 ++
.../galaxy/dependency_resolution/providers.py | 2 +-
requirements.txt | 2 +-
.../ansible-galaxy-collection/vars/main.yml | 14 ++++++++------
.../ansible_test/_data/requirements/ansible.txt | 2 +-
5 files changed, 13 insertions(+), 9 deletions(-)
create mode 100644 changelogs/fragments/update-resolvelib-lt-2_0_0.yml
diff --git a/changelogs/fragments/update-resolvelib-lt-2_0_0.yml b/changelogs/fragments/update-resolvelib-lt-2_0_0.yml
new file mode 100644
index 00000000000000..10c4f1a0838b91
--- /dev/null
+++ b/changelogs/fragments/update-resolvelib-lt-2_0_0.yml
@@ -0,0 +1,2 @@
+minor_changes:
+ - ansible-galaxy - support ``resolvelib >= 0.5.3, < 2.0.0`` (https://github.com/ansible/ansible/issues/84217).
diff --git a/lib/ansible/galaxy/dependency_resolution/providers.py b/lib/ansible/galaxy/dependency_resolution/providers.py
index 7578cae785c100..d336c3441e2e1d 100644
--- a/lib/ansible/galaxy/dependency_resolution/providers.py
+++ b/lib/ansible/galaxy/dependency_resolution/providers.py
@@ -39,7 +39,7 @@ class AbstractProvider: # type: ignore[no-redef]
# TODO: add python requirements to ansible-test's ansible-core distribution info and remove the hardcoded lowerbound/upperbound fallback
RESOLVELIB_LOWERBOUND = SemanticVersion("0.5.3")
-RESOLVELIB_UPPERBOUND = SemanticVersion("1.1.0")
+RESOLVELIB_UPPERBOUND = SemanticVersion("2.0.0")
RESOLVELIB_VERSION = SemanticVersion.from_loose_version(LooseVersion(resolvelib_version))
diff --git a/requirements.txt b/requirements.txt
index 5eaf9f2cbc2911..45c9c01b803647 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -12,4 +12,4 @@ packaging
# NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69
# NOTE: When updating the upper bound, also update the latest version used
# NOTE: in the ansible-galaxy-collection test suite.
-resolvelib >= 0.5.3, < 1.1.0 # dependency resolver used by ansible-galaxy
+resolvelib >= 0.5.3, < 2.0.0 # dependency resolver used by ansible-galaxy
diff --git a/test/integration/targets/ansible-galaxy-collection/vars/main.yml b/test/integration/targets/ansible-galaxy-collection/vars/main.yml
index 066d2678bca56e..c865871c4fe692 100644
--- a/test/integration/targets/ansible-galaxy-collection/vars/main.yml
+++ b/test/integration/targets/ansible-galaxy-collection/vars/main.yml
@@ -4,13 +4,15 @@ gpg_homedir: "{{ galaxy_dir }}/gpg"
offline_server: https://test-hub.demolab.local/api/galaxy/content/api/
+# Test oldest and most recently supported, and versions with notable changes.
+# The last breaking change for a feature ansible-galaxy uses was in 0.8.0.
+# It would be redundant to test every minor version since 0.8.0, so we just test against the latest minor release.
+# NOTE: If ansible-galaxy incorporates new resolvelib features, this matrix should be updated to verify the features work on all supported versions.
supported_resolvelib_versions:
- - "0.5.3" # Oldest supported
- - "0.6.0"
- - "0.7.0"
- - "0.8.0"
- - "0.9.0"
- - "1.0.1"
+ - "0.5.3" # test CollectionDependencyProvider050
+ - "0.6.0" # test CollectionDependencyProvider060
+ - "0.7.0" # test CollectionDependencyProvider070
+ - "<2.0.0" # test CollectionDependencyProvider080
unsupported_resolvelib_versions:
- "0.2.0" # Fails on import
diff --git a/test/lib/ansible_test/_data/requirements/ansible.txt b/test/lib/ansible_test/_data/requirements/ansible.txt
index 5eaf9f2cbc2911..45c9c01b803647 100644
--- a/test/lib/ansible_test/_data/requirements/ansible.txt
+++ b/test/lib/ansible_test/_data/requirements/ansible.txt
@@ -12,4 +12,4 @@ packaging
# NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69
# NOTE: When updating the upper bound, also update the latest version used
# NOTE: in the ansible-galaxy-collection test suite.
-resolvelib >= 0.5.3, < 1.1.0 # dependency resolver used by ansible-galaxy
+resolvelib >= 0.5.3, < 2.0.0 # dependency resolver used by ansible-galaxy

View File

@@ -1,21 +1,874 @@
-------------------------------------------------------------------
Mon May 26 12:43:54 UTC 2025 - Harshvardhan Sharma <harshvardhan.sharma@suse.com>
Thu Dec 11 08:28:49 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- Extend suse-distribution-fix.patch:
* Also detect VARIANT_ID='sles-sap' as SLES_SAP
- update to 2.20.1:
https://github.com/ansible/ansible/blob/v2.20.1/changelogs/CHANGELOG-v2.20.rst
* Bugfixes
- Fix AnsibleModule.human_to_bytes(), which was never adjusted
after the standalone human_to_bytes() got a new parameter
default_unit (#85259).
- Variable loading now uses file source instead of variables
when invalidly formmated vars file is loaded.
- ansible-test - The runtime-metadata sanity test now ignores
pre-release and build identifiers in collection versions.
This prevents errors if a tombstone version is X.0.0, while
the collection's version is X.0.0-prerelease (#85193)."
- display - Fix getuser fallback error handling on Python 3.13
and later. (#86142)
- first_found - Correct the "Include tasks only if one of the
files exists, otherwise skip" example.
- get_url - fix regex for GNU Digest line which is used in
comparing checksums (#86132).
- local connection - Fix getuser fallback error handling on
Python 3.13 and later.
-------------------------------------------------------------------
Tue May 20 10:18:01 UTC 2025 - Harshvardhan Sharma <harshvardhan.sharma@suse.com>
Fri Nov 7 15:52:19 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- Add missing dependency on python311-rpm required by package_facts
(#1243193)
- update to 2.20.0:
https://github.com/ansible/ansible/blob/v2.20.0/changelogs/CHANGELOG-v2.20.rst
* Major Changes
- ansible - Add support for Python 3.14.
- ansible - Drop support for Python 3.11 on the controller.
- ansible - Drop support for Python 3.8 on targets.
* Minor Changes
- Add tech preview play argument spec validation, which can be
enabled by setting the play keyword validate_argspec to True
or the name of an argument spec. When validate_argspec is set
to True, a play name is required and used as the argument
spec name. When enabled, the argument spec is loaded from a
file matching the pattern <playbook_name>.meta.yml. At
minimum, this file should contain {"argument_specs": {"name":
{"options": {}}}}, where "name" is the name of the play or
configured argument spec.
- Added Univention Corporate Server as a part of Debian OS
distribution family (#85490).
- AnsibleModule - Add temporary internal monkeypatch-able hook
to alter module result serialization by splitting
serialization from _return_formatted into
_record_module_result.
- DataLoader - Update DataLoader.get_basedir to be an abspath
- Python type hints applied to to_text and to_bytes functions
for better type hint interactions with code utilizing these
functions.
- ansible now warns if you use reserved tags that were only
meant for selection and not for use in play.
- ansible-doc - Return a more verbose error message when the
description field is missing.
- ansible-doc - show notes, seealso, and top-level
version_added for role entrypoints (#81796).
- ansible-doc adds support for RETURN documentation to support
doc fragment plugins
- ansible-test - Default to Python 3.14 in the base and default
test containers.
- ansible-test - Filter out pylint messages for invalid
filenames and display a notice when doing so.
- ansible-test - Implement new authentication methods for
accessing the Ansible Core CI service.
- ansible-test - Improve formatting of generated coverage
config file.
- ansible-test - Removed support for automatic provisioning of
obsolete instances for network-integration tests.
- ansible-test - Replace FreeBSD 14.2 with 14.3.
- ansible-test - Replace RHEL 9.5 with 9.6.
- ansible-test - Update Ubuntu containers.
- ansible-test - Update astroid imports in custom pylint
checkers.
- ansible-test - Update base/default containers to include
Python 3.14.0.
- ansible-test - Update default containers.
- ansible-test - Update pinned pip version to 25.2.
- ansible-test - Update pinned sanity test requirements,
including upgrading to pylint 4.0.0.
- ansible-test - Update pinned sanity test requirements.
- ansible-test - Update test containers.
- ansible-test - Update the pylint sanity test to pylint 4.0.2.
- ansible-test - Upgrade Alpine 3.21 to 3.22.
- ansible-test - Upgrade Fedora 41 to Fedora 42.
- ansible-test - Upgrade to coverage version 7.10.7 for Python
3.9 and later.
- ansible-test - Use OS packages to satisfy controller
requirements on FreeBSD 13.5 during managed instance
bootstrapping.
- apt_repository - use correct debug method to print debug
message.
- blockinfile - add new module option encoding to support files
in encodings other than UTF-8 (#85291).
- deb822_repository - Add automatic installation of the
python3-debian package if it is missing by adding the
parameter install_python_debian
- default callback plugin - add option to configure indentation
for JSON and YAML output (#85497).
- encrypt - check datatype of salt_size in password_hash
filter.
- fetch_file - add ca_path and cookies parameter arguments
(#85172).
- include_vars - Raise an error if 'extensions' is not
specified as a list.
- include_vars - Raise an error if 'ignore_files' is not
specified as a list.
- known_hosts - return rc and stderr when ssh-keygen command
fails for further debugging (#85850).
- lineinfile - add new module option encoding to support files
in encodings other than UTF-8 (#84999).
- regex - Document the match_type fullmatch.
- regex - Ensure that match_type is one of match, fullmatch, or
search (#85629).
- replace - read/write files in text-mode as unicode chars
instead of as bytes and switch regex matching to unicode
chars instead of bytes. (#85785).
- service_facts - handle keyerror exceptions with warning.
- service_facts - warn user about missing service details
instead of ignoring.
- setup - added new subkey lvs within each entry of
ansible_facts['vgs'] to provide complete logical volume data
scoped by volume group. The top level lvs fact by comparison,
deduplicates logical volume names across volume groups and
may be incomplete. (#85632)
- six - bump six version from 1.16.0 to 1.17.0 (#85408).
- stat module - add SELinux context as a return value, and add
a new option to trigger this return, which is False by
default. (#85217).
- tags now warn when using reserved keywords.
- wrapt - bump version from 1.15.0 to 1.17.2 (#85407).
* Breaking Changes / Porting Guide
- powershell - Removed code that tried to remote quotes from
paths when performing Windows operations like copying and
fetching file. This should not affect normal playbooks unless
a value is quoted too many times.
* Deprecated Features
- Deprecated the shell plugin's wrap_for_exec function. This
API is not used in Ansible or any known collection and is
being removed to simplify the plugin API. Plugin authors
should wrap their command to execute within an explicit shell
or other known executable.
- INJECT_FACTS_AS_VARS configuration currently defaults to
True, this is now deprecated and it will switch to False by
Ansible 2.24. You will only get notified if you are accessing
'injected' facts (for example, ansible_os_distribution vs
ansible_facts['os_distribution']).
- hash_params function in roles/__init__ is being deprecated as
it is not in use.
- include_vars - Specifying 'ignore_files' as a string is
deprecated.
- vars, the internal variable cache will be removed in 2.24.
This cache, once used internally exposes variables in
inconsistent states, the 'vars' and 'varnames' lookups should
be used instead.
* Removed Features (previously deprecated)
- Removed the option to set the DEFAULT_TRANSPORT configuration
to smart that selects the default transport as either ssh or
paramiko based on the underlying platform configuraton.
- vault/unvault filters - remove the deprecated vaultid
parameter.
- ansible-doc - role entrypoint attributes are no longer shown
- ansible-galaxy - remove support for resolvelib >= 0.5.3, <
0.8.0.
- ansible-galaxy - removed the v2 Galaxy server API. Galaxy
servers hosting collections must support v3.
- dnf/dnf5 - remove deprecated install_repoquery option.
- encrypt - remove deprecated passlib_or_crypt API.
- paramiko - Removed the PARAMIKO_HOST_KEY_AUTO_ADD and
PARAMIKO_LOOK_FOR_KEYS configuration keys, which were
previously deprecated.
- py3compat - remove deprecated py3compat.environ call.
- vars plugins - removed the deprecated get_host_vars or
get_group_vars fallback for vars plugins that do not inherit
from BaseVarsPlugin and define a get_vars method.
- yum_repository - remove deprecated keepcache option.
* Bugfixes
- Do not re-add tags on blocks from within import_tasks.
- Fix issue where play tags prevented executing notified
handlers (#85475)
- Fix issues with keywords being incorrectly validated on
import_tasks (#85855, #85856)
- Fix traceback when trying to import non-existing file via
nested import_tasks (#69882)
- SIGINT/SIGTERM Handling - Make SIGINT/SIGTERM handling more
robust by splitting concerns between forks and the parent.
- The ansible_failed_task variable is now correctly exposed in
a rescue section, even when a failing handler is triggered by
the flush_handlers task in the corresponding block (#85682)
- Windows - ignore temporary file cleanup warning when using
AnsibleModule to compile C# utils. This should reduce the
number of warnings that can safely be ignored when running
PowerShell modules - #85976
- Windows async - Handle running PowerShell modules with
trailing data after the module result
- ansible-galaxy collection list - fail when none of the
configured collection paths exist.
- ternary filter - evaluate values lazily (#85743)
- ansible-doc - prevent crash when scanning collections in
paths that have more than one ansible_collections in it
(#84909, #85361).
- ansible-doc --list/--list_files/--metadata-dump - fixed
relative imports in nested filter/test plugin files (#85753).
- ansible-galaxy - Use the provided import task url, instead of
parsing to get the task id and reconstructing the URL
- ansible-galaxy no longer shows the internal protomatter
collection when listing.
- ansible-test - Always exclude the tests/output/ directory
from a collection's code coverage. (#84244)
- ansible-test - Fix a traceback that can occur when using
delegation before the ansible-test temp directory is created.
- ansible-test - Limit package install retries during managed
remote instance bootstrapping.
- ansible-test - Use a consistent coverage config for all
collection testing.
- apt - mark dependencies installed as part of deb file
installation as auto (#78123).
- argspec validation - The str argspec type treats None values
as empty string for better consistency with pre-2.19
templating conversions.
- cache plugins - close temp cache file before moving it to fix
error on WSL. (#85816)
- callback plugins - fix displaying the rendered ansible_host
variable with delegate_to (#84922).
- callback plugins - improve consistency accessing the Task
object's resolved_action attribute.
- conditionals - When displaying a broken conditional error or
deprecation warning, the origin of the non-boolean result is
included (if available), and the raw result is omitted.
- config lookup now properly factors in variables and
show_origin when checking entries from the global
configuration.
- display - Fixed reference to undefined
_DeferredWarningContext when issuing early warnings during
startup. (#85886)
- dnf - Check if installroot is directory or not (#85680).
- failed_when - When using failed_when to suppress an error,
the exception key in the result is renamed to
failed_when_suppressed_exception. This prevents the error
from being displayed by callbacks after being suppressed.
(#85505)
- fetch - also return file in the result when changed is True
(#85729).
- import_tasks - fix templating parent include arguments.
- include_role - allow host specific values in all *_from
arguments (#66497)
- option argument deprecations now have a proper alternative
help text.
- package_facts - typecast bytes to string while returning
facts (#85937).
- pip - Fix pip module output so that it returns changed when
the only operation is initializing a venv.
- plugins config, get_option_and_origin now correctly displays
the value and origin of the option.
- psrp - ReadTimeout exceptions now mark host as unreachable
instead of fatal (#85966)
- run_command - Fixed premature selector unregistration on
empty read from stdout/stderr that caused truncated output or
hangs in rare situations.
- script inventory plugin will now show correct 'incorrect'
type when doing implicit conversions on groups.
- ssh connection - fix documented variables for the host
option. Connection options can be configured with delegated
variables in general.
- template lookup - Skip finalization on the internal
templating operation to allow markers to be returned and
handled by, e.g. the default filter. Previously, finalization
tripped markers, causing an exception to end processing of
the current template pipeline. (#85674)
- templating - Avoid tripping markers within Jinja generated
code. (#85674)
- templating - Ensure filter plugin result processing occurs
under the correct call context. (#85585)
- templating - Fix slicing of tuples in templating (#85606).
- templating - Multi-node template results coerce embedded None
nodes to empty string (instead of rendering literal None to
the output).
- templating - Undefined marker values sourced from the Jinja
getattr->getitem fallback are now accessed correctly, raising
AnsibleUndefinedVariable for user plugins that do not
understand markers. Previously, these values were erroneously
returned to user plugin code that had not opted in to marker
acceptance.
- tqm - use display.error_as_warning instead of
display.warning_as_error.
- tqm - use display.error_as_warning instead of self.warning.
- uri - fix form-multipart file not being found when task is
retried (#85009)
- validate-modules sanity test - fix handling of missing doc
fragments (#85638).
* Known Issues
- templating - Exceptions raised in a Jinja set or with block
which are not accessed by the template are ignored in the
same manner as undefined values.
- templating - Passing a container created in a Jinja set or
with block to a method results in a copy of that container.
Mutations to that container which are not returned by the
method will be discarded.
-------------------------------------------------------------------
Tue Apr 22 13:59:15 UTC 2025 - Harshvardhan Sharma <harshvardhan.sharma@suse.com>
Wed Nov 5 10:18:14 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- update to 2.19.4:
* Bugfixes
- Fix issue where play tags prevented executing notified
handlers (#85475)
- Fix issues with keywords being incorrectly validated on
import_tasks (#85855, #85856)
- Fix traceback when trying to import non-existing file via
nested import_tasks (#69882)
- SIGINT/SIGTERM Handling - Make SIGINT/SIGTERM handling more
robust by splitting concerns between forks and the parent.
- Windows - ignore temporary file cleanup warning when using
AnsibleModule to compile C# utils. This should reduce the
number of warnings that can safely be ignored when running
PowerShell modules - #85976
- ansible-doc - prevent crash when scanning collections in
paths that have more than one ansible_collections in it
(#84909, #85361).
- callback plugins - improve consistency accessing the Task
object's resolved_action attribute.
- config lookup now properly factors in variables and
show_origin when checking entries from the global
configuration.
- option argument deprecations now have a proper alternative
help text.
- package_facts - typecast bytes to string while returning
facts (#85937).
- psrp - ReadTimeout exceptions now mark host as unreachable
instead of fatal (#85966)
-------------------------------------------------------------------
Tue Oct 7 06:33:05 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- update to 2.19.3:
* Minor Changes
- fetch_file - add ca_path and cookies parameter arguments
(#85172).
* Bugfixes
- Windows async - Handle running PowerShell modules with
trailing data after the module result
- ansible-doc --list/--list_files/--metadata-dump - fixed
relative imports in nested filter/test plugin files (#85753).
- display - Fixed reference to undefined
'_DeferredWarningContext' when issuing early warnings during
startup. (#85886)
- run_command - Fixed premature selector unregistration on
empty read from stdout/stderr that caused truncated output or
hangs in rare situations.
- script inventory plugin will now show correct 'incorrect'
type when doing implicit conversions on groups.
-------------------------------------------------------------------
Fri Sep 19 13:06:56 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- update to 2.19.2:
* Minor Changes
- ansible-test - Implement new authentication methods for
accessing the Ansible Core CI service.
* Bugfixes
- The ansible_failed_task variable is now correctly exposed in a
rescue section, even when a failing handler is triggered by the
flush_handlers task in the corresponding block (#85682)
- ternary filter - evaluate values lazily (#85743)
-------------------------------------------------------------------
Tue Aug 26 05:15:17 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- update to 2.19.1:
* Minor Changes
- AnsibleModule - Add temporary internal monkeypatch-able hook
to alter module result serialization by splitting
serialization from '_return_formatted' into
'_record_module_result'.
- ansible-test - Improve formatting of generated coverage
config file.
- ansible-test - Use OS packages to satisfy controller
requirements on FreeBSD 13.5 during managed instance
bootstrapping.
- encrypt - check datatype of salt_size in password_hash
filter.
- service_facts - handle keyerror exceptions with warning.
- service_facts - warn user about missing service details
instead of ignoring.
* Bugfixes
- ansible-test - Always exclude the tests/output/ directory
from a collection's code coverage. (#84244)
- ansible-test - Limit package install retries during managed
remote instance bootstrapping.
- ansible-test - Use a consistent coverage config for all
collection testing.
- argspec validation - The str argspec type treats None values
as empty string for better consistency with pre-2.19
templating conversions.
- conditionals - When displaying a broken conditional error or
deprecation warning, the origin of the non-boolean result is
included (if available), and the raw result is omitted.
- failed_when - When using failed_when to suppress an error,
the exception key in the result is renamed to
failed_when_suppressed_exception. This prevents the error
from being displayed by callbacks after being suppressed.
(#85505)
- import_tasks - fix templating parent include arguments.
- plugins config, get_option_and_origin now correctly displays
the value and origin of the option.
- template lookup - Skip finalization on the internal
templating operation to allow markers to be returned and
handled by, e.g. the default filter. Previously, finalization
tripped markers, causing an exception to end processing of
the current template pipeline. (#85674)
- templating - Avoid tripping markers within Jinja generated
code. (#85674)
- templating - Ensure filter plugin result processing occurs
under the correct call context. (#85585)
- templating - Fix slicing of tuples in templating (#85606).
- templating - Multi-node template results coerce embedded None
nodes to empty string (instead of rendering literal None to
the output).
- templating - Undefined marker values sourced from the Jinja
getattr->getitem fallback are now accessed correctly, raising
AnsibleUndefinedVariable for user plugins that do not
understand markers. Previously, these values were erroneously
returned to user plugin code that had not opted in to marker
acceptance.
- tqm - use display.error_as_warning instead of
display.warning_as_error.
- tqm - use display.error_as_warning instead of self.warning.
-------------------------------------------------------------------
Tue Aug 26 05:07:19 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- update to 2.19.0:
Large update, please see the full changelog for the full list of
bugfixes and minor changes
https://github.com/ansible/ansible/blob/v2.19.0/changelogs/CHANGELOG-v2.19.rst
* Major Changes
- Jinja plugins - Jinja builtin filter and test plugins are now
accessible via their fully-qualified names
ansible.builtin.{name}.
- Task Execution / Forks - Forks no longer inherit stdio from
the parent ansible-playbook process. stdout, stderr, and
stdin within a worker are detached from the terminal, and
non-functional. All needs to access stdio from a fork for
controller side plugins requires use of Display.
- ansible-test - Packages beneath module_utils can now contain
__init__.py files.
- variables - The type system underlying Ansible's variable
storage has been significantly overhauled and formalized.
Attempts to store unsupported Python object types in
variables now more consistently yields early warnings or
errors.
- variables - To support new Ansible features, many variable
objects are now represented by subclasses of their respective
native Python types. In most cases, they behave
indistinguishably from their original types, but some Python
libraries do not handle builtin object subclasses properly.
Custom plugins that interact with such libraries may require
changes to convert and pass the native types.
* Breaking Changes / Porting Guide
- Support for the toml library has been removed from TOML
inventory parsing and dumping. Use tomli for parsing on
Python 3.10. Python 3.11 and later have built-in support for
parsing. Use tomli-w to support outputting inventory in TOML
format.
- assert - The quiet argument must be a commonly-accepted
boolean value. Previously, unrecognized values were silently
treated as False.
- conditionals - Conditional expressions that result in
non-boolean values are now an error by default. Such results
often indicate unintentional use of templates where they are
not supported, resulting in a conditional that is always
true. When this option is enabled, conditional expressions
which are a literal None or empty string will evaluate as
true, for backwards compatibility. The error can be
temporarily changed to a deprecation warning by enabling the
ALLOW_BROKEN_CONDITIONALS config option.
- first_found lookup - When specifying files or paths as a
templated list containing undefined values, the undefined
list elements will be discarded with a warning. Previously,
the entire list would be discarded without any warning.
- internals - The AnsibleLoader and AnsibleDumper classes for
working with YAML are now factory functions and cannot be
extended.
- internals - The ansible.utils.native_jinja Python module has
been removed.
- lookup plugins - Lookup plugins called as with_(lookup) will
no longer have the _subdir attribute set.
- lookup plugins - terms will always be passed to run as the
first positional arg, where previously it was sometimes
passed as a keyword arg when using with_ syntax.
- loops - Omit placeholders no longer leak between loop item
templating and task templating. Previously, omit placeholders
could remain embedded in loop items after templating and be
used as an omit for task templating. Now, values resolving to
omit are dropped immediately when loop items are templated.
To turn missing values into an omit for task templating, use
| default(omit). This solution is backward-compatible with
previous versions of ansible-core.
- modules - Ansible modules using sys.excepthook must use a
standard try/except instead.
- plugins - Any plugin that sources or creates templates must
properly tag them as trusted.
- plugins - Custom Jinja plugins that accept undefined
top-level arguments must opt in to receiving them.
- plugins - Custom Jinja plugins that use environment.getitem
to retrieve undefined values will now trigger a MarkerError
exception. This exception must be handled to allow the plugin
to return a Marker, or the plugin must opt-in to accepting
Marker values.
- public API - The ansible.vars.fact_cache.FactCache wrapper
has been removed.
- serialization of omit sentinel - Serialization of variables
containing omit sentinels (e.g., by the to_json and to_yaml
filters or ansible-inventory) will fail if the variable has
not completed templating. Previously, serialization succeeded
with placeholder strings emitted in the serialized output.
- set_fact - The string values "yes", "no", "true" and "false"
were previously converted (ignoring case) to boolean values
when not using Jinja2 native mode. Since Jinja2 native mode
is always used, this conversion no longer occurs. When
boolean values are required, native boolean syntax should be
used where variables are defined, such as in YAML. When
native boolean syntax is not an option, the bool filter can
be used to parse string values into booleans.
- template lookup - The convert_data option is deprecated and
no longer has any effect. Use the from_json filter on the
lookup result instead.
- templating - Access to _ prefixed attributes and methods, and
methods with known side effects, is no longer permitted. In
cases where a matching mapping key is present, the associated
value will be returned instead of an error. This increases
template environment isolation and ensures more consistent
behavior between the . and [] operators.
- templating - Conditionals and lookups which use embedded
inline templates in Jinja string constants now display a
warning. These templates should be converted to their
expression equivalent.
- templating - Many Jinja plugins (filters, lookups, tests) and
methods previously silently ignored undefined inputs, which
often masked subtle errors. Passing an undefined argument to
a Jinja plugin or method that does not declare undefined
support now results in an undefined value.
- templating - Templates are always rendered in Jinja2 native
mode. As a result, non-string values are no longer
automatically converted to strings.
- templating - Templates resulting in None are no longer
automatically converted to an empty string.
- templating - Templates with embedded inline templates that
were not contained within a Jinja string constant now result
in an error, as support for multi-pass templating was removed
for security reasons. In most cases, such templates can be
easily rewritten to avoid the use of embedded inline
templates.
- templating - The allow_unsafe_lookups option no longer has
any effect. Lookup plugins are responsible for tagging
strings containing templates to allow evaluation as a
template.
- templating - The result of the range() global function cannot
be returned from a template- it should always be passed to a
filter (e.g., random). Previously, range objects returned
from an intermediate template were always converted to a
list, which is inconsistent with inline consumption of range
objects.
- templating - #jinja2: overrides in templates with invalid
override names or types are now templating errors.
* Deprecated Features
- CLI - The --inventory-file option alias is deprecated. Use
the -i or --inventory option instead.
- Jinja test plugins - Returning a non-boolean result from a
Jinja test plugin is deprecated.
- Passing a warnings` or ``deprecations key to exit_json or
fail_json is deprecated. Use AnsibleModule.warn or
AnsibleModule.deprecate instead.
- Strategy Plugins - Use of strategy plugins not provided in
ansible.builtin are deprecated and do not carry any backwards
compatibility guarantees going forward. A future release will
remove the ability to use external strategy plugins. No
alternative for third party strategy plugins is currently
planned.
- The ShellModule.checksum method is now deprecated and will be
removed in ansible-core 2.23. Use
ActionBase._execute_remote_stat() instead.
- The ansible.module_utils.common.collections.count() function
is deprecated and will be removed in ansible-core 2.23. Use
collections.Counter() from the Python standard library
instead.
- YAML parsing - Usage of the YAML 1.1 !!omap and !!pairs tags
is deprecated. Use standard mappings instead.
- YAML parsing - Usage of the undocumented !vault-encrypted
YAML tag is deprecated. Use !vault instead.
- ansible.compat.importlib_resources is deprecated and will be
removed in ansible-core 2.23. Use importlib.resources from
the Python standard library instead.
- ansible.module_utils.compat.datetime - The datetime
compatibility shims are now deprecated. They are scheduled to
be removed in ansible-core v2.21. This includes UTC,
utcfromtimestamp() and utcnow importable from said module
(#81874).
- bool filter - Support for coercing unrecognized input values
(including None) has been deprecated. Consult the filter
documentation for acceptable values, or consider use of the
truthy and falsy tests.
- cache plugins - The ansible.plugins.cache.base Python module
is deprecated. Use ansible.plugins.cache instead.
- callback plugins - The v2_on_any callback method is
deprecated. Use specific callback methods instead.
- callback plugins - The v1 callback API (callback methods not
prefixed with v2_) is deprecated. Use v2_ prefixed methods
instead.
- conditionals - Conditionals using Jinja templating delimiters
(e.g., {{, {%) should be rewritten as expressions without
delimiters, unless the entire conditional value is a single
template that resolves to a trusted string expression. This
is useful for dynamic indirection of conditional expressions,
but is limited to trusted literal string expressions.
- config - The ACTION_WARNINGS config has no effect. It
previously disabled command warnings, which have since been
removed.
- config - The DEFAULT_ALLOW_UNSAFE_LOOKUPS configuration
option is deprecated and no longer has any effect. Ansible
templating no longer encounters situations where use of
lookup plugins is considered "unsafe".
- config - The DEFAULT_JINJA2_NATIVE option has no effect.
Jinja2 native mode is now the default and only option.
- config - The DEFAULT_NULL_REPRESENTATION option has no
effect. Null values are no longer automatically converted to
another value during templating of single variable
references.
- config - The DEFAULT_UNDEFINED_VAR_BEHAVIOR configuration
option is deprecated and no longer has any effect. Attempting
to use an undefined variable where undefined values are
unexpected is now always an error. This behavior was enabled
by default in previous versions, and disabling it yielded
inconsistent results.
- config - The STRING_TYPE_FILTERS configuration option is
deprecated and no longer has any effect. Since the template
engine now always preserves native types, there is no longer
a risk of unintended conversion from strings to native types.
- config - Using the DEFAULT_JINJA2_EXTENSIONS configuration
option to enable Jinja2 extensions is deprecated. Previously,
custom Jinja extensions were disabled by default, as they can
destabilize the Ansible templating environment. Templates
should only make use of filter, test and lookup plugins.
- config - Using the DEFAULT_MANAGED_STR configuration option
to customize the value of the ansible_managed variable is
deprecated. The ansible_managed variable can now be set the
same as any other variable.
- display - The Display.get_deprecation_message method has been
deprecated. Call Display.deprecated to display a deprecation
message, or call it with removed=True to raise an
AnsibleError.
- file loading - Loading text files with DataLoader containing
data that cannot be decoded under the expected encoding is
deprecated. In most cases the encoding must be UTF-8,
although some plugins allow choosing a different encoding.
Previously, invalid data was silently wrapped in Unicode
surrogate escape sequences, often resulting in later errors
or other data corruption.
- first_found lookup - Splitting of file paths on ,;: is
deprecated. Pass a list of paths instead. The split method on
strings can be used to split variables into a list as needed.
- interpreter discovery - The auto_legacy and
auto_legacy_silent options for INTERPRETER_PYTHON are
deprecated. Use auto or auto_silent options instead, as they
have the same effect.
- inventory plugins - Setting invalid Ansible variable names in
inventory plugins is deprecated.
- oneline callback - The oneline callback and its associated
ad-hoc CLI args (-o, --one-line) are deprecated.
- paramiko - The paramiko connection plugin has been deprecated
with planned removal in 2.21.
- playbook - The timedout.frame task result value (injected
when a task timeout occurs) is deprecated. Include error in
the DISPLAY_TRACEBACK config value to capture a full Python
traceback for timed out actions.
- playbook syntax - Specifying the task args keyword without a
value is deprecated.
- playbook syntax - Using key=value args and the task args
keyword on the same task is deprecated.
- playbook syntax - Using a mapping with the action keyword is
deprecated. (#84101)
- playbook variables - The play_hosts variable has been
deprecated, use ansible_play_batch instead.
- plugin error handling - The AnsibleError constructor arg
suppress_extended_error is deprecated. Using
suppress_extended_error=True has the same effect as
show_content=False.
- plugins - Accessing plugins with _-prefixed filenames without
the _ prefix is deprecated.
- public API - The ansible.errors.AnsibleFilterTypeError
exception type has been deprecated. Use AnsibleTypeError
instead.
- public API - The ansible.errors._AnsibleActionDone exception
type has been deprecated. Action plugins should return a task
result dictionary in success cases instead of raising.
- public API - The ansible.module_utils.common.json.json_dump
function is deprecated. Call Python stdlib json.dumps
instead, with cls set to an Ansible profile encoder type from
ansible.module_utils.common.json.get_encoder.
- template lookup - The jinja2_native option is no longer used
in the Ansible Core code base. Jinja2 native mode is now the
default and only option.
- templating - Support for enabling Jinja2 extensions (not
plugins) has been deprecated.
- templating - The disable_lookups option has no effect, since
plugins must be updated to apply trust before any templating
can be performed.
- tree callback - The tree callback and its associated ad-hoc
CLI args (-t, --tree) are deprecated.
* Removed Features (previously deprecated)
- Remove deprecated plural form of collection path (#84156).
- Removed deprecated STRING_CONVERSION_ACTION (#84220).
- encrypt - passing unsupported passlib hashtype now raises
AnsibleFilterError.
- manager - remove deprecated include_delegate_to parameter
from get_vars API.
- modules - Modules returning non-UTF8 strings now result in an
error. The MODULE_STRICT_UTF8_RESPONSE setting can be used to
disable this check.
- removed deprecated pycompat24 and compat.importlib.
- selector - remove deprecated compat.selector related files
(#84155).
- windows - removed common module functions
ConvertFrom-AnsibleJson, Format-AnsibleException from Windows
modules as they are not used and add unneeded complexity to
the code.
* Security Fixes
- include_vars action - Ensure that result masking is correctly
requested when vault-encrypted files are read.
(CVE-2024-8775)
- task result processing - Ensure that action-sourced result
masking (_ansible_no_log=True) is preserved. (CVE-2024-8775)
- templating - Ansible's template engine no longer processes
Jinja templates in strings unless they are marked as coming
from a trusted source. Untrusted strings containing Jinja
template markers are ignored with a warning. Examples of
trusted sources include playbooks, vars files, and many
inventory sources. Examples of untrusted sources include
module results and facts. Plugins which have not been updated
to preserve trust while manipulating strings may
inadvertently cause them to lose their trusted status.
- templating - Changes to conditional expression handling
removed numerous instances of insecure multi-pass templating
(which could result in execution of untrusted template
expressions).
- user action won't allow ssh-keygen, chown and chmod to run on
existing ssh public key file, avoiding traversal on existing
symlinks (CVE-2024-9902).
- remove patch 771f7ad29ca4d259761eaa88673c2e32f6412bbe.patch that
is included upstream
- remove patch unarchive-test-fix.patch that is included upstream
- remove patch suse-distribution-fix.patch that is included
upstream
-------------------------------------------------------------------
Thu Aug 21 06:32:55 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- update to 2.18.8:
* Minor Changes
- ansible-test - Improve formatting of generated coverage
config file.
- ansible-test - Replace remote FreeBSD 13.3 with 13.5.
- ansible-test - Use OS packages to satisfy controller
requirements on FreeBSD 13.5 during managed instance
bootstrapping.
* Bugfixes
- ansible-test - Always exclude the tests/output/ directory
from a collection's code coverage. (#84244)
- ansible-test - Limit package install retries during managed
remote instance bootstrapping.
- ansible-test - Use a consistent coverage config for all
collection testing.
- plugins config, get_option_and_origin now correctly displays
the value and origin of the option.
-------------------------------------------------------------------
Wed Jul 16 06:42:28 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- update to 2.18.7:
* Minor Changes
- ansible-test - Add RHEL 10.0 as a remote platform for
testing.
* Bugfixes
- ansible-doc will no longer ignore docs for modules without an
extension (#85279).
- ansible-pull change detection will now work independently of
callback or result format settings.
- ansible-test - Fix Python relative import resolution from
__init__.py files when using change detection.
- dnf5 - handle all libdnf5 specific exceptions (#84634)
- meta - avoid traceback when retrieving the meta task name
(#85367).
- password lookup - fix acquiring the lock when human-readable
FileExistsError error message is not English.
- user - Set timeout for passphrase interaction.
- user - Update prompt for SSH key passphrase (#84484).
-------------------------------------------------------------------
Mon May 26 13:03:25 UTC 2025 - Harshvardhan Sharma <harshvardhan.sharma@suse.com>
- Add patch suse-distribution-fix.patch to fix distribution.py
to identify the correct distribution for server-sap and micro
(#PED-12643)
(#PED-12643)
-------------------------------------------------------------------
Tue May 20 04:53:37 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- update to 2.18.6:
* Minor Changes
- ansible-test - Use the -t option to set the stop timeout when
stopping a container. This avoids use of the --time option which
was deprecated in Docker v28.0.
* Bugfixes
- Ansible will now ensure predictable permissions on remote
artifacts, until now it only ensured executable and relied on
system masks for the rest.
- ansible-doc - fix indentation for first line of descriptions of
suboptions and sub-return values (#84690).
- ansible-doc - fix line wrapping for first line of description of
options and return values (#84690).
- dnf5 - avoid generating excessive transaction entries in the
dnf5 history (#85046)
- dnf5 - when bugfix and/or security is specified, skip packages
that do not have any such updates, even for new versions of
libdnf5 where this functionality changed and it is considered
failure
- script - Fix up become support for Windows scripts when become
was set through host variables and not on the task directly -
#85076
-------------------------------------------------------------------
Mon May 19 09:51:23 UTC 2025 - Harshvardhan Sharma <harshvardhan.sharma@suse.com>
- Add missing dependency on python311-rpm required by package_facts
(#1243193)
-------------------------------------------------------------------
Thu Apr 24 06:56:16 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- update to 2.18.5:
* Bugfixes
- build - Pin wheel in pyproject.toml to ensure compatibility
with supported setuptools versions.
- dnf5 - Handle forwarded exceptions from dnf5-5.2.13 where a
generic RuntimeError was previously raised
- find - skip ENOENT error code while recursively enumerating
files. find module will now be tolerant to race conditions
that remove files or directories from the target it is
currently inspecting. (#84873).
- gather_facts action, will now add setup when 'smart' appears
with other modules in the FACTS_MODULES setting (#84750).
- uri - Form location correctly when the server returns a
relative redirect (#84540)
-------------------------------------------------------------------
Tue Mar 25 20:40:33 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- update to 2.18.4:
* Bugfixes
- Windows - add support for running on system where WDAC is in
audit mode with Dynamic Code Security enabled.
- dnf5 - fix is_installed check for packages that are not
installed but listed as provided by an installed package
(#84578)
- dnf5 - libdnf5 - use conf.pkg_gpgcheck instead of deprecated
conf.gpgcheck which is used only as a fallback
- facts - gather pagesize and calculate respective values
depending upon architecture (#84773).
- module respawn - limit to supported Python versions
-------------------------------------------------------------------
Fri Mar 7 08:09:45 UTC 2025 - Harshvardhan Sharma <harshvardhan.sharma@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package ansible-core
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,7 @@
#
%define ansible_core_major_minor_version 2.18
%define ansible_core_major_minor_version 2.20
%{?sle15_python_module_pythons}
%if 0%{?suse_version} < 1550
@@ -43,21 +43,13 @@
%endif
Name: ansible-core
Version: 2.18.3
Version: 2.20.1
Release: 0
Summary: Radically simple IT automation
License: GPL-3.0-or-later
URL: https://ansible.com/
Source0: https://files.pythonhosted.org/packages/source/a/ansible-core/ansible_core-%{version}.tar.gz#/ansible_core-%{version}.tar.gz
Source1: ansible_core-%{version}.tar.gz.sha256
# PATCH-FIX-UPSTREAM fix resolvelib dependency
Patch1: https://github.com/ansible/ansible/commit/771f7ad29ca4d259761eaa88673c2e32f6412bbe.patch
# PATCH-FIX-UPSTREAM unarchive-test-fix.patch -- Clamp zip timestamps on 32-bit time_t
# Upstream commit: d500354798beb9bf8341eb8e84e1e2046bbfd21b
# Reference: https://github.com/ansible/ansible/commit/d500354798beb9bf8341eb8e84e1e2046bbfd21b
Patch2: unarchive-test-fix.patch
# Patch to fix distribution.py to identify the correct distribution for server-sap and micro
Patch3: suse-distribution-fix.patch
BuildArch: noarch
# cannot be installed with ansible < 3 or ansible-base
@@ -69,12 +61,12 @@ Conflicts: ansible-core < %{ansible_core_major_minor_version}
Conflicts: ansible-core > %{ansible_core_major_minor_version}
# https://github.com/ansible/ansible/blob/stable-2.18/pyproject.toml#L6
BuildRequires: %{ansible_python}-base >= 3.11
BuildRequires: %{ansible_python}-base >= 3.12
BuildRequires: %{ansible_python}-pip
BuildRequires: %{ansible_python}-setuptools
BuildRequires: %{ansible_python}-wheel
# https://github.com/ansible/ansible/blob/stable-2.18/requirements.txt
BuildRequires: %{ansible_python}-Jinja2 >= 3.0.0
BuildRequires: %{ansible_python}-Jinja2 >= 3.1.0
BuildRequires: %{ansible_python}-PyYAML >= 5.1
BuildRequires: %{ansible_python}-cryptography
BuildRequires: %{ansible_python}-packaging
@@ -84,6 +76,7 @@ BuildRequires: (%{ansible_python}-resolvelib >= 0.5.3 with %{ansible_python}-re
# SECTION test requirements
BuildRequires: %{ansible_python}-botocore
BuildRequires: %{ansible_python}-curses
BuildRequires: %{ansible_python}-paramiko
BuildRequires: %{ansible_python}-passlib
BuildRequires: %{ansible_python}-pytest
BuildRequires: %{ansible_python}-pytest-mock
@@ -95,7 +88,7 @@ BuildRequires: openssh
# SECTION docs
BuildRequires: %{ansible_python}-docutils
# /SECTION
Requires: %{ansible_python}-Jinja2 >= 3.0.0
Requires: %{ansible_python}-Jinja2 >= 3.1.0
Requires: %{ansible_python}-PyYAML >= 5.1
Requires: %{ansible_python}-cryptography
Requires: %{ansible_python}-packaging
@@ -214,7 +207,18 @@ mkdir bin
cd bin
ln -s ../test/lib/ansible_test/_util/target/cli/ansible_test_cli_stub.py ./ansible-test
cd ..
%{ansible_python_executable} bin/ansible-test units -v --python %{ansible_python_version}
%if 0%{?suse_version} < 1600
rm -vf test/units/module_utils/common/test_yaml.py
rm -vf test/units/parsing/yaml/test_dumper.py
rm -vf test/units/cli/test_galaxy.py
rm -vf test/units/_internal/_yaml/test_dumper.py
rm -vf test/units/parsing/yaml/test_loader.py
%endif
%{ansible_python_executable} bin/ansible-test units \
-v \
--python %{ansible_python_version}
# --exclude=test_dump[Ansible-Ansible] \
# --exclude=test_dump[1-1]
%files
%doc changelogs/CHANGELOG-v%{ansible_core_major_minor_version}.rst changelogs/changelog.yaml

Binary file not shown.

View File

@@ -1 +0,0 @@
8c4eaca40845238e2601b9bc9dbfbd4f6ed3502cb8b2632789f75ce478abfdee ansible_core-2.18.3.tar.gz

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a891e5f90cd46626778f0f3d545ec1115840c9b50e8adf25944c5e1748452106
size 3313203

View File

@@ -0,0 +1 @@
a891e5f90cd46626778f0f3d545ec1115840c9b50e8adf25944c5e1748452106 ansible_core-2.20.1.tar.gz

View File

@@ -1,42 +0,0 @@
From bffda9eb661a8560bb9ac9e240ec70a2552aa2a8 Mon Sep 17 00:00:00 2001
From: HVSharma12 <harshvardhan.sharma@suse.com>
Date: Mon, 26 May 2025 18:08:53 +0530
Subject: [PATCH] Adjust distribution detection logic for SUSE
---
.../module_utils/facts/system/distribution.py | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/lib/ansible/module_utils/facts/system/distribution.py b/lib/ansible/module_utils/facts/system/distribution.py
index 7554ef1ae3..5ec94c92d1 100644
--- a/lib/ansible/module_utils/facts/system/distribution.py
+++ b/lib/ansible/module_utils/facts/system/distribution.py
@@ -311,9 +311,22 @@ class DistributionFiles:
suse_facts['distribution_release'] = release.group(1)
suse_facts['distribution_version'] = collected_facts['distribution_version'] + '.' + release.group(1)
- # See https://www.suse.com/support/kb/doc/?id=000019341 for SLES for SAP
- if os.path.islink('/etc/products.d/baseproduct') and os.path.realpath('/etc/products.d/baseproduct').endswith('SLES_SAP.prod'):
- suse_facts['distribution'] = 'SLES_SAP'
+ # Check VARIANT_ID first for SLES4SAP or SL-Micro
+ variant_id_match = re.search(r'^VARIANT_ID="?([^"\n]*)"?', data, re.MULTILINE)
+ if variant_id_match:
+ variant_id = variant_id_match.group(1)
+ if variant_id in ('server-sap', 'sles-sap'):
+ suse_facts['distribution'] = 'SLES_SAP'
+ elif variant_id == 'transactional':
+ suse_facts['distribution'] = 'SL-Micro'
+ else:
+ # Fallback for older SLES 15 using baseproduct symlink
+ if os.path.islink('/etc/products.d/baseproduct'):
+ resolved = os.path.realpath('/etc/products.d/baseproduct')
+ if resolved.endswith('SLES_SAP.prod'):
+ suse_facts['distribution'] = 'SLES_SAP'
+ elif resolved.endswith('SL-Micro.prod'):
+ suse_facts['distribution'] = 'SL-Micro'
return True, suse_facts
--
2.49.0

View File

@@ -1,116 +0,0 @@
From c158b3f85126dabb8107260839dbcdb80e356c70 Mon Sep 17 00:00:00 2001
From: Stefano Rivera <github@rivera.za.net>
Date: Thu, 5 Dec 2024 14:26:58 -0800
Subject: [PATCH] unarchive: Clamp zip timestamps on 32-bit time_t (#84409)
Clamp zip timestamps to representible values when unpacking zip files on
platforms that use 32-bit time_t (e.g. Debian i386). This is a
non-issue in practice (in 2024), but should allow the test suite to pass
on Debian i386.
We use a round value of 2038-01-01 00:00:00 for simplicity, and to avoid
running into timezone offsets closer to the actual limit.
MR #81520 introduced sanity-checking tests that used dates not
representable with a 32-bit time_t.
---
.../fragments/unarchive_timestamp_t32.yaml | 3 +++
lib/ansible/modules/unarchive.py | 22 +++++++++++++++++++
test/units/modules/test_unarchive.py | 10 ++++++++-
3 files changed, 34 insertions(+), 1 deletion(-)
create mode 100644 changelogs/fragments/unarchive_timestamp_t32.yaml
diff --git a/changelogs/fragments/unarchive_timestamp_t32.yaml b/changelogs/fragments/unarchive_timestamp_t32.yaml
new file mode 100644
index 0000000000..969c85de05
--- /dev/null
+++ b/changelogs/fragments/unarchive_timestamp_t32.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - unarchive - Clamp timestamps from beyond y2038 to representible values when unpacking zip files on platforms that use 32-bit time_t (e.g. Debian i386).
diff --git a/lib/ansible/modules/unarchive.py b/lib/ansible/modules/unarchive.py
index 0d56da53a4..3663cebcb8 100644
--- a/lib/ansible/modules/unarchive.py
+++ b/lib/ansible/modules/unarchive.py
@@ -241,6 +241,7 @@ uid:
import binascii
import codecs
+import ctypes
import fnmatch
import grp
import os
@@ -262,6 +263,13 @@ from ansible.module_utils.urls import fetch_file
from shlex import quote
from zipfile import BadZipFile
+try:
+ from functools import cache
+except ImportError:
+ # Python < 3.9
+ from functools import lru_cache
+ cache = lru_cache(maxsize=None)
+
# String from tar that shows the tar contents are different from the
# filesystem
OWNER_DIFF_RE = re.compile(r': Uid differs$')
@@ -279,6 +287,18 @@ CONTENT_DIFF_RE = re.compile(r': Contents differ$')
SIZE_DIFF_RE = re.compile(r': Size differs$')
+@cache
+def _y2038_impacted():
+ """Determine if the system has 64-bit time_t."""
+ if hasattr(ctypes, "c_time_t"): # Python >= 3.12
+ return ctypes.sizeof(ctypes.c_time_t) < 8
+ try:
+ time.gmtime(2**31)
+ except OverflowError:
+ return True
+ return False
+
+
def crc32(path, buffer_size):
''' Return a CRC32 checksum of a file '''
@@ -414,6 +434,8 @@ class ZipArchive(object):
try:
if int(match.groups()[0]) < 1980:
date_time = epoch_date_time
+ elif int(match.groups()[0]) >= 2038 and _y2038_impacted():
+ date_time = (2038, 1, 1, 0, 0, 0, 0, 0, 0)
elif int(match.groups()[0]) > 2107:
date_time = (2107, 12, 31, 23, 59, 59, 0, 0, 0)
else:
diff --git a/test/units/modules/test_unarchive.py b/test/units/modules/test_unarchive.py
index 6a2f0d9a67..b1885c2f1c 100644
--- a/test/units/modules/test_unarchive.py
+++ b/test/units/modules/test_unarchive.py
@@ -14,6 +14,14 @@ def fake_ansible_module():
return FakeAnsibleModule()
+def max_zip_timestamp():
+ """Return the max clamp value that will be selected."""
+ try:
+ return time.mktime(time.struct_time((2107, 12, 31, 23, 59, 59, 0, 0, 0)))
+ except OverflowError:
+ return time.mktime(time.struct_time((2038, 1, 1, 0, 0, 0, 0, 0, 0)))
+
+
class FakeAnsibleModule:
def __init__(self):
self.params = {}
@@ -68,7 +76,7 @@ class TestCaseZipArchive:
),
pytest.param(
"21081231.000000",
- time.mktime(time.struct_time((2107, 12, 31, 23, 59, 59, 0, 0, 0))),
+ max_zip_timestamp(),
id="invalid-year-2108",
),
pytest.param(
--
2.48.1