Commit Graph
55340 Commits
Author SHA1 Message Date
Matt ClayandGitHub e82d9564f0 Fix libxcrypt test setup on macOS 26.3 (#86598) 2026-02-26 03:36:55 +00:00
Jordan BoreanandGitHub 8e9ce75266 Fix up TLS settings for pwsh bootstrapping (#86594)
On some Windows hosts the TLS policies don't allow TLS 1.2 or newer by
default. We add some code to the bootstrapping code to enable PowerShell
to use the OS policies rather than the outdated .NET ones.

This has only appeared on Azure 2016 based hosts, AWS on 2016 seems to
configure the server to use the OS policies some other way. 2019+ by
default aren't affected.
2026-02-25 09:11:33 +10:00
Matt ClayandGitHub 8a07f8963d ansible-test - Improve git submodule error handling (#86586)
Also fix `env --list-files` to ensure non-filename output is sent to stderr.
2026-02-24 10:10:54 -08:00
Matt ClayandGitHub 87265284fa ansible-test - Fix pslint powershell selection (#86593)
This was overlooked in https://github.com/ansible/ansible/pull/86238
2026-02-24 17:52:53 +00:00
Abhijeet KasurdeandGitHub a751010bea package_facts: Use apk query instead of apk info to gather facts (#86581)
* package_facts: Use apk query instead of apk info to gather facts

* ``apk query`` gives more options to gather facts than ``apk info``

Fixes: #86579

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-02-24 10:27:45 -05:00
Abhijeet KasurdeandGitHub a44218e4b1 user: fail if groups is not provided with append (#86573)
* Update documentation

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-02-24 10:14:07 -05:00
Matt ClayandGitHub fbe9d7f32a ansible-test - Fix traceback on multiple win remotes (#86591) 2026-02-24 01:56:00 +00:00
Matt ClayandGitHub 4ae2ccbc8f ansible-test - Support pwsh version selection (#86238)
Although this change exposes `ansible_pwsh_interpreter` in inventory generated by ansible-test,
a follow-up change is needed to enable its usage.
2026-02-23 15:35:33 -08:00
cc2f35da5b default callback: add display_included_hosts option (#85758)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2026-02-23 16:16:47 +00:00
52b7d4d092 user: return actual system groups instead of input parameter (#86553)
The user module's 'groups' return value was returning the groups
specified in the module input rather than the actual groups the
user belongs to on the system. When using append=true, this meant
pre-existing groups were missing from the output.

Now queries the system for the user's actual group membership after
modification, which matches the documented behavior of "List of
groups of which the user is a member."

Fixes #80669

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:40:55 -05:00
Matt ClayandGitHub 7d281b2a7c Fix YAML string loading using Python loader (#86421) 2026-02-19 16:16:44 -08:00
Alexei ZnamenskyandGitHub f97d555247 find: adjust docs (#86554) 2026-02-19 14:32:27 -05:00
Abhijeet KasurdeandGitHub cdeea95a46 ansible-galaxy: handle an error when invalid regex specified (#86546)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-02-19 14:09:28 -05:00
Patrick KingstonandGitHub 7fdac45993 Fix freebsd user integration test repeatability (#86542)
* Cleanup previous user creations
2026-02-19 14:08:43 -05:00
d6f719429b Docs: Clarify user module behavior for invalid password hashes (#85838)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2026-02-17 12:45:23 +00:00
Brian CocaandGitHub 8730acbb2d config lookup, fallback to existing constants when needed (#86516) 2026-02-16 13:44:02 -05:00
be09a21446 Disable detached head warning on collection checkout (#86170)
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2026-02-11 16:47:33 +00:00
Ariel OtilibiliandGitHub 130e00736e executor: Remove RETURN_VARS (#86527)
RETURN_VARS was introduced for #70331, and last used in #70853.

    # git grep RETURN_VARS | wc -l
    1

Remove it.

Signed-off-by: Ariel Otilibili <a.otilibili@instadeep.com>
2026-02-10 15:06:07 -05:00
cf28bcb65d apt: Add deb822_repository in seealso section (#86539)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2026-02-10 07:16:09 -08:00
Abhijeet KasurdeandGitHub 0a2bac10da first_found: ensure lookup under files directory (#85669)
* Make sure to look under files directory when no path is specified.

Fixes: #85655

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-02-06 13:21:34 -08:00
Sam DoranandGitHub 475806a573 user - Preserve current password when modifying user on BusyBox systems (#86530)
* user - Preserve current password when modifying user on BusyBox systems

A bug in _build_password_string would incorrectly change the password hash
to ‘*’ if no password was specified.

* Update tests

Add a task to unsure the password is preserved when the password is not specified.

Use correct value when inspecting the password hash from the shadow data.

* Add changelog
2026-02-06 11:04:57 -08:00
Sam DoranandGitHub 34b0923967 Fix user modification on Alpine (#86143)
Fix user modification on Alpine. This change will handle primary group, shell, and password changes. It does not handle expiration changes, though it probably could with a bit more work.

The Alpine documentation recommends manually editing /etc/password to change the shell. These changes will rewrite the /etc/passwd file using atomic_move but creates a backup beforehand.
2026-02-05 11:09:51 -05:00
Abhijeet KasurdeandGitHub 03776e3bef config: Correct config in COLLECTIONS_PATHS (#86514)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-02-04 13:28:19 +00:00
Martin KrizekandGitHub d9deb945b0 async_status: inherit delegate_to from original task (#86493)
Fixes #86491

ci_complete
2026-02-04 09:39:42 +01:00
Matt ClayandGitHub 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 KasurdeandGitHub 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 KandGitHub 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 KingstonandGitHub 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 BoreanandGitHub 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 BoreanandGitHub 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 ShrewsburyandGitHub 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 KingstonandGitHub 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 ClayandGitHub 7f7884fc4f ansible-test - Update spare-tire URL (#86477) 2026-01-29 09:53:58 -08:00
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 ClayandGitHub 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 ClayandGitHub c1ff53e21d ansible-test - Remove obsolete remote auth (#86462) 2026-01-26 11:02:53 -08:00
Matt ClayandGitHub ade3d2c3ff ansible-test - Update the Ansible Core CI endpoint (#86455) 2026-01-23 08:36:20 -08:00
Matt ClayandGitHub a816184a6f ansible-test - Add integration test collection deps (#86437) 2026-01-21 09:40:35 -08:00
Dag WieersandGitHub 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
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
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 KasurdeandGitHub 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 ClayandGitHub 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 ClayandGitHub 330f40b4f5 ansible-test - Fix codespell test (#86419)
Prevent a traceback when test results are empty.
2026-01-14 16:45:54 +00:00
Matt ClayandGitHub 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 PathakandGitHub 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 ClayandGitHub fec9c3d50c Add codespell sanity test for core (#86418) 2026-01-13 20:11:16 +00:00
Matt ClayandGitHub d37cec2ea8 Spelling and grammar fixes (#86417) 2026-01-13 11:34:56 -08:00
RealKelsarandGitHub 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 KingstonandGitHub 28927a70b4 Remove Install-Python-Debian from the output of deb822_repository (#86403)
Fixes: #86395
2026-01-09 19:14:17 -08:00