Commit graph

55316 commits

Author SHA1 Message Date
Matt Clay
7f17759bfe
Integration test updates for PowerShell support (#86519)
Minor test additions/updates to prepare for improved PowerShell support in ansible-test.
2026-02-03 17:08:59 -08:00
Abhijeet Kasurde
66a9e19010
get_url: reword checksum description (#86507)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-02-03 16:36:00 +01:00
Mohammed Saalim K
2f621c95fd
deb822_repository: validate name parameter instead of over-normalizing (#86494)
* deb822_repository: validate name parameter instead of over-normalizing

The deb822_repository module was silently mangling the name parameter by converting to lowercase, replacing underscores with hyphens, and removing other characters. This caused filename collisions where distinct repository names produced identical filenames.

This change validates that the name parameter contains only valid APT sources.list filename characters (a-zA-Z0-9_.-) and preserves the name as-is. Invalid characters now result in a clear error message.

Fixes: #86243

* fix: update install.yml test to use valid name without spaces

* deb822_repository: add backward compatibility for legacy filenames

Check if a file with the old normalized naming convention already exists before using the new naming. If a legacy file exists, reuse that slug to avoid creating duplicate files for the same repository.

This addresses feedback from #86343 to maintain backward compatibility.

* deb822_repository: adopt PR #86343 approach for backward compatibility

Based on maintainer feedback, removed strict validation that hard-failed on invalid characters. Instead:

- Convert spaces to hyphens (backward compatible with existing playbooks)

- Preserve case, underscores, and periods

- Check for legacy-normalized files and reuse them if they exist

This maintains backward compatibility while still avoiding over-normalization.

Addresses feedback from https://github.com/ansible/ansible/pull/86494#discussion_r1975816493

* Replicate PR #86343 structure and fix trailing whitespace

- Created name_handling.yml with exact tests from #86343

- Import name_handling.yml in main.yml

- Removed conflicting tests from test.yml

- Updated changelog to match #86343 format

- Fixed trailing whitespace on line 584 (pep8/pylint fix)

* Apply suggested change: inline name.replace() directly
2026-02-03 16:21:45 +01:00
Patrick Kingston
1e31c7c819
Fix ansible-galaxy collection metadata/file system location discrepancy (#86402)
* Fix discrepancy between ansible-galaxy and ansible runtime when identifying usable collections

When enumerating usable collections, ansible-galaxy validates the galaxy metadata in the MANIFEST.json/galaxy.yml matches the collection path.

When the metadata is incorrect ansible-galaxy emits a warning and falls back to using no metadata since it is not required for usable collections.

* ansible-galaxy collection verify now evaluates the collection that will be used at runtime, even if a collection inaccurately documents the same namespace and name earlier in the search path

* Add integration tests for ansible-galaxy collection verify, list, and install
2026-02-02 17:17:36 -05:00
Jordan Borean
20ce7d60bd
Align AddType debug info with DISPLAY_TRACEBACKS (#86506)
Changes the logic used by `Ansible.ModuleUtils.AddType` to only include
the debug information when `DISPLAY_TRACEBACKS` is set to `error` or
`always`. This aligns with the new logic that no longer uses the
verbosity level to include extra traceback information with higher
verbosities.
2026-02-03 04:26:05 +10:00
Jordan Borean
2c1fdfe0eb
Action make_tmp_path fix error (#86505)
Fixes the error to only include the command rather than the dataclass
repr. This goes back to how it worked in the past before `_mkdtemp2` was
added.
2026-02-03 04:25:21 +10:00
David Shrewsbury
90595736ed
Fix local connection interaction with become plugins (#86473)
The local connection plugin is incorrectly passing a bytearray to methods of become plugins that expect bytes. A recent change to the su plugin exposed this by breaking the become plugin for different locale settings (the bytearray was not properly converted to a str for comparison operations). This changes the local connection plugin to send bytes.
2026-02-02 09:02:53 -05:00
Patrick Kingston
29086acfa6
Fix git checkmode on invalid ref (#86348)
Fix the output of git checkmode when supplied with a nonexistent ref for the version parameter.
Uses git fetch --dry-run [ref] to check if the supplied ref actually exists.
2026-01-30 13:55:29 -05:00
Matt Clay
7f7884fc4f
ansible-test - Update spare-tire URL (#86477) 2026-01-29 09:53:58 -08:00
Ilyas Timour
1036c096a2
Make relative links in the description field of core packaging metadata absolute
PR #86461.

Prior to this patch, the core packaging metadata contained relative contributing and license file URLs in its description field, which is sourced from the `README.md` file. These URLs are relative to the website location they're rendered in. On GitHub, they'd point to neighboring files in the repository but PyPI does not host them and this makes relative URLs point to addresses on PyPI that do not exist.

The change updates the lin URLs to be absolute and point to the file views in the GitHub repository, which fixes #86460.

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <webknjaz@redhat.com>
2026-01-27 16:56:44 +01:00
Matt Clay
b1bc1e2513
Fix direct S3 link in integration tests (#86464)
Also add a sanity test to prevent similar issues in the future.
2026-01-26 15:25:51 -08:00
Matt Clay
c1ff53e21d
ansible-test - Remove obsolete remote auth (#86462) 2026-01-26 11:02:53 -08:00
Matt Clay
ade3d2c3ff
ansible-test - Update the Ansible Core CI endpoint (#86455) 2026-01-23 08:36:20 -08:00
Matt Clay
a816184a6f
ansible-test - Add integration test collection deps (#86437) 2026-01-21 09:40:35 -08:00
Dag Wieers
a0b3c7c0d6
Fix LIB env var incorrectly set to "System.Collections.DictionaryEntry" (#86436)
This is a fix for a common issue where Ansible is setting the LIB env var to the data type (System.Collections.DictionaryEntry) and not the actual value.

It unfortunately causes downstream issues if you run PowerShell scripts that are affected by the LIB variable not being a search path, but an incorrect string. It causes Add-Type to fail on even the simples call (like `Add-Type "using System;"`
2026-01-21 12:29:16 +10:00
net0pyr
6b5301eba7
Fix user module to not create /nonexistent on FreeBSD (#86415)
Fixes an issue where the user module would create the /nonexistent directory when modifying a user to add them to a group on FreeBSD. The /nonexistent path is a standard convention for system accounts on FreeBSD that should not exist physically on disk.

This commit adds a check in the FreeBsdUser.modify_user() method to skip home directory creation when the home path is /nonexistent.

Fixes #86368

Co-authored-by: zykov <zykov@biocad.ru>
2026-01-16 10:40:58 -08:00
Abhijeet Kasurde
06fce4e2a2
strategy: added a space in message (#86373)
* strategy: added a space in message


Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: flowerysong <junk+github@flowerysong.com>
2026-01-15 14:55:45 -05:00
Abhijeet Kasurde
a3782f0e7d
unarchive: make timezone aware timestamp (#85799)
* Consider the timezone offset while creating timestamp from `zipinfo -T`
  information. This information is required while comparing to mtime of the file
  on local filesystem (for idempotency purposes).

Fixes: #85779

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-01-15 04:13:13 -08:00
Matt Clay
bf349232e2
Remove sleep 0 Linux kernel bug work-around (#86420)
The ``ActionBase._low_level_execute_command`` method no longer adds ``&& sleep 0`` to commands.
This was a work-around for a 10+ year old Linux kernel bug affecting OpenSSH.
By August of 2016 the fix had been included in kernel versions 4.1.26, 4.4.12, 4.5.6, 4.6.1 and 4.7.

Linux kernel bug report: https://lore.kernel.org/lkml/alpine.LNX.2.00.1512091358290.9574@fanir.tuyoix.net/
OpenSSH bug report: https://bugzilla.mindrot.org/show_bug.cgi?id=2492
2026-01-14 12:01:23 -08:00
Matt Clay
330f40b4f5
ansible-test - Fix codespell test (#86419)
Prevent a traceback when test results are empty.
2026-01-14 16:45:54 +00:00
Matt Clay
113e0bbb93
ansible-test - Expand unwanted pylint check (#86416)
Also remove redundant tests from the validate-modules sanity test.
2026-01-14 08:40:46 -08:00
Gaurav Pathak
6d383558c9
Validate changes in a git repo for combined check and diff mode (#85110)
This commit validates changes in a shallow clone git repo and shows
a diff for combined check and diff mode in case if any old single
full commit sha is provided in version parameter instead of any
branch name or HEAD together with refspec parameter.
At present, if an old commit sha is provided to version parameter
for a shallow clone git repository initially cloned using depth: 1
and if ansible-playbook is executed with --diff --check together,
the command shows:
Failed to get proper diff between <before_sha> and <after_sha>
fatal: bad object <after_sha>
2026-01-13 21:38:39 +00:00
Matt Clay
fec9c3d50c
Add codespell sanity test for core (#86418) 2026-01-13 20:11:16 +00:00
Matt Clay
d37cec2ea8
Spelling and grammar fixes (#86417) 2026-01-13 11:34:56 -08:00
RealKelsar
869088b959
Fixes Parsing for ClearLinux exposed by Gentoo (#86384)
* Fixes Parsing for ClearLinux exposed by Gentoo changing os-release, Quoting from " to ', also fixes NA parsing to strip both kinds of quotes
2026-01-12 08:02:39 -08:00
Patrick Kingston
28927a70b4
Remove Install-Python-Debian from the output of deb822_repository (#86403)
Fixes: #86395
2026-01-09 19:14:17 -08:00
Ariel Otilibili
ffa344e37b
Improve to_uuid documentation (#86404)
One has to look into the examples to realize the generaed UUID is a UUIDv5.

As of today, `to_uuid` returns a UUIDv5. Document it.

Link: f2357cdc53/lib/ansible/plugins/filter/core.py (L338-L346)

Signed-off-by: Ariel Otilibili <a.otilibili@instadeep.com>
2026-01-09 15:50:18 -08:00
Sloane Hertel
f2357cdc53
Fix module_defaults templating for gather_facts, service, and package actions (#85857)
* Ensure action plugins template module arguments from module_defaults as necessary
2026-01-09 14:14:26 -05:00
Matt Clay
3661f34811
ansible-test - Optimize RHEL DNF configuration (#86396) 2026-01-09 08:35:48 -08:00
Felix Fontein
612d54fc6f
Fix argument spec for v1 source info schema validation (#86320)
* Fix argument spec for v1 source info schema validation.

* Add changelog fragment.

* Add basic tests for _validate_v1_source_info_schema.
2026-01-09 14:20:54 +00:00
daomah
7726bf61a8
Expanded "See Also" section (#86370) 2026-01-08 04:14:56 -08:00
Matt Clay
63fdb2079c
ansible-test - Replace Fedora 42 with 43 (#86220)
* ansible-test - Replace Fedora 42 with 43

* Temporarily skip the rpm_key test on Fedora 43

* Stop testing podman as root on Fedora 43
2026-01-07 18:36:04 -08:00
Matt Clay
e223fbd5f6
Restore xt_comment tests (#86393) 2026-01-08 00:00:30 +00:00
Matt Clay
3df8aeed80
ansible-test - Replace RHEL 10.0 with 10.1 (#86387) 2026-01-07 15:20:37 -08:00
Matt Clay
69afa45880
ansible-test - Replace FreeBSD 13.5 with 15.0 (#86385)
* ansible-test - Replace FreeBSD 13.5 with 15.0

* Update Kerberos hack for FreeBSD 15
2026-01-07 13:45:42 -08:00
Matt Clay
5446d7333b
ansible-test - Replace Alpine 3.22 with 3.23 (#86386) 2026-01-07 13:44:58 -08:00
Sam Doran
d16aaec92d
ansible-galaxy - Change error to warning when no paths exist (#86341)
* ansible-galaxy - Change error to warning when no paths exist

When listing collections, a warning is much more appropriate than an error
for missing paths.
2026-01-07 11:24:30 -05:00
Felix Fontein
2cedaa24b6
default callback: make YAML line width configurable (#85498)
* Make YAML line width configurable.

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2026-01-07 12:55:26 +00:00
Will Schlitzer
7665917d51
Change 'blacklist' to 'denylist' in lib/utils/display.py (#86304)
Co-authored-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-01-07 00:21:44 +00:00
Abhijeet Kasurde
cc9e71f411
callback: filter _ansible_ in debug message (#84594)
* Drop _ansible_ keys from debug message

Fixes: #69731

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2026-01-06 16:06:10 -08:00
Matt Clay
52cd605887
ansible-test - Fix expat on Fedora 42 remotes (#86375) 2026-01-05 13:22:37 -08:00
Matt Clay
6c024e24b4
ansible-test - Upgrade to RHEL 9.7 (#86374) 2026-01-05 12:59:33 -08:00
Abhijeet Kasurde
5e10a9160c
ansible-test: disable xt_comment testcase for iptables (#86365)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-12-23 17:13:56 -08:00
sivel / Matt Martz
85d20838ce
state=latest now installs modules when missing. Fixes #73457 (#86328) 2025-12-15 12:08:59 -06:00
Abhijeet Kasurde
039b94c23d
Misc typo fix (#86322)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-12-15 10:06:25 -08:00
Sloane Hertel
f924902830
adhoc, ansible-console - fix traceback for meta end_play tasks (#86294)
Ensure all entrypoints using TaskQueueManager catch AnsibleEndPlay
2025-12-15 11:33:18 -05:00
Yuxiao Zeng
17fb4af38d
copy - fix reporting changed=True when a single-file dir is copied with remote_src=False (#85834)
* Fix directory path construction in the action plugin

Fixes #85833
2025-12-15 10:53:35 -05:00
Abhijeet Kasurde
9f42cefca6
dnf: Return error message from RPM installation (#86123)
* When RPM scriptlet fails, return those error messages
  for further debugging.

Fixes: #86117
2025-12-12 06:38:47 -08:00
Abhijeet Kasurde
6c0bb0837c
filter: Use datetime.strftime instead of time.strftime (#86261)
* Use datetime.strftime instead of time.strftime which
  supports more directives.

Fixes: #86260

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-12-11 11:01:00 -08:00
Jordan Borean
595b4f0390
winrm - Add better Kerberos error (#86317)
* winrm - Add better Kerberos error

Adds a better error when Kerberos authentication is requested but the
`pykerberos` library is not installed. This also removes the fallback to
basic auth if the username is in the UPN format and no transport/auth
method is specified. This is because a UPN user must be a domain account
and domain accounts cannot be used with basic auth.

* Add more docs about user settings

* Fix some grammar issues
2025-12-11 11:43:33 +10:00