Commit Graph
54910 Commits
Author SHA1 Message Date
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
j-dr3andGitHub dcc5dac184 sysvinit: make examples consistent (#85108) 2025-05-08 12:08:14 -07:00
omahsandGitHub 471c5229a7 Fix typos (#85107) 2025-05-08 12:05:12 -07:00
Martin KrizekandGitHub 8b9ddf5544 Passing warnings to exit/fail_json is deprecated. (#85109) 2025-05-07 11:02:04 -07:00
Matt DavisandGitHub 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
Martin KrizekandGitHub 107842fd7d dnf5: skip pkgs that don't satisfy bugfix/security when specified (#85111) 2025-05-07 10:52:23 -07:00
pollenJP(@'ω'@)andGitHub 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
Jordan BoreanandGitHub e4cac2ac33 Add win_script become tests (#85079) 2025-05-01 06:46:15 +10:00
Brian CocaandGitHub 9f894b81c2 ensure predictable permissions on module artifacts (#84948)
and test it!
2025-04-30 10:09:06 -04:00
Martin KrizekandGitHub cff49a62ec dnf5: avoid generating excessive history entries (#85065)
Fixes #85046
2025-04-29 16:51:22 +02:00
Martin KrizekandGitHub dbf131c07d async_status: fix example to use finished test (#85066)
Fixes #85048
2025-04-29 08:52:57 -05:00
Matt ClayandGitHub 0aa8afbaf4 ansible-test - Use -t for container stop timeout (#85019) 2025-04-28 21:06:12 -07:00
Brian CocaandGitHub aab732cb82 show internal but not hidden config options, while still hiding test options (#84997) 2025-04-24 12:48:12 -04:00
Brian CocaandGitHub 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
Matt DavisandGitHub 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
Brian CocaandGitHub 2cbb721f6f normalize error handler choices (#84998)
use existing to avoid deprecation cycle
normalize test too
2025-04-18 16:06:17 -04:00
Matt ClayandGitHub 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
Matt DavisandGitHub 1b6b910439 Miscellaneous fixes (#85012)
* Add help_text to play_hosts deprecation

* clean up TaskResult type handling
2025-04-17 15:14:01 -07:00
Matt ClayandGitHub f7d03474a5 Disable retries on ansible-galaxy-collection (#85013) 2025-04-17 21:55:21 +00:00
Sloane HertelandGitHub 93e6f012cb Remove unused local function _get_plugin_vars from vars manager (#85008) 2025-04-17 15:16:30 -04:00
Matt ClayandGitHub 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
Matt ClayandGitHub e094d48b1b Disable parallel publish in galaxy test (#85000) 2025-04-15 13:26:59 -07:00
Abhijeet KasurdeandGitHub 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
Martin KrizekandGitHub 4868effc71 get_bin_path('ssh-agent'): required is deprecated (#84995) 2025-04-15 16:30:29 +02:00
Felix FonteinandGitHub 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
Matt ClayandGitHub 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
Brian CocaandGitHub 6fc592df9b Fix uninstall tests (#84973)
match file name to package_manager detection of dnf5
2025-04-11 18:55:08 -04:00
Matt ClayandGitHub 3d30e05bb4 ansible-test - Improve runme.sh error handling (#84972) 2025-04-11 20:56:34 +00:00
Abhijeet KasurdeandGitHub 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
Abhijeet KasurdeandGitHub 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
Abhijeet KasurdeandGitHub 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
Matt MartzandGitHub 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
Alexandre MorignotandGitHub 16db3fe6c9 fix typo (#84955) 2025-04-10 15:54:40 +00:00
Abhijeet KasurdeandGitHub 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
Matt ClayandGitHub 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
Matt MartzandGitHub a01e58cae3 Support prompt matching with ssh_askpass (#84927) 2025-04-08 10:18:18 -05:00
Abhijeet KasurdeandGitHub 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
Matt MartzandGitHub 6a274d8456 Handle forwarded exceptions from dnf5-5.2.13 (#84933) 2025-04-08 09:35:32 -05:00
Matt ClayandGitHub 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
Jordan BoreanandGitHub 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