Commit Graph
55138 Commits
Author SHA1 Message Date
Matt DavisandGitHub 24c92b2d24 New release v2.19.2rc1 (#85788) v2.19.2rc1 2025-09-02 17:09:11 -07:00
Martin KrizekandGitHub 764070de69 [stable-2.19] Expose ansible_failed_task in rescue for explicit flush_handlers (#85687) (#85707)
Fixes #85682

(cherry picked from commit c5ddc93767)
2025-09-02 16:20:30 -07:00
Martin KrizekandGitHub 9aea625f63 [stable-2.19] ternary: evaluate values lazily (#85752) (#85753)
Fixes #85743
(cherry picked from commit 6976e13075)
2025-09-02 16:06:43 -07:00
Matt ClayandGitHub f2a4eb74ec [stable-2.19] ansible-test - Update Ansible Core CI auth (#85717) (#85768)
Implement new authentication methods for accessing the Ansible Core CI service.

(cherry picked from commit be9e57366b)
2025-08-29 21:00:18 -07:00
Matt ClayandGitHub 8203ef0fe0 [stable-2.19] CI - Add missing args to generic.sh (#85737) (#85738)
(cherry picked from commit 7b598f3fc9)
2025-08-25 17:05:54 -07:00
Matt MartzandGitHub adb3c6fae5 Update Ansible release version to v2.19.1.post0. (#85731) 2025-08-25 19:54:53 +00:00
Matt MartzandGitHub 43cac0b1d2 New release v2.19.1 (#85730) v2.19.1 2025-08-25 14:16:05 -05:00
Matt DavisandGitHub 695afe4fe7 Update Ansible release version to v2.19.1rc1.post0. (#85699) 2025-08-19 00:33:33 +00:00
Matt DavisandGitHub 7fc339e4aa New release v2.19.1rc1 (#85698) v2.19.1rc1 2025-08-18 23:53:04 +00:00
875b258977 Include result origin in broken conditional message instead of result (#85695) (#85697)
(cherry picked from commit b1fc98c8ad)

Co-authored-by: Matt Clay <matt@mystile.com>
2025-08-18 23:16:56 +00:00
Abhijeet KasurdeandGitHub 8849bd776b [stable-2.19] service_facts: Handle KeyError while processing service name (#85572) (#85647)
* service_facts: Handle KeyError while processing service name

As a part of follow up review,

* Handle KeyError with exception handling
* Warn user about the missing service name in the given service details
(cherry picked from commit 9ed7164)

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-08-18 15:34:42 -07:00
8d26bbf3f7 [stable-2.19] Fix marker handling in templating (#85690) (#85694)
* allow markers to pass through template lookup
* avoid tripping markers within Jinja generated code

(cherry picked from commit 558676fcdc)

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2025-08-18 21:20:37 +00:00
a00261b0ec [stable-2.19] ensure undefined marker access on Jinja getattr->getitem fallback (#85688) (#85691)
(cherry picked from commit 3518d48146)

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2025-08-18 20:41:14 +00:00
Sloane HertelandGitHub 6404fdce45 Fix nested import_tasks when the parent import contains a template (#85599) (#85636)
* Test nested import_tasks when the parent import contains a template

* Fix templating the parent_include.args

(cherry picked from commit 9a6420e1d5)
2025-08-18 10:00:15 -07:00
Matt DavisandGitHub 2dcd35b692 [stable-2.19] Backward-compatible None handling in template concat and argspec str (#85652) (#85663)
* Backward-compatible None handling in template concat and argspec str (#85652)

* templating coerces None to empty string on multi-node result

* avoid simple cases of embedded `None` in multi-node string concatenated template results ala <=2.18
* single-node template results preserve NoneType

* add None->empty str equivalency to argspec validation

* fix integration tests
* remove conversion error message check from apt_repository test
* remove error message check on `None` value for required str argspec in roles_arg_spec test (now logically-equivalent to empty string)

* explanatory comment for None->empty str coalesce

(cherry picked from commit e3c9908679)

* eliminate None template nodes in _flatten_nodes (#85676)

* defers value or concat choice until Nones are gone
* fixes None -> empty string for TemplateModule cases
* add tests

(cherry picked from commit 5345ac9911)
2025-08-18 09:58:32 -07:00
Abhijeet KasurdeandGitHub e24bc689a3 [stable-2.19] test: Remove redundant Python 3 condition (#85664) (#85675)
(cherry picked from commit 603dd2d)

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-08-15 15:14:29 -07:00
Matt ClayandGitHub 3c1e46435b [stable-2.19] Fix slicing of tuples in templating (#85608) (#85661)
* Fix slicing of tuples in templating

* Improve lazy container test coverage
(cherry picked from commit 00fe38215c)
2025-08-15 12:24:39 -07:00
Matt ClayandGitHub 0718473815 [stable-2.19] Fix filter plugin result processing (#85653) (#85662)
(cherry picked from commit 76748b8478)
2025-08-15 12:22:27 -07:00
db4973572a Add temporary module result serialization hook (#85609) (#85621)
* Add temporary module result serialization hook

* Sanity test fix

---------


(cherry picked from commit faf86ca2b3)

Co-authored-by: Matt Clay <matt@mystile.com>
2025-08-05 14:12:47 -05:00
Matt DavisandGitHub 99d701ccf9 default _ansible_tracebacks_for to [] when not specified (#85427) (#85453)
* eases module unit tests that aren't using our fixture

(cherry picked from commit 6b347bfbf7)
2025-08-04 10:43:18 -05:00
Brian CocaandGitHub ddf2bd773c meta: clear_host_errors, clarify what this applies to (#85463) (#85465)
* meta: clear_host_errors, clarify what this applies to

It clears host for selection, but does not change state in the current iterator.

* also update example

(cherry picked from commit 319dca2ea8)
2025-08-04 10:13:51 -05:00
5a20b991d4 Rewrite exception key on failed_when: false (#85516) (#85517)
* Prevents callback handle_exception from displaying the captured exception when the task is not failed.
* Added tests.


(cherry picked from commit 2fbd7c114e)

Co-authored-by: Matt Clay <matt@mystile.com>
2025-08-04 10:13:42 -05:00
Brian CocaandGitHub 68378c85cb plugin config options are now correctly fetched with origin (#85488) (#85525)
* also update callbcacks, since they override these functions
due to backwards compat _options being taken for CLI

(cherry picked from commit 19f9c66004)
2025-08-04 10:13:32 -05:00
Abhijeet KasurdeandGitHub e8272f1038 [stable-2.19] filter: update integration tests (#84990) (#85540)
(cherry picked from commit 181dbdb)

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-08-04 10:13:12 -05:00
d58c99ddd4 [stable-2.19] Add AnsiballZ debugging support with debugpy (#85476) (#85528)
* Add AnsiballZ debugging support with debugpy

Adds support for debugging AnsiballZ modules with debugpy which is used
by VSCode as its Python debugger DAP. Debugging can either be done
through a manual Debugpy listening server through a launch.json
configuration or through the new ansible-test --dev-debug-on-deman
argument.

* Fix up integration test

* Simplify config option and move mypy ignore

* Use new API if available and fix typo

* Guard the import of debugpy

* Fix sanity import issue

* Minor cosmetic adjustments

* Simplify debugger setup

* ansible-test - Refactor debugging interface

* Add ansible-test debug integration tests

* Fix ansible-test shell when in unsupported dir

---------
(cherry picked from commit 3882366585)

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2025-08-04 10:12:41 -05:00
Martin KrizekandGitHub 28ca9c09fb [stable-2.19] dnf/dnf5: address issues discovered in 2.16 yum tests (#83659) (#85607)
Fixes #85554
(cherry picked from commit c0256d6)
2025-08-04 10:12:20 -05:00
Matt ClayandGitHub a5cc030818 [stable-2.19] ansible-test - Limit bootstrap package install retries (#85544) (#85546)
(cherry picked from commit ee297bb7ca)
2025-07-29 15:23:56 -07:00
85af5cadf3 [stable-2.19] tqm: Use correct warning methods (#85434) (#85550)
* Use display.error_as_warning instead of self.warning
* Use display.error_as_warning instead of display.warning_as_error.

(cherry picked from commit ea238c9eb5)

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-07-29 15:23:34 -07:00
Matt ClayandGitHub f28faa7fbf [stable-2.19] ansible-test - Fix coverage config (#85555) (#85559)
(cherry picked from commit 35830cb054)
2025-07-29 15:22:57 -07:00
Matt ClayandGitHub cf6266cc2d [stable-2.19] Fix paramiko deprecation unit test (#85573) (#85574)
The unit test previously assumed paramiko was installed, and would fail if it was not.

(cherry picked from commit 43a20c9f68)
2025-07-29 15:22:23 -07:00
Matt ClayandGitHub 116cc16bc9 [stable-2.19] Update azure-pipelines-test-container (#85578) (#85579)
(cherry picked from commit 62dc40ce1c)
2025-07-29 14:23:23 -07:00
Matt ClayandGitHub 72c3a20e1a [stable-2.19] ansible-test - Use OS packages on FreeBSD 13.5 (#85530) (#85531)
(cherry picked from commit cdb7af094b)
2025-07-23 22:43:22 +00:00
fb09e79b2f [stable-2.19] Fixed string type in tags fieldattribute (#84655) (#85452)
(cherry picked from commit 8207406306)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-07-23 09:49:13 -07:00
Matt DavisandGitHub fc73880e08 Update Ansible release version to v2.19.0.post0. (#85514) 2025-07-21 18:17:16 +00:00
Matt DavisandGitHub 82529e534d New release v2.19.0 (#85513) v2.19.0 2025-07-21 10:43:25 -07:00
Matt DavisandGitHub 66eb3e7589 Update Ansible release version to v2.19.0rc2.post0. (#85459) 2025-07-09 00:19:29 +00:00
Matt DavisandGitHub b429f84674 New release v2.19.0rc2 (#85456) v2.19.0rc2 2025-07-08 16:35:22 -07:00
e55cda68f1 [stable-2.19] json filter: update docs (#84989) (#85442)
(cherry picked from commit 34f2f39)

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2025-07-08 14:46:36 -07:00
Matt ClayandGitHub 483b23ce6d [stable-2.19] Ensure config env/ini values are tagged (#85404) (#85414)
* Ensure config env/ini values are tagged

Config env and ini values now have origin and trust tags applied.

* Remove unused import
(cherry picked from commit 6ff6339191)
2025-07-08 14:43:02 -07:00
100b20260a [stable-2.19] Short-circuit legacy network module prefix->action mapping (#85406) (#85413)
* Short-circuit legacy network module prefix->action mapping

* Modified a non-short-circuit compound conditional in a legacy networking path that attempted to resolve an action for any module name containing `_`. The bug was always present, but the typical presentation (an ImportError) was ignored prior to 2.19.
* The legacy networking path should be deprecated and removed in 2.20- a module could still be run under the wrong action if one with a matching prefix is found.

* unit test fix
(cherry picked from commit d6efb7db8a)

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2025-07-08 14:42:32 -07:00
Matt ClayandGitHub da732a5c3c [stable-2.19] Drop incidental network tests from CI (#85425) (#85428)
(cherry picked from commit 35252fd96c)
2025-07-03 22:06:00 +00:00
Matt DavisandGitHub 8711bd0bf0 add missing changelog deprecation entries (#85415) 2025-07-01 17:43:14 +00:00
Matt ClayandGitHub c8e599b139 Update Ansible release version to v2.19.0rc1.post0. (#85405) 2025-06-30 22:51:10 +00:00
Matt ClayandGitHub 139b567cab New release v2.19.0rc1 (#85403) v2.19.0rc1 2025-06-30 21:59:56 +00:00
Matt Clay d808f11a44 Fix deprecated pylint plugin version parsing (#85402)
(cherry picked from commit 3511299e1e)
2025-06-30 14:26:43 -07:00
Sloane HertelandMatt Clay 98fd931629 Remove deprecation warning caused by automatic role argument spec validation (#85401)
(cherry picked from commit 7216e04139)
2025-06-30 12:21:09 -07:00
Martin KrizekandMatt Clay 16999ea4d9 Limit askpass prompts to single attempt (#85364)
* Limit askpass prompts to single attempt

OpenSSH client option NumberOfPasswordPrompts defaults to 3 so in case
an incorrect connection password is provided it is excessively tried 3
times. Not only that but running the `_ssh_askpass` entry point multiple
times (via ssh) results in `json.decoder.JSONDecodeError` as after the
first run the shared memory is zero'd and the subsequent runs end up
calling `json.loads` on empty data.

`json.decoder.JSONDecodeError` does not happen prior to Python 3.13 as
the share memory is unlinked automatically on `.close()` and the
`_ssh_askpass` entry point exits with return code 1 before attempting to
load zero'd memory.

Fixes #85359

* changelog and tests

* Update changelogs/fragments/85359-askpass-incorrect-password-retries.yml

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

* Update lib/ansible/cli/_ssh_askpass.py

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>

* Avoid race condition in second unlink

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 54ccad9e46)
2025-06-30 12:21:09 -07:00
Patrick KingstonandMatt Clay a633311f97 Test multiple inheritance in _utils get_all_subclasses (#85396)
Should bring code coverage in _utils.py to 100%.
Ensures get_all_subclasses won't enter infinite recursion.

(cherry picked from commit fcffd707c6)
2025-06-30 12:21:09 -07:00
Matt DavisandMatt Clay a37df1a94a Remove redundant vars FA on PlaybookInclude (#85395)
* The redundant FA declaration was not static, which broke a number of automatic validation behaviors.
* Added tests to assert deferred validation and lack of templating on `import_playbook.vars`.

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 73369f53af)
2025-06-30 12:21:09 -07:00
Matt DavisandMatt Clay 9a3288f8c4 unified Marker propagation for all Jinja plugin/call ops (#85391)
* Errors raised in most Jinja operations and plugin invocations are now propagated as Markers, allowing template pipeline to continue execution when a Marker-aware consumer is present.
* Added ability to inspect ExceptionMarkers to Protomatter `dump_object` filter.
* Added tests.

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 29cdba1fee)
2025-06-30 12:21:09 -07:00