Commit Graph

32258 Commits (980ec1642233e48b71882c2018604c2b191933c2)

Author SHA1 Message Date
Sam Doran 292c70368b
unarchive - log errors from underlying commands (#75329)
* unarchive - log errors from underlying commands

When a command run by the module fails, log the errors if debugging is enabled.

* Use debug() method
1 year ago
Sam Doran a56428de11
unarchive - properly handle relative path for `dest` (#75267)
* unarchive - properly handle relative path for dest

* Add integration test

* Return output of underlying commands with increased verbosity

* Revert "Return output of underlying commands with increased verbosity"

This reverts commit a2790c8275cdc5697b65670a0beffdc74b741bf6.

* Warn when a relative destination path was provided
1 year ago
Sloane Hertel b981a9dfcd
add a worker queue to get updates from the main results thread (#79886)
* Create a queue per WorkerProcess to receive intra-task updates
* Update `pause` action to use the worker queue
* Deprecate ConnectionBase()._new_stdin
* Add new `Display`  convenience method `prompt_until` to manage both controller- and worker-sourced prompting without cross-fork stdin sharing, in-worker mechanism to handle request-response over new worker queue.
1 year ago
Klaus Frank 39fd899d83
Clarify combine filter examples (#80078) 1 year ago
Yaakov Selkowitz c028006aaf
Define all processor facts on s390x (#19755) (#79806)
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
1 year ago
Martin Krizek 3fd0e12571
Introduce Delegatable and Notifiable mixin classes (#80077)
* Introduce Delegatable and Notifiable mixin classes

* fix sanity

* fix sanity
1 year ago
Desmond Obisi 43aa47c2af
package_facts requires python-rpm on SUSE systems in ansible 2.12.1 (#80041) 1 year ago
Martin Krizek 6c3d2a4e51
Use FAs with inheritance only when applicable (#80026)
... and set default value of an attribute on an object
only in NonInheritableFA.

Fixes #79777

ci_complete
1 year ago
devon-mar 2f8f7fba4c
Update lookup to use positional only arg for name to avoid conflicts (#79839) 1 year ago
Miklos Sagi b7ef2c1589
ansible-playbook -K breaks when passwords have quotes (#79837)
Now only 'unquote' when ini config file is the source
1 year ago
Matt Clay 21fc699b77
Remove trailing spaces from lines in YAML (#80032) 1 year ago
Jordan Borean 1e6b8249e7
Add condition that causes a when to skip a task to output msg (#78918)
* Add condition that causes a when to skip a task

* Fix up tests

* Use false_condition instead of failed_condition

* Remove formatting accidentially added

* Fix sanity
1 year ago
Martin Krizek bd329dc543
Make using blocks as handlers a parser error (#79993)
Fixes #79968
1 year ago
Sloane Hertel 556dadba6d
user - fix comparing existing group names to group IDs (#79981) 1 year ago
Matt Clay 715ab99462
ansible-test - Improve code formatting (#79983)
* ansible-test - Add blank lines after docstrings

* ansible-test - Preserve formatting of arg pairs

* ansible-test - Remove unused string

* ansible-test - Remove pointless dict() usage

* ansible-test - Clean up initial func arg indenting

* ansible-test - Clean up constructor arg indenting

* ansible-test - Clean up func arg wrapping

* ansible-test - Clean up comma and paren placement
1 year ago
Brian Coca e2f147bcec
ansible-inventory, add --limit option (#79596)
* ansible-inventory, add --limit option

* also graph

* optimize the when not providing limit

* added tests and clog

* avoid empty groups, fix tests

* i swear there as an ignore_errors there already!!?!?!?

* Fix stdout test fallback

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

* simpler approach using subset against inventory directly

* tyupose

* renamed funciton to what it actuall does
got yaml in line with others about removing empty groups

* have graph ignore limts, also note same for --host

* fixed typo long line

* better test

* cause hosvars are not a thing

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
1 year ago
Matt Clay 71f2e777ed
Update mypy to version 1.0.0 (#79963) 1 year ago
Sebastian Gumprich b5ff981369
Change `yes` to `true` in uri-module (#79934) 1 year ago
Martin Krizek d43d8274b1
Remove unneeded fallback code for nested defined/undefined tests (#79960)
* Remove unneeded fallback code for nested defined/undefined tests

The code used to handle defined/undefined tests on objects containing
nested undefined variables. Due to changes in lazy evalution of Jinja2
expressions it is no longer needed, see #56116.
1 year ago
Matt Martz 243d1b5e3d
Replace deprecated stacked `@classmethod` and `@property` (#79952) 1 year ago
Martin Krizek 09e0fb3516
Change ansible_job_id format (#79951)
* Change ansible_job_id format

...to be something that does not resemble float or other type which
value could be changed by literal_eval that jinja2_native uses.

Specifically the format of '%d.%d' is converted from str to float and
then back to float which may result in truncating the number resulting
in the job not being found because the job id does not exist.
1 year ago
Matt Davis e1d298ed61
don't ignore templated _raw_params that k=v parser failed to parse (#79913)
fixes #79862
1 year ago
Matt Clay 2525d0a136
basic.py - Perform Python version check earlier (#79954) 1 year ago
Matt Clay e6900f5cad
pycompat24 - Remove support for Python <= 2.5 (#79953) 1 year ago
Sloane Hertel fcdd7493ae
improve password_hash warning for unsupported algorithms (#79872)
* password_hash - give a warning for unsupported algorithms (that raise a TypeError)

* add suggested changes, a test and changelog
1 year ago
Matt Clay 9d65e122ff
Fix detection of available hashlib algorithms (#79946)
* Fix detection of available hashlib algorithms

Detection of hashlib algorithms now works on Python 3.x.
The new implementation works on Python 2.7 and later.

Test coverage is provided by both integration and unit tests.

* Add additional details about hashlib in docs
1 year ago
Matt Clay 716631189c
Fix "pointless" strings detected by pylint (#79943)
Convert these strings to comments, since they are not valid docstrings.
1 year ago
Matt Clay 02f6e40534
Clean up pointless statements (#79941)
* Add ignores for intentional pointless statements

* Remove redundant docstring

* Fix function docstring placement
1 year ago
Sloane Hertel fa1564c548
include_vars - document hash_behaviour + dir (#79790)
* document that hash_behaviour does not apply to individual files of variables when using the dir option

* add tests
1 year ago
Mateus Rangel 32672c6326
Improving the RETURN and its docs on the apt_repository module (#79658)
* Improving the documentation on how we generate the default value of the filename parameter

* fix pep8

* removing unnecessary documentation and improving the module's return

* making the RETURN docs

* pep8

* version_added and changelog

* module._diff

* module._diff fix

* add rudimentary tests for new outputs

---------

Co-authored-by: Matt Davis <mrd@redhat.com>
1 year ago
Sloane Hertel ce6e53e1f6
Remove another unwanted comma from pause action (#79926) 1 year ago
Matt Clay 379058e10f
Update collections.abc imports (#79911)
* Update `collections.abc` imports

- Use `six.moves` for modules and module_utils
- Use `collections.abc` for controller code

This avoids using `ansible.module_utils.common._collections_compat`,
which was added before the vendored `six` was updated to provide these
imports.

* Update _collections_compat to use six.moves

Also update the custom pylint rule to reflect this change.
1 year ago
Matt Clay 3b4f3c066a
Ignore necessary unused imports in module_utils (#79904) 1 year ago
Matt Clay 9e2aad6e51
Remove unwanted comma from pause action (#79908) 1 year ago
Matt Clay 51fadd0aac
Clean up unused imports in plugins (#79899) 1 year ago
Matt Clay 833909ac19
Clean up unused imports in core (#79900)
* Clean up unused imports in core

* Add changelog fragment
1 year ago
Matt Clay b3307f1aa7
Remove unused stdlib imports from module_utils (#79905) 1 year ago
Matt Clay 639e3e30d7
Remove unused internal imports from module_utils (#79906) 1 year ago
Matt Clay 2fa8ee503c
Clean up unused imports in modules (#79898) 1 year ago
Matt Clay d637e87a9e
user - Remove invalid return docs (#79891) 1 year ago
Matt Martz 0a00263a53
Use arg validation in debug action (#79866)
* Use arg validation in debug action. Fixes #79862

* Add clog frag

* Move the msg default into the argspec
1 year ago
Konrad Gawda 1c01eab3fb
Remove irrelevant line (#79865)
Remove irrelevant comment line form example code
1 year ago
Bartłomiej Kida 0ab53aefc9
Update dnf.py (#79679) 1 year ago
Tabah Baridule M 913e4863af
Description for changing User ID to match user value (#79470) 1 year ago
Jordan Borean 652a74e087
AddType - Support compiling with /unsafe C# code (#79853)
* AddType - Support compiling with /unsafe C# code

* Update Ansible version in docstring
1 year ago
Matt Clay 83fe75db07
Ansible.Basic.cs - Fix compile error on PS 7.3.x (#79848) 1 year ago
Hofer-Julian 6cd1a1404a
docs: Extend password entry of ansible.builtin.user (#79694)
* docs: Extend password entry of ansible.builtin.user

Clarify that `password` sets the password hash.
Not the actual password.
Fixes part of  #79684
1 year ago
Sloane Hertel 321848e98d
fix installing collections from git repos that contain MANIFEST.json (#79808)
* add null 'manifest' key to metadata for git repo collections containing MANIFEST.json

changelog

* set to Sentinel instead of None

* Test installing a collection in a git repo that contains a MANIFEST.json

* fix test

* Update changelogs/fragments/ansible-galaxy-install-git-src-manifest.yml
1 year ago
Matt Clay 27cd5e77d8
Update mypy and its dependencies. (#79812)
* Update mypy and its dependencies.

* Fix requirements.

* Remove unnecessary matching constraints.
1 year ago
Brian Coca 281474e809
strategy fix invalid variables being registered (#79706)
also added tests for normal and bad cases
1 year ago