Commit Graph

3614 Commits (7c62cdeecd4834a1ca38a01e42ea07e33044de19)

Author SHA1 Message Date
Matt Clay 7c62cdeecd
Fix MANIFEST.in includes (#80147) 1 year ago
Brian Coca ca604513db
apt_repository, dont assume only missing apt-key will populate stderr (#79827)
fixes #79825
1 year ago
Brian Coca ff3ee9c4bd
ansible-inventory prevent duplicating host entries (#80059)
this happened after implementing limits we introduced a bug that a host would be duplicated if it existed in a group's children
1 year ago
Sviatoslav Sydorenko 8fec2d2a82
Add macOS 13 to CI and ansible-test (#79508)
*  Add macOS 13.2 to `ansible-test`

* 🧪 Replace macOS 12.0 with 13.2 in the CI matrix

* Skip `lookup_url` under macOS 13.2

This is due to https://wefearchange.org/2018/11/forkmacos.rst.html
that manifests itself as follows:

    TASK [lookup_url : Test that retrieving a url works] ***************************
    objc[15394]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
    objc[15394]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in t
    he fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
    ERROR! A worker was found in a dead state

* 📝 Extend ansible-test change note w/ macOS 13.2
1 year ago
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
Mark Chappell f64e79be41
sanity tests - ignore pre-release versions for deprecation comparisons (#79185) 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
Matt Clay f587856beb
Remove straight.plugin dependency (#80084) 1 year ago
Matt Clay 6bfe6b899a
ansible-test - Fix vendoring support (#80074)
- Support loading of vendored Python packages.
- Exclude vendored Python packages from payloads.
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
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 1108c0f331
Fix markdown in changelog fragment (#80065) 1 year ago
Matt Clay bca55d945b
ansible-test - Adjust vcenter test plugin behavior (#80063)
The previous change to the default mode of operation for the plugin is now limited to collections.

This enables easier testing of the plugin in core, so the previously removed tests have been restored.
1 year ago
Sviatoslav Sydorenko c05d813661
Fix #80020 typos confusing `pylint` for `pytest` (#80056) 1 year ago
Matt Clay 5e3db6e441
ansible-test - Show Python version before install (#80022)
Always indicate the Python version being used before installing requirements.
1 year ago
Matt Clay e6cffce0eb
ansible-test - Allow target prefixes to use `_` (#80021)
Integration test target prefixes defined in a `tests/integration/target-prefixes.{group}` file can now contain an underscore (`_`) character.
1 year ago
Matt Clay fe2732b91e
ansible-test - Support pylint assertion rewriting (#80020)
Add support for `pylint` assertion rewriting when running unit tests on Python 3.5 and later.
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
Matt Clay a4248a63aa
Add missing newlines to YAML files (#80031) 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
Matt Clay 117cf0a44b
ansible-test - Disable the pep8 E203 rule (#79966)
The `E203` rule in `pycodestyle` is not fully PEP 8 compliant.
Disabling it provides compatibility with the output of the `black` code formatter.
1 year ago
Matt Clay 67d49734f7 ansible-test - Support Podman 4.4.0+ 1 year ago
Matt Clay d67b436eba
ansible-test - Improve pylint backwards compat (#79997) 1 year ago
Sloane Hertel 556dadba6d
user - fix comparing existing group names to group IDs (#79981) 1 year ago
Matt Clay 43487c6581
ansible-test - Enable unused-import pylint rule (#79912)
This was previously enabled for core. This change enables it for collections.
1 year ago
Matt Clay 10bc8af5a2
ansible-test - Remove auto format pylint rule (#79985) 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
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 c8c1402ff6
ansible-test - Fix file permissions for delegation (#79932)
* ansible-test - Fix file permissions for delegation

* Set more restrictive permissions for SSH key

* Check all execute bits, not just owner

* Add a breaking_changes changelog entry
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
Matt Clay 402ae0aa5d
ansible-test - Remove old containers and remotes (#79929) 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 4706af58ab
ansible-test - Enable trailing-comma-tuple pylint rule (#79909) 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