Commit Graph

55218 Commits

Author SHA1 Message Date
Matt Davis
547c64f326
deprecate esoteric/undocumented playbook syntaxes (#85378)
Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-24 17:00:37 +00:00
Matt Davis
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
Matt Davis
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
Nils Brinkmann
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
Martin Krizek
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
Matt Davis
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 Clay
3354d0d4e2
Add ticket stub for minor changes (#85350) 2025-06-18 17:05:23 -07:00
Matt Davis
fa9f286096
display wrap/format arg cleanup (#85352)
Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-18 14:50:45 -07:00
Martin Krizek
34abc83822
Remove Python 2 mentions (#85353) 2025-06-18 19:14:16 +02:00
Matt Davis
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
Sloane Hertel
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 Clay
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
leopardracer
678c6abc98
Update test-pause (#85347) 2025-06-17 09:15:58 -07:00
Matt Clay
83fcaeaa8b
Spelling fixes (#85345)
A few grammar fixes too.
2025-06-17 05:26:36 +00:00
Matt Davis
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 Evtush
778fdcbef1
Fix Typo in Variable Name and Update Test Data for Identifier Validation (#85338) 2025-06-16 12:02:16 +02:00
FT
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 Clay
093ac8df2d
ansible-test - Fix relative import resolution (#85328) 2025-06-14 16:11:03 +00:00
Matt Clay
025e9cfae6
Add type annotations to set_module_args (#85329) 2025-06-14 15:48:22 +00:00
Matt Davis
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.eth
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 Clay
2991883672
ansible-test - Fix ansible-test debug from remote shell (#85321) 2025-06-13 03:58:55 +00:00
Abhijeet Kasurde
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 Clay
7ef13cb29e
ansible-test - Add remote debugging support (#85317) 2025-06-12 18:57:36 +00:00
Brian Coca
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
Brian Coca
02c21742a3
Assemble add check mode (#85094)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-06-12 16:13:15 +00:00
kilavvy
a09b25a356
Minor Documentation and Comment Corrections (#85313)
* Update New-AnsiblePowerShellSignature.ps1

* Update ultimatequestion.yml
2025-06-12 08:47:24 -07:00
Brian Coca
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 Clay
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 Clay
76ad0b636f
ansible-test - Move metadata to environment (#85307) 2025-06-12 00:18:09 +00:00
Brian Coca
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
leopardracer
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 Clay
c8324aa01a
Fix bool filter for non-hashable types (#85300) 2025-06-11 11:18:12 -07:00
Sloane Hertel
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 Krizek
2cfb158536
module_utils/basic.py: properly deprecate importing text_type (#85293) 2025-06-11 07:44:40 +02:00
Matt Clay
bdc6c8e16a
ansible-test - Code cleanup (#85297) 2025-06-11 01:30:30 +00:00
Matt Davis
1d1bbe3424
Fix post-fork deadlock from early Python writers like pydevd (#85296) 2025-06-11 01:08:48 +00:00
Matt Clay
714f796384
Fix nested include with templating (#85295) 2025-06-10 22:37:32 +00:00
Matt Clay
45dd2c0647
AnsiballZ refactoring and remote debug support (#85289) 2025-06-10 14:11:19 -07:00
David Shrewsbury
aa8d58a174
get_url - check for incomplete data read (#85164) 2025-06-10 15:17:22 -05:00
Martin Krizek
532edf4c35
Fix templating tags on plays and roles (#82314)
Fixes #69903

ci_complete
2025-06-10 20:49:05 +02:00
Matt Clay
4956619ac2
Fix deprecation versions in template lookup (#85288) 2025-06-09 16:38:55 +00:00
Matt Davis
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
Martin Krizek
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
Matt Davis
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 Davis
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
Matt Davis
2b7204527b
Restore 2.18 vault tag YAML dump behavior (#85275)
* Doing conditional redaction/formatting needs other bits that aren't ready for 2.19.

Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-05 19:21:46 +00:00
Martin Krizek
ea7ad90c31
Fix calls to deprecated() to include help_text arg (#85262)
Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-05 08:46:17 +02:00
Matt Clay
051f7e5944
Add missing docs for sftp_batch_mode (#85270) 2025-06-05 05:33:40 +00:00
Matt Clay
1c06c46cc1
Fix YAML loading/dumping and filters (#85266)
- from_yaml/from_yaml_all filters now preserve trust
- YAML dumping can once again handle undecryptable vaulted values
- increased test coverage

Co-authored-by: Matt Davis <nitzmahone@redhat.com>
2025-06-05 01:59:23 +00:00