Compare commits

...

100 Commits

Author SHA1 Message Date
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
12 hours ago
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>
1 day ago
Sviatoslav Sydorenko 251fec31b4 🧪Drop PkgReq stub @ `ansible.galaxy.collection`
This tiny restructuring allows us to get rid of the type ignore.
2 days ago
lixiaoyong01 cc839f013a
Fix typos in apt_key module (#86257)
Co-authored-by: lixiaoyong <lixiaoyong@kylinos.cn>
1 week ago
John Eismeier a5a2b77911
Propose fix typo of targetting (#86242)
Signed-off-by: John E <jeis4wpi@outlook.com>
1 week ago
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>
1 week ago
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>
1 week ago
sivel / Matt Martz 6bb7bd760f
Fix escaping issue in ansiballz wrapper for sitecustomize (#86236)
* Fix escaping issue in ansiballz wrapper for sitecustomize

* add clog frag
1 week ago
sivel / Matt Martz bff3a9aeb9
Fix docker hostname parsing in ansible-test (#86235)
* Fix docker hostname parsing in ansible-test

* add clog frag
2 weeks ago
Martin Krizek 9d9a8d78ee
Skip hostname integration tests on all container providers (#86227)
* Skip hostname integration tests on all container providers

* Use skip/docker instead
2 weeks ago
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>
2 weeks ago
Matt Clay ce84d3157d
Fix first_found example (#86224) 2 weeks ago
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.
2 weeks ago
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>
2 weeks ago
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>
2 weeks ago
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>
2 weeks ago
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>
3 weeks ago
Matt Clay 3d26431e4f
ansible-test - Improve AZP commit API error handling (#86197) 3 weeks ago
🇺🇦 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
3 weeks ago
biancalana eb0ada3d28
Feature/improve bhyve guest and host detection (#85767) 3 weeks ago
David Shrewsbury dc3cc0f9ea
Fix test_encrypt.py unit test (#86180) 3 weeks ago
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.
3 weeks ago
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.
3 weeks ago
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>
3 weeks ago
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>
3 weeks ago
Matt Clay 76f07034b3
Fix unit test serialization (#86163)
This allows the test to work on pytest 9+
3 weeks ago
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>
3 weeks ago
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>
4 weeks ago
Matt Clay 4184d9665e
Fix getuser fallback error handling (#86144) 4 weeks ago
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>
4 weeks ago
David Shrewsbury e3cff24134
Increase code coverage of utils/encrypt.py (#86060)
* Add encryption code coverage

Co-authored-by: Matt Clay <matt@mystile.com>
4 weeks ago
Matt Clay a4ae978122
template module - Report syntax error line number (#86101)
Report the line number for Jinja syntax errors in template files.
4 weeks ago
Matt Clay 8ac5c8580b
Remove urllib2 pylint check (#86139)
No supported Python version provides urllib2.
4 weeks ago
Matt Clay 5b8ae0b5b5
Fix deprecation comments (#86138) 4 weeks ago
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
4 weeks ago
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
4 weeks ago
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>
4 weeks ago
Martin Krizek f743dfce93
basic.py: add proper deprecations (#86064)
* basic.py: add proper deprecations

* fix sanity
4 weeks ago
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>
4 weeks ago
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>
4 weeks ago
Matt Davis 3c5bb535a9
Fix incorrect propagation of task.connection (#86121)
Co-authored-by: Matt Clay <matt@mystile.com>
1 month ago
Brian Coca 5904846342
config lookup, remove unreachable code (#86051)
defensive, but uneeded since get_option already precludes bad values
this far in
1 month ago
🇺🇦 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>
1 month ago
Matt Clay 13496b9e11
ansible-test - Fix integration test code coverage (#86100) 1 month ago
Shion Ichikawa f2a4d6de12
🚨 fix yaml syntax error on ./test/integration/targets/unarchive/tasks/test_missing_binaries.yml (#86099) 1 month ago
Martin Krizek 2e8a859477
Remove deprecated imports from basic.py (#86065)
Fixes #85997
1 month ago
Matt Clay bb30a7fa1f
ansible-test - Update base/default containers (#86087) 1 month ago
Matt Clay 3bf54c8128
Remove obsolete incidental_ios_file test (#86086) 1 month ago
Matt Clay 12acd5c18f
ansible-test - Update sanity requirements (#86083) 1 month ago
Jason K Hall 8d07ed6318
Handle ValueError in run_command when parsing invalid args(shlex.split) (#85945) 1 month ago
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.
1 month ago
Abhijeet Kasurde 7bd2475a70
file, stat: return disk_usage_bytes (#85909)
Fixes: #70834

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
1 month ago
Brian Coca 169e6bead3
generated inventory plugin, add extra vars option (#85372) 1 month ago
Brian Coca 516a114ef6
option deprecations show alternatives (#86032)
Give users a helpful hint on what to do to address the deprecation
1 month ago
Sloane Hertel 68f5a7ca1c
Update issue templates with suggestion to exclude Galaxy server secrets and general reminder (#85481) 1 month ago
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
1 month ago
Sloane Hertel df34bf9e70
Update win_exec_wrapper integration test to match #86029 (#86052)
* Remove assertion now that there is no warning
1 month ago
sivel / Matt Martz e4b4787c02
Soft deprecate ansible.module_utils.six (#86048) 1 month ago
Martin Krizek 6dd48814f2
Remove test/units/module_utils/compat/test_datetime.py (#86045)
Follow up on #86018
1 month ago
Abhijeet Kasurde ef53d63953
package_facts: typecast bytes to string while returning facts (#85939)
Fixes: #85937

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
1 month ago
Abhijeet Kasurde 367de4498b
module_utils: remove deprecated compat.datetime APIs (#86018)
Fixes: #86000

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
1 month ago
Abhijeet Kasurde 9a350ff104
git: removed deprecated gpg_whitelist alias (#86011)
Fixes: #86004

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
1 month ago
Abhijeet Kasurde 9f1177a056
Removed parameter 'required' from get_bin_path API (#86009)
Fixes: #85998

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
1 month ago
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>
1 month ago
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.
1 month ago
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
1 month ago
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>
1 month ago
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.
1 month ago
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>
1 month ago
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>
1 month ago
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.
1 month ago
Brian Coca 22721b5d63
Slurp armor option (#85986)
* slurp, add option to deactivate the armor

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2 months ago
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>
2 months ago
sivel / Matt Martz 1a3e63c794
Don't deprecate six yet (#86020) 2 months ago
🇺🇦 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)
2 months ago
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.
2 months ago
sivel / Matt Martz 726e8d6548
Bump devel to 2.21 (#85992) 2 months ago
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>
2 months ago
sivel / Matt Martz c02f59ca3a
fix urls in additional ansible-doc test (#85988) 2 months ago
Matt Clay 83c79240ec
ansible-test - Update base/default/distro containers (#85985) 2 months ago
Matt Clay 7c2311d547
ansible-test - Upgrade coverage to 7.10.7 (#85981) 2 months ago
Matt Clay de7dd5bbb2
ansible-test - Update pinned pip to 25.2 (#85982) 2 months ago
sivel / Matt Martz 5a9afe4409
Fix signal propagation (#85907) 2 months ago
Matt Clay 9ee667030f
ansible-test - Update sanity test requirements (#85980) 2 months ago
Matt Clay 82b64d4b69
ansible-test - Update base/default containers (#85967) 2 months ago
Matt Clay 06456c68ec
Use bcrypt < 5 for unit tests (#85969) 2 months ago
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.
2 months ago
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.
2 months ago
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>
2 months ago
David Shrewsbury feda8fc564
Fix flakey get_url test (#85953) 2 months ago
sivel / Matt Martz 6673a14a9e
Update DataLoader.get_basedir to be an abspath (#85940) 2 months ago
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.
2 months ago
Martin Krizek 686c3658ae
Deprecate `ansible.module_utils.six` (#85934)
* Deprecate `ansible.module_utils.six`

Fixes #85920
2 months ago
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>
2 months ago
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
2 months ago
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>
2 months ago
Martin Krizek c3f87b31d1
import_tasks processing closer to include_tasks (#85877)
Fixes #69882
Closes #83853
Fixes #85855
Fixes #85856
2 months ago
Abhijeet Kasurde c5e6227bdb
falsy: Update doc (#85913)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2 months ago
Luca Steinke eafa139f77
fix description of truthy test (#85911)
There's a "not" too much here.

Maybe further examples can be found.
2 months ago
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>
2 months ago

@ -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)
def install_codecov(dest: pathlib.Path) -> pathlib.Path:
if not dry_run:
subprocess.run(cmd, check=True)
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('')
codecov_bin = install_codecov(pathlib.Path(tmpdir))
# 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),
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__':

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

@ -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:

@ -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.

@ -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

@ -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

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

@ -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).

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

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

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

@ -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)."

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

@ -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)."

@ -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).

@ -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)

@ -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)."

@ -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``

@ -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)."

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

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

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

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

@ -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)

@ -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)

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

@ -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)

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

@ -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)

@ -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)

@ -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)

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

@ -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``.

@ -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)

@ -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)."

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

@ -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).

@ -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

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

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

@ -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

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

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

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

@ -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.

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

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

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

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

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

@ -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``.

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

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

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

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

@ -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.

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

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

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

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

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

@ -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.

@ -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).

@ -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).

@ -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

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

@ -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.

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

@ -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).

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

@ -0,0 +1,2 @@
minor_changes:
- password hashing - Add support back for using the ``crypt`` implmentation from the C library used to build Python, or with expanded functionality using ``libxcrypt``

@ -0,0 +1,2 @@
minor_changes:
- DataLoader - Update ``DataLoader`` to deal exclusively in str

@ -1,3 +0,0 @@
deprecated_features:
- INJECT_FACTS_AS_VARS configuration currently defaults to ``True``, this is now deprecated and it will switch to ``False`` by Ansible 2.24.
You will only get notified if you are accessing 'injected' facts (for example, ansible_os_distribution vs ansible_facts['os_distribution']).

@ -1,3 +0,0 @@
bugfixes:
- display - Fixed reference to undefined `_DeferredWarningContext` when issuing early warnings during startup.
(https://github.com/ansible/ansible/issues/85886)

@ -1,2 +0,0 @@
removed_features:
- dnf/dnf5 - remove deprecated ``install_repoquery`` option.

@ -1,3 +0,0 @@
---
bugfixes:
- dnf - Check if installroot is directory or not (https://github.com/ansible/ansible/issues/85680).

@ -0,0 +1,4 @@
---
minor_changes:
- file - return disk_usage_bytes fact (https://github.com/ansible/ansible/issues/70834).
- stat - return disk_usage_bytes fact (https://github.com/ansible/ansible/issues/70834).

@ -1,3 +0,0 @@
bugfixes:
- conditionals - When displaying a broken conditional error or deprecation warning,
the origin of the non-boolean result is included (if available), and the raw result is omitted.

@ -1,3 +0,0 @@
---
removed_features:
- encrypt - remove deprecated passlib_or_crypt API.

@ -1,4 +0,0 @@
bugfixes:
- failed_when - When using ``failed_when`` to suppress an error, the ``exception`` key in the result is renamed to ``failed_when_suppressed_exception``.
This prevents the error from being displayed by callbacks after being suppressed.
(https://github.com/ansible/ansible/issues/85505)

@ -1,3 +0,0 @@
---
minor_changes:
- fetch_file - add ca_path and cookies parameter arguments (https://github.com/ansible/ansible/issues/85172).

@ -0,0 +1,2 @@
bugfixes:
- first_found - Correct the "Include tasks only if one of the files exists, otherwise skip" example.

@ -1,3 +0,0 @@
bugfixes:
- callback plugins - fix displaying the rendered ``ansible_host`` variable with ``delegate_to`` (https://github.com/ansible/ansible/issues/84922).
- ssh connection - fix documented variables for the ``host`` option. Connection options can be configured with delegated variables in general.

@ -1,2 +0,0 @@
bugfixes:
- ansible-doc --list/--list_files/--metadata-dump - fixed relative imports in nested filter/test plugin files (https://github.com/ansible/ansible/issues/85753).

@ -1,2 +0,0 @@
bugfixes:
- script inventory plugin will now show correct 'incorrect' type when doing implicit conversions on groups.

@ -1,2 +0,0 @@
bugfixes:
- ansible-galaxy - Use the provided import task url, instead of parsing to get the task id and reconstructing the URL

@ -0,0 +1,3 @@
---
minor_changes:
- generator - add support for extra vars (https://github.com/ansible/ansible/issues/83270).

@ -0,0 +1,3 @@
---
bugfixes:
- get_url - fix regex for GNU Digest line which is used in comparing checksums (https://github.com/ansible/ansible/issues/86132).

@ -1,4 +0,0 @@
bugfixes:
- templating - Undefined marker values sourced from the Jinja ``getattr->getitem`` fallback are now accessed correctly,
raising AnsibleUndefinedVariable for user plugins that do not understand markers.
Previously, these values were erroneously returned to user plugin code that had not opted in to marker acceptance.

@ -0,0 +1,2 @@
bugfixes:
- getent - handle non-empty string for split parameter value (https://github.com/ansible/ansible/issues/85720).

@ -0,0 +1,4 @@
bugfixes:
- display - Fix ``getuser`` fallback error handling on Python 3.13 and later.
(https://github.com/ansible/ansible/issues/86142)
- local connection - Fix ``getuser`` fallback error handling on Python 3.13 and later.

@ -0,0 +1,3 @@
---
removed_features:
- git - removed deprecated alias gpg_whitelist (https://github.com/ansible/ansible/issues/86004).

@ -0,0 +1,2 @@
minor_changes:
- group - Add warning message when invalid priority values are provided to Group.set_priority() method (https://github.com/ansible/ansible/pull/85468).

@ -1,2 +0,0 @@
bugfixes:
- ansible-galaxy no longer shows the internal protomatter collection when listing.

@ -1,2 +0,0 @@
bugfixes:
- Do not re-add ``tags`` on blocks from within ``import_tasks``.

@ -0,0 +1,5 @@
minor_changes:
- include_role has new option `rescuable` to allow it to toggle between task failure and syntax errors.
bugfixes:
- include_role would emit a syntax error on X_from options errors, but a task failure when missing a role to make it consistent now it also emits a task failure on missing tasks_from, which makes it subject to error handling in the play.
- include_role, would ignore missing X_from files if the subdir (tasks/vars/handlers/defaults) did not exist, now it is a proper error.

@ -1,6 +0,0 @@
---
deprecated_features:
- include_vars - Specifying 'ignore_files' as a string is deprecated.
minor_changes:
- include_vars - Raise an error if 'ignore_files' is not specified as a list.
- include_vars - Raise an error if 'extensions' is not specified as a list.

@ -0,0 +1,2 @@
bugfixes:
- template module - Report the line number for Jinja syntax errors in template files.

@ -1,4 +0,0 @@
known_issues:
- templating - Exceptions raised in a Jinja ``set`` or ``with`` block which are not accessed by the template are ignored in the same manner as undefined values.
- templating - Passing a container created in a Jinja ``set`` or ``with`` block to a method results in a copy of that container.
Mutations to that container which are not returned by the method will be discarded.

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

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

Loading…
Cancel
Save