Commit Graph
55405 Commits
Author SHA1 Message Date
Matt ClayandGitHub a712f79bf1 ansible-test - Upgrade coverage for Python 3.10+ (#86811)
* Upgrade coverage for Python 3.10+.
* Fix unit tests.
* Use ctrace to improve performance. It's unclear why this improves performance on Python 3.10 and 3.14.
2026-04-09 17:03:34 -07:00
Sloane HertelandGitHub efb9446769 Fix --start-at-task (#86345)
* Add VALIDATE state to IteratingStates and FailedStates instead of overloading cur_regular_task, which marks the --start-at-task location.

fixes #86268

* Fix skipping validate_argspec by not tagging with 'always' when inheriting play-level tags. Now it aligns with play-level gather_facts tag usage.
2026-04-09 13:19:47 -04:00
sivel / Matt MartzandGitHub fb8c4d3177 Add a skill for LLMs on how to get the azp logs for analysis (#86765) 2026-04-09 16:45:43 +00:00
Martin KrizekandGitHub 54cdaedfbc Remove deprecated ANSIBLE_CONNECTION_PATH option (#86791) 2026-04-09 08:13:37 +02:00
Martin KrizekandGitHub 073f444052 Add runtime deprecation warning for six (#86806)
Soft deprecated in ansible-core 2.21

Fixes #86789
2026-04-09 08:13:01 +02:00
sivel / Matt MartzandGitHub 5b10504b5e Fix galaxy container setup issues with podman (#86801) 2026-04-08 11:04:17 -05:00
Martin KrizekandGitHub 6cf3df5ac5 fetch: fix typo in module docs (#86807) 2026-04-08 10:47:29 -04:00
Martin KrizekandGitHub c9f5005be7 follow_redirects: remove the deprecated use of yes/no (#86793)
Fixes #86790
2026-04-08 11:13:08 +02:00
Abhijeet KasurdeandGitHub 6d350ae78c yum_repository: Removed deprecated parameters (#86794)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-04-08 11:08:26 +02:00
Martin KrizekandGitHub 0980f39d7d Removed deprecated DEFAULT_LIBVIRT_LXC_NOSECLABEL (#86792) 2026-04-08 08:11:31 +02:00
Martin KrizekandGitHub 3f15ac70ad find: clarify regex usage in patterns (#86764) 2026-04-08 08:09:52 +02:00
sivel / Matt MartzandGitHub a36f73b473 ansible-test - Only add volume bind mount for docker.sock when using docker (#86802) 2026-04-07 13:35:01 -05:00
sivel / Matt MartzandGitHub bae4284820 ansible-test - generate dist_info. Fixes #86695 (#86768) 2026-04-07 12:28:25 -05:00
f1179b1f7d Sort galaxy FILES.json for build reproducibility (#86770)
* added the sorting of FILES.json based on name with ASCII2 ordering
* remove useless code
* Add comprehensive tests for FILES.json sorting to ensure reproducible builds

This commit adds tests to validate the FILES.json sorting feature implementation (issue #82792).

Unit Tests (test/units/galaxy/test_collection.py):
- test_build_files_manifest_sorted_by_name: Validates ASCII sorting
- test_build_files_manifest_walk_sorted_output: Tests walk function
- test_build_collection_reproducible_build: Ensures reproducibility
- test_build_files_manifest_special_characters_sorted: Edge cases
- test_files_json_has_sorted_keys: Validates JSON key ordering
- test_build_collection_large_number_of_files_sorted: Scale testing

Integration Tests (test/integration/.../build.yml):
- Multiple builds produce identical FILES.json
- Verify FILES.json reproducible across builds
- Verify all files in ASCII sorted order
- Validate FILES.json format and structure
- Verify each file entry has required fields

Per the comment that 'this should follow the same pattern as _build_collection_tar', add `sort_keys` to this invocation of `json.dumps`
Also removes a sort because files area already sorted in `_build_files_manifest`, which is the source of `file_manifest` in `_build_collection_dir`'s only invocation (line 1669)

Co-authored-by: Thomas Wang <yuanchen.wang@optus.com.au>
Co-authored-by: Thomas Wang <yctomwang123@gmail.com>
Co-authored-by: pvskp <pvincius14@gmail.com>
2026-04-07 12:34:12 -04:00
sivel / Matt MartzandGitHub a496819b4d Bump devel to 2.22 (#86784) 2026-04-06 14:21:41 -05:00
sivel / Matt MartzandGitHub 9ade959713 Skip podman rootful tests on RHEL10 (#86785) 2026-04-06 13:28:40 -05:00
Nick MarshallandGitHub 260fcabb79 ansible-playbook - refactor task processing to remove duplicated loading logic (#86603) 2026-04-02 20:51:35 +00:00
sivel / Matt MartzandGitHub 81c4615453 Add 2.21 release name. Fixes #86005 (#86766) 2026-04-02 20:13:56 +00:00
0aef93bca0 Remove paramiko connection (#86757)
* Remove paramiko connection plugin deprecation warning (#86002)

Remove deprecated paramiko connection plugin

Remove integration tests for paramiko connection plugin

Fix connection fallback after paramiko removal

Revert connection fallback changes

* Remove internal use of the paramiko connection

Setting connection to 'smart' now always uses 'ssh', 'persistent' now always uses 'ansible.netcommon.persistent'

Remove unused test helper

Deprecate PluginLoader aliases

ci_complete

* Remove deprecated portion of lib/ansible/module_utils/compat/paramiko.py

add changelog

* Fully remove ansible.module_utils.compat.paramiko

---------

Co-authored-by: Simon <siimonchernyk@gmail.com>
2026-04-02 14:15:19 -05:00
Nick MarshallandGitHub f6d0379191 ansible-vault - improved formatting of ansible-vault error messages (#86602) 2026-04-02 19:03:13 +00:00
7a4bd08663 ansible-vault - keep the original contents on EDITOR failure (#86731)
Currently when the editor returns a failure exit code in `ansible-vault edit`,
the original file is still being overwritten by whatever is in the temporary
file. This is undesirable when some process already made edits to the temporary
file and then later fails for some reason, since the file might only be
partially modified and thus corrupt.

Fix this by using `check_call()` instead of `call()` to throw an Exception when
the exit code is non-zero.

Co-authored-by: Matt Clay <matt@mystile.com>
2026-04-02 11:20:34 -07:00
64d74c9754 Register projections and action plugin dynamic host/group/var API (#86241)
* Register projections and action plugin variable API

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Patrick Kingston <pkingsto@redhat.com>
2026-03-31 23:09:14 +00:00
8d24f0d32f Deprecate apt_* using runtime.yml (#86690)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2026-03-28 05:19:07 -07:00
Felix FonteinandGitHub e4004d720d Upgrade ACME test image to 2.4.0. (#86740) 2026-03-27 17:20:11 -07:00
Matt ClayandGitHub 36e9711c26 Fix deepcopy support for imported templates (#86727) 2026-03-27 15:23:27 -07:00
4da24b8128 apt: recreate apt cache if /var/lib/apt/lists is missing (#86612)
* While creating bare minimum container images, sometimes
  /var/lib/apt/lists is removed.
  Recreate this directory in order to update cache successfully.

Fixes: #61176

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Sloane Hertel <19572925+shertel@users.noreply.github.com>
2026-03-27 17:36:17 -04:00
ca8444f238 Simplify pipelining logic for Windows ci_complete (#86734)
* Simplify pipelining logic for Windows ci_complete

Has the Windows connection plugins override is_pipelining_enabled to
return True rather than use the special connection plugin attributes.
These attributes should be removed in the future but when is still
dependent on when we can expect Ansible 2.19 is the minimum version
supported in collections.

* Make CI green

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>

---------

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-03-28 03:50:59 +10:00
Jordan BoreanandGitHub 85f371fe5d Fix windows test with coverage (#86736) 2026-03-28 03:06:17 +10:00
Patrick KingstonandGitHub 8d75344549 Pip editable now applies to all packages (#86732)
When editable is set to true, -e flag should be passed to all packages.
This change passes -e flag before each package name. However, if a
requirements file is used, then editable flag raises errors. Therefore,
editable and requirements are now mutually exclusive.

Fixes #77755

Signed-off-by: Nirmal Patel <nirmal@nirmal.dev>
2026-03-26 13:11:08 -07:00
Jordan BoreanandGitHub 1071baca60 Add support for PowerShell modules on POSIX (#86627)
* Add support for PowerShell modules on POSIX

Adds support for running modules written in PowerShell on non-Windows
hosts. This includes references to a PowerShell or C# module_util
located in Ansible or a collection. Not all module utils will work
outside of Windows but `Ansible.Basic` will do so.

Support for PowerShell modules on non-Windows is up to the module and
collection author. This PR just enables the ability to run them through
the existing PowerShell execution wrapper.

* Fix up sanity and unit tests, try and run in separate CI group

* Fix up powershell.sh group detection

* More sanity fixes

* More sanity fixes

* Ensure shebang is part of command to run

* Try and simplify exec module logic

* Attempt to get powershell group running in CI

* Fix up test integration aliases for powershell

* Remove ansible.windows collection for integration support

* Revert the win_powershell changes now they aren't needed

* Simplify test matrix and use default container
2026-03-27 05:56:38 +10:00
Abhijeet KasurdeandGitHub a0257b2dc3 User: Raise an error when force is used to delete group (#85610)
On platforms like Alpine and BusyBox, group delete operation
with force is not applicable. Raise an error notifying the
user about the same.

Fixes: #85565

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-03-26 12:03:31 +00:00
Ariel OtilibiliandGitHub cef7aab8b5 tests/integration: find: use directly variables and str concat (#86710) 2026-03-25 17:18:39 -07:00
af6f1afeaf Support core packaging operations against older python versions (#86432)
* split the dnf module into a cli shim and a module
* Update package_facts to use rpm cli, add package_facts and rpm_key to rhel8 targeted testing
* Switch resource embedding to EmbedManager.embed API


Co-authored-by: Matt Davis <nitzmahone@redhat.com>
2026-03-25 12:02:11 -05:00
Sloane HertelandGitHub a51536f311 Fix using the server's validate_certs config when downloading (#86705)
* Fix using the server's validate_certs configuration when downloading collections

* Fix validate_certs for verify

There is no GalaxyAPI on the collection object for verify since it wasn't created via the resolver

Remove unit test - would need more convoluted monkeypatching

* Simplify ConcreteArtifactsManager.save_collection_source by passing 2 arguments instead of 6

* Consolidate ConcreteArtifactsManager instance attrs _galaxy_collection_cache/_galaxy_collection_origin_cache
2026-03-25 11:20:34 -05:00
sivel / Matt MartzandGitHub 03c851d681 Switch to new galaxy-ng container setup (#86623) 2026-03-24 13:40:43 -05:00
ef7b026f77 apt: Handle comma-separated packages from recommends (#86613)
* While installing local deb packages, consider comma-separated
  packages from recommends

Fixes: #86609

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Sloane Hertel <19572925+shertel@users.noreply.github.com>
2026-03-24 03:40:04 -07:00
e6b6f34144 Add new psrp options and change service default (#86638)
* Add new psrp options and change service default

Add new options to the `psrp` connection plugin to specify the profile
loading behaviour and a password to use for decrypting the certificate
authentication private key.

This also changes the `negotiate_service` default from `WSMAN` to `host`
to improve compatibility with Windows targets that may not have the
`WSMAN` SPN registered like domain controllers and align with the
defaults the native PowerShell PSRemoting client uses.

* Update lib/ansible/plugins/connection/psrp.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2026-03-24 15:11:00 +10:00
Matt ClayandGitHub 02a65ab292 ansible-test - Update base/default containers (#86706) 2026-03-21 01:51:04 +00:00
7d2aa2a4c6 find: add locale encoding in err msg when none is given (#86641)
When the search fails, as expected, the following error is printed out:

    [...] Failed to read the file FILENAME due to an encoding error. current encoding: None (default determined by the Python built-in function "open")

Add locale encoding in error messages when none is given.

As well, this case is hit for decoding exceptions, not encoding ones.

Change the error message.

Add the corresponding tests, update documentation.

Link: https://docs.python.org/3/library/locale.html#locale.getpreferredencoding
Co-authored-by: Matt Clay <matt@mystile.com>
Signed-off-by: Ariel Otilibili <a.otilibili@instadeep.com>
2026-03-20 18:07:35 -07:00
Matt ClayandGitHub e65e27c38a ansible-test - Update sanity test requirements (#86701) 2026-03-20 23:39:04 +00:00
Matt ClayandGitHub 30940e2689 ansible-test - Update utility containers (#86700) 2026-03-20 21:42:39 +00:00
Matt ClayandGitHub 67ef70756c ansible-test - Upgrade macOS remote to 26.3 (#86699) 2026-03-20 12:44:39 -07:00
Matt ClayandGitHub b330f2a051 ansible-test - Upgrade FreeBSD 14.3 to 14.4 (#86698)
Also use packaged version of ``packaging`` for FreeBSD 15.0.
2026-03-20 11:23:14 -07:00
Brian CocaandGitHub 4fdeac0a72 ssh connection, document quoting (#86684)
also move to fstrings
moved to case/match
2026-03-19 19:02:19 -04:00
Brian CocaandGitHub 85918854b3 note on pickle (#86685) 2026-03-19 19:01:41 -04:00
60a9be7f46 Consult deprecation metadata for non-collection builtins (#86689)
* Consult deprecation metadata for non-collection builtins

* Re-homed `ignore_deprecated` on PluginLoadContext
* Added tests

* remove superfluous shebang and ignore entry

* Apply suggestion from @mattclay

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2026-03-18 21:59:47 -07:00
Jordan BoreanandGitHub e091045923 Bump PowerShell 7.6 to GM release (#86688)
* Bump PowerShell 7.6 to GM release

* Update test container references
2026-03-19 07:10:54 +10:00
1d16ef3334 user: warn when seuser is set on systems without SELinux (#86671)
When the seuser parameter is provided but SELinux is not enabled on the
target system, the parameter is silently ignored and the module reports
changed: true. This misleads users into thinking SELinux user mappings
were applied.

Emit a warning when seuser is set and SELinux is not enabled, so users
are aware the parameter has no effect. This uses module.selinux_enabled()
to check at runtime rather than checking the platform type, as recommended by the maintainers.

The warning alone is not enough — useradd still receives the -Z flag
and fails with "useradd: -Z requires SELinux enabled kernel". Skip
adding -Z to the command when SELinux is not enabled.


Fixes #85542


---------

Co-authored-by: olegnazarov23 <olegnazarov23@users.noreply.github.com>
2026-03-18 08:30:40 -07:00
Abhijeet KasurdeandGitHub 80ee6b5d92 apt_repository: Deprecate module (#86090)
* Deprecate apt_repository in favor of deb822_repository

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-03-16 15:19:35 -07:00
c93085eece service: Add compatibility with GNU Hurd (#86622)
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
Co-authored-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-03-16 05:25:20 -07:00