Commit Graph

55458 Commits

Author SHA1 Message Date
Abhijeet Kasurde 9dfed16dae tests: test for collection_skeleton_ignore (#86896)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-06-02 08:26:04 -07:00
Minh Vu 2a628c04c9 user: fix Alpine move_home ordering (#87044) 2026-06-02 04:40:30 -07:00
Sam Doran 1d398ae8af user - Warn when an invalid shell is specified on BusyBox systems (#86342)
Only for BusyBox since that was the context where this initally came up. It may
make sense to add this warning more broadly.

chsh on Alpine warns but does not error when changing to an invalid shell.
Other distros error with an invalid shell.

Signed-off-by: Sam Doran <sdoran@redhat.com>
Co-authored-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-29 14:38:20 +00:00
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) d25ac062dd 🧪 Pin Codecov CLI uploader env for Python 3.13
PR #87041

PR #87010 bumped the container used in CI for uploading the coverage
measurements to Codecov and its runtime now uses Python 3.13.

The previously set `.azure-pipelines/scripts/dependencies/codecov.txt`
pip constraints used to lock down the transitive dependencies in that
environment were of older versions and `test-results-parser==0.5.4`
caused pip to trigger building this dependency from an sdist due to
the latest platform-specific wheel available for that version being
tagged for Python 3.12.

The new container does not have enough of the build toolchain and the
build fails being unable to find the `cc` linker [[1]].

This patch mass-upgrades the transitive dependencies in said deptree
to newer versions that also ship platform-specific wheels for Python
3.13 and 3.14.

[1]: https://dev.azure.com/ansible/ansible/_build/results?buildId=181432&view=logs&j=d7668ad9-d7bb-5ae4-c14f-5061b89e467d&s=44856301-4c0b-5572-5f50-eb8e385c84fd&t=7f884d87-6a36-516f-9067-af4cf77c020d&l=93

ci_coverage
ci_complete
2026-05-28 16:16:08 +00:00
sivel / Matt Martz 73f4bdb681 Add ai context skill (#87038) 2026-05-28 10:22:12 -05:00
Matt Clay ba21909655 Update AZP container (#87010) 2026-05-27 19:29:13 -07:00
David Shrewsbury ea0024944f Fix dnf/dnf5 documentation for exclude parameter (#87034)
* Sanity fix
* Test dnf `exclude` parameter


Co-authored-by: Patrick Kingston <pkingsto@redhat.com>
2026-05-27 05:35:01 -07:00
sivel / Matt Martz 28dadef725 Update skills for compat with non-claude agents (#87032) 2026-05-26 17:40:34 +00:00
Matt Davis 10186793b3 Fix internal exception type on result thread (#87017)
* Bogus auto-import of sqlite.NotSupportedError instead of stdlib NotImplementedError
* No meaningful external visibility
2026-05-21 15:28:19 -07:00
Martin Krizek cef01730fb ssh-agent: hardening (#86921)
* fix partial socket reads
* cap agent response size to 256 KiB
* fix wire format for zero-length binary_string, unicode_string and mpint
* separate key and comment in identities response per the protocol
* remove KeyList/PublicKeyMsgList in favor of inline parsing and Identity dataclass
* rename comments -> comment
* switch KeyAlgo to StrEnum

ci_complete
2026-05-20 14:21:01 -05:00
sivel / Matt Martz 028f8d9d0c move claude review command to skill (#87002) 2026-05-20 10:29:17 -05:00
Felix Fontein c70c5c63a4 Allow positional for lookup plugins (#86986)
* Make validate-modules aware of positional.
* Mark positional lookup arguments as positional on existing lookups.
2026-05-20 11:01:22 -04:00
simonLeary42 5a4f60dc03 git: remove redundant error checking (#86937)
* remove redundant error checking that makes bad error message

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2026-05-20 07:49:00 -04:00
Kay Yan c1d7cf45f6 facts: classify UnionTech OS Server as RedHat os_family (#86959)
UnionTech OS (UOS) Server is RPM-based and built on top of openAnolis
or openEuler, but the existing 'Uos' branch in parse_distribution_file_Debian
classified all UOS variants (including the Server editions) as Debian.

UOS Server advertises PLATFORM_ID="platform:uel*" in /etc/os-release
on every released image (uel20 for the openEuler-based E version with
codename 'fuyu', uelc20 for the openAnolis-based A version with codename
'kongzi'). The Debian-based Desktop edition has no such PLATFORM_ID.

This change adds a dedicated parse_distribution_file_UnionTech that:

* matches /etc/os-release when PLATFORM_ID starts with platform:uel
* matches /etc/redhat-release when it contains 'UnionTech OS Server release'
  or 'UOS Server release' (some A-version images symlink redhat-release
  to uos-release)
* sets distribution to 'UnionTech', preserving the underlying base via
  distribution_release ('kongzi' for A version, 'fuyu' for E version)

The Debian-based Desktop edition is unchanged: parse_distribution_file_Debian
returns early for the 'Uos' branch only when PLATFORM_ID="platform:uel*"
is present, so existing Desktop fixtures keep their os_family=Debian.

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2026-05-20 07:46:38 -04:00
sivel / Matt Martz 57f4901faf update sqlite-libs during bootstrap (#87003) 2026-05-19 16:19:44 -05:00
Anna Rift e35d82cb1b Fix grammar and capitalization in vars lookup examples (#86988) 2026-05-19 11:10:03 -04:00
Matt Clay d60f11409b ansible-test - Update base/default containers (#86958) 2026-05-15 18:17:43 -07:00
Matt Davis 405a6052b0 Defer patch target attribute failure until verified needed (#86976)
* Defer patch target attribute failure until verified needed

* Fixes startup failure under Python 3.15.0b1 on dataclass ClassVar annotation patch (which appears to have been fixed).
* Adds explicit failure if the target attribute does not exist but `is_patch_needed` is True.
* Added surrogate test coverage for the new defensive error case.

* import boilerplate

* skip coverage on unused test impl

Co-authored-by: Matt Clay <matt@mystile.com>

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2026-05-15 19:18:51 +00:00
Matt Clay f4203e90e4 ansible-test - Replace Ubuntu 22.04 with 26.04 (#86894)
* ansible-test - Replace Ubuntu 22.04 with 26.04

* Remove obsolete AppArmor work-around

* Fix connection_local integration test

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>

* Fix apt integration test

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>

* Skip apt_repository test on Ubuntu 26.04+

The module is deprecated, but it still tested on Ubuntu 24.04.

* Fix apt test

---------

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2026-05-14 16:51:34 -07:00
Abhijeet Kasurde 05797da13e apt_repository: validate line in sources.list (#85881)
* According to `sources.list(5)` man pages, only four fields are mandatory
  Types, URIs, Suites, Component.
  Validate as per this requirement while adding new source in sources.list.

Fixes: #85715

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-13 12:54:58 -07:00
Matt Davis cb535cf3d3 Fix broken callback dispatch on skipped meta tasks (#86977)
* Fix broken callback dispatch on skipped meta tasks
2026-05-12 16:16:42 -04:00
Abhijeet Kasurde b7c0900272 filter: add support for POSIX extended in regex_escape (#86949)
* add support for POSIX extended in regex_escape filter

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-08 18:48:32 +00:00
Brian Coca 5c55372345 Ensure no_log does not use subsets (#86939)
* also remove unused parameters from inner function

* Ensure no_log does not use subsets

Sort strings before using so the longer ones are processed first
avoiding strings that are subsets of each other creating partial
results.
Co-authored-by: David Shrewsbury <Shrews@users.noreply.github.com>
2026-05-07 15:12:07 -04:00
sivel / Matt Martz ae4d2b8291 Add docs/comments to IncludedFile to clarify behavior (#86942) 2026-05-06 14:30:34 -04:00
Abhijeet Kasurde 6ffe277fbf dnf: add test for broken config file (#86901)
Fixes: #85681

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-05 12:36:41 -07:00
Abhijeet Kasurde ef4cb719c7 ansible-doc: remove unnecessary parameter value (#86900)
* remove extraneous display.vvv and display.warning parameter

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-05 08:21:01 -07:00
Abhijeet Kasurde 87547967e6 cli: handle empty PAGER value (#86909)
Fixes: #86898

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-05 08:19:58 -07:00
Abhijeet Kasurde 30d7849e7e Deprecate is_module parameter (#86931)
* Use plugin_type=module instead of is_module=True

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-05 11:07:03 -04:00
Jordan Borean 49f1615157 winrm/psrp - apply no_log to stdout/stderr logs (#86919)
* winrm/psrp - apply no_log to stdout/stderr logs

This change censors the raw stdout/stderr logging used on the `winrm`
and `psrp` connection plugins with a verbosity level of 5 being set.
While by default the raw output isn't sensitive if a user has set a task
with `no_log: true` we shouldn't be displaying the raw results of that
task.

* Apply suggestions from code review

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Jordan Borean <jborean93@gmail.com>

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2026-05-01 15:13:31 +10:00
sivel / Matt Martz ff6b7e404a Add OrderedSet class (#84134) 2026-04-30 14:56:26 -05:00
sivel / Matt Martz f074c20929 Drop email in favor of our own multipart generator. Fixes #76666 (#86687) 2026-04-30 14:54:54 -05:00
David Shrewsbury 776f90ae4b Handle None return from read() in run_command() (#86922) 2026-04-30 15:03:21 -04:00
sivel / Matt Martz 883360fa00 humans (#86910) 2026-04-28 13:30:32 -05:00
Brian Coca 639bab6a44 sudo become plugin: add sudo-rs prompt support (#86175)
fixes #85837

Also move to fstrings
2026-04-27 12:51:34 -04:00
Abhijeet Kasurde 266cb0ee16 Parameterize fetch_url tests (#86892)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-04-27 04:23:57 -07:00
Patrick Kingston 2721c9d627 Fix git force to not override local commits (#86860)
* Add logic for toggleable local commit override

* Document tweaked git force logic

* Add tests for new commit-aware force

* Refactor switch_version

- duplicate code paths when handling 'HEAD'
- Fixed a FIXME

* Add changelog fragment

* Fix sanity and use fstrings

* Address 'diverged' case

* Revert to old structure

- Still contains new functionality
- Still contains FIXME

* Remove comments

* Update test/integration/targets/git/tasks/localmods.yml

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

* Move cleanup to always

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2026-04-24 10:42:23 -04:00
Patrick Kingston 3adecacccf Increase support for ftp urls across modules (#86885)
* Add generic success check for fetch_url

* Add unit test for new fn

* Add changelog, fix failing tests

* Apply suggestion from review

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

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2026-04-23 10:51:21 -04:00
Matt Davis b401c9246e Ensure ansible-galaxy test server shutdown (#86880)
* Accidental reuse on test retry usually timed out prematurely
2026-04-22 11:06:48 -07:00
Oleg Nazarov 44aa5b8936 git: fix track_submodules using hardcoded master branch (#86692)
The git module hardcodes 'master' when comparing submodule versions
with track_submodules=yes. This fails for repositories that use a
different default branch (e.g. 'main').

Read the branch from .gitmodules for each submodule, falling back to
the remote HEAD if no branch is configured. This respects the
submodule's configured branch and works regardless of the default
branch name.

Fixes #77691


Signed-off-by: olegnazarov23 <olegnazarov23@users.noreply.github.com>
Co-authored-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-04-22 15:20:33 +00:00
Abhijeet Kasurde a1ba752ed3 tests: do not use reserved 'tags' name (#86823)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-04-21 11:15:21 -04:00
Martin Krizek 99a155d6db More reliable non-lockstep strategies callback test (#86813)
ci_coverage
ci_complete
2026-04-21 11:08:46 -04:00
Abhijeet Kasurde f1144ba81f User: Add support for move_home for Alpine Linux (#86810)
* User: Add support for move_home for Alpine Linux

Fixes: #85521

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-04-21 11:04:44 -04:00
Matt Davis 7678502c77 Disable ansible-test azure cloud self-test (#86866)
* Core CI service principal pool is broken, likely new global policy. This service is not used by core.
2026-04-20 23:35:39 +00:00
Matt Davis 5a2d53c6c6 Add WORKER_SESSION_ISOLATION config for TTY sharing (#86762)
* Add WORKER_SESSION_ISOLATION config for TTY sharing

* Worker should always be new PG leader

* Use non-deprecated os.setpgid for non-session-isolates case
* Validate session-isolated and not in signal_propagation integration test
2026-04-20 14:50:06 -07:00
Matt Davis 0df3d4abc5 Add INJECT_INVOCATION config (#86771)
* Add `INJECT_INVOCATION` config, misc invocation cleanup

* clean up copy action invocation injection

* add basic test coverage

* unbork templated config, misc test cleanup

* force invocation output in roles test
2026-04-20 14:49:43 -07:00
Abhijeet Kasurde 7611079116 tests: enable setup_cron for Alpine (#86751)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-04-20 11:49:22 -07:00
Matt Clay bd7fa60c24 Remove Windows Server 2016 support (#86852)
* ansible-test - Remove Windows Server 2016 remote
* Drop Windows Server 2016 support from psrp connection plugin
* Remove test support for EOL Windows versions
* Tighten up win_script integration test
* Remove obsolete Windows version check from test
2026-04-16 02:42:17 +00:00
Matt Clay a5a9fbd9ec ansible-test - Replace Fedora 43 with 44 (#86851) 2026-04-16 01:19:33 +00:00
Patrick Kingston a250aafa9f Add winrm hostname to stdin error (#86840)
* Enhance winrm connection failure

- Add winrm_hostname to the failure message for clarity
- Test that we're able to reach this message with a custom action plugin

* Create changelog fragment

* Make action plugin less verbose

* Remove more comments (they were bad)
2026-04-16 07:55:29 +10:00
Matt Davis 00b1f27d9c Fix ansible-test remote aliases for new-style args (#86844)
* Always include `name` when applying remote config defaults for Posix/Windows.
2026-04-14 18:03:58 -07:00