Commit Graph
55272 Commits
Author SHA1 Message Date
Matt ClayandGitHub 4a03ccbd41 Use codecov-cli for uploads (#85386)
ci_coverage
ci_complete
2025-06-25 10:04:15 -07:00
liviozanolandGitHub 66a7cfe77d Docs: fix small typo (#85388) 2025-06-25 08:43:07 -04:00
11f5563895 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>
2025-06-25 03:37:21 +00:00
Patrick KingstonandGitHub e7c7df7074 Add test coverage to ansiballz builder source mapping (#85382)
Should bring code coverage in _builder.py to 100%.
2025-06-24 13:41:06 -07:00
547c64f326 deprecate esoteric/undocumented playbook syntaxes (#85378)
Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-24 17:00:37 +00:00
1f8937b57e 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>
2025-06-24 01:36:50 +00:00
3c52b14c9e 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>
2025-06-23 16:55:53 -07:00
578d25f286 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>
2025-06-23 16:31:59 +00:00
ef9d92b31d Test both original and latest dnf versions (#85342)
Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-19 08:19:32 +02:00
dde10a9afb 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>
2025-06-19 00:38:23 +00:00
Matt ClayandGitHub 3354d0d4e2 Add ticket stub for minor changes (#85350) 2025-06-18 17:05:23 -07:00
fa9f286096 display wrap/format arg cleanup (#85352)
Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-18 14:50:45 -07:00
Martin KrizekandGitHub 34abc83822 Remove Python 2 mentions (#85353) 2025-06-18 19:14:16 +02:00
46abcfcc82 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>
2025-06-17 23:15:55 +00:00
8e9f5fb9d5 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>
2025-06-17 16:37:25 -04:00
Matt ClayandGitHub d922398c4d 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
2025-06-17 13:21:27 -07:00
leopardracerandGitHub 678c6abc98 Update test-pause (#85347) 2025-06-17 09:15:58 -07:00
Matt ClayandGitHub 83fcaeaa8b Spelling fixes (#85345)
A few grammar fixes too.
2025-06-17 05:26:36 +00:00
eec57ec396 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>
2025-06-16 20:03:06 -07:00
Maxim EvtushandGitHub 778fdcbef1 Fix Typo in Variable Name and Update Test Data for Identifier Validation (#85338) 2025-06-16 12:02:16 +02:00
FTandGitHub f6be5ab224 Fix Typos in Comments and Task Names (#85330)
* Update windows.yml

* Update test_manifest.yml
2025-06-14 14:50:20 -07:00
Matt ClayandGitHub 093ac8df2d ansible-test - Fix relative import resolution (#85328) 2025-06-14 16:11:03 +00:00
Matt ClayandGitHub 025e9cfae6 Add type annotations to set_module_args (#85329) 2025-06-14 15:48:22 +00:00
ed90a424a9 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>
2025-06-14 00:36:59 +00:00
fuder.ethandGitHub f7e0612a85 Fix Typos in Integration Test Comments and Documentation (#85322)
* Update specific-revision.yml

* Update main.yml
2025-06-13 10:09:29 -07:00
Matt ClayandGitHub 2991883672 ansible-test - Fix ansible-test debug from remote shell (#85321) 2025-06-13 03:58:55 +00:00
Abhijeet KasurdeandGitHub cace19f365 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>
2025-06-12 17:37:21 -05:00
Matt ClayandGitHub 7ef13cb29e ansible-test - Add remote debugging support (#85317) 2025-06-12 18:57:36 +00:00
137036e96f 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>
2025-06-12 18:30:32 +00:00
02c21742a3 Assemble add check mode (#85094)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-06-12 16:13:15 +00:00
kilavvyandGitHub a09b25a356 Minor Documentation and Comment Corrections (#85313)
* Update New-AnsiblePowerShellSignature.ps1

* Update ultimatequestion.yml
2025-06-12 08:47:24 -07:00
Brian CocaandGitHub 8ec403a3b9 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.
2025-06-12 15:05:02 +00:00
Matt ClayandGitHub 4b0a5c5c63 ansible-test - Relocate internal CLI args (#85308)
This improves consistency by locating them with other global options.
2025-06-12 03:24:50 +00:00
Matt ClayandGitHub 76ad0b636f ansible-test - Move metadata to environment (#85307) 2025-06-12 00:18:09 +00:00
7e495f4b20 ansible-doc display docs for modules w/o ext (#85299)
Fixed case in which listing modules for docs failed to get sidecar

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-06-11 14:20:05 -07:00
leopardracerandGitHub 56de597fc7 Fix typos in documentation and test ignore list (#85303)
* Update ignore.txt

* Update invalid_choice_value.py
2025-06-11 11:19:47 -07:00
Matt ClayandGitHub c8324aa01a Fix bool filter for non-hashable types (#85300) 2025-06-11 11:18:12 -07:00
d3977ebc88 fix handler include_tasks templating (#85015)
* Add test for a handler including tasks from a variable filename

* Add FieldAttributeBase attribute to indicate if the object should be post validated

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2025-06-11 11:27:00 -04:00
Martin KrizekandGitHub 2cfb158536 module_utils/basic.py: properly deprecate importing text_type (#85293) 2025-06-11 07:44:40 +02:00
Matt ClayandGitHub bdc6c8e16a ansible-test - Code cleanup (#85297) 2025-06-11 01:30:30 +00:00
Matt DavisandGitHub 1d1bbe3424 Fix post-fork deadlock from early Python writers like pydevd (#85296) 2025-06-11 01:08:48 +00:00
Matt ClayandGitHub 714f796384 Fix nested include with templating (#85295) 2025-06-10 22:37:32 +00:00
Matt ClayandGitHub 45dd2c0647 AnsiballZ refactoring and remote debug support (#85289) 2025-06-10 14:11:19 -07:00
David ShrewsburyandGitHub aa8d58a174 get_url - check for incomplete data read (#85164) 2025-06-10 15:17:22 -05:00
Martin KrizekandGitHub 532edf4c35 Fix templating tags on plays and roles (#82314)
Fixes #69903

ci_complete
2025-06-10 20:49:05 +02:00
Matt ClayandGitHub 4956619ac2 Fix deprecation versions in template lookup (#85288) 2025-06-09 16:38:55 +00:00
2bed98bd20 fix Marker handling on Jinja macro invocations (#85280)
* always allow Marker args to pass through
* always disable pre-emptive trip-on-retrieval for Macro JinjaCallContext
* add macro-callable template expression result test cases

Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-06 13:26:45 -07:00
600c1e67b4 Exceptions clean up (#85176)
* replace usage of `IOError` as it is an alias to `OSError`
* replace usage of `socket.error` as it is an alias to `OSError`
* use subclasses of `OSError` rather than inspecting `errno`s
* utilize `exist_ok` parameter of `os.makedirs` rather than ignoring
  `FileExistsError`

Make the following changes to the exception handling this patch already
updates to be consistent with the new code:
* use `ex` as a name for exception being handled
* use `from ex` when re-raising exception for additional context
* use f-strings and `!r` for quoting
* pass exceptions to the `exception` parameter of `fail_json`
* use `display.error_as_warning` rather than passing stringified
  exception into `display.warning`

Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-06 07:59:01 +02:00
43c0132caa adjust PluginInfo to use PluginType enum (#85277)
* normalization fixups

Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-06 00:50:09 +00:00
Matt DavisandGitHub 9f0a8075e3 Prevent template lookup and action from masking ansible_managed value (#85075)
* deprecate DEFAULT_MANAGED_STR and prevent masking of ansible_managed var

* adjust public API behavior

* restore backward-compatible behavior on existing public API
2025-06-05 17:21:48 -07:00