Commit Graph
55098 Commits
Author SHA1 Message Date
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
Matt DavisandMatt Clay ebae950db2 Encryptedstring redact fixes (#85390)
* misc DTFIX/docstring cleanup

* fix EncryptedString redaction, add tests

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

* Fix test failures

---------

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 649c9ec443)
2025-06-30 12:21:09 -07:00
Matt DavisandMatt Clay 8c083e4d1d ensure transform_to_native_types converts keys (#85389)
* added basic key visitor support to variable visitor (off by default)
* transform_to_native_types enables new key visit/conversion
* add test

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit db819d2514)
2025-06-30 12:21:09 -07:00
Matt Clay 632b87b55c Use codecov-cli for uploads (#85386)
ci_coverage
ci_complete

(cherry picked from commit 4a03ccbd41)
2025-06-30 12:21:09 -07:00
liviozanolandMatt Clay d0d89c9585 Docs: fix small typo (#85388)
(cherry picked from commit 66a7cfe77d)
2025-06-30 12:21:09 -07:00
Matt DavisandMatt Clay b23aa84a49 Jinja sandbox refinement (#85385)
* DTFIX recategorize

* fix ansible-console generated task dict

* use non-deprecated task shape

* switch Jinja from ImmutableSandboxedEnvironment to SandboxedEnvironment

* Restore ability to call collection mutation methods.
* Restore ability to directly call integer bitwise operator methods.
* Adjust tests.

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

---------

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 11f5563895)
2025-06-30 12:21:09 -07:00
Matt ClayandGitHub 5f39fc05ba Update Ansible release version to v2.19.0b7.post0. (#85384) 2025-06-25 00:51:03 +00:00
Matt ClayandGitHub c0d8306d4e New release v2.19.0b7 (#85383) v2.19.0b7 2025-06-24 22:57:36 +00:00
Patrick KingstonandMatt Clay 68bf0a66cb Add test coverage to ansiballz builder source mapping (#85382)
Should bring code coverage in _builder.py to 100%.

(cherry picked from commit e7c7df7074)
2025-06-24 15:18:17 -07:00
Matt DavisandMatt Clay b3dde82ab1 deprecate esoteric/undocumented playbook syntaxes (#85378)
Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 547c64f326)
2025-06-24 15:18:17 -07:00
Matt DavisandMatt Clay d68954de83 restore playbook import DS rewrite (#85379)
* add tests for FQ "action" aliases
* add validation for multiple directives

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 1f8937b57e)
2025-06-24 15:18:17 -07:00
Matt DavisandMatt Clay 0ce6b45db2 deprecate invalid variable names in inventory (#85377)
* deprecate invalid variable names in inventory

* was previously a hard error for `Host`
* added missing check to `Group`
* swapped blanket Python keyword prohibition with Jinja singleton and `not` check

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

* fix invalid variable name test

---------

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 3c52b14c9e)
2025-06-24 15:18:17 -07:00
Nils BrinkmannandMatt Clay 223546bf76 Add type annotations to the Role.__init__() method
PR #85346

This patch adds type-checking to the `Role.__init__()` method.

Context: https://github.com/ansible/ansible/pull/85249#issuecomment-2956115486

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
Co-authored-by: Nils Brinkmann <nils.brinkmann@rheinmetall.com>
(cherry picked from commit 578d25f286)
2025-06-24 15:18:17 -07:00
Martin KrizekandMatt Clay 3de2b9082c Test both original and latest dnf versions (#85342)
Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit ef9d92b31d)
2025-06-24 15:18:17 -07:00
Matt DavisandMatt Clay 9c0dc6c88a import_playbook validation cleanup (#85358)
* use declarative FA validation
* deleted redundant/broken imperative validation
* added test case to ensure templating

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit dde10a9afb)
2025-06-24 15:18:17 -07:00
Matt Clay 0b772cb892 Add ticket stub for minor changes (#85350)
(cherry picked from commit 3354d0d4e2)
2025-06-24 15:18:17 -07:00
Matt DavisandMatt Clay 9f7432c5ff display wrap/format arg cleanup (#85352)
Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit fa9f286096)
2025-06-24 15:18:16 -07:00
Martin KrizekandMatt Clay e6f2c112f5 Remove Python 2 mentions (#85353)
(cherry picked from commit 34abc83822)
2025-06-24 15:18:16 -07:00
Matt DavisandMatt Clay 03dc8c4260 feature-flag experimental module metadata (#85351)
* added ansible-test integration env/set directive for aliases
* applied to module-serialization-profiles test to enable feature flag

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 46abcfcc82)
2025-06-24 15:18:16 -07:00
Sloane HertelandMatt Clay 39ed1fc4bc password lookup - re-attempt acquiring lock file regardless of locale (#85318)
* Fix handling FileExistsError, instead of only handling OSError when the human-readable error message is "File exists".

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 8e9f5fb9d5)
2025-06-24 15:18:16 -07:00
Matt Clay b6ac61b487 Show context for reserved variable warnings (#85324)
* Show context for reserved variable warnings

* Update integration test

* Use var origin not value origin

* Use a list

* Ensure tagged varname is used

(cherry picked from commit d922398c4d)
2025-06-24 15:18:16 -07:00
leopardracerandMatt Clay 11ad0ae758 Update test-pause (#85347)
(cherry picked from commit 678c6abc98)
2025-06-24 15:18:16 -07:00
Matt Clay 0aa8a878cf Spelling fixes (#85345)
A few grammar fixes too.

(cherry picked from commit 83fcaeaa8b)
2025-06-24 15:18:16 -07:00
Matt DavisandMatt Clay 59cdb65926 Misc callback fixes/cleanup (#85344)
* Misc callback fixes/cleanup

* Fix v1 callback method dispatch, fully deprecate v1 methods, add missing tests.
* Clean up callback plugin init/setup code, remove redundancies, improve error messaging.
* Remove unused callback method definitions from base class.

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

* switch callback bypass to instance-level from class-level

* preserves any instance-level method magic that implementations were using

* add missing handler dispatch entry

* add tests to ensure all methods are covered

---------

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit eec57ec396)
2025-06-24 15:18:16 -07:00
Maxim EvtushandMatt Clay 19f3890275 Fix Typo in Variable Name and Update Test Data for Identifier Validation (#85338)
(cherry picked from commit 778fdcbef1)
2025-06-24 15:18:16 -07:00
FTandMatt Clay 7d05c6e8e0 Fix Typos in Comments and Task Names (#85330)
* Update windows.yml

* Update test_manifest.yml

(cherry picked from commit f6be5ab224)
2025-06-24 15:18:16 -07:00
Matt Clay fd8d22e874 ansible-test - Fix relative import resolution (#85328)
(cherry picked from commit 093ac8df2d)
2025-06-24 15:18:16 -07:00
Matt Clay 69ac7b1278 Add type annotations to set_module_args (#85329)
(cherry picked from commit 025e9cfae6)
2025-06-24 15:18:16 -07:00
Matt DavisandMatt Clay b708e53d08 fix script failed_when bypass (#85326)
* fix script failed_when bypass

* misuse of AnsibleActionFail for a retryable/alterable error case
* add tests

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

* type annotation fixes

---------

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit ed90a424a9)
2025-06-24 15:18:16 -07:00
fuder.ethandMatt Clay b7158e7829 Fix Typos in Integration Test Comments and Documentation (#85322)
* Update specific-revision.yml

* Update main.yml

(cherry picked from commit f7e0612a85)
2025-06-24 15:18:16 -07:00
Matt Clay b5529ee064 ansible-test - Fix ansible-test debug from remote shell (#85321)
(cherry picked from commit 2991883672)
2025-06-24 15:18:16 -07:00
Abhijeet KasurdeandMatt Clay 73df36e7d0 apt: Consider timeout while invoking apt-get command (#85219)
* apt: Consider timeout while invoking apt-get command

* Apply timeout specified by user to apt-get command
  using '-o DPkg::Lock::Timeout=' syntax

Fixes: #78658

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit cace19f365)
2025-06-24 15:18:16 -07:00
Matt Clay 865d69dab1 ansible-test - Add remote debugging support (#85317)
(cherry picked from commit 7ef13cb29e)
2025-06-24 15:18:16 -07:00
Brian CocaandMatt Clay 7cc5f8504e wait_for module - document self match avoidance (#85251)
When using static string to search system log, avoid matching self execution
logged by Ansible by default.

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 137036e96f)
2025-06-24 15:18:16 -07:00
Brian CocaandMatt Clay f29662138e Assemble add check mode (#85094)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 02c21742a3)
2025-06-24 15:18:16 -07:00
kilavvyandMatt Clay 80a00f60d6 Minor Documentation and Comment Corrections (#85313)
* Update New-AnsiblePowerShellSignature.ps1

* Update ultimatequestion.yml

(cherry picked from commit a09b25a356)
2025-06-24 15:18:16 -07:00
Brian CocaandMatt Clay 05b3eafeae ansible-doc don't show empty paths (#85294)
If no path is given, it can only mean that it is a Jinja plugin, display Jinja as 'provider' then.

(cherry picked from commit 8ec403a3b9)
2025-06-24 15:18:16 -07:00
Matt Clay 3ad711aee4 ansible-test - Relocate internal CLI args (#85308)
This improves consistency by locating them with other global options.

(cherry picked from commit 4b0a5c5c63)
2025-06-24 15:18:16 -07:00
Matt Clay 9d83546b65 ansible-test - Move metadata to environment (#85307)
(cherry picked from commit 76ad0b636f)
2025-06-24 15:18:16 -07:00
Matt DavisandGitHub 05951a6d9a Update Ansible release version to v2.19.0b6.post0. (#85306) 2025-06-11 23:33:08 +00:00
Matt DavisandGitHub 8a047b623d New release v2.19.0b6 (#85305) v2.19.0b6 2025-06-11 22:30:33 +00:00