Commit Graph

6266 Commits (8d07ed6318b95f56632d39e646e6bb4cde145b51)

Author SHA1 Message Date
Jason K Hall 8d07ed6318
Handle ValueError in run_command when parsing invalid args(shlex.split) (#85945) 1 month ago
Brian Coca d9d11d6ff6
sanitize path symbols in inventory_hostname on file cache plugins (#41420)
* File based cache plugins filenames fix

File based cache plugins will now correctly handle inventory_hostnames
with 'path symbols' in their names. This should allow those using
chroot and jail connection plugins to use file based caches now.
1 month ago
Abhijeet Kasurde 7bd2475a70
file, stat: return disk_usage_bytes (#85909)
Fixes: #70834

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
1 month ago
Brian Coca 169e6bead3
generated inventory plugin, add extra vars option (#85372) 1 month ago
Sloane Hertel df34bf9e70
Update win_exec_wrapper integration test to match #86029 (#86052)
* Remove assertion now that there is no warning
1 month ago
Abhijeet Kasurde 790b66f383
interpreter_discovery: removed auto_silent* option (#86006)
* interpreter_discovery: removed auto_silent* option

* Removed deprecated auto_silent* option from interpreter_discovery_python

Fixes: #85995

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

* Make CI green

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>
1 month ago
sivel / Matt Martz d6051b18dd
Add support for crypt/libxcrypt via ctypes, as an alternative to passlib (#85970)
* Add support for crypt/libxcrypt via ctypes, as an alternative to passlib

* move verbosity message to BaseHash

* Don't require DYLD_LIBRARY_PATH mods for standard homebrew installs on macos

* improve crypt_gensalt error handling
1 month ago
Brian Coca ccfb7b1364
Fix include_role error consitency and add rescueable option (#86012)
* include_role now behaves more like task on error

changes _from errors from syntax to task failures, by default
which makes it more consistent with other existing errors
 * also force 'missing role' to behave as syntax error when false
 * also error when subdir does not exist, previouslly we ignored missing
   file
 * add 'rescuable' toggle to allow user to chose error type

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
1 month ago
Brian Coca 1cb2932c95
config lookup, fix 'show_origin' and variables (#85356)
show_origin and variable sources were broken for base config when 'forked' from plugins
---------
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
1 month ago
Brian Coca 22721b5d63
Slurp armor option (#85986)
* slurp, add option to deactivate the armor

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2 months ago
Martin Krizek 05d5b0f168
Avoid the ssh-agent exiting before tests end (#85979)
There were couple of occurrences where the hard 30 seconds limit on
running ssh-agent was not enough for the test to run and the ssh-agent
was killed resulting in the test failing with "Connection refused". This
change just lets the agent run in the background and kills it
manually after the tests finish.
2 months ago
sivel / Matt Martz c02f59ca3a
fix urls in additional ansible-doc test (#85988) 2 months ago
sivel / Matt Martz 5a9afe4409
Fix signal propagation (#85907) 2 months ago
Matt Clay 9ee667030f
ansible-test - Update sanity test requirements (#85980) 2 months ago
David Shrewsbury feda8fc564
Fix flakey get_url test (#85953) 2 months ago
s-hamann 0c7dcb65cf
fetch - return file in result when changed is true (#85729)
Set the (source) file attribute in the return value if the file changed
(e.g. on initial fetch). The attribute is already set in all other
cases.
2 months ago
Sloane Hertel cb2ecda514
Remove support for resolvelib < 0.8.0 (#85936)
* Remove support for resolvelib < 0.8.0

Remove code handling differences between resolvelib 0.5.3 and 0.8.0

Drop some versions from the test to reduce the time it takes to run

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>

* Remove type annotation

---------

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
2 months ago
Martin Krizek 313c6f6b4d
Don't special case implicit meta tasks when filtering on tags (#85805)
* Don't special case implicit meta tasks when filtering on tags

Fixes #85475
2 months ago
Abhijeet Kasurde 6bee84318d
known_hosts: return rc and stderr in fail_json (#85871)
* When ssh-keygen fails, return rc and stderr in fail_json
  in order to help debugging.

Fixes: #85850

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2 months ago
Martin Krizek c3f87b31d1
import_tasks processing closer to include_tasks (#85877)
Fixes #69882
Closes #83853
Fixes #85855
Fixes #85856
2 months ago
Felix Fontein c6d8d206af
Make sure ansible-doc doesn't crash when scanning collections whose path contains ansible_collections twice (#85361)
Ref: https://github.com/ansible/ansible/issues/84909#issuecomment-2767335761

Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2 months ago
Sloane Hertel 27a56a34df
Add feature preview play argument spec validation (#85763)
* Add new play keyword validate_argspec

Set to True to use the play name as the argument spec identifier. A play name is required (i.e. a host pattern is not supported as an argument spec name).

Alternatively, set to a specific argument spec name.

A valid argument spec for the play is required. Example:

# playbook.meta.yml
argument_specs:
  name of the play:
    options: {}

* Play argument spec validation runs after fact gathering

Play keywords like tags are inherited and work similarly to fact gathering
3 months ago
Brian Coca c87dc6ed7d
script inventory plugin correct error message (#85765)
type was reflecting 'converted' type, not 'pre conversion' of the data
now message points at specific data keys
add deprecation tests
3 months ago
Sloane Hertel 5e8815b823
Fix ansible-doc -l/-F/--metadata-dump for relative imports in filter/test plugins (#85801)
* Add test for sidecar documentation for filter plugin in a subdirectory

Fix ansible-doc --list/--list_files/--metadata-dump for relative imports in nested filter/test plugin files
3 months ago
Sloane Hertel ced362a50d
ansible-galaxy - remove deprecated v2 API (#85830)
* ansible-galaxy - remove deprecated v2 API

Update unit tests exercising the v2 Galaxy API

Remove v2 API integration tests

* Remove internal test configuration for servers which support API v2 and v3

* Update and simplify verify tests by using the configured server list
3 months ago
Ketan Kelkar 18691ec83f
Replace module - update string comparison method from bytes to unicode (#85785) 3 months ago
Zdeněk Vydra 60511c2a08
Fix uri form-multipart to not overwrite filename to allow retries (#85010) 3 months ago
Jordan Borean 250610b924
Remove tarfile data_filter check (#85808)
Removes the now uneeded tarfile check for data_filter now that our
minimum Python version on the controller is 3.12 and guarantees it will
be present.
3 months ago
Jordan Borean aad9fbd4f5
Windows async - handle trailing junk output (#85820)
Add handling for when a PowerShell module emits more than just the
module result JSON. The behaviour reflects the Python async wrapper
where trailing data after the module result will emit a warning.
3 months ago
Martin Krizek 065f202d30
Remove (de)serialize methods (#85724)
* move task specific from_attrs to Task
* Keep deserialize on PC, add tests
3 months ago
Patrick Kingston 36f00cdf1a
Expand integration test coverage for `deb822_repository` module
PR #85586
3 months ago
Abhijeet Kasurde a805356358
include_vars: Code cleanup and integration tests (#85292)
* Updated docs
* Removed stale code
* Added integration tests for better coverage

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
3 months ago
Jordan Borean 3582997698
Remove deprecated vars plugin fallback (#85809)
* Remove deprecated vars plugin fallback

Removes the vars plugin `get_host_vars` and `get_group_vars` fallback
which was deprecated.

* Remove integration tests for removed feature
3 months ago
Felix Fontein 4209d714db
validate-modules and return fragments: fix bug in markup check, fix bug in missing doc fragment check, add tests (#85638)
* Prevent crashing on invalid structure.

* Also process return doc fragments.

* Fix handling of missing doc fragments.
3 months ago
Felix Fontein 4c27ccf8f4
default callback: allow to configure indentation (#85497)
* Comment on PyYAML's behavior if indentation is set to 1, or to 10+.
3 months ago
Sloane Hertel 0ed37ca899
setup - add logical volume facts scoped by volume group (#85705)
Add an 'lvs' key to each value in ansible_facts['vgs'] to support extracting all logical volume facts.

Add note to consider deprecating ansible_facts['lvs'] in a future release since it is misleading if any volume groups have identical logical volume names.

Fixes #85632
3 months ago
Abhijeet Kasurde 7b1644e0b3
dnf: Check if installroot is directory or not (#85748)
* dnf: Check if installroot is directory or not

* dnf library creates installroot if it is missing.
  check if installroot is directory or not.

Fixes: #85680

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
3 months ago
Martin Krizek 6976e13075
ternary: evaluate values lazily (#85752)
Fixes #85743
3 months ago
Martin Krizek 3ec07418aa
ansible-doc: remove displaying role attributes (#85725) 3 months ago
Brian Coca 534b8c225a
vars deprecation (#85673)
internal 'vars' dict cache has not been used for long time, but kept since we could not deprecate and some users had found it
3 months ago
Brian Coca 931c923e0e
Deprecate defaulting to inject (#85323)
INJECT_FACTS_AS_VARS config deprecate default of true
3 months ago
Brian Coca 75ad1f8d6a
tags warn wwhen using reserved tags (#85631) 3 months ago
Martin Krizek c5ddc93767
Expose ansible_failed_task in rescue for explicit flush_handlers (#85687)
Fixes #85682
4 months ago
Abhijeet Kasurde 603dd2d793
test: Remove redundant Python 3 condition (#85664)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
4 months ago
Ketan Kelkar 18289c403d
Blockinfile - Add new module option - 'encoding' (#85291)
Signed-off-by: Ketan Kelkar <ktnklkr@gmail.com>
Signed-off-by: Yogesh Rana <Yogesh.Rana@ibm.com>
Co-authored-by: Yogesh Rana <Yogesh.Rana@ibm.com>
Co-authored-by: Yogesh Rana <36674300+yrana17@users.noreply.github.com>
Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Matt Davis e3c9908679
Backward-compatible None handling in template concat and argspec str (#85652)
* templating coerces None to empty string on multi-node result

* avoid simple cases of embedded `None` in multi-node string concatenated template results ala <=2.18
* single-node template results preserve NoneType

* add None->empty str equivalency to argspec validation

* fix integration tests
* remove conversion error message check from apt_repository test
* remove error message check on `None` value for required str argspec in roles_arg_spec test (now logically-equivalent to empty string)

* explanatory comment for None->empty str coalesce
4 months ago
Ketan Kelkar 4cb5fe44b6
Lineinfile - Add new module option - 'encoding' (#84999)
Signed-off-by: Ketan Kelkar <ktnklkr@gmail.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Martz <matt@sivel.net>
4 months ago
Abhijeet Kasurde 90f62f3fdf
regex: validate input before processing (#85629)
* Validated user input for match_type before processing
* added new match_type 'fullmatch'

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
4 months ago
Martin Krizek 0cc771dc3c
six cleanup (#85284)
Co-authored-by: Matt Clay <matt@mystile.com>
4 months ago
Felix Fontein 45d62a726c
ansible-doc: show 'notes', 'seealso', and top-level 'version_added' for role entrypoints (#81796)
* Show 'notes', 'seealso', 'requirements', and top-level 'version_added' for role entrypoints.

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