Commit Graph

55019 Commits (e7c7df7074a664175e96f17288aba1d3c190009b)
 

Author SHA1 Message Date
Patrick Kingston e7c7df7074
Add test coverage to ansiballz builder source mapping (#85382)
Should bring code coverage in _builder.py to 100%.
7 months ago
Matt Davis 547c64f326
deprecate esoteric/undocumented playbook syntaxes (#85378)
Co-authored-by: Matt Clay <matt@mystile.com>
7 months ago
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>
7 months ago
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>
7 months ago
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>
7 months ago
Martin Krizek ef9d92b31d
Test both original and latest dnf versions (#85342)
Co-authored-by: Matt Clay <matt@mystile.com>
7 months ago
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>
7 months ago
Matt Clay 3354d0d4e2
Add ticket stub for minor changes (#85350) 7 months ago
Matt Davis fa9f286096
display wrap/format arg cleanup (#85352)
Co-authored-by: Matt Clay <matt@mystile.com>
7 months ago
Martin Krizek 34abc83822
Remove Python 2 mentions (#85353) 7 months ago
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>
7 months ago
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>
7 months ago
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
7 months ago
leopardracer 678c6abc98
Update test-pause (#85347) 7 months ago
Matt Clay 83fcaeaa8b
Spelling fixes (#85345)
A few grammar fixes too.
7 months ago
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>
7 months ago
Maxim Evtush 778fdcbef1
Fix Typo in Variable Name and Update Test Data for Identifier Validation (#85338) 7 months ago
FT f6be5ab224
Fix Typos in Comments and Task Names (#85330)
* Update windows.yml

* Update test_manifest.yml
7 months ago
Matt Clay 093ac8df2d
ansible-test - Fix relative import resolution (#85328) 7 months ago
Matt Clay 025e9cfae6
Add type annotations to set_module_args (#85329) 7 months ago
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>
7 months ago
fuder.eth f7e0612a85
Fix Typos in Integration Test Comments and Documentation (#85322)
* Update specific-revision.yml

* Update main.yml
7 months ago
Matt Clay 2991883672
ansible-test - Fix ansible-test debug from remote shell (#85321) 7 months ago
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>
7 months ago
Matt Clay 7ef13cb29e
ansible-test - Add remote debugging support (#85317) 7 months ago
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>
7 months ago
Brian Coca 02c21742a3
Assemble add check mode (#85094)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
7 months ago
kilavvy a09b25a356
Minor Documentation and Comment Corrections (#85313)
* Update New-AnsiblePowerShellSignature.ps1

* Update ultimatequestion.yml
7 months ago
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.
7 months ago
Matt Clay 4b0a5c5c63
ansible-test - Relocate internal CLI args (#85308)
This improves consistency by locating them with other global options.
7 months ago
Matt Clay 76ad0b636f
ansible-test - Move metadata to environment (#85307) 7 months ago
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>
7 months ago
leopardracer 56de597fc7
Fix typos in documentation and test ignore list (#85303)
* Update ignore.txt

* Update invalid_choice_value.py
7 months ago
Matt Clay c8324aa01a
Fix bool filter for non-hashable types (#85300) 7 months ago
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>
7 months ago
Martin Krizek 2cfb158536
module_utils/basic.py: properly deprecate importing `text_type` (#85293) 7 months ago
Matt Clay bdc6c8e16a
ansible-test - Code cleanup (#85297) 7 months ago
Matt Davis 1d1bbe3424
Fix post-fork deadlock from early Python writers like pydevd (#85296) 7 months ago
Matt Clay 714f796384
Fix nested include with templating (#85295) 7 months ago
Matt Clay 45dd2c0647
AnsiballZ refactoring and remote debug support (#85289) 7 months ago
David Shrewsbury aa8d58a174
get_url - check for incomplete data read (#85164) 7 months ago
Martin Krizek 532edf4c35
Fix templating tags on plays and roles (#82314)
Fixes #69903

ci_complete
7 months ago
Matt Clay 4956619ac2
Fix deprecation versions in template lookup (#85288) 7 months ago
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>
7 months ago
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>
7 months ago
Matt Davis 43c0132caa
adjust PluginInfo to use PluginType enum (#85277)
* normalization fixups

Co-authored-by: Matt Clay <matt@mystile.com>
7 months ago
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
7 months ago
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>
7 months ago
Martin Krizek ea7ad90c31
Fix calls to `deprecated()` to include `help_text` arg (#85262)
Co-authored-by: Matt Clay <matt@mystile.com>
7 months ago
Matt Clay 051f7e5944
Add missing docs for sftp_batch_mode (#85270) 7 months ago