Compare commits

...

156 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
Sviatoslav Sydorenko
7328efbdf3 🧪 Replace distlib type ignores with stubs
The stubs are taken from the unmerged PR [[1]] upstream. MyPy is set
up to rely on them instead of the missing package type annotations.

[1]: https://github.com/pypa/distlib/pull/195
2025-12-10 18:03:47 +01:00
Sviatoslav Sydorenko
e05b6e7475 Fix types @ galaxy.collection.galaxy_api_proxy
This includes enforcing `strict_optional` for the
`ansible.galaxy.collection.galaxy_api_proxy` module in MyPy.
2025-12-10 18:03:23 +01:00
Sviatoslav Sydorenko
be8152a2b1 🧪 Fix types @ ansible.galaxy.collection.gpg
Most of this patch is coversion from comments to native syntax. It
also includes fixing a strict optional violation.
2025-12-10 15:57:34 +01:00
FestplattenSchnitzel
e25cc345fe
deb822_repository: add include, exclude parameters (#86171) 2025-12-05 12:21:09 -05:00
Brian Coca
ca6dc93dcc
ansible_local should not trigger deprecation (#86234)
* ansible_local should not trigger deprecation

fixes #86228
2025-12-05 11:35:27 -05:00
sivel / Matt Martz
8a4b184620
fix package installation when specifying architecture without version. Fixes #86156 (#86219) 2025-12-04 11:14:29 -06:00
Martin Krizek
7b4d4ed672
ssh connection: fix sshpass pipe fd leaks (#86141)
When using sshpass the file descriptors leaks would happen in the reset
method that used _build_command that creates the pipe but the command
would not go through _bare_run which closes the pipe.

Another scenario would be _bare_run failing and not all code path would
properly close the pipe.

This patch fixes the issues by:
* move creating the pipe from _build_command closer to where it is used
  in _bare_run
* wrap _bare_run with closing the pipe in case of a failure
* no need to re-create pipe in the retry code
* unrelated but simplify the reset method
2025-12-03 12:48:19 +01:00
Brian Coca
335db20951
vars loading, show file name instead of vars in error (#86277)
* Show file instead of vars on load error

(cherry picked from commit 490795770f34120adc02b08fc24fc50be6ac68a2)
(cherry picked from commit 11a2d02bf2)

* merged

* Update lib/ansible/vars/manager.py

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

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-12-02 15:32:24 -06:00
Sviatoslav Sydorenko
251fec31b4 🧪Drop PkgReq stub @ ansible.galaxy.collection
This tiny restructuring allows us to get rid of the type ignore.
2025-12-01 17:41:58 +01:00
lixiaoyong01
cc839f013a
Fix typos in apt_key module (#86257)
Co-authored-by: lixiaoyong <lixiaoyong@kylinos.cn>
2025-11-25 12:09:49 -08:00
John Eismeier
a5a2b77911
Propose fix typo of targetting (#86242)
Signed-off-by: John E <jeis4wpi@outlook.com>
2025-11-25 10:33:31 -05:00
Abhijeet Kasurde
17f3698384
copy: honor directory_mode when specified with remote_src=True (#86184)
* copy: honor directory_mode when specified with remote_src=True

* Honor directory_mode specified by user when copying directories
  and remote_src=True

Fixes: #81292

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-11-25 10:14:05 -05:00
Abhijeet Kasurde
5f2d96c60e
regex: fix example documentation for regex_test (#86172)
Fixes: https://github.com/ansible/ansible-documentation/issues/3246

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-11-25 10:04:29 -05:00
sivel / Matt Martz
6bb7bd760f
Fix escaping issue in ansiballz wrapper for sitecustomize (#86236)
* Fix escaping issue in ansiballz wrapper for sitecustomize

* add clog frag
2025-11-24 09:33:45 -08:00
sivel / Matt Martz
bff3a9aeb9
Fix docker hostname parsing in ansible-test (#86235)
* Fix docker hostname parsing in ansible-test

* add clog frag
2025-11-20 15:54:33 -08:00
Martin Krizek
9d9a8d78ee
Skip hostname integration tests on all container providers (#86227)
* Skip hostname integration tests on all container providers

* Use skip/docker instead
2025-11-20 09:53:49 -08:00
Thomas Sjögren
6d428ca8f0
replace random with secrets when generating passwords (#85971)
---------

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-20 12:32:32 -05:00
Matt Clay
ce84d3157d
Fix first_found example (#86224) 2025-11-19 10:16:45 -08:00
Matt Clay
2797659df4
Use more stable platforms for agents examples (#86221)
Refer to versions that are changed less frequently in AGENTS.md to reduce the frequency of updates needed to keep it up-to-date.

Also fix a few spacing issues.
2025-11-19 09:14:21 -08:00
Sloane Hertel
7ebc9fa5d6
Support configuring callback plugins with --extra-vars (#84661)
* Support configuring callback plugins with --extra-vars

Callback plugins define variable names in the documentation for ConfigManager

Variable values can be omitted

* Added default callback variable configuration for display_skipped_hosts

Fixes #84469

Co-authored-by: Matt Clay <matt@mystile.com>
2025-11-18 20:04:22 -05:00
Abhijeet Kasurde
af9009b00d
get_url: Fix regex for GNU digest line (#86134)
* GNU digest line may contain multiple spaces between
  checksum and filename. Fix regex to handle this situation.

Fixes: #86132

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-11-17 15:29:43 -08:00
Vinayak Bhatia
e2ae13cf38
getent: Handle non-empty split string (#85728)
Signed-off-by: Vinayak Bhatia <ntpjc2vinayak@gmail.com>
Co-authored-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-11-17 15:27:24 -08:00
Patrick Kingston
76fb182b63
Fix pip package name resolution in check mode (#85623)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <webknjaz@redhat.com>
2025-11-14 10:20:50 -08:00
Matt Clay
3d26431e4f
ansible-test - Improve AZP commit API error handling (#86197) 2025-11-14 03:59:26 +00:00
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
69c9fbed26
Install xt_comment kernel mod @ iptables test (#86187)
This patch fixes integration test jobs running under RHEL 10.0 that
don't have this extension pre-installed.

Co-Authored-By: sivel / Matt Martz <matt@sivel.net>

ci_complete
ci_coverage
2025-11-13 17:48:35 +00:00
biancalana
eb0ada3d28
Feature/improve bhyve guest and host detection (#85767) 2025-11-13 09:18:00 -05:00
David Shrewsbury
dc3cc0f9ea
Fix test_encrypt.py unit test (#86180) 2025-11-12 09:54:25 -05:00
David Shrewsbury
83d2ce771c
Modify crypt library import pattern (#86120)
Hide the functionality of the _internal/_encryption/_crypt.py module
behind an object so that we don't have code executed at import time.
2025-11-11 17:33:45 -05:00
Patrick Kingston
e0f61dfce4
Fix iptables match extension bug (#86147)
* Prevent unnecessary match extension duplicates

I moved this to use a set instead of the
`if not in rule` just in case there's a comment
like 'owner' or another stray string that matches
the extension.
2025-11-11 17:29:10 -05:00
Felix Fontein
13a7393cfe
Fix AnsibleModule.human_to_bytes (#85259)
* Fix AnsibleModule.human_to_bytes.

* Add unit test.

* Fix wrong example in docstring.

* Forgot tests without keyword.

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

* Apply review suggestions.

* Add type hints.

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

---------

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2025-11-11 11:50:36 -08:00
Felix Fontein
222f786f23
ansible-test validate-modules: report bad-return-value-key for return values that cannot be accessed with Jinja's dot notation (#86079)
* Report bad-return-value-key for return values that cannot be accessed with Jinja's dot notation.

* Move constants into separate module.

* Add test to check FORBIDDEN_DICTIONARY_KEYS against current Python's key list.

* Remove unused constant.

* Apply suggestions from code review.

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

* Add type annotations.

* Simplify typing.

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

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2025-11-11 09:13:15 -08:00
Matt Clay
76f07034b3
Fix unit test serialization (#86163)
This allows the test to work on pytest 9+
2025-11-10 16:29:20 -08:00
Felix Fontein
89ba882b08
runtime-metadata sanity test: ignore pre-release and build identifier (#85198)
* Ignore pre-release and build identifier.

* Add tests.

* Improve changelog fragment.

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

* Extend tests.

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2025-11-10 09:16:54 -08:00
Patrick Kingston
6a4b199054
Remove decrypt arg-docs mismatch (#86128)
* Remove decrypt arg-docs mismatch

Removes the use of the arg in the action plugin
and removes the associated doc fragment. Changes
no behavior because the lack of decrypt in the
argspec prevents a value being passed in and
the args.get('decrypt', True) means that it is
always true.

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-11-07 10:54:25 -05:00
Matt Clay
4184d9665e
Fix getuser fallback error handling (#86144) 2025-11-07 01:57:23 +00:00
sivel / Matt Martz
707a5ec617
Add CLAUDE.md/AGENTS.md files for tighter assistance with GenAIs (#85841)
* Add an override of the `/review` slash command in claude code
* Add support for `CLAUDE.local.md` and `~/.claude/ansible.md`

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2025-11-06 15:08:54 -06:00
David Shrewsbury
e3cff24134
Increase code coverage of utils/encrypt.py (#86060)
* Add encryption code coverage

Co-authored-by: Matt Clay <matt@mystile.com>
2025-11-06 15:26:41 -05:00
Matt Clay
a4ae978122
template module - Report syntax error line number (#86101)
Report the line number for Jinja syntax errors in template files.
2025-11-05 17:11:17 -08:00
Matt Clay
8ac5c8580b
Remove urllib2 pylint check (#86139)
No supported Python version provides urllib2.
2025-11-06 00:55:32 +00:00
Matt Clay
5b8ae0b5b5
Fix deprecation comments (#86138) 2025-11-06 00:53:41 +00:00
Martin Krizek
a2dda41bb6
Removed deprecated handle_stats_and_callbacks param of _load_included_file (#86063)
* Removed deprecated handle_stats_and_callbacks param of _load_included_file

Fixes #86003

* ci_complete
2025-11-05 13:25:49 -05:00
Iksas
388ce79fcd
apt: Stop the >= operator from being ignored while installing packages (#85254)
* apt: Stop the >= operator from being ignored if packages are not already installed

* apt: Fix failing integration test in Ubuntu 24.04
2025-11-04 15:34:08 -08:00
Abhijeet Kasurde
3c3a06b8fd
inventory: Add warning for invalid priority values (#86114)
* Handle ValueError raised when user set invalid priority values
* Update tests to work with Pytest

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Mannu Silva <wise.tent4987@fastmail.com>
2025-11-04 10:52:15 -05:00
Martin Krizek
f743dfce93
basic.py: add proper deprecations (#86064)
* basic.py: add proper deprecations

* fix sanity
2025-11-04 10:19:15 -05:00
Jordan Borean
55e4ba224d
Raise min setuptools and remove wheel from build (#86040)
* Raise min setuptools for license specifier

Raises the minimum setuptools version used for our build requirements to
support the new license identifiers. This removes a deprecation warning
emitted by setuptools and will avoid breaking the build when the old
format is eventually removed.

* Fix typos referencing PEP 639 in text

The respective metadata docs are
* https://packaging.python.org/en/latest/specifications/pyproject-toml/#license
* https://packaging.python.org/en/latest/specifications/core-metadata/#license-expression

---------

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2025-11-04 03:33:31 +00:00
Jordan Borean
829373bfb9
Use json for test inventory - ci_complete (#86118)
* Use json for test inventory - ci_complete

Uses the JSON/YAML format for the inventory files generated by
`ansible-test`. This solves minor issues with using complex values when
building the test inventory files like backslashes or more complex data
structures.

* Apply suggestions from code review

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

* Add changelog and use more limited ext config var - ci_complete

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2025-11-04 13:25:03 +10:00
Matt Davis
3c5bb535a9
Fix incorrect propagation of task.connection (#86121)
Co-authored-by: Matt Clay <matt@mystile.com>
2025-11-03 21:17:43 +00:00
Brian Coca
5904846342
config lookup, remove unreachable code (#86051)
defensive, but uneeded since get_option already precludes bad values
this far in
2025-11-03 10:35:08 -05:00
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
730af3239d
🧪 Set timeouts for CI jobs
Sometimes, AZP would mark steps in jobs as cancelled when they've
actually exited successfully but on the boundary of the default
60-minute timeout. Such logs might be difficult to reason about.

Additionally, `entry-point.sh` sets a 60-minute timeout for the main
test invocation but it would never trigger earlier that AZP would kill
such a job as the job-global timeout was 60 minutes already and it'd
always be hit earlier than the test runner one.

The patch sets maximum observable job timeouts with extra buffer to
account for flakiness.

PR #86073

Co-authored-by: Matt Clay <matt@mystile.com>
2025-10-30 16:48:46 +01:00
Matt Clay
13496b9e11
ansible-test - Fix integration test code coverage (#86100) 2025-10-29 18:21:53 -07:00
Shion Ichikawa
f2a4d6de12
🚨 fix yaml syntax error on ./test/integration/targets/unarchive/tasks/test_missing_binaries.yml (#86099) 2025-10-29 22:55:26 +00:00
Martin Krizek
2e8a859477
Remove deprecated imports from basic.py (#86065)
Fixes #85997
2025-10-29 19:53:03 +01:00
Matt Clay
bb30a7fa1f
ansible-test - Update base/default containers (#86087) 2025-10-28 14:01:37 -07:00
Matt Clay
3bf54c8128
Remove obsolete incidental_ios_file test (#86086) 2025-10-28 10:44:36 -07:00
Matt Clay
12acd5c18f
ansible-test - Update sanity requirements (#86083) 2025-10-28 09:33:10 -07:00
Jason K Hall
8d07ed6318
Handle ValueError in run_command when parsing invalid args(shlex.split) (#85945) 2025-10-27 14:02:22 -07:00
Brian Coca
d9d11d6ff6
sanitize path symbols in inventory_hostname on file cache plugins (#41420)
* File based cache plugins filenames fix

File based cache plugins will now correctly handle inventory_hostnames
with 'path symbols' in their names. This should allow those using
chroot and jail connection plugins to use file based caches now.
2025-10-24 14:57:11 -04:00
Abhijeet Kasurde
7bd2475a70
file, stat: return disk_usage_bytes (#85909)
Fixes: #70834

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-10-24 18:42:58 +00:00
Brian Coca
169e6bead3
generated inventory plugin, add extra vars option (#85372) 2025-10-24 07:39:07 -04:00
Brian Coca
516a114ef6
option deprecations show alternatives (#86032)
Give users a helpful hint on what to do to address the deprecation
2025-10-23 12:44:43 -04:00
Sloane Hertel
68f5a7ca1c
Update issue templates with suggestion to exclude Galaxy server secrets and general reminder (#85481) 2025-10-23 14:53:45 +00:00
Patrick Kingston
087931546d
Remove deprecated safe_eval (#86019)
* Remove safe_eval from codebase

Resolves deprecations in 85996 and 85999

* Remove deprecations from sanity ignores

* Add changelog fragment

* Add newline to file

* Remove unused imports
2025-10-22 12:22:14 -04:00
Sloane Hertel
df34bf9e70
Update win_exec_wrapper integration test to match #86029 (#86052)
* Remove assertion now that there is no warning
2025-10-21 17:56:18 -04:00
sivel / Matt Martz
e4b4787c02
Soft deprecate ansible.module_utils.six (#86048) 2025-10-21 16:20:55 -05:00
Martin Krizek
6dd48814f2
Remove test/units/module_utils/compat/test_datetime.py (#86045)
Follow up on #86018
2025-10-21 14:17:47 -04:00
Abhijeet Kasurde
ef53d63953
package_facts: typecast bytes to string while returning facts (#85939)
Fixes: #85937

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-10-21 15:46:00 +00:00
Abhijeet Kasurde
367de4498b
module_utils: remove deprecated compat.datetime APIs (#86018)
Fixes: #86000

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-10-21 11:43:28 -04:00
Abhijeet Kasurde
9a350ff104
git: removed deprecated gpg_whitelist alias (#86011)
Fixes: #86004

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-10-21 11:37:42 -04:00
Abhijeet Kasurde
9f1177a056
Removed parameter 'required' from get_bin_path API (#86009)
Fixes: #85998

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-10-21 11:37:03 -04:00
Abhijeet Kasurde
790b66f383
interpreter_discovery: removed auto_silent* option (#86006)
* interpreter_discovery: removed auto_silent* option

* Removed deprecated auto_silent* option from interpreter_discovery_python

Fixes: #85995

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

* Make CI green

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

* Make CI green I

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

---------

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-10-21 11:35:53 -04:00
Jason K Hall
192948434c
galaxy: handle missing 'results' key in cached Galaxy API responses. (#85972)
* galaxy: handle missing 'results' key in cached Galaxy API responses.

* galaxy: clarified AnsibleError message for missing cache results.

* Modified AnsibleError message and added a regression test.

* Fixed formatting issue in test/units/galaxy/test_api.py

* Added a changelog entry.

* Modified changelog.
2025-10-21 11:27:24 -04:00
sivel / Matt Martz
d6051b18dd
Add support for crypt/libxcrypt via ctypes, as an alternative to passlib (#85970)
* Add support for crypt/libxcrypt via ctypes, as an alternative to passlib

* move verbosity message to BaseHash

* Don't require DYLD_LIBRARY_PATH mods for standard homebrew installs on macos

* improve crypt_gensalt error handling
2025-10-21 11:24:57 -04:00
sivel / Matt Martz
f1f5b934c2
Update DataLoader to deal almost exclusively in str (#85941)
* Update DataLoader to deal almost exclusively in str

* source can be None as well

Co-authored-by: David Shrewsbury <Shrews@users.noreply.github.com>
2025-10-21 11:06:15 -04:00
Miro Hrončok
719681bbe2
Do not require wheel for building (#85533)
* Do not require wheel for building

- current version of setuptools (70.1+) does not need wheel at all
- older versions of setuptools would fetch wheel when building wheels (but not sdists)

* Pin setuptools to a version not requiring wheel

Now when we don't list wheel,
we are unable to pin it to a particular version.

Instead, use setuptools version that no longer uses it.
2025-10-21 01:35:19 +00:00
Brian Coca
ccfb7b1364
Fix include_role error consitency and add rescueable option (#86012)
* include_role now behaves more like task on error

changes _from errors from syntax to task failures, by default
which makes it more consistent with other existing errors
 * also force 'missing role' to behave as syntax error when false
 * also error when subdir does not exist, previouslly we ignored missing
   file
 * add 'rescuable' toggle to allow user to chose error type

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2025-10-20 19:19:11 -04:00
Brian Coca
1cb2932c95
config lookup, fix 'show_origin' and variables (#85356)
show_origin and variable sources were broken for base config when 'forked' from plugins
---------
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2025-10-20 19:15:00 -04:00
Jordan Borean
99bb587906
Remove AddType warning for cleanup (#86029)
Removes the warning emitted when using Add-Type and the cleanup of temp
files fails due to a file still being in use. The cleanup should be
handled by AnsibleModule on exit giving it more time to wait for any
open file handles to close. The exception is still present if calling
`Add-CSharpType` without an `AnsibleModule` object.
2025-10-21 06:35:31 +10:00
Brian Coca
22721b5d63
Slurp armor option (#85986)
* slurp, add option to deactivate the armor

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-10-17 18:09:30 -04:00
Sviatoslav Sydorenko
823c117563 Fix dry-run for notifications @ publish-codecov
Apparently `codecovcli send-notifications` does not have a `--dry-run`
CLI option. This patch stops adding it to the command and implements
an external `dry-run` mode in the wrapper script or this case instead.

This is a follow-up for #85968.

Co-authored-by: Matt Clay <matt@mystile.com>
2025-10-16 23:28:14 +02:00
sivel / Matt Martz
1a3e63c794
Don't deprecate six yet (#86020) 2025-10-16 12:56:23 -05:00
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
2799a684fc
Explicitly notify Codecov about upload completion (#85968)
This patch add an additional invocation of Codecov CLI that tells the
backend that we're done uploading. It is supposed to stop Codecov from
guessing whether to wait for more uploads for the CI or start
processing them already.

Upstream refs:
* https://docs.codecov.com/docs/cli-options#send-notifications
* https://docs.codecov.com/docs/notifications#preventing-notifications-until-youre-ready-to-send-notifications
* https://docs.codecov.com/docs/codecovyml-reference#codecovnotifymanual_trigger
* https://github.com/codecov/codecov-cli/pull/195 (d634ebd8f2)
* https://github.com/codecov/codecov-action/issues/1436
* https://github.com/codecov/engineering-team/issues/107
* https://github.com/codecov/roadmap/issues/20
* https://github.com/codecov/feedback/discussions/204#discussioncomment-8796433
* https://github.com/codecov/engineering-team/issues/1245
* https://github.com/codecov/engineering-team/issues/3
* https://github.com/codecov/worker/pull/14 (71626b6368)
2025-10-15 08:50:25 -07:00
Martin Krizek
05d5b0f168
Avoid the ssh-agent exiting before tests end (#85979)
There were couple of occurrences where the hard 30 seconds limit on
running ssh-agent was not enough for the test to run and the ssh-agent
was killed resulting in the test failing with "Connection refused". This
change just lets the agent run in the background and kills it
manually after the tests finish.
2025-10-15 08:23:31 +02:00
sivel / Matt Martz
726e8d6548
Bump devel to 2.21 (#85992) 2025-10-14 15:35:21 -05:00
Michał Gąsior
9fcf1f7c58
Fix psrp - ReadTimeout exceptions now mark host as unreachable (#85974)
* psrp - ReadTimeout exceptions now mark host as unreachable

* add try to _exec_psrp_script

* fix indent E111

* update raise format

switch to raise Exception from e

Co-authored-by: Jordan Borean <jborean93@gmail.com>

---------

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2025-10-15 05:59:00 +10:00
sivel / Matt Martz
c02f59ca3a
fix urls in additional ansible-doc test (#85988) 2025-10-14 13:05:39 -05:00
Matt Clay
83c79240ec
ansible-test - Update base/default/distro containers (#85985) 2025-10-13 16:39:17 -07:00
Matt Clay
7c2311d547
ansible-test - Upgrade coverage to 7.10.7 (#85981) 2025-10-13 14:30:14 -07:00
Matt Clay
de7dd5bbb2
ansible-test - Update pinned pip to 25.2 (#85982) 2025-10-13 21:00:17 +00:00
sivel / Matt Martz
5a9afe4409
Fix signal propagation (#85907) 2025-10-13 15:38:12 -05:00
Matt Clay
9ee667030f
ansible-test - Update sanity test requirements (#85980) 2025-10-13 12:32:39 -07:00
Matt Clay
82b64d4b69
ansible-test - Update base/default containers (#85967) 2025-10-09 20:58:50 +00:00
Matt Clay
06456c68ec
Use bcrypt < 5 for unit tests (#85969) 2025-10-09 19:32:27 +00:00
Sviatoslav Sydorenko
53afc6f203 Mention pkg name in package-data sanity output
The logs were displaying a series of numbers in parens like `(66.1.0)`
at the end of each error line. its unintuitive what that means. I had
to look into the source code to confirm my suspicion of it being the
version of `setuptools`. This patch spells it out.
2025-10-09 00:40:59 +02:00
Sviatoslav Sydorenko
0cd36ce6d0 Use strict_optional @ ansible.galaxy.dependency_resolution
This patch drops unnecessary default for
`CollectionDependencyProvider`'s `concrete_artifacts_manager` argument
as it is always passed, in every place across the code base where the
provider is constructed.

It was also causing MyPy violations on calls to
`_ComputedReqKindsMixin.from_requirement_dict()` in the "strict
optional" mode which is now enforced for $sbj, while remaining
disabled globally.

It is a #85545 follow-up.
2025-10-07 22:11:58 +02:00
Sviatoslav Sydorenko
c9131aa847 Type-annotate ansible.galaxy.dependency_resolution
This patch is a combination of `pyrefly autotype` and manual
post-processing. Parts of it migrate pre-existing comment-based
annotations, fixing incorrect ones where applicable.

The change also configures MyPy to run checks against actual
`resolvelib` annotations and includes a small tweak of
`ansible.galaxy.collection._resolve_depenency_map` to make it
compatible with those.

Co-Authored-By: Jordan Borean <jborean93@gmail.com>
Co-Authored-By: Matt Clay <matt@mystile.com>
Co-Authored-By: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2025-10-07 09:55:10 +02:00
David Shrewsbury
feda8fc564
Fix flakey get_url test (#85953) 2025-10-06 18:42:03 -07:00
sivel / Matt Martz
6673a14a9e
Update DataLoader.get_basedir to be an abspath (#85940) 2025-10-06 09:22:47 -05:00
s-hamann
0c7dcb65cf
fetch - return file in result when changed is true (#85729)
Set the (source) file attribute in the return value if the file changed
(e.g. on initial fetch). The attribute is already set in all other
cases.
2025-10-03 08:28:41 -04:00
Martin Krizek
686c3658ae
Deprecate ansible.module_utils.six (#85934)
* Deprecate `ansible.module_utils.six`

Fixes #85920
2025-10-02 13:17:03 -05:00
Sloane Hertel
cb2ecda514
Remove support for resolvelib < 0.8.0 (#85936)
* Remove support for resolvelib < 0.8.0

Remove code handling differences between resolvelib 0.5.3 and 0.8.0

Drop some versions from the test to reduce the time it takes to run

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>

* Remove type annotation

---------

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
2025-10-01 14:33:21 -07:00
Martin Krizek
313c6f6b4d
Don't special case implicit meta tasks when filtering on tags (#85805)
* Don't special case implicit meta tasks when filtering on tags

Fixes #85475
2025-10-01 17:44:53 +00:00
Abhijeet Kasurde
6bee84318d
known_hosts: return rc and stderr in fail_json (#85871)
* When ssh-keygen fails, return rc and stderr in fail_json
  in order to help debugging.

Fixes: #85850

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-10-01 16:07:29 +00:00
Martin Krizek
c3f87b31d1
import_tasks processing closer to include_tasks (#85877)
Fixes #69882
Closes #83853
Fixes #85855
Fixes #85856
2025-10-01 09:56:14 +02:00
Abhijeet Kasurde
c5e6227bdb
falsy: Update doc (#85913)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-09-30 17:19:10 +02:00
Luca Steinke
eafa139f77
fix description of truthy test (#85911)
There's a "not" too much here.

Maybe further examples can be found.
2025-09-30 17:18:38 +02:00
Felix Fontein
c6d8d206af
Make sure ansible-doc doesn't crash when scanning collections whose path contains ansible_collections twice (#85361)
Ref: https://github.com/ansible/ansible/issues/84909#issuecomment-2767335761

Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2025-09-30 10:08:43 -04:00
605 changed files with 6358 additions and 2222 deletions

View file

@ -90,16 +90,16 @@ stages:
targets:
- name: macOS 15.3
test: macos/15.3
- name: RHEL 9.6 py39
test: rhel/9.6@3.9
- name: RHEL 9.6 py312
test: rhel/9.6@3.12
- name: RHEL 10.0
test: rhel/10.0
- name: FreeBSD 13.5
test: freebsd/13.5
- name: RHEL 9.7 py39
test: rhel/9.7@3.9
- name: RHEL 9.7 py312
test: rhel/9.7@3.12
- name: RHEL 10.1
test: rhel/10.1
- name: FreeBSD 14.3
test: freebsd/14.3
- name: FreeBSD 15.0
test: freebsd/15.0
groups:
- 1
- 2
@ -108,10 +108,12 @@ stages:
targets:
- name: macOS 15.3
test: macos/15.3
- name: RHEL 9.6
test: rhel/9.6
- name: RHEL 10.0
test: rhel/10.0
- name: RHEL 9.7
test: rhel/9.7
- name: RHEL 10.1
test: rhel/10.1
- name: FreeBSD 15.0
test: freebsd/15.0
groups:
- 3
- 4
@ -119,14 +121,14 @@ stages:
- template: templates/matrix.yml # context/controller (ansible-test container management)
parameters:
targets:
- name: Alpine 3.22
test: alpine/3.22
- name: Fedora 42
test: fedora/42
- name: RHEL 9.6
test: rhel/9.6
- name: RHEL 10.0
test: rhel/10.0
- name: Alpine 3.23
test: alpine/3.23
- name: Fedora 43
test: fedora/43
- name: RHEL 9.7
test: rhel/9.7
- name: RHEL 10.1
test: rhel/10.1
- name: Ubuntu 24.04
test: ubuntu/24.04
groups:
@ -138,10 +140,10 @@ stages:
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3.22
test: alpine322
- name: Fedora 42
test: fedora42
- name: Alpine 3.23
test: alpine323
- name: Fedora 43
test: fedora43
- name: Ubuntu 22.04
test: ubuntu2204
- name: Ubuntu 24.04
@ -153,10 +155,10 @@ stages:
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3.22
test: alpine322
- name: Fedora 42
test: fedora42
- name: Alpine 3.23
test: alpine323
- name: Fedora 43
test: fedora43
- name: Ubuntu 24.04
test: ubuntu2404
groups:
@ -167,8 +169,8 @@ stages:
parameters:
testFormat: linux/{0}
targets:
- name: Fedora 42
test: fedora42
- name: Fedora 43
test: fedora43
groups:
- 7
- stage: Galaxy

View file

@ -47,13 +47,25 @@ def parse_args() -> Args:
return Args(**kwargs)
def run(*args: str | pathlib.Path) -> None:
def run(
*args: str | pathlib.Path,
dry_run: bool = False,
) -> None:
"""
Log and run given command.
The command is not actually executed if ``dry_run`` is truthy.
"""
cmd = [str(arg) for arg in args]
print(f'==> {shlex.join(cmd)}', flush=True)
subprocess.run(cmd, check=True)
dry_prefix = '[would run] ' if dry_run else ''
print(f'==> {dry_prefix}{shlex.join(cmd)}', flush=True)
if not dry_run:
subprocess.run(cmd, check=True)
def install_codecov(dest: pathlib.Path) -> pathlib.Path:
def install_codecov(dest: pathlib.Path, dry_run: bool = False) -> pathlib.Path:
"""Populate a transitively pinned venv with ``codecov-cli``."""
requirement_file = DEPS_DIR / 'codecov.in'
constraint_file = requirement_file.with_suffix('.txt')
@ -72,6 +84,7 @@ def install_codecov(dest: pathlib.Path) -> pathlib.Path:
f'--constraint={constraint_file!s}',
f'--requirement={requirement_file!s}',
'--disable-pip-version-check',
dry_run=dry_run,
)
return codecov_bin
@ -118,16 +131,40 @@ def upload_files(codecov_bin: pathlib.Path, config_file: pathlib.Path, files: t.
run(*cmd)
def report_upload_completion(
codecov_bin: pathlib.Path,
config_file: pathlib.Path,
dry_run: bool = False,
) -> None:
"""Notify Codecov backend that all reports we wanted are in."""
cmd = [
codecov_bin,
'--disable-telem',
f'--codecov-yml-path={config_file}',
'send-notifications',
]
run(*cmd, dry_run=dry_run)
def main() -> None:
args = parse_args()
with tempfile.TemporaryDirectory(prefix='codecov-') as tmpdir:
config_file = pathlib.Path(tmpdir) / 'config.yml'
config_file.write_text('')
# Refs:
# * https://docs.codecov.com/docs/codecovyml-reference#codecovnotifymanual_trigger
# * https://docs.codecov.com/docs/notifications#preventing-notifications-until-youre-ready-to-send-notifications
config_file.write_text('codecov:\n notify:\n manual_trigger: true')
codecov_bin = install_codecov(pathlib.Path(tmpdir))
codecov_bin = install_codecov(
pathlib.Path(tmpdir),
dry_run=args.dry_run,
)
files = process_files(args.path)
upload_files(codecov_bin, config_file, files, args.dry_run)
# Ref: https://docs.codecov.com/docs/cli-options#send-notifications
report_upload_completion(codecov_bin, config_file, args.dry_run)
if __name__ == '__main__':

View file

@ -7,6 +7,7 @@ jobs:
- job: Coverage
displayName: Code Coverage
container: $[ variables.defaultContainer ]
timeoutInMinutes: 10
workspace:
clean: all
steps:

View file

@ -12,6 +12,7 @@ jobs:
- job: test_${{ replace(replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_'), '@', '_') }}
displayName: ${{ job.name }}
container: $[ variables.defaultContainer ]
timeoutInMinutes: 65
workspace:
clean: all
steps:

View file

@ -0,0 +1,55 @@
---
description: Review an Ansible PR following the project's standardized process from CLAUDE.md
argument-hint: <pr_number>
allowed-tools: [TodoWrite, Bash(gh pr view:*), Bash(gh pr diff:*), Bash(gh pr checkout:*), Bash(gh pr checks:*), Read, Grep, Glob, Search]
---
PR Review Command
=================
Review an Ansible PR following the project's standardized process from `CLAUDE.md`.
Usage
-----
```bash
/review <pr_number>
```
Arguments
---------
- `pr_number` (required): The GitHub PR number to review
Implementation
--------------
This command implements the PR Review Guidelines documented in the `PR Review Guidelines` section of CLAUDE.md.
Review Process Steps
--------------------
The command follows these numbered steps from CLAUDE.md:
1. **Create TodoWrite list** for systematic review tracking
2. **Get PR details**: `gh pr view <number>` to understand scope, motivation and the desired outcome
3. **Get PR diff**: `gh pr diff <number>` to see all changes
4. **Check required components FIRST**:
- Verify changelog fragment exists in `changelogs/fragments/`
- Verify changelog uses correct section (check `changelogs/config.yaml`)
- Verify tests exist and specifically cover the changed code paths
- Unit tests should be pytest style, and functional rather than tightly coupled to mocking
- Integration tests required for almost all plugin changes
5. **Checkout PR branch**: `gh pr checkout <number>` to examine code holistically
6. **Review existing feedback**: `gh pr view <number> --comments` for all comments and previous reviews
7. **Verify all issues addressed**: Ensure bot failures, reviewer requests, and discussion points are resolved
8. **Call out unresolved feedback**: Explicitly mention any discussions/requests that remain unaddressed
Critical Review Elements
------------------------
- **Licensing**: Verify GPLv3/BSD-2-Clause compatibility for any new dependencies
- **Test scope**: Tests must exercise actual changed code, not just add random coverage
- **Changelog validation**: Fragment structure follows sections defined in `changelogs/config.yaml`
Each step is tracked in TodoWrite for visibility and systematic completion. A review round should not exceed 20 feedback items.

View file

@ -105,7 +105,8 @@ body:
label: Configuration
description: >-
Paste verbatim output from `ansible-config dump --only-changed -t all` below, under the prompt line.
(if using a version older than ansible-core 2.12 you should omit the '-t all')
Remember to redact secret values. You can easily filter Galaxy server secrets using grep,
for example `ansible-config dump --only-changed -t all | grep -Ev 'token|password|client_secret'`.
Please don't wrap it with triple backticks — your
whole input will be turned into a code snippet automatically.
render: console

View file

@ -130,6 +130,8 @@ body:
label: Configuration
description: >-
Paste verbatim output from `ansible-config dump --only-changed -t all` below, under the prompt line.
Remember to redact secret values. You can easily filter Galaxy server secrets using grep,
for example `ansible-config dump --only-changed -t all | grep -Ev 'token|password|client_secret'`.
(if using a version older than ansible-core 2.12 you should omit the '-t all')
Please don't wrap it with triple backticks — your
whole input will be turned into a code snippet automatically.

2
.gitignore vendored
View file

@ -127,3 +127,5 @@ test/units/.coverage.*
/SYMLINK_CACHE.json
changelogs/.plugin-cache.yaml
.ansible-test-timeout.json
# Agents
CLAUDE.local.md

321
AGENTS.md Normal file
View file

@ -0,0 +1,321 @@
# AGENTS.md
This file provides guidance to Claude Code (claude.ai/code) and other compatible agentic tools when working with code in this repository.
**Note:** This file is for AI assistant use only. For human developers, see the [Ansible Developer Guide](https://docs.ansible.com/ansible-core/devel/dev_guide/index.html).
## ⚠️ IMPORTANT: Always Start Here
**BEFORE starting any PR review or development task:**
1. **Read this file first** - Don't work from memory or assumptions
2. **Use TodoWrite** to create a task list and track progress systematically
3. **Follow the numbered steps** in the relevant process sections
4. **Reference Quick Reference** for correct commands and patterns
## ⚠️ CRITICAL: Licensing Requirements
**NEVER suggest, recommend, or approve code that violates these requirements:**
- **ansible-core**: All code must be **GPLv3 compatible**
- **lib/ansible/module_utils/**: Defaults to **BSD-2-Clause** (more permissive)
- **External dependencies**: Only recommend libraries compatible with these licenses
- **PR reviews**: Always verify any new dependencies or suggested libraries are license-compatible
- **When in doubt**: Ask about licensing compatibility rather than assuming
**This is non-negotiable** - licensing violations can create serious legal issues for the project.
## Quick Reference
Most commonly used commands and patterns:
```bash
# Testing
ansible-test sanity -v --docker default # Run all sanity tests
ansible-test sanity -v --docker default --test <test> # Run specific sanity test
ansible-test units -v --docker default # Run unit tests
ansible-test integration -v --docker ubuntu2404 # Run integration tests
# PR Review and CI
gh pr view <number> # Get PR details
gh pr view <number> --comments # Check for ansibot CI failures
gh pr checks <number> # Get Azure Pipelines URLs
gh pr checkout <number> # Switch to PR branch
gh pr diff <number> # See all changes
```
**Container Selection:**
- Sanity/Unit tests: `--docker default`
- Integration tests: `--docker ubuntu2204`, `--docker ubuntu2404`, etc. (NOT default/base)
**Critical Reminders:**
- **Licensing**: See [Licensing Requirements](#-critical-licensing-requirements) - GPLv3/BSD-2-Clause only
## Development Environment Setup
Ansible development typically uses an editable install after forking and cloning:
```bash
# After forking and cloning the repository
pip install -e .
```
**Note:** ansible-core and all CLIs (including ansible-test) require a POSIX OS. On Windows, use WSL (Windows Subsystem for Linux).
## Testing and CI
### Basic Testing Commands
```bash
# Run sanity tests - these are linting/static analysis (pylint, mypy, pep8, etc.)
ansible-test sanity -v --docker default
# List available sanity tests
ansible-test sanity --list-tests
# Run specific sanity tests
ansible-test sanity -v --docker default --test pep8 --test pylint
# Run sanity on specific files (paths relative to repo root)
ansible-test sanity -v --docker default lib/ansible/modules/command.py
# Run unit tests (recommended with Docker)
ansible-test units -v --docker default
# Run specific unit test (paths relative to repo root, targets in test/units/)
ansible-test units -v --docker default test/units/modules/test_command.py
# Run integration tests (choose appropriate container - NOT base/default)
ansible-test integration -v --docker ubuntu2404
# Run specific integration target (directory name in test/integration/targets/)
ansible-test integration -v --docker ubuntu2404 setup_remote_tmp_dir
# Run with coverage
ansible-test units -v --docker default --coverage
# Alternative: use --venv if Docker/Podman unavailable (less reliable for units/integration)
ansible-test sanity -v --venv
```
Available Docker containers for testing can be found in `./test/lib/ansible_test/_data/completion/docker.txt`.
The `base` and `default` containers are for sanity/unit tests only. For integration tests, use distro-specific
containers, depending on the modules being tested.
**Test isolation options:**
- `--docker` (supports Docker or Podman) - preferred for reliable, isolated testing
- `--venv` - fallback when containers unavailable, but unit tests may be unreliable due to host environment differences
### Helping Developers with CI Failures
When developers submit PRs and encounter CI failures, use these approaches to help diagnose and resolve issues:
**1. Check for ansibot comments:**
```bash
# Get all PR comments to find ansibot CI failure reports
gh pr view <number> --comments
```
Look for comments from `ansibot` that contain:
- Test failure details with specific error messages
- File paths and line numbers for failures
- Links to sanity test documentation (e.g., `[explain](https://docs.ansible.com/...`)
**2. Get CI check status and URLs:**
```bash
# See all CI check results with Azure Pipelines URLs
gh pr checks <number>
```
This shows:
- Overall CI status (pass/fail) with timing
- Direct links to Azure DevOps build results
- Individual job results (Sanity Test 1/2, Docker tests, Units, etc.)
**3. Common CI failure patterns:**
- **Sanity failures**: Usually have specific fixes (trailing whitespace, import errors, etc.)
- **Integration test failures**: May require platform-specific containers or test adjustments
- **Unit test failures**: Often indicate actual code issues that need debugging
**4. CI failure analysis workflow:**
1. Check ansibot comments first for immediate error details
2. Use `gh pr checks <number>` to get Azure Pipelines URLs for detailed logs
3. Focus on failed jobs (marked as `fail`) and examine their specific error output
4. For sanity test failures, the error messages usually indicate exactly what needs to be fixed
5. For test failures, run the same tests locally using `ansible-test` to reproduce and debug
## PR Review Guidelines
### PR Review Checklist
Use this checklist for EVERY PR review:
```text
□ Created TodoWrite list for review steps
□ Step 1: Get PR details with gh pr view <number>
□ Step 2: Get PR diff with gh pr diff <number>
□ Step 3: Check required components (changelog, tests)
□ Step 4: Checkout PR branch with gh pr checkout <number>
□ Step 5: Review existing feedback with gh pr view <number> --comments
□ Step 6: Verify all issues addressed
□ Step 7: Call out any unresolved feedback
□ Mark each TodoWrite item as completed when done
```
When assisting with PR reviews, verify:
### Required Components
- Changelog fragment exists in `changelogs/fragments/`
- Appropriate tests are included and cover the changed code
- Unit tests should be pytest style, and functional rather than tightly coupled to mocking
- Integration tests required for almost all plugin changes (tests the public API)
- Tests should exercise the actual changed code, not just add random coverage
### Review Process
Follow these steps in order for thorough PR reviews:
1. **Get PR details**: Use `gh pr view <number>` to understand the PR scope and description
2. **Get PR diff**: Use `gh pr diff <number>` to see all changes
3. **Check required components FIRST**:
- Verify changelog fragment exists and uses correct section (check `changelogs/config.yaml` for valid sections)
- Verify tests exist and specifically cover the changed code paths
4. **Checkout PR branch**: Use `gh pr checkout <number>` to examine code holistically with changes applied
5. **Review existing feedback**: Use `gh pr view <number> --comments` to see all comments and previous review feedback
6. **Verify all issues addressed**: Ensure all bot failures, reviewer requests, and discussion points are resolved
7. **Call out any unresolved review feedback**: Explicitly mention any discussions or requests that remain unaddressed
### Common Review Issues to Check
- **Changelog section errors**: Verify changelog uses valid section from `changelogs/config.yaml`. Fragment structure follows sections defined there.
- **Test scope**: Ensure tests exercise the actual changed code, not just add random coverage.
Integration tests required for almost all plugin changes (tests the public API).
Tests should be functional rather than tightly coupled to mocking.
### Review Task Management
- Use TodoWrite tool to track review steps for complex PRs
- Mark tasks as in_progress when actively working on them
- Complete tasks immediately after finishing each step
- This provides visibility to users about review progress
### Review Tools
- `gh pr view <number>` - Get PR details and description
- `gh pr view <number> --comments` - See all comments and review feedback
- `gh pr diff <number>` - Get complete diff of changes
- `gh pr checkout <number>` - Switch to PR branch for holistic examination
- `Read` tool - Examine specific changed files in detail
- `Grep` tool - Search for related code patterns or test coverage (uses ripgrep/rg)
## Development Guidelines
### Code Style Notes
- Line limit is 160 characters (not 80)
- E402 (module level import not at top) is ignored
- In `lib/ansible/modules/`, imports must come after DOCUMENTATION, EXAMPLES, and RETURN definitions
- Don't add obvious comments about code
- Use native type hints with `from __future__ import annotations` (converts to strings at runtime)
- Don't document module parameters in docstrings - migrate to type hints instead
- **No trailing whitespace**: Always clean up trailing spaces on lines, especially when editing existing files
### Python Version Support
- Controller code: support range defined in `pyproject.toml`
- Modules/module_utils: minimum version in `lib/ansible/module_utils/basic.py` (`_PY_MIN`) up to max from `pyproject.toml`
- Modules support a wider Python version range than controller code
### Dependencies and Imports
- Prefer Python stdlib over external dependencies
- Use existing code from within the Ansible project
- `lib/ansible/modules/` can only import from `lib/ansible/module_utils/` (modules are packaged for remote execution)
- `lib/ansible/module_utils/` cannot import from outside itself
## Documentation Standards
### Module and Plugin Documentation
- Modules and plugins require DOCUMENTATION, EXAMPLES, and RETURN blocks as static YAML string variables
- These blocks cannot be dynamically generated - they are parsed via AST/token parsing
- Alternative: "sidecar" documentation as `.yml` files with same stem name adjacent to plugin files
- All modules should have a `main()` function and `if __name__ == '__main__':` block
- Use `version_added` fields in documentation following existing version format patterns
### Changelog Requirements
- Changes require entries in `changelogs/fragments/` as YAML files
- Create a new fragment file per PR (never reuse existing fragments to avoid merge conflicts)
- Fragment structure follows sections defined in `changelogs/config.yaml` under the `sections` key
- Naming: `{issue_number}-{short-description}.yml` or `{component}-{description}.yml` if no issue
- Format: `- {component} - {description} ({optional URL to GH issue})`
- Content supports Sphinx markup (use double backticks for code references)
## Repository Management
### Plugin Development
- New plugins should go into collections, not ansible-core
- ansible-core rarely accepts new plugins; core team makes these decisions
### Branch and Release Management
- All PRs target the `devel` branch
- Use GitHub templates when creating issues/PRs (`.github/ISSUE_TEMPLATE/` and `.github/PULL_REQUEST_TEMPLATE/`)
- For issues: fill out the `component` field with project root relative file path
- For PRs: adjust the issue type in the template as listed in `.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md`
- Validate issues are fixed in `devel` before reporting against stable releases
- Bug fixes: backported to latest stable only
- Critical bug fixes: backported to latest and previous stable
- Security issues: contact security@ansible.com privately, not via GitHub
### Backwards Compatibility
- Backwards compatibility is prioritized over most other concerns
- Deprecation cycle: 4 releases (deprecation + 2 releases + removal)
- Use `Display.deprecated` or `AnsibleModule.deprecate` with version from `lib/ansible/release.py` plus 3
- Example: deprecating in 2.19 means removal in 2.22
## Code Structure Reference
### Core Structure
- `lib/ansible/` - Main Ansible library code
- `cli/` - Command-line interface implementations (ansible, ansible-playbook, etc.)
- `executor/` - Task execution engine and strategies (includes PowerShell support in `powershell/`)
- `inventory/` - Inventory management and parsing
- `modules/` - Core modules (built-in automation modules)
- `module_utils/` - Shared utilities for modules (includes C# in `csharp/` and PowerShell in `powershell/`)
- `plugins/` - Plugin framework (filters, tests, lookups, etc.)
- `vars/` - Variable management
- `config/` - Configuration handling
- `collections/` - Ansible Collections framework
### Key Components
- **CLI Layer**: Entry points in `lib/ansible/cli/` handle command parsing and dispatch
- **Executor**: `lib/ansible/executor/` contains the core execution engine that runs tasks and plays
- **Module System**: Modules in `lib/ansible/modules/` are the units of work; they're executed remotely
- **Plugin Architecture**: `lib/ansible/plugins/` provides extensibility through filters, tests, lookups, etc.
- **Inventory**: `lib/ansible/inventory/` manages host and group definitions
- **Collections**: Modern packaging format for distributing Ansible content
### Testing Infrastructure
- `test/units/` - Unit tests mirroring the lib structure
- `test/integration/` - Integration tests organized by target (named after plugin/functionality being tested)
- Some targets have `context/controller` or `context/target` in their `aliases` file when not easily inferable
- Only modules run on target hosts; all other plugins execute locally in the ansible process
- `test/lib/` - Test utilities and frameworks
- `ansible-test` - Unified testing tool for all test types
For CI failure debugging, see [Helping Developers with CI Failures](#helping-developers-with-ci-failures).

3
CLAUDE.md Normal file
View file

@ -0,0 +1,3 @@
- @AGENTS.md
- @~/.claude/ansible.md
- @CLAUDE.local.md

View file

@ -5,6 +5,6 @@ include licenses/*.txt
include requirements.txt
recursive-include packaging *.py *.j2
recursive-include test/integration *
recursive-include test/sanity *.in *.json *.py *.txt *.ini
recursive-include test/sanity *.in *.json *.py *.pyi *.txt *.ini
recursive-include test/support *.py *.ps1 *.psm1 *.cs *.md
recursive-include test/units *

View file

@ -4,7 +4,7 @@
[![Build Status](https://dev.azure.com/ansible/ansible/_apis/build/status/CI?branchName=devel)](https://dev.azure.com/ansible/ansible/_build/latest?definitionId=20&branchName=devel)
[![Ansible Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg)](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html)
[![Ansible mailing lists](https://img.shields.io/badge/mailing%20lists-Ansible-orange.svg)](https://docs.ansible.com/ansible/devel/community/communication.html#mailing-list-information)
[![Repository License](https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg)](COPYING)
[![Repository License](https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg)][copying]
[![Ansible CII Best Practices certification](https://bestpractices.coreinfrastructure.org/projects/2372/badge)](https://bestpractices.coreinfrastructure.org/projects/2372)
# Ansible
@ -58,7 +58,7 @@ For more ways to get in touch, see [Communicating with the Ansible community](ht
## Contribute to Ansible
* Check out the [Contributor's Guide](./.github/CONTRIBUTING.md).
* Check out the [Contributor's Guide](https://github.com/ansible/ansible/blob/devel/.github/CONTRIBUTING.md).
* Read [Community Information](https://docs.ansible.com/ansible/devel/community) for all
kinds of ways to contribute to and interact with the project,
including how to submit bug reports and code to Ansible.
@ -98,4 +98,6 @@ and has contributions from over 5000 users (and growing). Thanks everyone!
GNU General Public License v3.0 or later
See [COPYING](COPYING) to see the full text.
See [COPYING] to see the full text.
[copying]: https://github.com/ansible/ansible/blob/devel/COPYING

View file

@ -1,2 +1,2 @@
ancestor: 2.18.0
ancestor: 2.20.0
releases: {}

View file

@ -0,0 +1,2 @@
bugfixes:
- git - Correct the output of git checkmode to a failure when the ``version`` supplied is an invalid ref (https://github.com/ansible/ansible/issues/51580)

View file

@ -1,2 +0,0 @@
bugfixes:
- include_role - allow host specific values in all ``*_from`` arguments (https://github.com/ansible/ansible/issues/66497)

View file

@ -0,0 +1,2 @@
bugfixes:
- dnf - When installing a dnf module, install and enable when missing, upgrade when present (https://github.com/ansible/ansible/issues/73457)

View file

@ -1,2 +0,0 @@
minor_changes:
- "ansible-doc - show ``notes``, ``seealso``, and top-level ``version_added`` for role entrypoints (https://github.com/ansible/ansible/pull/81796)."

View file

@ -1,2 +0,0 @@
bugfixes:
- uri - fix form-multipart file not being found when task is retried (https://github.com/ansible/ansible/issues/85009)

View file

@ -0,0 +1,2 @@
bugfixes:
- 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`` (https://github.com/ansible/ansible/issues/85193)."

View file

@ -1,2 +0,0 @@
minor_changes:
- stat module - add SELinux context as a return value, and add a new option to trigger this return, which is False by default. (https://github.com/ansible/ansible/issues/85217).

View file

@ -0,0 +1,2 @@
bugfixes:
- apt - Stop the >= operator from being ignored for packages that are not already installed (https://github.com/ansible/ansible/pull/85254)

View file

@ -0,0 +1,2 @@
bugfixes:
- "Fix ``AnsibleModule.human_to_bytes()``, which was never adjusted after the standalone ``human_to_bytes()`` got a new parameter ``default_unit`` (https://github.com/ansible/ansible/pull/85259)."

View file

@ -1,2 +0,0 @@
minor_changes:
- deb822_repository - Add automatic installation of the ``python3-debian`` package if it is missing by adding the parameter ``install_python_debian``

View file

@ -1,2 +0,0 @@
minor_changes:
- "default callback plugin - add option to configure indentation for JSON and YAML output (https://github.com/ansible/ansible/pull/85497)."

View file

@ -0,0 +1,3 @@
minor_changes:
- "default callback plugin - add option to configure line width for YAML output. This allows to disable line wrapping
(https://github.com/ansible/ansible/issues/84657, https://github.com/ansible/ansible/pull/85498)."

View file

@ -1,2 +0,0 @@
bugfixes:
- callback plugins - improve consistency accessing the Task object's resolved_action attribute.

View file

@ -1,2 +0,0 @@
bugfixes:
- pip - Fix pip module output so that it returns changed when the only operation is initializing a venv.

View file

@ -1,3 +0,0 @@
bugfixes:
- >-
``ansible-galaxy collection list`` - fail when none of the configured collection paths exist.

View file

@ -1,2 +0,0 @@
bugfixes:
- import_tasks - fix templating parent include arguments.

View file

@ -0,0 +1,5 @@
bugfixes:
- >-
``ansible.builtin.pip`` - Running the built-in pip module with ``check_mode`` and packages coming from VCS URLs, archives, or local filepaths now correctly outputs the ``changed`` status of the task.
Previously, it was always reported as changed due to improper package name resolution.
(https://github.com/ansible/ansible/pull/85623)

View file

@ -1,6 +0,0 @@
minor_changes:
- >-
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. (https://github.com/ansible/ansible/issues/85632)

View file

@ -1,2 +0,0 @@
bugfixes:
- "validate-modules sanity test - fix handling of missing doc fragments (https://github.com/ansible/ansible/pull/85638)."

View file

@ -1,2 +0,0 @@
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`` (https://github.com/ansible/ansible/issues/85682)

View file

@ -1,2 +0,0 @@
bugfixes:
- "``ternary`` filter - evaluate values lazily (https://github.com/ansible/ansible/issues/85743)"

View file

@ -0,0 +1,2 @@
bugfixes:
- ansible_virtualization_role and ansible_virtualization_type facts - fix the detection of vms running inside FreeBSD Bhyve hypervisor and detection of jails (https://github.com/ansible/ansible/pull/85767)

View file

@ -1,2 +0,0 @@
bugfixes:
- cache plugins - close temp cache file before moving it to fix error on WSL. (https://github.com/ansible/ansible/pull/85816)

View file

@ -0,0 +1,2 @@
bugfixes:
- "copy - when a single-file local directory was specified as the source, ``changed`` used to be ``false`` even when the source was actually copied. It now makes sure ``changed`` is ``true`` in this case. (https://github.com/ansible/ansible/issues/85833)"

View file

@ -0,0 +1,6 @@
---
bugfixes:
- galaxy - previously, some corrupted cache files could cause Ansible Galaxy to fail
with a traceback. This has been corrected to display a clear error message explaining
how to resolve the problem.
(https://github.com/ansible/ansible/issues/85918)

View file

@ -0,0 +1,2 @@
bugfixes:
- psrp - ReadTimeout exceptions now mark host as unreachable instead of fatal (https://github.com/ansible/ansible/issues/85966)

View file

@ -0,0 +1,2 @@
removed_features:
- Removed deprecated ability to import ``datetime``, ``signal``, ``types``, ``chain``, ``repeat``, ``map`` and ``shlex_quote`` from ``ansible.module_utils.basic``.

View file

@ -0,0 +1,2 @@
removed_features:
- Removed deprecated ``handle_stats_and_callbacks`` parameter of the ``StrategyBase._load_included_file`` method. (https://github.com/ansible/ansible/issues/86003)

View file

@ -0,0 +1,2 @@
minor_changes:
- "ansible-test validate-modules sanity test - now reports bad return value keys that cannot be used with the dot notation in Jinja expressions (https://github.com/ansible/ansible/issues/86079)."

View file

@ -0,0 +1,3 @@
---
minor_changes:
- script - remove the currently unsupported ``decrypt`` argument from the module documentation (https://github.com/ansible/ansible/issues/86067).

View file

@ -0,0 +1,6 @@
---
bugfixes:
- >-
iptables - The module can now detect when a extensions added with the module ``match`` argument have
been automatically imported by other module arguments such as ``uid_owner`` and prevents duplicate
extension imports which previously caused an error (https://github.com/ansible/ansible/issues/84387).

View file

@ -0,0 +1,2 @@
minor_changes:
- deb822_repository - add include and exclude parameter arguments (https://github.com/ansible/ansible/issues/86155)

View file

@ -0,0 +1,2 @@
bugfixes:
- "dnf - fix package installation when specifying architecture without version (e.g., ``libgcc.i686``) where a different architecture of the same package is already installed (https://github.com/ansible/ansible/issues/86156)."

View file

@ -0,0 +1,4 @@
bugfixes:
- deb822_repository no longer over-normalizes repository names when generating
sources list filenames, preventing collisions for names that differ by case,
underscores, or dots (https://github.com/ansible/ansible/issues/86243)

View file

@ -0,0 +1,2 @@
bugfixes:
- "Fix source metadata validation (https://github.com/ansible/ansible/pull/86320)."

View file

@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy - warn instead of raising an error when no valid role or collections paths exist (https://github.com/ansible/ansible/pull/86341)

View file

@ -0,0 +1,2 @@
bugfixes:
- user - fix ``FreeBsdUser`` to not create ``/nonexistent`` directory when modifying user to add them to a group on FreeBSD (https://github.com/ansible/ansible/issues/86368)

View file

@ -0,0 +1,10 @@
bugfixes:
- >-
``ansible-galaxy collection list`` - issue a warning when a collection's namespace and name do not match its
filepath. (https://github.com/ansible/ansible/issues/69813)
- >-
``ansible-galaxy collection list|install`` - list collections based on reference (the fqcn used to refer to them in a
playbook), not based on their documented name. (https://github.com/ansible/ansible/issues/69813)
- >-
``ansible-galaxy collection verify`` - fail collection verification when a collection's namespace and name
do not match its filepath. (https://github.com/ansible/ansible/issues/69813)

View file

@ -0,0 +1,2 @@
bugfixes:
- deb822_repository - Remove ``Install-Python-Debian`` from files outputted by the ``deb822_repository`` module (https://github.com/ansible/ansible/issues/86395)

View file

@ -0,0 +1,2 @@
bugfixes:
- local connection - Pass correct type to become plugins when checking password (https://github.com/ansible/ansible/issues/86458)

View file

@ -0,0 +1,5 @@
minor_changes:
- >-
PowerShell AddType Util - Will only include the debug information when ``DISPLAY_TRACEBACK`` contains ``error`` or
``always``. In the past the debug information would have been included if ``-vvv`` or higher was used but this new
behavior aligns the logic with the new option added in Ansible 2.19.

View file

@ -0,0 +1,5 @@
bugfixes:
- >-
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 - https://github.com/ansible/ansible/issues/85976

View file

@ -0,0 +1,2 @@
bugfixes:
- modules - fix AnsiballZ wrapper code escaping of sitecustomize

View file

@ -1,2 +0,0 @@
minor_changes:
- ansible-doc - Return a more verbose error message when the ``description`` field is missing.

View file

@ -0,0 +1,2 @@
minor_changes:
- The minimum required ``setuptools`` version is now ``77.0.3``, as it is needed for the new PEP 639 license format

View file

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Replace Alpine 3.22 container and remote with 3.23.

View file

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Use the new API endpoint for the Ansible Core CI service.

View file

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Remove support for an obsolete remote authentication method.

View file

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Implement new authentication methods for accessing the Ansible Core CI service.

View file

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Support automatic loading of test collections in core integration tests.

View file

@ -1,2 +0,0 @@
bugfixes:
- ansible-test - Limit package install retries during managed remote instance bootstrapping.

View file

@ -1,2 +1,2 @@
minor_changes:
- ansible-test - Update test containers.
- ansible-test - Update base and default containers.

View file

@ -1,7 +0,0 @@
bugfixes:
- ansible-test - Use a consistent coverage config for all collection testing.
- ansible-test - Always exclude the ``tests/output/`` directory from a collection's code coverage.
(https://github.com/ansible/ansible/issues/84244)
minor_changes:
- ansible-test - Improve formatting of generated coverage config file.

View file

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Upgrade to ``coverage`` version 7.10.6 for Python 3.9 and later.

View file

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Fix docker hostname parsing

View file

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Upgrade ``expat`` during provisioning of Fedora 42 remote instances.

View file

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Replace FreeBSD 14.2 with 14.3.

View file

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Replace FreeBSD 13.5 remote with 15.0.

View file

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Use OS packages to satisfy controller requirements on FreeBSD 13.5 during managed instance bootstrapping.

View file

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Restore code coverage reporting for Python code residing in integration tests.

View file

@ -0,0 +1,4 @@
minor_changes:
- >-
ansible-test - add ``.winrm`` and ``.networking`` as valid JSON/YAML inventory file extensions. This should not
affect any public facing code as it is used internally for inventories generated by ``ansible-test``.

View file

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Removed support for automatic provisioning of obsolete instances for network-integration tests.

View file

@ -1,2 +0,0 @@
bugfixes:
- ansible-test - Fix a traceback that can occur when using delegation before the ansible-test temp directory is created.

View file

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Replace Fedora 42 with 43.

View file

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Update the pylint sanity test to pylint 4.0.2.

View file

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Remove pylint check for ``urllib2`` usage.

View file

@ -1,4 +0,0 @@
minor_changes:
- ansible-test - Upgrade Fedora 41 to Fedora 42.
- ansible-test - Upgrade Alpine 3.21 to 3.22.
- ansible-test - Update Ubuntu containers.

View file

@ -0,0 +1,3 @@
minor_changes:
- ansible-test - Replace RHEL 9.6 remote with 9.7.
- ansible-test - Replace RHEL 10.0 remote with 10.1.

View file

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Replace RHEL 9.5 with 9.6.

View file

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Optimize DNF configuration for managed remote RHEL instances.

View file

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Update pinned sanity test requirements.

View file

@ -0,0 +1,5 @@
minor_changes:
- ansible-test - Expand functions covered by the ``unwanted`` rule for the ``pylint`` sanity test.
It now includes various ``os.*`` and ``subprocess.*`` subprocess functions in Ansible modules and module_utils.
- ansible-test - Remove ``use-run-command-not-popen`` and ``use-run-command-not-os-call`` error codes from the
``validate-modules`` sanity test. These scenarios are now covered by the ``pylint`` sanity test.

View file

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Update URL used to download FreeBSD wheels for managed remotes.

View file

@ -0,0 +1,2 @@
bugfixes:
- ansible_local will no longer trigger variable injection default value deprecation.

View file

@ -1,3 +0,0 @@
---
bugfixes:
- apt - mark dependencies installed as part of deb file installation as auto (https://github.com/ansible/ansible/issues/78123).

View file

@ -1,3 +0,0 @@
---
minor_changes:
- apt_repository - use correct debug method to print debug message.

View file

@ -0,0 +1,3 @@
---
removed_features:
- interpreter_discovery - removed auto_legacy and auto_legacy_slient options (https://github.com/ansible/ansible/issues/85995).

View file

@ -0,0 +1,4 @@
deprecated_features:
- The ``get_platfrom()`` function from ``ansible.module_utils.basic`` is deprecated and will be removed in ansible-core 2.24. Use ``platform.system()`` from the Python standard library instead.
- The ``load_platform_subclass()`` function from ``ansible.module_utils.basic`` is deprecated and will be removed in ansible-core 2.24. Use ``get_platform_subclass()`` from ``ansible.module_utils.common.sys_info`` instead.
- The ``get_all_subclasses()`` function from ``ansible.module_utils.basic`` is deprecated and will be removed in ansible-core 2.24. Use ``get_all_subclasses()`` from ``ansible.module_utils.common._utils`` instead.

View file

@ -0,0 +1,3 @@
---
bugfixes:
- basic - fail in controlled manner when ``run_command()`` attempts to parse a command with broken syntax passed in as a string (https://github.com/ansible/ansible/issues/85719).

View file

@ -1,2 +0,0 @@
minor_changes:
- blockinfile - add new module option ``encoding`` to support files in encodings other than UTF-8 (https://github.com/ansible/ansible/pull/85291).

View file

@ -0,0 +1,2 @@
bugfixes:
- cache plugins based on the BaseFileCache class will now sanitize keys to avoid names that could cause issues with the storage path

View file

@ -0,0 +1,2 @@
bugfixes:
- 'ansible_facts[os_*] - Contained wrong information, if ClearLinux parsing was tried before falling back to general os-release parsing'

View file

@ -0,0 +1,3 @@
---
removed_features:
- compat.datetime - removed deprecated datetime compat APIs (https://github.com/ansible/ansible/issues/86000).

View file

@ -1,3 +0,0 @@
bugfixes:
- templating - Multi-node template results coerce embedded ``None`` nodes to empty string (instead of rendering literal ``None`` to the output).
- argspec validation - The ``str`` argspec type treats ``None`` values as empty string for better consistency with pre-2.19 templating conversions.

View file

@ -0,0 +1,2 @@
bugfixes:
- config lookup now properly factors in variables and show_origin when checking entries from the global configuration.

View file

@ -0,0 +1,3 @@
minor_changes:
- callback plugins - support configuration using extra variables.
- default callback plugin - add variable configuration for ``display_skipped_hosts`` (https://github.com/ansible/ansible/issues/84469).

View file

@ -0,0 +1,3 @@
---
bugfixes:
- copy - honor directory_mode when copying directories with remote_src=True (https://github.com/ansible/ansible/issues/81292).

Some files were not shown because too many files have changed in this diff Show more