Compare commits

...

429 Commits

Author SHA1 Message Date
a1d25cca00 ansible-test - Upgrade coverage to 7.9.1 (#85411) 2025-06-30 17:41:10 -07:00
6ff6339191 Ensure config env/ini values are tagged (#85404)
* Ensure config env/ini values are tagged

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

* Remove unused import
2025-06-30 16:33:37 -07:00
d6efb7db8a Short-circuit legacy network module prefix->action mapping (#85406)
* 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
2025-06-30 16:33:28 -07:00
ac8c66d431 Bump devel version to 2.20.0.dev0 (#85409) 2025-06-30 23:31:20 +00:00
3511299e1e Fix deprecated pylint plugin version parsing (#85402) 2025-06-30 14:18:49 -07:00
7216e04139 Remove deprecation warning caused by automatic role argument spec validation (#85401) 2025-06-30 12:19:57 -07:00
54ccad9e46 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>
2025-06-28 02:01:33 +00:00
fcffd707c6 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.
2025-06-26 17:14:20 -07:00
73369f53af 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>
2025-06-26 11:34:29 -07:00
29cdba1fee 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>
2025-06-26 01:17:18 +00:00
649c9ec443 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>
2025-06-26 00:42:23 +00:00
db819d2514 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>
2025-06-25 19:43:57 +00:00
4a03ccbd41 Use codecov-cli for uploads (#85386)
ci_coverage
ci_complete
2025-06-25 10:04:15 -07:00
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
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
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
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
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
678c6abc98 Update test-pause (#85347) 2025-06-17 09:15:58 -07:00
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
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
093ac8df2d ansible-test - Fix relative import resolution (#85328) 2025-06-14 16:11:03 +00:00
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
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
2991883672 ansible-test - Fix ansible-test debug from remote shell (#85321) 2025-06-13 03:58:55 +00:00
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
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
a09b25a356 Minor Documentation and Comment Corrections (#85313)
* Update New-AnsiblePowerShellSignature.ps1

* Update ultimatequestion.yml
2025-06-12 08:47:24 -07:00
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
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
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
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
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
2cfb158536 module_utils/basic.py: properly deprecate importing text_type (#85293) 2025-06-11 07:44:40 +02:00
bdc6c8e16a ansible-test - Code cleanup (#85297) 2025-06-11 01:30:30 +00:00
1d1bbe3424 Fix post-fork deadlock from early Python writers like pydevd (#85296) 2025-06-11 01:08:48 +00:00
714f796384 Fix nested include with templating (#85295) 2025-06-10 22:37:32 +00:00
45dd2c0647 AnsiballZ refactoring and remote debug support (#85289) 2025-06-10 14:11:19 -07:00
aa8d58a174 get_url - check for incomplete data read (#85164) 2025-06-10 15:17:22 -05:00
532edf4c35 Fix templating tags on plays and roles (#82314)
Fixes #69903

ci_complete
2025-06-10 20:49:05 +02:00
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
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
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
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
051f7e5944 Add missing docs for sftp_batch_mode (#85270) 2025-06-05 05:33:40 +00:00
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
6198c7377f Fix incorrect behavior when a Jinja test returns Marker (#85264)
* Avoid Marker trip in plugin wrapper that causes unnecessary early template bailout.
* Remove spurious non-boolean result deprecation warning.
* Add test.

Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-04 18:20:24 +00:00
7da24ca7b0 Fix logic error in ansible-galaxy (#85258)
Co-authored-by: OpenRefactory, Inc <56681071+openrefactory@users.noreply.github.com>
Co-authored-by: Munawar <munawar.hafiz@gmail.com>
2025-06-04 06:37:33 +00:00
0bbd8847c4 Use a Specific Package Manager (#82050)
* Use a Specific Package Manager

* Update the name of package manager from yum to dnf

* Update lib/ansible/modules/package.py

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

* Update lib/ansible/modules/package.py

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

---------

Co-authored-by: Aditya Putta <puttaa@skiff.com>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-03 23:18:42 -07:00
bbbfbd57e2 fix key conversion on legacy JSON profiles (#85253)
* fix key conversion on legacy JSON profiles

* restore stdlib silent str conversion behavior for int/float/bool/None dict key types
* remove most conversions for non-scalar keys
* add key conversion cases to JSON profile test suite

* typo

* Fix sanity test failures

* Fix _handle_key_str_fallback implementation

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-03 15:11:27 -07:00
d7c4d0119f Deprecate ShellModule.checksum() (#85216)
The methods have not been used, updated or tested since
b9d0662faf.
2025-06-03 11:14:55 -04:00
df0b417f2d Resolve misc DTFIX0/1 (#85247)
* complete DTFIX0 after eval

* sunder-prefix Marker.concrete_subclasses

* re-home Jinja plugin decorators public API

* low-hanging/already fixed DTFIX cases

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

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-03 01:31:20 +00:00
8f2622c39f doc - Dynamically document jinja builtins (#85215)
* doc - Dynamically document jinja builtins

This change has `ansible-doc` dynamically generate the documentation for
any Jinja builtin filter and test plugins. These dynamic stubs will
point to the official Jinja documentation pages for more information.

* Fix sanity issues

* Add tests

* Update Jinja builtin doc gen

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

---------

Co-authored-by: Matt Davis <nitzmahone@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-02 13:23:30 -07:00
01bb9393d7 Merge dnf and dnf5 integration tests (#85199) 2025-06-02 09:52:38 +02:00
3505572470 Deprecate ansible.compat.importlib_resources (#85226)
Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-02 09:51:03 +02:00
487d699226 Deprecate module_utils.common.collections.count (#85233)
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-02 09:49:42 +02:00
b4741fc495 Exclude ansible._protomatter from ansible-doc output by default (#85115)
* Exclude ansible._protomatter from ansible-doc output by default

* Added changelog
2025-05-30 15:12:45 -07:00
0ee1c36779 local connection always passes str to Popen (#85239) 2025-05-30 14:39:45 -07:00
2a24633964 Misc ssh agent fixes (#85238)
* Misc ssh-agent fixes

* Replace manual SIGALRM handling with new alarm_timeout context manager
* Misc error handling fixes to ssh-agent startup
* Add SSH_AGENT_EXECUTABLE config to ease failure mode testing
* 100% test coverage on agent startup failure code

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

* make SSH Agent support internal

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2025-05-30 13:38:59 -07:00
eafe5fc739 Add missing warning methods and args (#85225) 2025-05-30 11:36:21 -07:00
cbcefc53a3 Clean up TE error handling, wrap sigalrm handler (#85232)
* Clean up TE error handling, wrap sigalrm handler

* Preserve error detail on AnsibleAction and Connection exceptions.
* Remove multiple layers of unreachable or redundant error handling.
* Wrap manual alarm signal/timeout handling into a context manager, add tests.

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

* update error message check in test

* update test timeout message assertions

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2025-05-30 10:45:10 -07:00
d41a3430b7 async handling changed to use 'true' booleans(#85074)
async_status and async_wrrapper now use booleans instead of 0/1 for 'thruthyness'
gather_facts also updated

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Matt Clay <matt@mystile.com>
2025-05-30 08:32:49 -07:00
0e2f770a24 jinja2.__version__ is deprecated (#85221)
Prepare for its removal in Jinja 3.3.

See https://github.com/pallets/jinja/pull/2098
2025-05-30 11:40:10 +02:00
91453e30af Added _TEMPLAR_SANDBOX_MODE config (#85222)
* Added _TEMPLAR_SANDBOX_MODE config

* allows unsafe attribute checks to be disabled in Jinja sandbox

* Update lib/ansible/_internal/_templating/_jinja_bits.py

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

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2025-05-30 01:37:58 +00:00
e2a5377b9a ansible-test - Fix incorrect use of InferenceContext (#85230) 2025-05-29 23:20:39 +00:00
b71d9aa4a5 Decouple SSH client verbosity from Ansible display (#85224)
* decouple SSH client verbosity from Ansible display

* remove failing false-coverage unit test
2025-05-29 09:58:16 -07:00
356bf336bd fix from_yaml_all filter inconsistent None handling (#85223)
* fix from_yaml_all filter inconsistent None handling

* always returns empty list for None or empty string input

* deprecate non-string inputs for from_yaml and from_yaml_all
2025-05-29 09:50:01 -07:00
f05b1d1ccf Improve SUSE distribution detection using VARIANT_ID with fallback (#85152)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-05-29 09:20:15 -07:00
99a3346de6 dnf5 - handle all specific libdnf5 exceptions (#85175)
Fixes #84634
2025-05-29 11:51:12 +02:00
a0132fec0b dnf5 tests: do not remove attr (#85218)
On RHEL 10, the attr package is in the dependency tree of dnf itself
and cannot be removed.
2025-05-28 20:23:28 +02:00
3b66150cc3 Recognize virtualization type correctly on Linode (#85184) 2025-05-27 17:27:01 +02:00
068157618c service: Remove py2 specific code (#85191)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-05-27 16:29:54 +02:00
f635a22d81 apt_repository: remove Python 2 support (#85212) 2025-05-27 16:24:23 +02:00
17cee7a982 win coverage - Fix untrusted coverage collection (#85197)
Fixes the logic when running a module through App Control when the
module is not trusted to run in Full Language Mode. This ensures
coverage will still run as expected and that the trust verification only
happens in the wrappers that actually run/prepare the code.

Also expands on a comment to clarify why only that branch is set to set
the internal file encoding to UTF-8.
2025-05-21 20:14:56 +00:00
359173c006 Include message in captured tracebacks (#85196)
This matches the formatting of tracebacks from exceptions.
2025-05-21 13:12:28 -07:00
e226294855 display - Replace CRNL with NL (#85194) 2025-05-21 17:42:22 +00:00
53b0f1645b ansible-test - Add RHEL 10.0 remote (#85189)
* ansible-test - Add RHEL 10.0 remote

* Update tests for RHEL 10
* Fix iptables test
* Rework rpm_key integration test
2025-05-21 10:21:27 -07:00
c6a2e5ea75 csvfile lookup: remove Python 2 compat (#85186) 2025-05-21 09:54:24 -07:00
6a1c24ca99 Limit SSH agent DSA testing to RHEL 9 (#85193) 2025-05-21 15:53:38 +00:00
75f7b2267d Add support for Windows App Control/WDAC (#84898)
* Add support for Windows App Control/WDAC

Adds preview support for Windows App Control, formerly known as WDAC.
This is a tech preview feature and is designed to test out improvements
needed in future versions of Ansible.

* Use psd1 and parse it through the Ast to avoid any unexpected execution results

* Add tests for various manifest permutations

* Ignore test shebang failure

* Apply suggestions from code review

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

* Use more flexible test expectations

* Add type annotations for shell functions

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2025-05-21 12:28:58 +10:00
e82be177cd ansible-test - Improve deprecated checking type inference (#85159)
* ansible-test - Improve deprecated checking type inference

Also disabled the ``bad-super-call`` pylint rule due to false positives.

* Add type comment support

* Try without using register_transform
2025-05-20 11:23:06 -07:00
feda0a5c6e ansible-test - Fix option filtering (#85182) 2025-05-20 11:11:45 -07:00
1e64707592 Remove unnecessary module shebang (#85183) 2025-05-20 05:41:33 +00:00
242bb9ebab DTFIX recategorization and error/warning refactor (#85181)
Co-authored-by: Matt Davis <nitzmahone@redhat.com>
2025-05-20 00:48:00 +00:00
40c919d7bd Integration tests clean up (#85130)
* Integration tests clean up

* more

* we only test with Ubuntu 24.04 on the controller
2025-05-16 08:25:18 -07:00
97dd5f104c Expand scope of black sanity test (#85169) 2025-05-16 06:28:07 +00:00
14bf64ddf8 Code formatting for .azure-pipelines/ (#85166) 2025-05-16 06:14:44 +00:00
ebd022ee42 Mark integration tests as needs/root (#84487)
For calling setup_test_user, which adds a user to the system (and thus requiring
root):
- become
- become_su
- become_sudo
- slurp

And also:
- apt, which installs/removes system packages
- deb822_repository, which adds/removes apt repos
- hardware_facts calls losetup, which requires root
- package_facts, which installs/removes system packages

Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
2025-05-15 23:13:55 -07:00
930ffd1a83 Code formatting for packaging/cli-doc/ (#85167) 2025-05-16 05:52:24 +00:00
ed0e78fd9c Code formatting for packaging/release.py (#85168) 2025-05-16 05:44:59 +00:00
460343510c Code formatting for test/sanity/code-smell/ (#85165) 2025-05-16 05:44:15 +00:00
fe2d9e316a Fix constructable inventory default keyed group (#85002)
Fix the logic for a constructable inventory `keyed_groups` entry to use
the `default_value` if the ``key` expression result is `None` or `omit`
and not just an empty string. This bug was introduced with the changes
in data tagging and goes back to the original behaviour.

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2025-05-15 09:52:47 -04:00
7ac74ab591 ansible-test - Update default containers (#85161) 2025-05-15 02:38:59 +00:00
588410fe50 ansible-test - Update sanity requirements (#85160) 2025-05-15 01:30:59 +00:00
f5a85493c1 recategorize pass over DTFIX-MERGE entries post b4 (#85155) 2025-05-13 23:24:18 +00:00
567fda6906 Add missing cache plugin test scenarios (#85154) 2025-05-13 14:18:32 -07:00
e5476972da ensure builtin tests always return bool (#85149)
* added unit test validation and coverage enforcement

Co-authored-by: Matt Clay <matt@mystile.com>
2025-05-13 02:53:23 +00:00
7be1359841 misc changelog and docstring cleanup (#85148)
* deferred listify_lookup_plugin_terms deprecation

Co-authored-by: Matt Clay <matt@mystile.com>
2025-05-13 00:11:04 +00:00
93aa611435 release.py - Remove email announcement support (#85060)
Also add missing git and run overloads.
2025-05-12 10:29:42 -07:00
9a426fe303 fix ensure_type to support vaulted values (#85129)
* restored parity with 2.18

Co-authored-by: Matt Clay <matt@mystile.com>
2025-05-10 05:05:56 +00:00
fc8a227647 ensure that all config return values are Origin-tagged (#85127)
Co-authored-by: Matt Clay <matt@mystile.com>
2025-05-09 22:10:55 +00:00
9efba4f972 apply trust to declarative plugin config (#85126)
* trust strings in loaded doc fragments
* added tests
* added hard_fail_context test mechanism

Co-authored-by: Matt Clay <matt@mystile.com>
2025-05-09 19:33:33 +00:00
8a4fb78988 facts: CloudStack KVM Hypervisor to Linux virtual fact (#85117)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-05-09 11:52:27 -07:00
7b69cf3266 ansible-test - Relax some deprecation checks (#85122) 2025-05-08 17:08:18 -07:00
4fe9606530 template module - render None as empty string (#85121)
* template module - render `None` as empty string

* Update changelogs/fragments/template-none.yml

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

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2025-05-08 22:45:53 +00:00
d33bedc48f Misc config type coercion fixes (#85119)
* remove dead config comment noise

* update `list` typed config defaults to be lists

* fix tag preservation/propagation in config
* numerous other ensure_type bugfixes
* 100% unit test coverage of ensure_type
* emit warnings on template_default failures
* fix unhandled exception in convert_bool on unhashable inputs

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

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2025-05-08 13:06:18 -07:00
dcc5dac184 sysvinit: make examples consistent (#85108) 2025-05-08 12:08:14 -07:00
471c5229a7 Fix typos (#85107) 2025-05-08 12:05:12 -07:00
8b9ddf5544 Passing warnings to exit/fail_json is deprecated. (#85109) 2025-05-07 11:02:04 -07:00
7e00053a30 add fuzzy matching to package_data sanity (#85103)
* add fuzzy matching to package_data sanity

* relaxes exact directory matches for license files to allow setuptools > 72 to pass

* sanity
2025-05-07 11:00:21 -07:00
107842fd7d dnf5: skip pkgs that don't satisfy bugfix/security when specified (#85111) 2025-05-07 10:52:23 -07:00
1c29910087 get_url: missing closing brace in docs (#85096) 2025-05-06 07:29:18 -07:00
ff6998f2b9 Switch to stackwalk caller ID (#85095)
* See changelog fragment for most changes.
* Defer early config warnings until display is functioning, eliminating related fallback display logic.
* Added more type annotations and docstrings.
* ansible-test - pylint sanity for deprecations improved.
* Refactored inline legacy resolutions in PluginLoader.

Co-authored-by: Matt Clay <matt@mystile.com>
2025-05-05 18:00:02 -07:00
e4cac2ac33 Add win_script become tests (#85079) 2025-05-01 06:46:15 +10:00
9f894b81c2 ensure predictable permissions on module artifacts (#84948)
and test it!
2025-04-30 10:09:06 -04:00
cff49a62ec dnf5: avoid generating excessive history entries (#85065)
Fixes #85046
2025-04-29 16:51:22 +02:00
dbf131c07d async_status: fix example to use finished test (#85066)
Fixes #85048
2025-04-29 08:52:57 -05:00
0aa8afbaf4 ansible-test - Use -t for container stop timeout (#85019) 2025-04-28 21:06:12 -07:00
aab732cb82 show internal but not hidden config options, while still hiding test options (#84997) 2025-04-24 12:48:12 -04:00
8ab342f8cc These actions do not support until (#84847) 2025-04-24 09:50:13 -04:00
03181ac87b Implement TaskResult backward compatibility for callbacks (#85039)
* Implement TaskResult backward compatibility for callbacks
* general API cleanup
* misc deprecations

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

* fix v2_on_any deprecation exclusion for base

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2025-04-24 00:59:46 +00:00
2033993d89 restore parsing/utils/jsonify.py (#85032) 2025-04-22 19:31:45 +00:00
1daa8412d5 comment: raise an exception when an invalid option is provided (#84984)
Co-authored-by: Matt Clay <matt@mystile.com>
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-04-18 20:40:28 -07:00
2cbb721f6f normalize error handler choices (#84998)
use existing to avoid deprecation cycle
normalize test too
2025-04-18 16:06:17 -04:00
e6dc17cda4 Increase galaxy test publish timeout (#85016) 2025-04-18 17:14:22 +00:00
5f6aef95ac Fix test_range_templating on 32-bit architectures (#85007)
* Fix test_range_templating on 32-bit architectures

32-bit archtectures like i386, armel, armhf will fail with the error

ansible._internal._templating._errors.AnsibleTemplatePluginRuntimeError: The
filter plugin 'ansible.builtin.random' failed: Python int too large to convert
to C ssize_t

So just pick sys.maxsize (2**31 - 1) so it works on 32 bit machines.

---------

Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
Co-authored-by: Matt Clay <matt@mystile.com>
2025-04-17 17:56:01 -07:00
1b6b910439 Miscellaneous fixes (#85012)
* Add help_text to play_hosts deprecation

* clean up TaskResult type handling
2025-04-17 15:14:01 -07:00
f7d03474a5 Disable retries on ansible-galaxy-collection (#85013) 2025-04-17 21:55:21 +00:00
93e6f012cb Remove unused local function _get_plugin_vars from vars manager (#85008) 2025-04-17 15:16:30 -04:00
6cc97447aa Miscellaneous DT fixes (#84991)
* Use `_UNSET` instead of allowing `ellipsis`

* Fix deprecation warning pre-check

* Deprecation warnings from modules can now be disabled.
* Deprecation warnings from modules get the "can be disabled" notice.

* Include help text in pre-display fatal errors

* Simplify lookup warning/debug messaging

* Fix return type of `timedout` test plugin

* Use `object` for `_UNSET`

* Remove obsolete `convert_data` tests

* Remove unnecessary template from test

* Improve legacy YAML objects backward compat

* Fix templar backward compat for None overrides
2025-04-15 21:45:28 +00:00
e094d48b1b Disable parallel publish in galaxy test (#85000) 2025-04-15 13:26:59 -07:00
500a4aba08 filter_core integration test - remove Python 2.6 related dead code (#84985)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-04-15 11:23:30 -04:00
4868effc71 get_bin_path('ssh-agent'): required is deprecated (#84995) 2025-04-15 16:30:29 +02:00
352d8ec33a ansible-doc: fix indent and line wrapping for first line of (sub-)option and (sub-)return value descriptions (#84690)
* Fix initial indent for descriptions of suboptions.
* Fix line width for initial line of option descriptions.
2025-04-14 16:38:21 -04:00
9ddfe9db39 Convert DT issue template to pre-release template (#84982) 2025-04-14 09:36:10 -07:00
35750ed321 Templating overhaul, implement Data Tagging (#84621)
Co-authored-by: Matt Davis <mrd@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2025-04-14 08:54:36 -07:00
6fc592df9b Fix uninstall tests (#84973)
match file name to package_manager detection of dnf5
2025-04-11 18:55:08 -04:00
3d30e05bb4 ansible-test - Improve runme.sh error handling (#84972) 2025-04-11 20:56:34 +00:00
c54ff7de41 Filter: add support for URL-safe encoding/decoding in b64* (#84949)
* Added support for URL-safe decoding into b64decode
* Added support for URL-safe encoding into b64encode

Fixes: #84147

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-04-11 09:08:02 -07:00
244c2f06ed Add ssh-agent launching, and ssh-agent python client (#84754)
* Add ssh-agent launching, and ssh-agent python client

* Move things around, is this better??

* docs

* postpone creating dir after bin lookup

* fix method name

* changelog ssh agent

* address reviews

* fix typing

* do not redefine public_key

* typing

* more typing

* Catch OSError when starting ssh agent

* likely copy pasted old code

* var type fix

* why is this needed?

ci_complete

* ignoring the change for now

* write out pub key file atomically

* defensive timeout for the socket

* _populate_agent docstring

* do not allow setting these in config

* check expected length before slicing blobs

* test all key types

* remove lock/unlock functionality

* docstring

* private _ssh_agent

* .

* launch agent in cli and ansible_ssh_*

* additional info for ssh-agent comment

* Add tests for remove and remove_all

* comment on os.rename

* hopefully mitigate agent startup/delays problems

* exceptions

* unused import

* fix sanity

* perf

---------

Co-authored-by: Matt Martz <matt@sivel.net>
2025-04-10 15:30:34 -07:00
fcdf0b80b3 git: Document security risk involved in embedding user creds (#84963)
* Provide warning to user about the potential risk involved in
  embedding username and password in git URL while checking out the source.

Fixes: #84557

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-04-10 15:15:42 -04:00
82e4b469f6 respawn: Update ENV dict copy with PYTHONPATH value (#84962)
* Use shallow copy of os.environ to update PYTHONPATH value
  instead of using '|' operator

Fixes: #84954

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-04-10 15:14:24 -04:00
4bc4030988 ansible-pull fix adhoc output inconsistencies on changed (#84869)
Two fixes for single bug:
  - ignore callback changes for adhoc
  - allow 'yaml' change matching
---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-04-10 14:56:52 -04:00
fd76cc2821 Revert "basic: remember the user sensitive information to use later (#84699)" (#84959)
This reverts commit 19e9f3dae2.
2025-04-10 11:19:11 -05:00
16db3fe6c9 fix typo (#84955) 2025-04-10 15:54:40 +00:00
5347d4d4fc distro: detect debian for OS_FAMILY for LMDE 6 (#84941)
Fixes: #84934

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-04-09 16:22:20 -04:00
8b0c4825ae Pin wheel to resolve build issues (#84943) 2025-04-08 22:31:23 -07:00
72909599f6 pipelining fxies (#78111)
Moved check to connection as it should be the final decider
Added property to become plugins to indicate support
Also removed hardcoded su exception
Added tty detection logic for ssh (pipelining won't work if tty is needed or forced)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2025-04-08 15:53:38 -04:00
a01e58cae3 Support prompt matching with ssh_askpass (#84927) 2025-04-08 10:18:18 -05:00
19e9f3dae2 basic: remember the user sensitive information to use later (#84699)
* Git allows embedding username and password in repo URL for
  https authentication. This may lead to exposing the user sensitive
  information to logs and unautheticated users.
  Adding no_log will partially solve this.
* Added documentation warning user about URL embedded with username
  and password.
* Added logic to remember user sensitive information for later sanitization

Fixes: #84557

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-04-08 09:53:36 -05:00
6a274d8456 Handle forwarded exceptions from dnf5-5.2.13 (#84933) 2025-04-08 09:35:32 -05:00
462affa7c4 Clean up interpreter discovery (#84394)
* Clean up interpreter discovery

- Deprecated `auto_legacy` and `auto_legacy_silent`
- Removed obsolete platform fallback config and logic
- Replaced unit tests with integration tests
- Increased test coverage
2025-04-03 18:07:36 +00:00
b7d76a93b2 Fix up coverage with async on Windows (#84917)
Fixes the coverage collection for Windows and async tasks. This ensures
the async task still has access to the PSHost so that it can access the
runspace debugger tasks on the host.
2025-04-03 12:56:51 +10:00
390e112822 Support download_url without a scheme:host (#84767)
* Support download_url without a scheme:host. Fixes #84213

* Support properly rebuilding pagination links. #84765

* Don't permit non absolute pagination links

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2025-04-02 20:21:41 +00:00
183c695be1 Fix errant warning about client_secret and access_token (#84916) 2025-04-02 10:34:09 -05:00
399d2841c8 Add fallible 2025.4.1 to issue template (#84915) 2025-04-01 23:25:59 +00:00
2a4b1c8248 ansible-config: Dump galaxy server config in proper JSON format (#84912)
Fixes: #84840

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-04-01 11:36:15 -04:00
7d0886457a Windows Exec Runner Update (#84868)
Updates the Windows exec runner in preparation for the WDAC changes.
This new process is designed to improve the way modules are run by
Windows and expose common functionality to run PowerShell code in a
common environment. It also includes futher changes to improve the error
handling to make it easier to see where an error occurred in the running
code.
2025-04-01 11:24:35 +10:00
b3d21e3ad2 Fix apt and dpkg_selections tests (#84900)
* Fix apt and dpkg_selections tests

The tests now support aarch64.
They also have reduced dependencies on URLs hosted on third-party servers.

* Skip tests on unsupported platforms

* Use same package version for both tests

* Fix multi-arch support for Ubuntu 22.04
2025-03-27 09:05:25 -07:00
87422526f5 Expand tests for apt_repository (#84904) 2025-03-27 04:52:24 +00:00
b9e35d66c4 Fix markup for config variable reference. (#84901) 2025-03-26 16:28:31 -04:00
3607f01521 Improve vault filter documentation with clearer examples (#84896)
Fixes: #83583

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-03-26 02:14:48 +00:00
e66aaa66a5 Improve performance of including tasks into the play (#84445)
* Improve performance of including tasks into the play

PlayIterator.add_tasks is used to insert tasks from an include into the
play for particular host. It makes a copy of the current block including
the tasks within the block and inserts the new tasks from the include
into the copied block. But there is no need to make copies of tasks
within the block, what we want is a "shallow" copy of the block. This
PR changes that to copy the block excluding the tasks within.

On a contrived playbook with 50 include_role tasks, each role has 1 task,
running on 10 hosts the running time is reduced from ~55s to ~44s in my
environment.

ci_complete

* Add changelog
2025-03-24 09:39:17 -05:00
5280850130 find: skip ENOENT while enumerating files (#84877)
* skip 'no such file or directory' error code while files and
  directories and report them.

Fixes: #84873

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-03-24 07:37:01 -07:00
1e5aac7b4f Set IPv4 and IPv6 simultaneously (#84829) 2025-03-21 16:19:58 -04:00
e53c12fe2b ansible-test - Update base/default containers (#84874) 2025-03-20 13:25:55 -07:00
3690819ee8 Fix wait_for examples (#84870)
connection: local is wrong as configured remote python does not always match controller
missing the timeout to wait 300s before error
2025-03-20 16:03:26 -04:00
f4aafe1a94 ansible-test - Update pylint requirement (#84872) 2025-03-20 17:18:03 +00:00
35665db4ed Miscellaneous integration test fixes (#84871) 2025-03-20 16:48:02 +00:00
091994a477 ansible-test - Update sanity test requirements (#84866) 2025-03-20 01:21:56 +00:00
b7a5411d8b ansible-test - Improve pep8 compat with black (#84867) 2025-03-20 01:17:01 +00:00
7e7946b60d Require Jinja2 3.1.0 or later (#84864) 2025-03-20 00:21:26 +00:00
ad5cf37625 Add typing_extensions for core unit tests on <3.11 (#84865) 2025-03-20 00:00:07 +00:00
0d4f00f5c8 needed intesect, not difference (#84839)
fixes #84750

Added tests to verify output when using smart + others
2025-03-19 10:41:30 -04:00
61a6222e0e uri: form location correctly from relative redirect (#84541)
* uri: form location correctly from relative redirect

Previously, the original URL would be combined with the relative location incorrectly, especially for URL of any complexity.

Add simple tests demonstrating the problem that fail without the fix

* fix pylint error, import the method similar to other uri methods

* add changelog fragment

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-03-18 15:54:48 -04:00
101e2eb19a windows async - refactor async wrapper code (#84712)
Refactor the async wrapper and watchdog scripts for Windows. This
attempts to avoid WMI on connection plugins that allow breaking away
from a job like winrm and ssh as an optimisation and changes how WMI is
used so that we can get the error details on a failed process more
easily.

These changes are being made also in preparation for the WDAC
implementation that requires this new execution model where input needs
to be provided through stdin.
2025-03-19 04:47:32 +10:00
611d8bdde3 doc-build: fix doc builds (#84852)
Fixes: #84849

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-03-18 16:20:50 +01:00
ac43e40904 darwin: simplify the fact code (#84848)
* Follow up for code review on #84779

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-03-18 14:21:30 +00:00
8127abbc29 Don't inherit stdio (#82770) 2025-03-17 10:08:11 -05:00
3684b4824d Remove reliance on sshpass and utilize SSH_ASKPASS (#83936)
* Add SSH_ASKPASS as an alternative means to provide ssh with passwords
2025-03-17 10:07:44 -05:00
2e7e5b65e7 🧪 Drop venv when making coverage XML @ CI
This deletes the fallback that would use `--venv` when `--docker` is
unavailable in `ansible-test`. But this option is present in all
supported versions of Ansible as it was added in v2.12 which is EOL
already.

PR #84819
2025-03-13 12:24:37 +01:00
9821a4de2f pipe/lines: simplify explanation for need for quotes (#84816)
* do not mention subprocess.Popen, it is an implementation detail
* use "shell injection vulnerability" to describe the problem that is
  well-known, or easily searched for on $search_engine and do not link
  to a 3rd-party site that is also specific to a tool for Python
2025-03-12 17:04:31 +01:00
4efb01c2f3 ansible-test - Replace FreeBSD 13.4 with 13.5 (#84812) 2025-03-11 15:21:38 -07:00
f11dfa7cce dnf5: use new pkg_gpgcheck option, fallback to deprecated one (#84791) 2025-03-11 18:11:57 +01:00
44966cb8e2 Update Fallible issue template (#84808) 2025-03-11 16:32:17 +00:00
df08ed3ef3 🔥 Remove Python 2 datetime compat fallbacks
This patch marks the `ansible.module_utils.compat.datetime` module as deprecated, including `UTC`, `utcfromtimestamp()`  and `utcnow` shims that it provides, scheduling its removal for v2.21.

It also replaces any uses of the compatibility helpers with non-deprecated calls to CPython stdlib.

PR #81874

Co-authored-by: Matt Clay <matt@mystile.com>
2025-03-11 17:19:40 +01:00
50b4e0d279 facts: use pagesize for darwin (#84779)
Fixes: #84773

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-03-11 15:40:46 +00:00
fc71a5befd Added Popen warning to lines.py documentation (#84806) 2025-03-11 16:38:13 +01:00
7fbaf6cfcf dnf5: fix is_installed check for provided packages (#84802)
Fixes #84578
2025-03-11 16:27:13 +01:00
7e0d8398ff Implement an informative reporter for resolvelib
Prior to this change, when the dependency resolver started looping over multiple versions of the same collection due to backtracking, it might take a lot of time to consider and disregard tens or hundreds of versions. But to the end-user, it looks like “nothing is happening, the program is *stuck*”. Even worse if such a time-consuming backtracking hits multiple collections and it “hangs” for longer cumulative period of time.

This patch improves the perceived responsiveness by printing out informational messages with the current status whenever the backtracking for a collection happens for the first, the eighth and the thirteenth times. The last message also reminds them that they can interrupt the process and attempt to adjust the constraints.

In debug mode, it also shows what caused conflicts leading up to candidate rejections. But this is only available with `resolvelib >= 0.9.0`.

The improvement is heavily inspired by https://github.com/pypa/pip/commit/9731131.

PR #81709

Co-Authored-By: Jordan Borean <jborean93@gmail.com>
2025-03-10 12:57:09 +01:00
09391f38f0 dnf tests: unique environment/group name (#84785)
Prevents `Group state for \"customenvgroup\" not found` error which may
or may not be a regression in dnf5. Just name groups/envs uniquely to
workaround the issue.
2025-03-06 11:28:19 +01:00
c02ad3516f Adjust fallible issue template (#84776)
This should provide missing details the bot is looking for.
2025-03-04 23:16:45 -08:00
532e3ea3ec test: error handling in include_role (#84737)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-03-04 15:17:01 +00:00
9bed0413ec Deprecate the paramiko connection plugin. Fixes #83757 (#84727) 2025-03-04 09:05:28 -06:00
00067f1d2e Limit respawn to supported python versions (#83662)
* Limit respawn to supported python versions
2025-03-04 08:43:39 -06:00
96a8c04207 Add issue template for Fallible Data Tagging (#84766) 2025-03-03 11:47:58 -08:00
9ef623a517 Integration test cleanup (#84763)
This brings in integration test fixes from the data tagging PR which are unrelated to DT changes.
2025-03-01 03:11:46 +00:00
650ee5abf8 core: update b64encode and b64decode doc (#84757) 2025-02-28 17:37:38 +01:00
4a710587dd 🧪 Add macOS 15.3 to CI and ansible-test (#84665) 2025-02-25 18:55:03 +01:00
5ff8d093f0 ansible-test - Code style cleanup (#84749)
* ansible-test - Minor style cleanup (add blank lines)

* ansible-test - Use `"""` instead of `'''`
2025-02-25 04:47:45 +00:00
e9e6001263 winrm - Remove pexpect kinit code (#84735)
Removes the use of pexpect in the winrm connection plugin and rely on
just subprocess. In the past pexpect was used for macOS compatibility so
that it could handle the TTY prompt but after testing it seems like
subprocess with `start_new_session=True` is enough to get it reading
from stdin on all platforms. This simplifies the code as there's no
longer an optional library changing how things are called and will work
out of the box.
2025-02-25 04:59:04 +10:00
bddb9a7490 ansible-test - Support target testing with black (#84744) 2025-02-24 17:09:38 +00:00
989e583356 ansible-test - Initial support for black in core (#84741) 2025-02-24 08:39:59 +00:00
2a3c93f593 Deprecate strategy plugins (#84728)
* Deprecate strategy plugins. Fixes #84725
2025-02-19 14:28:55 -06:00
e5ec1ee76c Windows - Support WDAC Audit Mode (#84730)
Fix up bug when attempting to run any module on a Windows host that has
been configured with WDAC and Dynamic Code Security in audit mode. This
does not enable WDAC support with signed scripts so Ansible will still
not pass the audit events but it no longer fails to run.
2025-02-20 05:13:29 +10:00
a742e20fca ansible-test validate-modules - fix ps util checks (#84610)
* ansible-test validate-modules - fix ps util checks

Fix the module util import checks done by `ansible-test sanity --test
validate-modules` to support the newer `#AnsibleRequires` import
statement and `-Optional` flag.

* Fix sanity issues
2025-02-19 07:42:22 +10:00
d21788a9b4 Fix integration tests on debian (#84379)
* Simplify conditional for service_facts integration test

This test requires systemd, so just test for that. Also fixes running this on
Debian testing/unstable releases, where ansible_distribution_version is "n/a".

* Clean up after service_facts integration test

* Simplify set_fact in interpreter_discovery_python test

Those vars are always set, either to something discovered, or "n/a". There are
no evaluations against the value "unknown".

* interpreter_discovery_python: Fix Debian test

Debian doesn't set VERSION_ID in /etc/os-release on pre-releases, see
https://bugs.debian.org/1008735

ansible 2.17 onwards does not support python 2.7 anyway.

* fix deb822_repository integration test failure on Debian

* Fix integration test hostname for Debian

* Fix integration test mount_facts

Some VMs might only have a single mount point, so they only have a single UUID.

* Add package deps for integration test subversion

/usr/bin/htpasswd is shipped in apache2-utils and needed by the main playbook.

* Fix integration test "service" on Debian sid

Debian sid does not set ansible_distribution_version, as such any tests assuming
it's a numeric value will fail. Since this is ancient test code that predates
ansible_service_mgr, remove the error-prone heuristic and rely on that var
instead.

* Fix service integration tests not running on *BSD

---------

Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
2025-02-18 13:33:24 -08:00
7a091bf486 Ensure implicit flush_handlers have a parent block (#84709)
* Ensure implicit flush_handlers have a parent block

To avoid getting tracebacks when calling methods like ``get_play()`` on
them.

* task needs to be copied

* copy only when necessary
2025-02-18 08:42:36 -06:00
55e9e21ded better error message for malformed documentation (#84705)
No the file name that caused the error will be apparent
---------

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-02-17 16:12:14 -05:00
cc30f25c42 Make timeout on become an unreachable error (#84589)
* Make timeout on become an unreachable error

Fixes #84468
2025-02-17 08:49:50 -06:00
478806e668 Minor typo fixes (#84714)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-02-14 16:47:18 -05:00
5d7b8288f8 Fix local connection and become issues (#84700)
* Fixed various become-related issues in `local` connection plugin.
* Fixed various issues in `sudo` and `su` become plugins.
* Added unit and integration test coverage.

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Davis <nitzmahone@redhat.com>
2025-02-13 09:17:57 -08:00
a4d4315d37 non-confrontational by default (#84707) 2025-02-12 09:40:36 -06:00
ea2fe793aa Extend description for meta refresh_inventory (#84691)
* Link to amazon.aws.aws_ec2 inventory plugin.

* Mention that refresh_inventory does not update the selected hosts for a play.

* Address comments by bcoca.

* Apply suggestions from code review

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-02-11 12:00:42 -08:00
fd30ba8ce0 clarify check_mode (#84703)
fixes #84701
2025-02-11 16:54:06 +00:00
b27b8068f9 re: maxsplit is now keyword argument (#84702)
* Passing maxsplit and flags as positional arguments is deprecated in
  3.13.

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-02-11 10:45:02 -05:00
21492e27fa Add openSUSE MicroOS to SUSE family list (#84685)
* Add openSUSE MicroOS to SUSE family list

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-02-11 10:27:10 -05:00
411b7985a5 test: Enable group tests for Alpine (#84652)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-02-11 10:10:08 -05:00
d0110ff691 test: enable user test for alpine (#84644)
* test: enable user test for alpine

* Disable user home update tests

* Disable some more tests which are not applicable for Alpine

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-02-11 10:09:29 -05:00
d049e7b1b3 fix broken ansible-galaxy-collection resolvelib test (#84626) 2025-02-11 10:03:58 -05:00
a086c34a91 linear - don't treat end_role as a run_once task (#84673) 2025-02-11 08:54:39 -06:00
8d65900974 template: update links to docs (#84689)
Changed the URL to Jinja project
2025-02-10 07:43:49 -08:00
cdb1ce000a Fix is_pinned property of Requirement (#81812)
Previously, requirement version specs starting with `!=` were
incorrectly considered as pinned release requests because the
comparison was being made against a one-char string while the
operator is two-char. This patch changes the check to test against `!`
which is enough to detect this case.
2025-02-08 00:01:23 +01:00
333ee8d010 Test include_vars reserved variable matching (#84678)
* Add test case for include_vars

* Revise test to catch erroneous warnings
2025-02-07 16:15:59 -05:00
ee49adfaf4 🧪🔥 Delete the egg-info integration test (#84686)
Previously, the integration test depended on luck. `setuptools` used
to be bundled in Python stdlib's `ensurepip`. Python 3.12 and newer no
longer include it. This test imports `pkg_resources` that is a part of
`setuptools`, meaning that it'll run out of luck at some point, under
newer Python runtimes.

This test does not seem to be useful to us so instead of fixing it, we
remove it from the repo [[1]].

Supersedes #84681.

[1]: https://github.com/ansible/ansible/pull/84681#discussion_r1945525317
2025-02-07 19:43:29 +01:00
6724e076dd Fix 1GB example in human_to_bytes.yml
Fixed an incorrect example, where the expected output given had evidently been copied from an earlier example accidentally.

PR #84684
2025-02-07 18:30:23 +01:00
f3ccd78cce ansible-test - Update base/default containers (#84670) 2025-02-05 02:09:06 +00:00
cd881bf71e ansible-test - Add pytest-mock to mypy sanity test (#84669) 2025-02-05 00:58:48 +00:00
7594243fc0 ansible-test - Update sanity test requirements (#84667) 2025-02-04 15:03:34 -08:00
21bc1d915d ansible-test - Fix warning message grammar (#84666) 2025-02-04 19:58:21 +00:00
4b38456e4f ansible-test - Correct CLI arg type and annotation (#84664) 2025-02-04 17:53:14 +00:00
4cc47307ef Use separate venvs for each release command (#84641)
This avoids requirements conflicts between different commands invoked by the release tool.
2025-01-30 08:31:36 -08:00
a6b5861c53 add lightweight core issue template for bot-ignored issues (#84638) 2025-01-29 18:18:48 -08:00
48d71ba3aa [fix] warn_if_reserved expects a list (#84624)
Fixes #84623
2025-01-28 18:46:10 +00:00
8290912eb1 service_facts: skip unwanted lines in openrc output (#84622)
* rc-status commands returns unwanted lines with service names
  and their status. Skip such lines while parsing service names

Fixes: #84512

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-28 16:19:46 +01:00
6db6d1967e connection: raise exception return by SSH (#84592)
Fixes: #58133

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-28 16:05:37 +01:00
ce392dd86e Revert "generator: add support for extra vars usage (#84544)" (#84619)
This reverts commit 186c716af1.
2025-01-27 17:59:29 -08:00
e6adddcaf8 debug: hide loop variables while using var (#84597)
Fixes: #65856

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-23 15:00:32 -08:00
03d6209862 apt_key: fix module names in docs (#84588)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-22 08:46:04 -06:00
c9097f73a2 uri: Handle HTTP exception raised (#84015)
* Handle HTTP exceptions raised when reading the content
  such as IncompleteRead

Fixes: #83794

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-21 21:39:28 +00:00
186c716af1 generator: add support for extra vars usage (#84544)
* generator: add support for extra vars usage

Fixes: #83270

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* CI green

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Review requests

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Review requests II

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-21 15:20:51 -05:00
4953fc7b26 Apt key bye (#84555)
* apt-key module updates due to debian removal

Still kept for now for backwards compat, but removing from testing when not present
And adding more explicit mesasges to errors to point to new module

* added docs and error msg

* clog

* aslkdfj

* no docs to document doc changes

* also add warning to apt_repository

* clog on apt_repo too

* fix string concat

* Apply suggestions from code review

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-21 14:45:38 -05:00
689c047e3a Update win_dirname and win_basename docs (#84587)
* Updated docs and examples for win_dirname and win_basename for UNC path

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-21 09:57:14 -08:00
b51ec9412e cache: deprecated API first_order_merge (#84568)
* deprecated legacy method first_order_merge

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-21 09:33:22 -08:00
df7e1befb4 stdout callback first comment (#84533)
so we know its a rule, not just implementation accident
2025-01-21 11:02:03 -05:00
3b6d086f5e targets/handlers: fix incorrect test cmd (#84567) 2025-01-21 10:38:03 -05:00
8c5e33cd3a Ansible.Basic - Fix required_if check (#84562)
Fixes the Ansible.Basic `required_if` check when the option to check is
either unset or explicitly set to null.
2025-01-21 05:00:03 +10:00
f86c58e2d2 ssh - Improve CLIXML stderr parsing (#84569)
Improves the logic for parsing CLIXML values in the stderr returned by
SSH. This fixes encoding problems by having a fallback in case the
output is not valid UTF-8. It also can now extract embedded CLIXML
sequences in all of stderr rather than just at the start.
2025-01-21 04:42:12 +10:00
3398c102b5 reserved vars, avoid gather_subset (#84575) 2025-01-17 21:33:25 -05:00
675d7201d8 fix template (#84563)
also fix gather_subset warning and add some comments/notes
---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-16 16:33:43 -05:00
35a712588e filters/flatten: fix input documentation (#84477)
Flatten input is a list, not a dictionary.
2025-01-15 14:26:29 -05:00
ad93b96750 host_group_vars - remove unnecessary os.path.join cache (#84549) 2025-01-14 14:55:33 -05:00
3030c79331 user: Fix homedir permissions when UMASK is unset in /etc/login.defs
When a user doesn't exist and user module is used to create the user and the
homedir, adduser is called which parses HOME_MODE from /etc/login.defs, and when
not set calculates the mode from UMASK from the same file.

When a user already exists without homedir, and the user module is used to add a
home dir, it incorrectly ignores HOME_MODE, resulting in a world-readable home
dir when UMASK is not set. This is for example the case in Debian trixie and
later, and likely Ubuntu 25.04 and later.


Signed-off-by: Lee Garrett <lgarrett@rocketjump.eu>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-14 11:44:16 -08:00
5623a386c1 Fix unit and integration tests (#84554)
This is a follow-up to https://github.com/ansible/ansible/pull/84473
2025-01-14 09:27:39 -08:00
7677bf1c9b ansible-test - Use urllib intead of curl (#84551)
Also added automatic retries on HTTP request exceptions, since all currently implemented methods (GET/PUT/DELETE) are idempotent.
2025-01-14 08:59:42 -08:00
a046ef5a95 fix incongruent ansible-vault cli options (#84494)
prompt now only errors if stdin is specifically triggered and not due to lack of other args

fixes #84489
---------

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2025-01-14 10:46:52 -05:00
73180c0630 ansible-vault integration test fix (fixes: #83837) (#84486)
Correct the test that expects an error when using ansible-vault to write against
a non-writeable dir. Skip the test as root, as root can always write.

Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
2025-01-14 15:46:31 +00:00
5b0d170496 get_url: add support for BSD-style digest (#84485)
* Added support for BSD-style digest file to test
  checksum of downloaded file.

Fixes: #84476

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-14 15:44:29 +00:00
f727d74fc2 Allows iptables chain creation with wait parameter (#84491)
* Allows iptables chain creation with wait parameter

Fixes #84490

* Add the changelog fragment for 84490
2025-01-14 10:43:08 -05:00
8588401387 User: Update prompt for SSH key passphrase prompt (#84521)
* update prompt for SSH key passphrase prompt
* introduce timeout in SSH key passphrase interaction

Fixes: #84484

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-14 10:35:31 -05:00
d79b706c06 fix[doc.py]: path will be undefined (#84464)
* fix[doc.py]: path will be undefined and a direct reference will throw an UnboundLocalError.

If none of the files in files exists, path will be undefined and a direct reference will throw an UnboundLocalError.
Repair function file parameter type annotation is inaccurate

* Update changelogs/fragments/fix-cli-doc-path_undefined.yaml

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>

---------

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2025-01-14 15:33:43 +00:00
e151cd765d with_dict type error include value in error message (#84473)
* with_dict better error message

* include type in error message

* changelog fragment

* Update lib/ansible/plugins/lookup/dict.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* specific wording

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-14 10:21:56 -05:00
4c30e8b6cf .github: simplify PR templates (#84536)
It is rare that we need to provide information like "before and after
the change". In majority of cases we just ignore "Additional
information" when submitting PRs. We can just put the needed information
into the summary if needed and remove the section from the template,
simplifying it.
2025-01-14 15:04:43 +01:00
ae55f874a0 Enforce FQCNs in seealso plugin/module entries. (#84325) 2025-01-13 17:24:09 -05:00
508c4dc93e Update ticketing stubs (#84535)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-13 12:04:50 -08:00
60e2135c2b Bump acme test container to 2.3.0 (#84547) 2025-01-13 11:24:56 -08:00
40d364985d host_group_vars - fix Python API traceback caused by undefined 'key' variable (#84488)
Fixes:

Traceback (most recent call last):
  File "/home/shertel/ansible/lib/ansible/plugins/vars/host_group_vars.py", line 139, in get_vars
    FOUND[key] = found_files = loader.find_vars_files(opath, entity_name)
          ^^^
UnboundLocalError: cannot access local variable 'key' where it is not associated with a value

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/shertel/ansible/lib/ansible/plugins/vars/host_group_vars.py", line 151, in get_vars
    raise AnsibleParserError(to_native(e))
ansible.errors.AnsibleParserError: cannot access local variable 'key' where it is not associated with a value
2025-01-13 11:51:49 -05:00
eb475e23f7 ansible-test - Update utility containers (#84545) 2025-01-11 01:09:48 +00:00
20baf29a2a fix warnings about reserved variable names to cover all sources (#84432)
Also remove redundant check from tqm
Now covers module output (set_fact/include_vars)
Includes play objects at any stage (tasks that error were not covered)
Added tests, moved them to role structure
2025-01-10 18:03:18 +00:00
96f7090acc Use ECR Public for container test (#84537) 2025-01-09 21:16:01 -08:00
477433c5ba constructed, let users know some limitations (#84510)
* constructed, let users know some limitations

reasons https://forum.ansible.com/t/debugging-constructed-inventory-constructing-group-from-values-of-host-variables/39443

* fix indent

* Update lib/ansible/plugins/doc_fragments/constructed.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* updated as per fb

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-09 16:18:23 -05:00
64cbb71e6e FIX get_options function for CallbackBase (#84496) 2025-01-08 11:26:42 -05:00
ed250ecd0a 📝 Update the outdated WGs+community links in GH issues (#84523)
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2025-01-08 13:07:04 +00:00
ecadbc6354 📝 Drop drop-down default note from issue forms (#84524)
Co-authored-by: flowerysong <junk+github@flowerysong.com>
2025-01-08 14:00:26 +01:00
3b77277428 ansible-test - Fix FreeBSD instance CA certs (#84529)
Some versions and architectures come with `ca_root_nss` pre-installed.
However, at least FreeBSD 13.4 on aarch64 does not.
This change ensures the certificates will always be installed.
2025-01-07 19:17:35 -08:00
1b3face065 ansible-test - Replace FreeBSD 14.1 with 14.2 (#84527)
* ansible-test - Replace FreeBSD 14.1 with 14.2

* Remove cron faketime testing from FreeBSD
2025-01-07 17:15:27 -08:00
f552fe2c15 ansible-test - Replace RHEL 9.4 with 9.5 (#84526) 2025-01-07 15:11:33 -08:00
35c4b58c11 ansible-test - Replace Alpine 3.20 with 3.21 (#84525) 2025-01-07 14:37:35 -08:00
648dcd3a6a ansible-test - Replace Fedora 40 with 41 (#84281)
* ansible-test - Replace Fedora 40 with 41

Also update other distro containers to remove unnecessary packages:

* apache2
* subversion
* ruby

* Fix subversion test on Ubuntu

Also remove obsolete vars files from subversion test.

* Skip dnf test on Fedora 41+

The dnf5 test is all that is needed.

* Support dnf5 for the package test

* Extend unix-chkpwd work-around for Fedora
2025-01-07 13:46:48 -08:00
3a33d8a4c1 Add Keycloak service account auth capability to ansible-galaxy (#83145) 2025-01-07 12:02:22 -06:00
91f4b71d40 Fix uri integration test on Python 3.13 (#84518) 2025-01-06 17:50:34 -08:00
eb6d581286 ansible-test - Update nios-test-container to 7.0.0 (#84517) 2025-01-06 15:59:58 -08:00
5ec236b564 Fix result_pickle_error integration test (#84506)
The test has been updated to use a custom type which does not support pickling,
instead of relying on Jinja's `Undefined` type. As of Jinja 3.1.5 that type now
supports pickle, which breaks the original implementation of the test.
2025-01-02 19:59:16 -08:00
f72aa1dc0c test: Update regex for required and default in FieldAttributes (#84209)
Fixes: #61460

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-03 02:14:56 +00:00
db44fc58ec Added docstrings to V2 methods in the CallbackBase Class (4 & 5 of 27) (#83507)
* Added docstrings to V2 methods in the CallbackBase Class (4 & 5 of 27)

* Made corrections as requested by webknjaz.

* Cleaned up whitespace issues.

* Corrections to customization note for review by webknjaz.

* Added rtype to return in docstrings.

* Simplified docstrings.


Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
2024-12-30 21:58:10 +01:00
cae4f90b21 Add documentation for non-numeric cron scheduling values (#84396)
- Document vixie cron compatible non-numeric values
- State which parameters cannot be used together with special_time
2024-12-17 12:48:58 -05:00
c64c389007 gather_facts, fix 'smart' handling with network os and 'setup' (#84425)
gather_facts, fix network_os and smart logic and defaults

setup will be default for smart only if network_os is not set, now you get warnings and errors when missing a valid facts module for a network os

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-12-17 10:19:43 -05:00
01ca9b1d0e uri: move follow_redirects to module_utils (#84442)
* url lookup and uri module shares follow_redirects parameter,
  moving it module_utils code.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-12-10 08:08:24 -08:00
106909db8b adding option for form-multipart data to switch multipart encoding (#80566)
* adding option for form-multipart data to switch multipart encoding from default base64 to 7or8bit encoding

Co-authored-by: davlas <david.lassig@bwi.de>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2024-12-10 07:54:23 -08:00
3fffddc183 Added None/empty notes to regex_search (#84437) 2024-12-10 07:51:49 -08:00
73d8f4ad46 Make sure we are always using Lock from our multiprocessing context (#84453)
* Make sure we are always using Lock from our multiprocessing context

* add clog frag
2024-12-10 10:38:57 -05:00
563906687b Fix a debug message error (#84426) 2024-12-10 10:13:22 -05:00
3c91eab0d8 copy, prevent internal options in task (#84422)
* copy, prevent internal options in task

fixes #84367
2024-12-10 10:07:12 -05:00
f0f5d7f88b simplify copy module (#84313)
* simplify redundancy with AnsibleModule set_*_if_different methods

* simplify copying a source directory to a dest directory without modifying behavior
2024-12-10 09:09:15 -05:00
363c57b311 csvfile - let the config system do the typecasting (#82263)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-12-06 16:15:17 +00:00
ac110eb012 lookup_template: added trim_blocks option (#84254)
* Allow user to control the trimming of blocks while templating
* Added tests
* Updated documentation and example

Fixes: #75962

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-12-06 15:44:08 +00:00
0f466bb75f test: Remove dead code (#84436)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-12-05 14:52:12 -08:00
d500354798 unarchive: Clamp zip timestamps on 32-bit time_t (#84409)
Clamp zip timestamps to representible values when unpacking zip files on
platforms that use 32-bit time_t (e.g.  Debian i386). This is a
non-issue in practice (in 2024), but should allow the test suite to pass
on Debian i386.

We use a round value of 2038-01-01 00:00:00 for simplicity, and to avoid
running into timezone offsets closer to the actual limit.

MR #81520 introduced sanity-checking tests that used dates not
representable with a 32-bit time_t.
2024-12-05 17:26:58 -05:00
af2bb2c182 wait_for_connection - test connection=local does not emit warning (#84438)
Add test for PR 84421
2024-12-05 17:24:48 -05:00
59d9737788 fix reset_connection with templated connection variables (#84240)
* ssh: Test reset_connection with templated ansible_ssh_executable

Add failing test to confirm subsequent fixes are necessary & sufficient.

* ssh: Fix reset_connection with templated ansible_ssh_executable

Signed-off-by: Alex Willmer <alex@moreati.org.uk>
2024-12-05 15:54:46 -05:00
Fil
eed6d48046 Fix failed_when string in the second ansible.builtin.uri example (#84382)
Open the double quotes at the beginning of the entire `failed_when` value.

Individual conditions work well, yet fail each time they are combined with a logic `or` (as per the example).

Double quoting the entire string solved the problem.
2024-12-05 20:20:27 +00:00
e2b454f4e3 wait_for_connection: fix errant warning for local connection(s) (#84421)
This prevents "[WARNING]: Reset is not implemented for this connection" when
using wait_for_connection with localhost or other local hosts.

It's arguable (from a consistency/correctness perspective) that
`ansible.plugins.connection.local.Connection.reset()` should call
`Connection.close()`. I went for a no-op on the basis of "if it aint broke
don't fix it", and erred on the side of keeping existing semantics. However
either option would be fine with me.
2024-12-05 14:56:14 -05:00
5208cffd91 document decrypt also works on strings (#84412) 2024-12-05 14:54:23 -05:00
b154e38e54 config lookup, fixes and tests (#84398)
* Integration tests for lookup_config

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-12-05 11:19:34 -08:00
6d21e28c73 Fix non-root integration tests failure (#84378)
* Fix callback_default integration test for non-root users

This test compares the test output to previously collected output. However, this
previously assumed that the tests are run as root, even though needs/root in
aliases is not set.

So instead parameterize the output, and use sed to replace the value that
diverge when running it as different users.

* integration tests: Ensure temp file removal doesn't fail as non-root user

* Don't fail when ansible-galaxy integration test runs as non-root

* Update integration test callback list

---------

Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
2024-12-05 14:17:29 -05:00
1ad0c404ef Coverage for virtual/sunos.py (#84357)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-12-03 09:11:49 -08:00
2ca086c993 Coverage for virtual/hpux.py (#84362)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-12-03 10:41:56 -05:00
5b231bbbdb test coverage for virtual/sysctl.py (#84356)
* test coverage for virtual/sysctl.py

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-12-03 10:33:30 -05:00
df0fe81383 Changed human_to_bytes input to a string (#84336)
For it to be a human readable description it can't be an int.
2024-12-03 10:18:37 -05:00
27aa60b8b4 Added examples for password_hash (#84322)
Fixes: #84318

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-12-03 15:14:48 +00:00
5100aa3977 fix documentation about avoiding apt_key (#84326) 2024-12-03 10:14:37 -05:00
803cf7df41 Add ansible_uptime_seconds support for AIX (#84321)
Added ansible_uptime_seconds fact for AIX

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-12-03 10:12:39 -05:00
92cf41aa46 Additional tests for lookup_sequence (#84315)
* Additional tests for lookup_sequence

* Follow up for https://github.com/ansible/ansible/pull/83758,
  to add tests for stride parameter.
---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-12-03 10:06:29 -05:00
9588215601 Removed deprecated include_delegate_to param (#84306)
* Removed deprecated include_delegate_to param

* Remove deprecated include_delegate_to param from
  get_vars API in manager.py

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Make ignore.txt

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-12-03 10:04:32 -05:00
cf4276f560 package_facts: extend note about python3-rpm to cover Fedora 41+ (#84373)
Fedora 41 no longer has python3-rpm installed by default either,
so package_facts blows up on Fedora 41 hosts unless you make sure
python3-rpm is installed first. Not sure we can do a lot about
this besides extending this note.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-11-29 11:19:07 -05:00
f9b58fa13f ansible-test - fix coverage for test modules (#84366)
Fixes the coverage path translation for modules located in integration
test paths. Instead of trying to match by the unique temporary path name
that the module is executed as, the reporting tool will translate it to
the static path that the module is actually located under.
2024-11-27 13:43:06 +10:00
f2a77b071e Test aliases fix (#84377)
* integrity tests: Tag (destructive) root tests as such

- apt_key needs root to touch the apt key database
- debconf needs root to change debconf values of system packages
- gathering writes to /etc/ansible/*, writeable only to root
- group creates system groups
- noexec mounts/umounts a ramdisk
- systemd requires root to start/stop services

Mark all except noexec as "destructive" as they change the state of the system.

* integration test cron requires root, as it calls setup_cron

* integration test dpkg_selection runs dpkg as root

* integration test facts_linux_network requires root

It adds/removes IP addresses from network interfaces, requiring root for that.

* integration test package requires root

installs/removes system packages

* Integration test service requires root

Creates/starts/stops/removes systemd services

* integration test user requires root to create users

* integration tests using setup_test_user require root

---------

Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
2024-11-25 16:43:40 -08:00
2a53b851fe dnf5,apt: add auto_install_module_deps option (#84292)
* dnf5,apt: add auto_install_module_deps option

Fixes #84206
2024-11-21 10:06:18 -06:00
95e3af3e0f ansible-test - Improve container network detection (#84323)
When detection of the current container network fails, a warning is now issued and execution continues.
This simplifies usage in cases where the current container cannot be inspected, such as when running in GitHub Codespaces.
2024-11-19 10:49:24 -08:00
c99493eb3f dnf5 - consolidate package resolving settings (#84335)
Fixes #84334
2024-11-19 18:00:35 +01:00
a27a7a27d1 dnf5: fix is_installed check (#84275)
Fixes #84259
2024-11-19 09:32:04 +01:00
3e82ed307b include_vars - fix including new hash variables when hash_behaviour is set to merge (#84303) 2024-11-14 13:50:14 -05:00
e14f9fe725 Sequence query fix (#83758)
Co-authored-by: flowerysong <junk+github@flowerysong.com>
2024-11-13 19:46:57 -08:00
c734ac2125 vars/varnames more examles more varied (#84300)
also ref each other in seealso as they will commonly be used toghether
2024-11-12 16:05:37 -05:00
32eacecca9 Deprecated libvirt_lxc_noseclabel config (#84287)
* Deprecated libvirt_lxc_noseclabel config

* deprecate moved libvirt_lxc_noseclabel config

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Make CI green I

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-11-12 16:13:45 +01:00
ca0810da85 Add tests for deprecations (#84284)
* Check for module deprecation
* Check for module option deprecation
* Check for plugin deprecation

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-11-12 16:09:39 +01:00
e404bc17f7 package_facts fix empty packages on foreign mgr (#83855)
* package_facts fix empty packages on foreign mgr

return the first package manager that provides output

add tests with fake rpm on apt machines
2024-11-12 08:36:26 -05:00
3befdd3d15 Fix runas become SYSTEM logic (#84280)
Fixes the logic when attempting to become the SYSTEM user using the
runas plugin. It was incorrectly assumed that calling LogonUser with the
SYSTEM username would produce a new token with all the privileges but
instead it creates a copy of the existing token. This reverts the logic
back to the original process and adds in new logic to avoid any tokens
that are restricted from creating new processes.
2024-11-12 09:16:22 +10:00
52ecd3664a ansible-test - align 2025 connection defaults to CI matrix (#84291) 2024-11-11 09:07:35 +10:00
9d249432c4 Increase scope of mypy sanity test (#84288)
* Increase scope of mypy sanity test

* Fix issues reported by mypy
2024-11-09 02:58:29 +00:00
7501bbec20 Add support for Windows Server 2025 (#84285)
Adds Windows Server 2025 to the testing matrix.
2024-11-08 12:28:20 +10:00
bf48b538f8 command module, fix docs to reflect reality (#84191)
though the previous docs were the 'intended' outcome,
the current behaviour has been active for a long time and should
not be removed due to backward compatibility issues.

One thing we can do going forward is deprecate substitution enabled by default.
2024-11-07 16:22:40 -05:00
a98801903d ansible-test - Replace FreeBSD 13.3 with 13.4 (#84236)
* ansible-test - Replace FreeBSD 13.3 with 13.4
* ansible-test - Fix typos in bootstrap.sh
* Skip libfaketime on FreeBSD except FreeBSD 14
2024-11-07 13:19:26 -08:00
1d61f2a4fd remove ignore clauses for module uri (#83642)
Co-authored-by: flowerysong <junk+github@flowerysong.com>
2024-11-07 14:56:51 +00:00
31cde0ebd1 user: create Buildroot subclass as alias to Busybox (#83666)
Fixes: #83665
2024-11-07 14:45:32 +00:00
157ef04b1e Add --flush-cache option to ansible-pull (#84211) 2024-11-06 11:40:15 -05:00
771f7ad29c update ansible-galaxy resolvelib requirement to >= 0.5.3, < 2.0.0 (#84218)
* Update resolvelib upperbound to 2.0.0

Minor SemVer releases should not contain breaking changes

* Test the latest minor release and reduce number of resolvelib versions tested for efficiency
2024-11-06 10:20:26 -05:00
68bfa37838 ansible-test - Fix interactive cmd traceback (#84264) 2024-11-05 23:50:34 +00:00
9cdd6e58b3 Fixed ipv6 pattern in parse_address (#84237) 2024-11-05 08:05:21 -08:00
a99d66e6c7 Removed deprecated STRING_CONVERSION_ACTION (#84245)
Fixes: #84220

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-11-05 16:27:12 +01:00
49b22d4d6b Python binary should not be python at first try for env-setup.fish (#84212) 2024-11-05 16:13:52 +01:00
abf6036bb2 Link to role argspec docs. Fixes #84164 (#84192) 2024-11-04 17:06:58 -06:00
f92e99fd8f test: fix check_required_by (#84153)
* Update the documentation for check_required_by
* Fix return value for check_required_by (now returns empty list on success)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-11-02 10:36:45 -07:00
c49e94017a Improvements for the create-bulk-issues.py script (#84235)
* Improve error handling for create-bulk-issues.py

* Add support for setting assignee

* Add example YAML to feature --help output.

* Add additional help message for token issues.
2024-11-01 15:15:59 -07:00
32ae3ce117 Remove encrypt unit tests for undocumented algorithms, which are disallowed in 2.19. (#84219) 2024-11-01 13:21:24 -04:00
8784469b4c encrypt: raise error on passing unsupported passlib hashtype (#84186)
* Raise an AnsibleFilterError when unsupported passlib hashtype is
  provided in do_encrypt.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-31 15:27:37 +00:00
2c6b78f516 Add --flush-cache option for ansible and ansible-console (#84149)
* Allow CLIs that accept inventory options to flush the inventory cache(s) and fact cache

Fixes #83749
2024-10-30 14:59:01 -04:00
03acb22f99 Fix returning unreachable for looped tasks (#84049)
* Fix returning unreachable for looped tasks

Add tests for ignore_unreachable and loop
2024-10-30 10:35:23 -04:00
a3b58fb67c Add a test using ignore_errors as a variable (#84175)
* Add a regression test for https://github.com/ansible/ansible/issues/32384
2024-10-29 16:32:17 +01:00
3a40ba3b2c Remove deprecated pycompat24 and importlib (#84161)
* Removed deprecated pycompat24 and importlib

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Make CI green

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Ignore basic.py

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Make CI green III

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Make CI green IV

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-29 16:14:01 +01:00
1b46b5923e Change changelog type from bugfixes to removed_features (#84158)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-29 16:09:20 +01:00
f29b46e438 Remove deprecated plural form of collection path (#84156)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-29 16:07:20 +01:00
d662a8d088 Enable file module to disable diff_mode (#83700)
Several tasks within the modification_time.yml and state_link.yml task
lists have explicitly enabled diff_mode because these tests previously
assumed a diff attribute would always be returned from the file module.
2024-10-25 18:32:11 +00:00
ab1a8cb3b3 docs: print deprecation collection name (#84126)
While showing the deprecation message, mention the collection name
from which the module is removed.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-25 11:20:11 -07:00
c9ac477e53 Preserve _ansible_no_log from action result; fix include_vars to set properly (#84143)
* fixes for CVE-2024-8775

* propagate truthy `_ansible_no_log` in action result (previously superseded by task-calculated value)
* always mask entire `include_vars` action result if any file loaded had a false `show_content` flag (previously used only the flag value from the last file loaded)

* update no_log tests for CVE-2024-8775
* include validation of _ansible_no_log preservation when set by actions
* replace static values with dynamic for increased robustness to logging/display/callback changes (but still using grep counts :( )

* changelog

* use ternary, coerce to bool explicitly
2024-10-24 22:56:54 +00:00
11e4a6a722 user module avoid conflicts ssh pub key (#84165)
Remove pub key if we are going to generate private
fix tests for os X
2024-10-24 14:39:51 -04:00
b1816880cb Remove deprecated compat.selector (#84155)
* Removed files related to selector compat

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-23 14:54:40 +00:00
1e6ffc1d02 Fixed broken tests (#84088)
* Add `match=` in pytest.raises
* Remove redundant assert statements

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2024-10-18 14:11:33 -07:00
1727bbecce test: Remove unreachable tests (#83696)
variable_manager unit tests are unreachable. These tests
are already covered in integration tests.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-18 12:23:40 -07:00
53ceb74e84 Use open with context manager (#83337)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-18 10:53:11 -07:00
f7766cf843 Trim selinux_policytype @ integration tests (#84136)
The shell command sometimes prints a trailing whitespace which breaks
the tests on old RHELs. This patch is supposed to fix that.
2024-10-18 09:25:40 -07:00
c6e166319a test: use password to generate random string instead of range (#84129)
* Use password lookup instead of range
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-17 19:17:42 +00:00
42e2f09b97 Faster host removal from a handler (#84091)
In ``Handler.notify_host`` we ensure that ``Handler.notified_hosts`` can contain
particular host at most once. Therefore for removing a host it should be
faster to use ``list.remove`` which removes the first item in the list,
as opposed to using list comprehension removing all such items.
2024-10-17 08:33:39 +02:00
4f6276d72d Remove configuration options that were moved to inventory plugins now that ansible-config supports plugin types. (#84130) 2024-10-16 15:39:15 -04:00
663f7f3b56 test for gathering FIPS facts (#83266)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-16 12:35:12 -07:00
279de623d0 Use dict comprehension instead (#83680)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-16 12:33:07 -07:00
671c797aa1 Remove unnecessary code (#84085)
* os.setsid does not return anything, so remove code which relying
  on return value

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-15 07:59:01 -07:00
58cb8ca4fa feat: checksum_algo param for find module (#83014)
Co-authored-by: shirann <shirannx@gmail.com>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <webknjaz@redhat.com>
2024-10-11 11:02:39 -07:00
48be6f8b6f ansible-test - Improve container probe error handling (#84109) 2024-10-10 22:58:38 +00:00
6aaac6cab3 service_facts: add FreeBSD support (#82556)
new freebsd scanner using 'their version' of service cli tool
also avoid loading the linuxy service scanner when freebsd
2024-10-10 14:22:21 -04:00
b3950bc864 Add NoReturn annotations in module_utils (#84106) 2024-10-10 16:58:27 +00:00
56bab1d097 Enable bad-docstring-quotes pylint rule for core (#84100)
* Enable bad-docstring-quotes pylint rule for core

* Ignore previously bulk update in git blame
2024-10-09 21:57:05 +00:00
a0495fc314 Update triple single quotes to triple double quotes (#84099)
* Update triple single quotes to triple double quotes

This change was fully automated.

The updated Python files have been verified to tokenize the same as the originals, except for the expected change in quoting of strings, which were verified through literal_eval.

* Manual conversion of docstring quotes
2024-10-09 21:22:35 +00:00
62ce21b6e4 ansible-test - Work around pylint issue on 3.11 (#84094) 2024-10-09 17:19:55 +00:00
83671ecb39 ansible-test - Enable pylint docstyle for tests (#84092)
This cleans up the implementation of the pylint sanity test and enables the docstyle extension rule `bad-docstring-quotes` for tests.

The rule will be enabled for the rest of ansible-core once automated cleanup has been performed on existing docstrings.
2024-10-09 15:38:32 +00:00
0b661438a0 ansible-test - Update base/default containers (#84089) 2024-10-08 18:33:04 -07:00
7e57c0fb3d Fix copyright format for gather_facts and mount_facts as documented (#84087) 2024-10-08 17:11:06 -07:00
955e310b4c Cover unit tests with mypy (#84084)
* Added support for testing unit tests with mypy.
* Added support for ignoring individual mypy error codes.
* Added missing assert on unit tests and marked xfail.
* Added type hints for some unit tests.
* Added ignores for unit tests not passing mypy.
* Fixed incorrect autouse argument in unit test fixtures.
* Fixed minor issues causing problems with mypy in unit tests.
2024-10-08 13:29:37 -07:00
18c6b40e19 Update unique filter docs (#84078)
* Correct case_sensitive example
* Add attribute docs

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-08 12:09:07 -07:00
0959472bc6 user module, avoid chmoding symlink'd home file (#83956)
also added tests

---------
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2024-10-08 13:15:34 -04:00
f3b956a7ef docs: unique add missing settings (#84076)
add the `case_sensitive` setting
2024-10-08 17:35:35 +02:00
f1f0d9bd53 PlayIterator: skip tasks from already ran roles (#83793)
... so strategies do not have to filter them.
2024-10-08 07:28:02 +02:00
d0df3a174a ansible-galaxy - fix ignoring certs when installing from git repos (#83332)
* Fix installing collections|roles from git repos with GALAXY_IGNORE_CERTS

* Fix installing collections from git repos with --ignore-certs

* Update unit test

* Add test case
2024-10-07 18:42:49 -04:00
50604e8461 ansible-test - Update astroid for pylint sanity test (#84054) 2024-10-04 13:18:07 -07:00
3cf308f672 ansible-test - Disable pylint deprecated-* rules (#84050) 2024-10-04 08:31:46 -07:00
0f4f05ebe4 Implicit flush_handlers inherit play tags (#83968) 2024-10-04 09:47:28 +02:00
ee9e6130a7 Fix error message given by ansible.module_utils.facts.timeout.timeout (#83945)
* Update unit test

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2024-10-03 21:54:54 +00:00
9406ed3109 ansible-test - Update sanity tests and default Python (#83998)
* ansible-test - Update sanity test requirements
* ansible-test - Default to Python 3.13 in base/default containers
* ansible-test - Fix incorrect AnyStr type hints
2024-10-03 09:59:56 -07:00
d6d2251929 Reduce number of implicit meta tasks (#84007)
This greatly reduces run time on large inventories since meta tasks are
executed in the main process sequentially and just executing them is expensive.

This change avoids running the following implicit meta tasks:
  * ``flush_handlers`` on hosts where no handlers are notified
  * ``noop`` for the linear strategy's lockstep, instead hosts that are
    not executing the current task are just not part of the current host loop

A playbook consiting of two simple plays both running on ~6000 hosts
runs in:
devel: 37s
this PR: 1.3s

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2024-10-03 16:02:02 +02:00
02e00aba3f file: simplify the code (#84043)
* Remove unnecessary code
* Make code simple to read

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-03 06:53:09 -07:00
f593eb42a3 get_url: properly parse filename in content-disposition (#83748)
Since we don't really care about the type we don't have to
query for it and just retrieve the filename value.
Unfortunately we cannot use module_utils.urls.get_response_filename
as we don't have the response object, so just utilize
email.message.Message to parse the filename
instead of manually doing the work ourselves.

Fixes: #83690
2024-10-03 15:36:42 +02:00
b3c4154e86 Use sentinel everywhere (#84041)
* Use sentinel everywhere

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-02 15:49:35 -07:00
9abc651cd6 ansible-test - Update nios-test-container to 6.0.0 (#84042) 2024-10-02 16:37:37 +00:00
bebc192c3e remove one ignore clause for module copy (#83643)
---------
Co-authored-by: flowerysong <junk+github@flowerysong.com>
2024-10-02 13:53:58 +00:00
4c8fb12fc2 cron: return stdout and rc for cron command (#83290)
Co-authored-by: Jack Farzan <jfarzan@adobe.com>
2024-10-01 14:45:27 -07:00
79e8c4c26c debconf: set empty password value (#83217)
Fixes: #83214

---------
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-01 11:48:57 -04:00
fb7fd51b93 Prevent condor from being installed and fulfilling libfmt dependency (#84023) 2024-09-30 11:11:22 -05:00
f97adb4c5d Add additional logging for SSH runtime output timeouts and escalation messages (#84008)
Signed-off-by: Yuri Savinkin <stkwar@gmail.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-30 11:26:21 -04:00
3d40db1ac0 INVENTORY_IGNORE_EXTS stop ignoring ini (#84001)
* INVENTORY_IGNORE_EXTS stop ignoring ini

Originally added to avoid configuration files for inventory scripts
now clashes with the much more common ini inventory files.

* add a note to script plugin

* Update lib/ansible/plugins/inventory/script.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-26 12:15:34 -07:00
34f8f55d9e facts: Skip path if the distribution path is directory (#84012)
* facts: Skip path if the distribution path is directory

Skip path if the distribution path is directory instead of file.
Handle exception raised while handling distribution path.

Fixes: #84006

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Review requests

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-26 15:05:57 -04:00
21fee95af7 package/dnf action plugins: better facts failure msg (#83995) 2024-09-26 09:19:00 +02:00
facf9186b4 Test entry points with editable install (#84002)
This allows collection of code coverage for the entry points.
2024-09-24 11:23:20 -07:00
0c8efa29b2 Ansible Errors, Don't hide stacked messages when yaml (#83933)
Also remove redundant msg now that we fixed yaml case
So no more need to %s % e.

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-24 13:58:41 -04:00
8caa32a558 split: Fix incorrect example result of the split builtin filter (#83982)
The following Python output proves that the second member of the resulting list should be " a", not "a":

```txt
$ python3 
Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> string = "jojo is, a"
>>> string.split(',')
['jojo is', ' a']
```
2024-09-24 17:33:25 +02:00
f4e2e206b3 Add basic validation for action_groups (#83965)
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2024-09-24 17:15:43 +02:00
0a100c7f06 dnf5: fix tb when plugins API is not available (#83969)
Follow up on https://github.com/ansible/ansible/pull/83105
2024-09-24 10:52:20 +02:00
c0fb71a642 Move ansible-deprecated ignores for tests inline (#83989) 2024-09-23 17:33:01 -07:00
491a87215a zap changelogs (#83988) 2024-09-23 16:20:13 -07:00
1b8bfd40ab bump devel to 2.19 (#83985) 2024-09-23 15:29:06 -07:00
2146 changed files with 55521 additions and 24849 deletions

View File

@ -78,36 +78,44 @@ stages:
test: 2022/psrp/http
- name: 2022 SSH Key
test: 2022/ssh/key
- name: 2025 PSRP HTTP
test: 2025/psrp/http
- name: 2025 SSH Key
test: 2025/ssh/key
- stage: Remote
dependsOn: []
jobs:
- template: templates/matrix.yml # context/target
parameters:
targets:
- name: macOS 14.3
test: macos/14.3
- name: RHEL 9.4 py39
test: rhel/9.4@3.9
- name: RHEL 9.4 py312
test: rhel/9.4@3.12
- name: FreeBSD 13.3
test: freebsd/13.3
- name: FreeBSD 14.1
test: freebsd/14.1
- name: macOS 15.3
test: macos/15.3
- name: RHEL 9.5 py39
test: rhel/9.5@3.9
- name: RHEL 9.5 py312
test: rhel/9.5@3.12
- name: RHEL 10.0
test: rhel/10.0
- name: FreeBSD 13.5
test: freebsd/13.5
- name: FreeBSD 14.2
test: freebsd/14.2
groups:
- 1
- 2
- template: templates/matrix.yml # context/controller
parameters:
targets:
- name: macOS 14.3
test: macos/14.3
- name: RHEL 9.4
test: rhel/9.4
- name: FreeBSD 13.3
test: freebsd/13.3
- name: FreeBSD 14.1
test: freebsd/14.1
- name: macOS 15.3
test: macos/15.3
- name: RHEL 9.5
test: rhel/9.5
- name: RHEL 10.0
test: rhel/10.0
- name: FreeBSD 13.5
test: freebsd/13.5
- name: FreeBSD 14.2
test: freebsd/14.2
groups:
- 3
- 4
@ -115,12 +123,14 @@ stages:
- template: templates/matrix.yml # context/controller (ansible-test container management)
parameters:
targets:
- name: Alpine 3.20
test: alpine/3.20
- name: Fedora 40
test: fedora/40
- name: RHEL 9.4
test: rhel/9.4
- name: Alpine 3.21
test: alpine/3.21
- name: Fedora 41
test: fedora/41
- name: RHEL 9.5
test: rhel/9.5
- name: RHEL 10.0
test: rhel/10.0
- name: Ubuntu 24.04
test: ubuntu/24.04
groups:
@ -132,10 +142,10 @@ stages:
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3.20
test: alpine320
- name: Fedora 40
test: fedora40
- name: Alpine 3.21
test: alpine321
- name: Fedora 41
test: fedora41
- name: Ubuntu 22.04
test: ubuntu2204
- name: Ubuntu 24.04
@ -147,16 +157,24 @@ stages:
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3.20
test: alpine320
- name: Fedora 40
test: fedora40
- name: Alpine 3.21
test: alpine321
- name: Fedora 41
test: fedora41
- name: Ubuntu 24.04
test: ubuntu2404
groups:
- 3
- 4
- 5
- template: templates/matrix.yml # context/target (dnf-oldest, dnf-latest)
parameters:
testFormat: linux/{0}
targets:
- name: Fedora 41
test: fedora41
groups:
- 7
- stage: Galaxy
dependsOn: []
jobs:
@ -198,6 +216,10 @@ stages:
test: 2022/psrp/http
- name: 2022 SSH Key
test: 2022/ssh/key
- name: 2025 PSRP HTTP
test: 2025/psrp/http
- name: 2025 SSH Key
test: 2025/ssh/key
- stage: Incidental
dependsOn: []
jobs:

View File

@ -9,11 +9,11 @@ from __future__ import annotations
import argparse
import dataclasses
import pathlib
import shutil
import shlex
import subprocess
import tempfile
import typing as t
import urllib.request
import venv
@dataclasses.dataclass(frozen=True)
@ -43,6 +43,27 @@ def parse_args() -> Args:
return Args(**kwargs)
def run(*args: str | pathlib.Path) -> None:
cmd = [str(arg) for arg in args]
print(f'==> {shlex.join(cmd)}', flush=True)
subprocess.run(cmd, check=True)
def install_codecov(dest: pathlib.Path) -> pathlib.Path:
package = 'codecov-cli'
version = '11.0.3'
venv_dir = dest / 'venv'
python_bin = venv_dir / 'bin' / 'python'
codecov_bin = venv_dir / 'bin' / 'codecovcli'
venv.create(venv_dir, with_pip=True)
run(python_bin, '-m', 'pip', 'install', f'{package}=={version}', '--disable-pip-version-check')
return codecov_bin
def process_files(directory: pathlib.Path) -> t.Tuple[CoverageFile, ...]:
processed = []
for file in directory.joinpath('reports').glob('coverage*.xml'):
@ -57,45 +78,43 @@ def process_files(directory: pathlib.Path) -> t.Tuple[CoverageFile, ...]:
return tuple(processed)
def upload_files(codecov_bin: pathlib.Path, files: t.Tuple[CoverageFile, ...], dry_run: bool = False) -> None:
def upload_files(codecov_bin: pathlib.Path, config_file: pathlib.Path, files: t.Tuple[CoverageFile, ...], dry_run: bool = False) -> None:
for file in files:
cmd = [
str(codecov_bin),
'--name', file.name,
'--file', str(file.path),
codecov_bin,
'--disable-telem',
'--codecov-yml-path',
config_file,
'upload-process',
'--disable-search',
'--disable-file-fixes',
'--plugin',
'noop',
'--name',
file.name,
'--file',
file.path,
]
for flag in file.flags:
cmd.extend(['--flags', flag])
cmd.extend(['--flag', flag])
if dry_run:
print(f'DRY-RUN: Would run command: {cmd}')
continue
cmd.append('--dry-run')
subprocess.run(cmd, check=True)
run(*cmd)
def download_file(url: str, dest: pathlib.Path, flags: int, dry_run: bool = False) -> None:
if dry_run:
print(f'DRY-RUN: Would download {url} to {dest} and set mode to {flags:o}')
return
with urllib.request.urlopen(url) as resp:
with dest.open('w+b') as f:
# Read data in chunks rather than all at once
shutil.copyfileobj(resp, f, 64 * 1024)
dest.chmod(flags)
def main():
def main() -> None:
args = parse_args()
url = 'https://ci-files.testing.ansible.com/codecov/linux/codecov'
with tempfile.TemporaryDirectory(prefix='codecov-') as tmpdir:
codecov_bin = pathlib.Path(tmpdir) / 'codecov'
download_file(url, codecov_bin, 0o755, args.dry_run)
with tempfile.TemporaryDirectory(prefix='codecov-') as tmpdir:
config_file = pathlib.Path(tmpdir) / 'config.yml'
config_file.write_text('')
codecov_bin = install_codecov(pathlib.Path(tmpdir))
files = process_files(args.path)
upload_files(codecov_bin, files, args.dry_run)
upload_files(codecov_bin, config_file, files, args.dry_run)
if __name__ == '__main__':

View File

@ -12,6 +12,6 @@ if ! ansible-test --help >/dev/null 2>&1; then
pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
fi
# Generate stubs using docker (if supported) otherwise fall back to using a virtual environment instead.
# The use of docker is required when Powershell code is present, but Ansible 2.12 was the first version to support --docker with coverage.
ansible-test coverage xml --group-by command --stub --docker --color -v || ansible-test coverage xml --group-by command --stub --venv --color -v
# Generate stubs using docker.
# The use of docker is mandatory when Powershell code is present.
ansible-test coverage xml --group-by command --stub --docker --color -v

View File

@ -2,3 +2,5 @@
# Bulk PowerShell sanity fixes
6def4a3180fe03981ba64c6d8db28fed3bb39c0c
716631189cb5a3f66b3add98f39e64e98bc17bf7
# Bulk update of strings from triple single quotes to triple double quotes
a0495fc31497798a7a833ba7406a9729e1528dd8

View File

@ -47,23 +47,7 @@ body:
- type: dropdown
attributes:
label: Issue Type
description: >
Please select the single available option in the drop-down.
<details>
<summary>
<em>Why?</em>
</summary>
We would do it by ourselves but unfortunately, the current
edition of GitHub Issue Forms Alpha does not support this yet 🤷
_We will make it easier in the future, once GitHub
supports dropdown defaults. Promise!_
</details>
# FIXME: Once GitHub allows defining the default choice, update this
description: This is a marker for our automatic bot. Do not change it.
options:
- Bug Report
validations:
@ -152,7 +136,7 @@ body:
attributes:
label: Steps to Reproduce
description: |
Describe exactly how to reproduce the problem, using a minimal test-case. It would *really* help us understand your problem if you could also pased any playbooks, configs and commands you used.
Describe exactly how to reproduce the problem, using a minimal test-case. It would *really* help us understand your problem if you could also provide any playbooks, configs and commands you used.
**HINT:** You can paste https://gist.github.com links for larger files.
value: |

View File

@ -16,10 +16,10 @@ contact_links:
url: https://docs.ansible.com/ansible/devel/community/code_of_conduct.html?utm_medium=github&utm_source=issue_template_chooser
about: ❤ Be nice to other members of the community. ☮ Behave.
- name: 💬 Talk to the community
url: https://docs.ansible.com/ansible/devel/community/communication.html?utm_medium=github&utm_source=issue_template_chooser#mailing-list-information
url: https://docs.ansible.com/ansible/devel/community/communication.html?utm_medium=github&utm_source=issue_template_chooser#forum
about: Please ask and answer usage questions here
- name: ⚡ Working groups
url: https://github.com/ansible/community/wiki
url: https://forum.ansible.com/g?utm_medium=github&utm_source=issue_template_chooser
about: Interested in improving a specific area? Become a part of a working group!
- name: 💼 For Enterprise
url: https://www.ansible.com/products/engine?utm_medium=github&utm_source=issue_template_chooser

View File

@ -84,20 +84,7 @@ body:
- type: dropdown
attributes:
label: Issue Type
description: >
Please select the single available option in the drop-down.
<details>
<summary>
<em>Why?</em>
</summary>
_We will make it easier in the future, once GitHub
supports dropdown defaults. Promise!_
</details>
# FIXME: Once GitHub allows defining the default choice, update this
description: This is a marker for our automatic bot. Do not change it.
options:
- Documentation Report
validations:

View File

@ -101,23 +101,7 @@ body:
- type: dropdown
attributes:
label: Issue Type
description: >
Please select the single available option in the drop-down.
<details>
<summary>
<em>Why?</em>
</summary>
We would do it by ourselves but unfortunately, the current
edition of GitHub Issue Forms Alpha does not support this yet 🤷
_We will make it easier in the future, once GitHub
supports dropdown defaults. Promise!_
</details>
# FIXME: Once GitHub allows defining the default choice, update this
description: This is a marker for our automatic bot. Do not change it.
options:
- Feature Idea
validations:

View File

@ -0,0 +1,10 @@
---
name: Internal Issue
about: Free-form issue creation for core maintainer use only.
title: ''
labels: [core-internal]
assignees: ''
---
@ansibot bot_skip

42
.github/ISSUE_TEMPLATE/pre_release.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: Pre-Release Bug Report
description: File a bug report against a pre-release version
labels:
- bug
- pre_release
assignees:
- nitzmahone
- mattclay
body:
- type: markdown
attributes:
value: |
## Bug Report
- type: textarea
attributes:
label: Ansible Version
description: Paste the full output from `ansible --version` below.
render: console
placeholder: $ ansible --version
validations:
required: true
- type: textarea
attributes:
label: Summary
description: Describe the issue with any relevant steps to reproduce.
validations:
required: true
- type: dropdown
attributes:
label: <!-- Bot instructions (ignore this) -->
options:
- |
<!--
### Component Name
bin/ansible
### Issue Type
Bug Report
### Configuration
### OS / Environment
-->
validations:
required: true

View File

@ -2,19 +2,8 @@
<!--- Describe the change below, including rationale and design decisions -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
<!--- Add "Fixes #1234" or steps to reproduce the problem if there is no corresponding issue -->
##### ISSUE TYPE
- Bugfix Pull Request
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here -->
<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
```

View File

@ -2,18 +2,8 @@
<!--- Describe the change below, including rationale -->
<!--- HINT: Include "Closes #nnn" if you are fixing an existing issue -->
<!--- Add "Fixes #1234" if there is a corresponding issue -->
##### ISSUE TYPE
- Docs Pull Request
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
```

View File

@ -2,18 +2,8 @@
<!--- Describe the change below, including rationale and design decisions -->
<!--- HINT: Include "Resolves #nnn" if you are fixing an existing issue -->
<!--- Add "Fixes #1234" if there is a corresponding issue -->
##### ISSUE TYPE
- Feature Pull Request
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
```

View File

@ -2,19 +2,8 @@
<!--- Describe the change below, including rationale and design decisions -->
<!--- HINT: Include "Closes #nnn" if you are fixing an existing issue -->
<!--- Add "Fixes #1234" if there is a corresponding issue -->
##### ISSUE TYPE
- Test Pull Request
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here -->
<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
```

View File

@ -2,7 +2,7 @@
<!--- Describe the change below, including rationale and design decisions -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
<!--- Add "Fixes #1234" or steps to reproduce the problem if there is no corresponding issue -->
##### ISSUE TYPE
@ -12,14 +12,3 @@
- Docs Pull Request
- Feature Pull Request
- Test Pull Request
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here -->
<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
```

View File

@ -1,3 +1,5 @@
2.20.0 TBD
2.19.0 What Is and What Should Never Be
2.18.0 Fool in the Rain
2.17.0 Gallows Pole
2.16.0 All My Love

3
.gitignore vendored
View File

@ -97,6 +97,9 @@ Vagrantfile
# vendored lib dir
lib/ansible/_vendor/*
!lib/ansible/_vendor/__init__.py
# PowerShell signed hashlist
lib/ansible/config/powershell_signatures.psd1
*.authenticode
# test stuff
/test/integration/cloud-config-*.*
!/test/integration/cloud-config-*.*.template

View File

@ -1,2 +1,2 @@
ancestor: 2.17.0
ancestor: 2.18.0
releases: {}

View File

@ -1,3 +0,0 @@
---
bugfixes:
- vault - handle vault password file value when it is directory (https://github.com/ansible/ansible/issues/42960).

View File

@ -1,3 +0,0 @@
---
bugfixes:
- apt - report changed=True when some packages are being removed (https://github.com/ansible/ansible/issues/46314).

View File

@ -1,2 +0,0 @@
bugfixes:
- atomic_move - fix using the setgid bit on the parent directory when creating files (https://github.com/ansible/ansible/issues/46742, https://github.com/ansible/ansible/issues/67177).

View File

@ -1,2 +0,0 @@
minor_changes:
- loop_control - add a break_when option to to break out of a task loop early based on Jinja2 expressions (https://github.com/ansible/ansible/issues/83442).

View File

@ -1,2 +0,0 @@
bugfixes:
- get_url - Verify checksum using tmpsrc, not dest (https://github.com/ansible/ansible/pull/64092)

View File

@ -1,3 +0,0 @@
---
bugfixes:
- git - check if git version is available or not before using it for comparison (https://github.com/ansible/ansible/issues/72321).

View File

@ -1,3 +0,0 @@
minor_changes:
- Add ``uid_min``, ``uid_max`` to the user plugin to overwrite the defaults provided by the ``/etc/login.defs`` file (https://github.com/ansible/ansible/pull/81770).
- Add ``gid_min``, ``gid_max`` to the group plugin to overwrite the defaults provided by the ``/etc/login.defs`` file (https://github.com/ansible/ansible/pull/81770).

View File

@ -1,2 +0,0 @@
bugfixes:
- addressed issue of trailing text been ignored, non-ASCII characters are parsed, enhance white space handling and fixed overly permissive issue of human_to_bytes filter(https://github.com/ansible/ansible/issues/82075)

View File

@ -1,2 +0,0 @@
bugfixes:
- Fix handlers not being executed in lockstep using the linear strategy in some cases (https://github.com/ansible/ansible/issues/82307)

View File

@ -1,2 +0,0 @@
bugfixes:
- fixed the issue of creating user directory using tilde(~) always reported "changed".(https://github.com/ansible/ansible/issues/82490)

View File

@ -1,2 +0,0 @@
bugfixes:
- shell plugin - properly quote all needed components of shell commands (https://github.com/ansible/ansible/issues/82535)

View File

@ -1,2 +0,0 @@
minor_changes:
- "ansible-doc - show examples in role entrypoint argument specs (https://github.com/ansible/ansible/pull/82671)."

View File

@ -1,2 +0,0 @@
bugfixes:
- support the countme option when using yum_repository

View File

@ -1,4 +0,0 @@
bugfixes:
- >-
fetch - add error message when using ``dest`` with a trailing slash that becomes a local directory -
https://github.com/ansible/ansible/issues/82878

View File

@ -1,5 +0,0 @@
---
removed_features:
- paramiko_ssh - removed deprecated ssh_extra_args from the paramiko_ssh connection plugin (https://github.com/ansible/ansible/issues/82941).
- paramiko_ssh - removed deprecated ssh_common_args from the paramiko_ssh connection plugin (https://github.com/ansible/ansible/issues/82940).
- paramiko_ssh - removed deprecated ssh_args from the paramiko_ssh connection plugin (https://github.com/ansible/ansible/issues/82939).

View File

@ -1,3 +0,0 @@
---
removed_features:
- play_context - remove deprecated PlayContext.verbosity property (https://github.com/ansible/ansible/issues/82945).

View File

@ -1,3 +0,0 @@
---
removed_features:
- loader - remove deprecated non-inclusive words (https://github.com/ansible/ansible/issues/82947).

View File

@ -1,2 +0,0 @@
bugfixes:
- "linear strategy: fix handlers included via ``include_tasks`` handler to be executed in lockstep (https://github.com/ansible/ansible/issues/83019)"

View File

@ -1,3 +0,0 @@
---
bugfixes:
- lookup - Fixed examples of csv lookup plugin (https://github.com/ansible/ansible/issues/83031).

View File

@ -1,2 +0,0 @@
bugfixes:
- "ansible-doc - format top-level descriptions with multiple paragraphs as multiple paragraphs, instead of concatenating them (https://github.com/ansible/ansible/pull/83155)."

View File

@ -1,2 +0,0 @@
bugfixes:
- copy - mtime/atime not updated. Fix now update mtime/atime(https://github.com/ansible/ansible/issues/83013)

View File

@ -1,2 +0,0 @@
bugfixes:
- Fix for ``meta`` tasks breaking host/fork affinity with ``host_pinned`` strategy (https://github.com/ansible/ansible/issues/83294)

View File

@ -1,3 +0,0 @@
---
bugfixes:
- fixed unit test test_borken_cowsay to address mock not been properly applied when existing unix system already have cowsay installed.

View File

@ -1,3 +0,0 @@
---
bugfixes:
- facts - add facts about x86_64 flags to detect microarchitecture (https://github.com/ansible/ansible/issues/83331).

View File

@ -1,2 +0,0 @@
bugfixes:
- dnf, dnf5 - fix for installing a set of packages by specifying them using a wildcard character (https://github.com/ansible/ansible/issues/83373)

View File

@ -1,2 +0,0 @@
bugfixes:
- Fix rapid memory usage growth when notifying handlers using the ``listen`` keyword (https://github.com/ansible/ansible/issues/83392)

View File

@ -1,2 +0,0 @@
bugfixes:
- dnf - fix an issue where two packages of the same ``evr`` but different arch failed to install (https://github.com/ansible/ansible/issues/83406)

View File

@ -1,2 +0,0 @@
bugfixes:
- "``end_host`` - fix incorrect return code when executing ``end_host`` in the ``rescue`` section (https://github.com/ansible/ansible/issues/83447)"

View File

@ -1,2 +0,0 @@
bugfixes:
- service_facts - don't crash if OpenBSD rcctl variable contains '=' character (https://github.com/ansible/ansible/issues/83457)

View File

@ -1,2 +0,0 @@
minor_changes:
- "ansible-test - update HTTP test container to 3.2.0 (https://github.com/ansible/ansible/pull/83469)."

View File

@ -1,6 +0,0 @@
---
bugfixes:
- facts - `support_discard` now returns `0` if either `discard_granularity`
or `discard_max_hw_bytes` is zero; otherwise it returns the value of
`discard_granularity`, as before
(https://github.com/ansible/ansible/pull/83480).

View File

@ -1,2 +0,0 @@
bugfixes:
- Fix a traceback when an environment variable contains certain special characters (https://github.com/ansible/ansible/issues/83498)

View File

@ -1,2 +0,0 @@
minor_changes:
- Add a new mount_facts module to support gathering information about mounts that are excluded by default fact gathering.

View File

@ -1,2 +0,0 @@
minor_changes:
- "validate-modules sanity test - reject option/aliases names that are identical up to casing but belong to different options (https://github.com/ansible/ansible/pull/83530)."

View File

@ -1,2 +0,0 @@
bugfixes:
- distro package - update the distro package version from 1.8.0 to 1.9.0 (https://github.com/ansible/ansible/issues/82935)

View File

@ -1,2 +0,0 @@
minor_changes:
- distribution.py - Added SL-Micro in Suse OS Family. (https://github.com/ansible/ansible/pull/83541)

View File

@ -1,2 +0,0 @@
minor_changes:
- find - change the datatype of ``elements`` to ``path`` in option ``paths`` (https://github.com/ansible/ansible/pull/83575).

View File

@ -1,3 +0,0 @@
minor_changes:
- "validate-modules sanity test - detect if names of an option (option name + aliases) do not match between argument spec and documentation
(https://github.com/ansible/ansible/issues/83598, https://github.com/ansible/ansible/pull/83599)."

View File

@ -1,3 +0,0 @@
---
bugfixes:
- debconf - fix normalization of value representation for boolean vtypes in new packages (https://github.com/ansible/ansible/issues/83594)

View File

@ -1,2 +0,0 @@
bugfixes:
- Fix an issue where registered variable was not available for templating in ``loop_control.label`` on skipped looped tasks (https://github.com/ansible/ansible/issues/83619)

View File

@ -1,4 +0,0 @@
---
minor_changes:
- rpm_key - allow validation of gpg key with a subkey fingerprint
- rpm_key - enable gpg validation that requires presence of multiple fingerprints

View File

@ -1,2 +0,0 @@
minor_changes:
- ini lookup - add new ``interpolation`` option (https://github.com/ansible/ansible/issues/83755)

View File

@ -1,4 +0,0 @@
minor_changes:
- >-
``ansible-galaxy collection publish`` - add configuration options for the initial poll interval
and the exponential when checking the import status of a collection, since the default is relatively slow.

View File

@ -1,3 +0,0 @@
bugfixes:
- "runtime-metadata sanity test - do not crash on deprecations if ``galaxy.yml`` contains an empty ``version`` field (https://github.com/ansible/ansible/pull/83831)."
- "Fix ``SemanticVersion.parse()`` to store the version string so that ``__repr__`` reports it instead of ``None`` (https://github.com/ansible/ansible/pull/83831)."

View File

@ -1,4 +0,0 @@
bugfixes:
- >-
include_tasks - Display location when attempting to load a task list where ``include_*`` did not specify any value -
https://github.com/ansible/ansible/issues/83874

View File

@ -1,2 +0,0 @@
bugfixes:
- "dnf5 - re-introduce the ``state: installed`` alias to ``state: present`` (https://github.com/ansible/ansible/issues/83960)"

View File

@ -1,7 +0,0 @@
bugfixes:
- >-
powershell - Implement more robust deletion mechanism for C# code compilation
temporary files. This should avoid scenarios where the underlying temporary
directory may be temporarily locked by antivirus tools or other IO problems.
A failure to delete one of these temporary directories will result in a
warning rather than an outright failure.

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-test action-plugin-docs - Fix to check for sidecar documentation for action plugins

View File

@ -1,2 +0,0 @@
minor_changes:
- facts - add systemd version and features

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-config has new 'validate' option to find mispelled/forgein configurations in ini file or environment variables.

View File

@ -1,3 +0,0 @@
---
bugfixes:
- ansible-doc - make colors configurable.

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-doc - fixed "inicates" typo in output

View File

@ -1,3 +0,0 @@
---
bugfixes:
- ansible-doc - handle no_fail condition for role.

View File

@ -1,2 +0,0 @@
minor_changes:
- The minimum supported Python version on targets is now Python 3.8.

View File

@ -1,4 +0,0 @@
bugfixes:
- >-
``ansible-galaxy role install`` - update the default timeout to download
archive URLs from 20 seconds to 60 (https://github.com/ansible/ansible/issues/83521).

View File

@ -1,5 +0,0 @@
bugfixes:
- >-
Add descriptions for ``ansible-galaxy install --help` and ``ansible-galaxy role|collection install --help``.
- >-
``ansible-galaxy install --help`` - Fix the usage text and document that the requirements file passed to ``-r`` can include collections and roles.

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-galaxy role install - fix symlinks (https://github.com/ansible/ansible/issues/82702, https://github.com/ansible/ansible/issues/81965).

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Update ``base`` and ``default`` containers to omit Python 3.7.

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Update ``coverage`` to version 7.6.1.

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Upgrade to ``coverage`` version 7.9.1 for Python 3.9 and later.

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Improve the error message shown when an unknown ``--remote`` or ``--docker`` option is given.

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Update ``http-test-container`` to version 3.0.0.

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Update ``nios-test-container`` to version 5.0.0.

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - An ``ansible_core.egg-info`` directory is no longer generated when running tests.

View File

@ -1,12 +0,0 @@
minor_changes:
- ansible-test - Replace Fedora 39 container and remote with Fedora 40.
- ansible-test - Replace Alpine 3.19 container and remote with Alpine 3.20.
- ansible-test - Replace Ubuntu 20.04 container with Ubuntu 24.04 container.
- ansible-test - Add Ubuntu 24.04 remote.
- ansible-test - Replace RHEL 9.3 remote with RHEL 9.4.
- ansible-test - Replace FreeBSD 14.0 remote with FreeBSD 14.1.
known_issues:
- ansible-test - When using the Fedora 40 container with Podman on a Ubuntu 24.04 host,
the ``unix-chkpwd`` AppArmor profile must be disabled on the host to allow SSH connections to the container.
- ansible-test - When using ansible-test containers with Podman on a Ubuntu 24.04 host,
ansible-test must be run as a non-root user to avoid permission issues caused by AppArmor.

View File

@ -1,4 +0,0 @@
bugfixes:
- ansible-test - The ``pylint`` sanity test now includes the controller/target context of files when grouping them.
This allows the ``--py-version`` option to be passed to ``pylint`` to indicate the minimum supported Python version
for each test context, preventing ``pylint`` from defaulting to the Python version used to invoke the test.

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Update ``pypi-test-container`` to version 3.2.0.

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - The ``empty-init`` sanity test no longer applies to ``module_utils`` packages.

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Updated the frozen requirements for all sanity tests.

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Update ``ansible-test-utility-container`` to version 3.1.0.

View File

@ -1,3 +0,0 @@
minor_changes:
- ansible-test - Virtual environments created by ansible-test no longer include the ``wheel`` or ``setuptools`` packages.
- ansible-test - Upgrade ``pip`` used in ansible-test managed virtual environments from version 24.0 to 24.2.

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Removed the ``vyos/1.1.8`` network remote as it is no longer functional.

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-test - Connection options can be set for ansible-test managed remote Windows instances.

View File

@ -1,8 +0,0 @@
bugfixes:
- persistent connection plugins - The correct Ansible persistent connection helper is now always used.
Previously, the wrong script could be used, depending on the value of the ``PATH`` environment variable.
As a result, users were sometimes required to set ``ANSIBLE_CONNECTION_PATH`` to use the correct script.
deprecated_features:
- persistent connection plugins - The ``ANSIBLE_CONNECTION_PATH`` config option no longer has any effect, and will be removed in a future release.
breaking_changes:
- persistent connection plugins - The ``ANSIBLE_CONNECTION_PATH`` config option no longer has any effect.

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible_managed restored it's 'templatability' by ensuring the possible injection routes are cut off earlier in the process.

View File

@ -1,3 +0,0 @@
---
bugfixes:
- package_facts - apk fix when cache is empty (https://github.com/ansible/ansible/issues/83126).

View File

@ -1,3 +0,0 @@
---
bugfixes:
- apt_* - add more info messages raised while updating apt cache (https://github.com/ansible/ansible/issues/77941).

View File

@ -1,3 +0,0 @@
---
bugfixes:
- assemble - update argument_spec with 'decrypt' option which is required by action plugin (https://github.com/ansible/ansible/issues/80840).

View File

@ -1,2 +0,0 @@
bugfixes:
- module_utils atomic_move (used by most file based modules), now correctly handles permission copy and setting mtime correctly across all paths

View File

@ -1,4 +0,0 @@
bugfixes:
- ->
runas become - Generate new token for the SYSTEM token to use for become. This should result in the full SYSTEM
token being used and problems starting the process that fails with ``The process creation has been blocked``.

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-galaxy collection install - remove old installation info when installing collections (https://github.com/ansible/ansible/issues/83182).

View File

@ -1,4 +0,0 @@
bugfixes:
- COLOR_SKIP will not alter "included" events color display anymore.
minor_changes:
- Introducing COLOR_INCLUDED parameter. This can set a specific color for "included" events.

Some files were not shown because too many files have changed in this diff Show More