Commit Graph

12470 Commits (devel)

Author SHA1 Message Date
Brian Coca 4a84a9b3db
copy keep suffix on temp file for validation (#82158)
Also updated test to require suffix

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
6 months ago
Martin Krizek a8b6ef7e7c
flush_handlers: handle a failure in a nested block with force_handlers (#81572)
Fixes #81532

ci_complete
6 months ago
Dellucifer f2b5c33349
fixed typos in the documentation (#82077) 6 months ago
Matt Clay fd009a073a Remove sefcontext support plugin
It was only used by the subversion test, but is no longer required.
6 months ago
Matt Clay 0e6942a4d7
Remove unused unit test code (#82168) 6 months ago
Abhijeet Kasurde c5b68ef16d Update Python3
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 months ago
Matt Clay 98407fc00e Remove unused validate-modules unit test code 6 months ago
Matt Clay dae4e2f07f
Remove unused/unreachable unit test code (#82160) 6 months ago
Matt Clay 0be33551d7
Remove unit tests dependent on systemd bindings (#82161)
These do no not run as part of our test suite.
6 months ago
Abhijeet Kasurde 78c16d983e Remove type_regex testcase
This is leftover testcase for type checker regex removed in
https://github.com/ansible/ansible/pull/82153

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 months ago
Matt Clay 9dd3eafa14 ansible-test - Use pylint unidiomatic-typecheck
This replaces the regex based check previously used within the validate-modules sanity test.

NOTE: The pylint check overlaps with a similar check for pep8.
      Both are used, since the pep8 based check is more nuanced than the one in pylint.
      For example, allowing `is` checks, but not `==` comparisons.
      If the pylint check is ignored, the pep8 check would still be relevant.
6 months ago
Martin Krizek 7538668731
Check strict before failing to respect skip_broken (#80795)
Fixes #80590
6 months ago
Matt Clay 916a20fccd Ignore coverage of test code that does not run 7 months ago
JustinWayland dec9eeb2e5
Remove create_new_password parameter in CLI.build_vault_ids (#82066)
* Remove unused argument in call to build_vault_ids

* Remove obsolete build_vault_ids tests

* Change tests to account for argument removal

* Remove redundant test
7 months ago
Brian Coca 20a54eb236
restore role param precedence (#82106)
* add test for setfact/param override
7 months ago
Matt Clay ac3ae94ae1
Ignore coverage on code intended never to execute (#82128)
* Ignore coverage on code intended never to execute

* Fail collection loader test if wrong code runs

* Update boilerplate test to accommodate nocover
7 months ago
Matt Clay 1df791cd90
Ignore code which coverage can't analyze (#82125)
* Ignore code which coverage can't analyze

Our own tracing function can't be traced.

* Use `nocover` instead of `no cover` for consistency
7 months ago
Jordan Borean f8a9fd4758
Remove duplicate winrm test (#82124) 7 months ago
Matt Clay 36d6860d80 ansible-test - Remove no-main-display sanity test 7 months ago
Matt Clay 6e15fb0ebf ansible-test - Removed no-basestring sanity test 7 months ago
Matt Clay c349b91af3 ansible-test - Removed no-dict-* sanity tests 7 months ago
Matt Clay 9765bb46f9 ansible-test - Remove no-unicode-literals test 7 months ago
Matt Clay 172a010dd7 Remove unused test support plugins 7 months ago
Matt Clay 5b1b0ce762 Remove Python 2 compat (via six) from unit tests 7 months ago
Matt Clay 18e8401edd
Remove Python 2.x compat from unit tests (#82109) 7 months ago
Matt Clay 89cda0bcae
pip - Add break_system_packages option (#82097) 7 months ago
Jordan Borean f5a0c0dfc8
Ignore testing data for gitleaks (#82083) 7 months ago
Thomas Sjögren fb8ede22e1
don't warn about using a yescrypt hash as user password (#82071)
* dont warn about using a yescrypt hash as password

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* add changelog

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* add yescrypt test

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

---------

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
7 months ago
Martin Krizek fe94a99aa2
any_errors_fatal fixes (#78680)
Fixes #31543
Fixes #36308
Fixes #73246
Fixes #80981
Fixes #81533

ci_complete
7 months ago
Matt Clay c827dc0dab Remove obsolete requirements from prepare_http_tests 7 months ago
Brian Coca 99e0d25857
ansible-pull now handles all secret files CLI options (#82009)
* ansible-pull added missing pasthrough for secrets

 Both become and connection password file options were missing.
 Also added test
7 months ago
Brian Coca 9ee603d1c5
Clarify some points in config lookup documentation (#81951)
Also update tests to support the format on modules/plugins

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
7 months ago
Matt Clay 0b7387d46c Improve filter_encryption test
- Update `data2_vaulted_string_with_id` to match the documented plaintext.
- Add a comment explaining how `data2_vaulted_string_with_id` was derived.
- Add assertions for unvaulted values to ensure they match their plaintext.
- Add round-trip tests for vault+unvault when no salt is used.
7 months ago
Matt Clay 2d2211e4e1
Simplify filter_encryption test (#82062) 7 months ago
Matt Davis 40263992df
remove args passthru on role runme tests that use grep (#82060)
* varying verbosity was masking some first-pass test failures
7 months ago
Brian Coca b4566c18b3
Fix Jinja plugin deduplication (#82002)
for j2 plugins dedupe on path and  not basename
for j2 this is a container file , for other plugins file name == plugin name
7 months ago
Matt Clay e933d9d8a6 ansible-test - Fix parsing of cgroup entries 7 months ago
Matt Clay 09d943445c
Fix subversion integration test (#82029)
- Remove dependency on the htpasswd module (and thus passlib)
- Fix setup/teardown of the httpd process
- Fix cleanup of temporary directories
7 months ago
Matt Clay 37cee8bdfc
ansible-test - Remove special cryptography install (#82008)
Python 3.10 is the minimum version on the controller, and it requires openssl 1.1.1 or later.

As a result, there's no need to check the openssl version any longer.
7 months ago
Jordan Borean 22568305d6
Add ignore invalid options override for mod wrapper (#81899)
Adds an option that can have an action plugin tell the module to ignore
options that do not fit its arg spec. This is to enable support for core
running modules that exist outside of the collection that may not be new
enough to support some of the options supplied to it.
7 months ago
Matt Clay 4f04df75cc
Fix outdated S3 URLs (#81964)
We should always use the CloudFront backed endpoint (ci-files) not the direct S3 bucket reference (ansible-ci-files).
7 months ago
Matt Clay f5c742cdfd
ansible-test - Clean up old Python 2 compat code (#81962)
* Update generated code __future__ import

* Remove Python 2.x compat from compile sanity test

* Remove __metaclass__ from pylint good names list

* Remove Python 2.x compat from ansible-test injector

* Remove Python 2.x compat from ansible-test importer

* Remove Python 2.x compat from ansible-test units

* Remove Python 2.x compat from validate-modules

* Remove Python 2.x compat from pylint plugins

* Remove more Python 2.x compat from ansible-test

* Remove Python 2.x openssl detection in ansible-test

* Remove obsolete Python 2.x comment

* Remove obsolete ansible-test Python 2.x support

* Remove unused bootstrap script functions

* Keep mypy happy

* Remove unused imports

* Keep pylint happy
7 months ago
Matt Clay 3f607359de
Remove obsolete compat code from integration tests (#81961)
Also fix up boilerplate for non .py extension files that contain Python code.
7 months ago
Matt Clay 9295bb5b5d
Unit test cleanup (#81958)
Remove obsolete Python 2.7 and 3.6 support code and fix up existing tests.
7 months ago
Matt Clay fd0f48e99d
ansible-test - Update base/default containers (#81957) 7 months ago
Matt Davis d8484f0af7
Update default test container Python to 3.12 and support for PyLint 3.0.1 (#81953)
* temporary PyLint plugin to mask 3.12 finalizer noise

* ansible-test - Default to Python 3.12 for base/default

* ansible-test - Update pylint requirements

* ansible-test - Remove obsoleted changelog entry

* Add changelog fragment for pylint work-around
7 months ago
Sviatoslav Sydorenko d2ba76c117
Remove Python `< 3.5` `selectors` fallbacks (#81872) 7 months ago
Sviatoslav Sydorenko 46623b0a96
Deprecate `pycompat24` (#81896) 7 months ago
Sviatoslav Sydorenko 350a394185
Remove Python 2 importlib.import_module compat (#81879) 7 months ago
Matt Martz 92d2c66db2
Remove py2 support from urls.py (#81880) 7 months ago
Jordan Borean 8a5ccc9d63
ansible-galaxy - fix traceback error for invalid req file (#81917)
Provide a better error message when encountering a YAML requirements file that is not a dictionary or list.

Fixes: #81901
8 months ago
Jordan Borean 976067c15f
Add more winrm coverage (#81923) 8 months ago
Jordan Borean 282908c57e
Add test coverage for winrm (#81910) 8 months ago
Matt Clay 16b23d6779
Rename boilerplate sanity test (#81903)
The test covers more than just future boilerplate, so the shorter name is more appropriate.
8 months ago
Matt Clay 9f899f9492
Require `from __future__ import annotations` (#81902) 8 months ago
Matt Clay 921efce43a
ansible-test - Remove more Python 2.7 / 3.6 support (#81898) 8 months ago
Jordan Borean dfc62589f6
win_fetch - improve test time by not scanning Win dir (#81884) 8 months ago
Matt Clay b94ee1cefd
Drop Python 2.7 and Python 3.6 support (#81866)
* Drop Python 2.7 and Python 3.6 support

* Remove obsolete _json_compat
8 months ago
Sloane Hertel debf2be913
optimize host_group_vars and vars plugin loading (#79945)
* Improve host_group_vars efficiency:

* normalize the basedir with `os.path.realpath()` once and cache it
* cache missing paths/files
* reduce the calls to `isinstance`

Add a couple more general improvements in vars/plugins.py get_vars_from_path():

* call `PluginLoader.all()` once for vars plugins and reload specific
  plugins subsequently
* don't reload legacy/builtin vars plugins that are not enabled

Add a test for host_group_vars and legacy plugin loading

Co-authored-by: Matt Davis <mrd@redhat.com>

* changelog

* Add a new is_stateless attribute to the vars plugin baseclass

update integration tests to be quieter and use the same test pattern

Fix deprecation and adjust test that didn't catch the issue (deprecation only occured when the value was False)

move realpath cache to host_group_vars (do not smuggle call state as instance data)

refactor under a single 'if cache:' statement

Call os.path.isdir instead of always calling os.path.exists first. Just call os.path.exists to differentiate between missing and non-directory.

remove call to super(VarsModule, self).get_vars()

use the entity name as the cache key instead of variable location

Remove isinstance checks and use a class attribute just in case any plugins are subclassing Host/Group

Replace startswith by checking index 0 of the name instead, since host/group names are required

* rename is_stateless to cache_instance to make it more clear what it does

* add plugin instance cache using the path to plugin loader

reduce loading stage option if a new instance isn't created

don't require a known subdir on PluginLoader instantiation for backwards
compatibility

rename attribute again

contain reading from/initializing cached instances to a plugin loader method

* Deprecate v2 vars plugins

* Refactor to use the cache in existing plugin loader methods

Rename the attribute again

Refactor host_group_vars with requested changes

Make changelog a bugfixes fragment

Add a deprecation fragment for v2 vars plugins.

Add type hints

* unbreak group_vars

* Apply suggestions from code review

* misc tweaks

* always cache instance by both requested and resolved FQ name
* add lru_cache to stage calculation to avoid repeated config consultation

* handle KeyError from missing stage option

---------

Co-authored-by: Matt Davis <mrd@redhat.com>
8 months ago
Martin Krizek 9b3ed5ec68
Properly template tags in parent blocks (#81624)
When templating tags (which happens outside of standard `post_validate`) we
need to template each object in the inheritance chain and set the templated
values on those objects individually. That way when `task.tags` is called the
`extend` functionality properly picks up the templated values of all
parents into one flatten list.

Fixes #81053
8 months ago
Martin Krizek 2d5861c185
run_once: unnotify hosts on handlers that are not run (#81667)
Fixes #81666
8 months ago
Sloane Hertel 000cf1dd46
Update the test containers to include Python3.12.0 final (#81858) 8 months ago
Sloane Hertel b3408ab80b
Fix dnf module crash for non-existent url (#81801)
* ci_complete ci_coverage
8 months ago
Martin Krizek 116766ac3e
Add intentional tests for dnf group remove (#81739)
* Add intentional tests for dnf group remove

* Copy tests from yum
8 months ago
Matt Clay b7903669b4
ansible-test - Update distro containers (#81851)
* ansible-test - Update distro containers

* Update the alpine3 container to Python 3.11

* Update changelog
8 months ago
Matt Clay 20f17687da
ansible-test - Invoke container sleep through env (#81853) 8 months ago
Abhijeet Kasurde d8f791d88c
Bump sanity test requirements for 3.12 (#81846) 8 months ago
Abhijeet Kasurde ce3954ba74
Bump sanity test requirements for 3.12 (#81843) 8 months ago
Sviatoslav Sydorenko ec265ec08a
Bump `coverage.py` to v7.3.2 in `ansible-test` (#81844) 8 months ago
Matt Clay f31c287348
ansible-test - Improve compatibility with pylint 3 (#81841) 8 months ago
Brian Coca ab6a544e86
Import role public (#81772)
revert to previous behavior to push vars to play at compile time
add `public` parameter to allow per import control of exporting (vs just the global config)

Co-authored-by: tchernomax <maxime.deroucy@gmail.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
8 months ago
Matt Martz e78cc1e602
Install upgraded crun from edge (#81833) 8 months ago
Abhijeet Kasurde 4d4c50f856
Provide more info about plugin in deprecation message (#81719)
Provide more information about plugin usage which needs to be
used instead of the deprecated plugin in the deprecation message.

Fixes: #80561

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
lukaslihotzki-f 27bbff7c22
Add count and mandatory_count parameters in regex_replace filter (#81775) 8 months ago
Martin Krizek 01d190f3d2
Add intentional tests for module_utils/yumdnf.py (#81776) 8 months ago
Matt Clay d6a356d7cd
ansible-test - Update sanity test requirements (#81810) 8 months ago
Sloane Hertel cb8cb8936a
Update ansible-test containers
* Include Python 3.12rc3 and PowerShell 7.3.7
8 months ago
Martin Krizek 60c9660952
Add intentional tests for dnf install rpm when higher version is installed (#81740)
* Add intentional tests for dnf install rpm when higher version is installed

* ci_complete ci_coverage
8 months ago
Matt Martz 68ab02a504
Test heuristic_log_sanitize (#81730)
* Test heuristic_log_sanitize. See #81689

* Add note about what this test is doing

* grammar

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

---------

Co-authored-by: Matt Clay <matt@mystile.com>
8 months ago
Matt Martz ddf0311c63
Prevent roles from using symlinks to overwrite files outside of the installation directory (#81780)
* Sanitize linkname during role installs

* Add tests

* add clog frag
8 months ago
Hungtsetse 51f2ddd445
Extend mount info (#81768) 8 months ago
Sloane Hertel 230f956e25
Add lineinfile integration test for removing a line that has already been removed (#81762)
ci_complete ci_coverage
8 months ago
Sloane Hertel 85adaa76f1
Add integration test for copy with force=false when dest exists (#81756)
ci_complete ci_coverage
8 months ago
Matt Clay 3794612832
ansible-test - Skip pylint test on Python 3.12 (#81706) 8 months ago
Martin Krizek 1e7f7875c6
Allow for searching handler subdir for included task via include_role (#81733)
Fixes #81722
8 months ago
Abhijeet Kasurde 86fd7026a8
Handle exceptions in interpreter discovery (#81745)
* Handle exceptions like AnsibleError, AnsibleConnectionFailure
  raise while interpreter discovery.

Fixes: #78264

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Martin Krizek 62c10199d1
Add intentional tests for dnf list (#81738)
ci_complete ci_coverage
8 months ago
Carlos Camacho 9244b2bff8
Make sure paths are treated correctly when building collection files manifest (#81619)
* Make sure paths are correct when building collection files manifest

This commit makes sure the path of the files part of
the collection build manifest are correct.

This commit uses os.path.commonprefix instead of
dealing with strings.

Signed-off-by: Carlos Camacho <ccamacho@redhat.com>

Bugfix Pull Request
Fixes: #81618

* Revert the change note type to `minor_changes`

* Clarify the change note with user-oriented details

---------

Signed-off-by: Carlos Camacho <ccamacho@redhat.com>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
8 months ago
René Moser e4b9f9c6ae
tests: update CloudStack test container to version 1.7.0. (#81732) 8 months ago
Sviatoslav Sydorenko 7662a05085
Always allow "no-other-choice" pre-release dependencies when resolving collection dependency tree
PR #81606.

Prior to this patch, when `--pre` CLI flag was not passed, the
dependency resolver would treat concrete collection dependency
candidates (Git repositories, subdirs, tarball URLs, or local dirs or
files etc) as not meeting the requirements.

This patch makes it so pre-releases in any concrete artifact
references, and the ones being specifically pinned dependencies or
user requests, met anywhere in the dependency tree, are allowed
unconditionally.

This is achieved by moving the pre-release check from
`is_satisfied_by()` to the `find_matches()` hook, following the
Pip's example.

As a bonus, this change also fixes the situation when a collection
pre-releases weren't considered if it didn't have any stable releases.
This now works even if `--pre` wasn't requested explicitly.

Finally, this patch partially reverts commit
6f4b4c345b, except for the tests. And it
also improves the `--pre` hint warning to explain that it mostly
affects Galaxy/Automation Hub-hosted collection releases.

Ref #73416
Ref #79112
Fixes #79168
Fixes #80048
Resolves #81605

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
8 months ago
Abhijeet Kasurde 4b7705b07a
Remove deprecated APIs from ansible-doc (#81729)
* Removed add_collection_plugins
* Removed find_plugins

Fixes: #81716

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Matt Martz 3ec7a6e0db
Fix ansible-test issues with detecting docker host and forwarding ports (#81726)
* Properly detect docker host using ssh

* Disable ControlPath when creating SSH port forwards

* typo fix

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

* Add clog frag

---------

Co-authored-by: Matt Clay <matt@mystile.com>
8 months ago
Abhijeet Kasurde 0ea40e09d1
vars: handle exception in combine_vars (#81700)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Matt Martz f7234968d2
bump devel to 2.17.0.dev0 (#81712) 8 months ago
Abhijeet Kasurde a1a6550daf
inventory_ini: Handle SyntaxWarning in ini parsing (#81707)
* handle SyntaxWarning ini inventory parsing

Fixes: #81328

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Abhijeet Kasurde 6f65397871
galaxy: check if the target for symlink exists (#81586)
* Symlinks in the collection might be pointing to non-existent
  targets. Check and report the failure to the user.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Felix Fontein 7f0baabbe0
blockinfile: avoid crash on Python 3 when creating directory fails (#81662)
* Avoid crash on Python 3.

* Add a test for the crash on Python 3
8 months ago
Abhijeet Kasurde 3b608f97b1
sanity: update requirements (#81680)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Abhijeet Kasurde e4468dc944
copy: print correct dest path when content + diff is used (#81678)
* when --diff is used with content parameter, print destination
  path instead of temporary file path.

Fixes: #79749

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Sloane Hertel 67cdaa49f8
ansible-galaxy-collection - fix config permissions for galaxy-importer (#81679)
* Fix permissions for the galaxy-importer config, previously only root had
read/write

* fix ownership instead
8 months ago
Matt Clay 7d3d4572ed
Fix set filters to use set operations (#81639)
* Fix set filters to use set operations

* Fix integration tests

* Update filter documentation
8 months ago
Felix Fontein b1b029c6b5
ansible-doc: allow to filter by more than one collection (#81450)
Make collection filters more flexible for listing collections.
Co-authored-by: Maxwell G <maxwell@gtmx.me>
8 months ago
Sloane Hertel 8034651cd2
Only mark a role as complete once a task in it executes for the target host (#81565)
* If all tasks in the role are skipped or unreachable, the role is not marked as complete for the host.

* Only mark the role as complete if a task in the role succeeds or fails for the host.
8 months ago
Abhijeet Kasurde cd0aa35c19
encrypt: deprecate passlib_or_crypt (#81571)
* deprecate passlib_or_crypt in favor of do_encrypt

Fixes: #55839
9 months ago
Abhijeet Kasurde 6177888cf6
ansible-vault: Check if the destination is writable (#81660)
* Before performing shredding the original file, check if the
  destination file location is writable or not. This will
  prevent corruption of original file.

Fixes: #81455

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
9 months ago
Matt Martz 3ec0850df9
Support packaging and importlib.metadata for pip module (#80881) 9 months ago
Matt Davis dd79c49a4d
fix various Jinja plugin caching issues (#79781)
* fix various Jinja plugin caching issues

* consolidate the wrapper plugin cache
* remove redundant cache in J2 filter/test interceptor

* intra-template loader bypass

* fix early exits swallowing some exception detail

* misc comment cleanup
9 months ago
David Gries 786a8abee6
yum/dnf/dnf5/zypper documentation - fix grammatical error (#81601) 9 months ago
Abhijeet Kasurde 1cc5efa77b
tarfile: Handle deprecation warning for extract and extractall (#81545)
* Python 3.11.4 introduces a new parameter 'filter' in extract and
extractall in tarfile. Handle deprecation warning message emitted
in Python 3.12.
* added probing mechanism in ansible-galaxy code to detect broken
data filter implementation in tarfile.

Fixes: #80832

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
9 months ago
Matt Clay 5a059b81c8
ansible-test - Fix Python coverage stub generation (#81611)
As of coverage 7.1.0, files without arcs are not generated.

To work around this, an empty (0, 0) arc is used for each file instead.

This is a follow-up to https://github.com/ansible/ansible/pull/81077

ci_coverage
ci_complete
9 months ago
Matt Clay e1e0e2709c
ansible-test - Enable thread code coverage (#81604)
ci_complete
ci_coverage
9 months ago
Matt Clay 261e5ce381
ansible-test - Update mypy to 1.5.1 (#81602) 9 months ago
Sviatoslav Sydorenko c59bcbe627
Bump `coverage.py` to v7.3.0 in `ansible-test` (#81077) 9 months ago
John HU 65a96daaf4
Fix typos in url lookup plugin options (#81587) 9 months ago
Matt Martz 509be19357
Fix nested jinja statements in integration tests (#81591) 9 months ago
Aleksey Tsalolikhin bdaa091b33
Add warnings for illegal file names in role (#81555)
Co-authored-by: Aleksey Tsalolikhin <atsaloli.tech@gmail.com>
9 months ago
Brent Barbachem 4ab5ecbe81
dnf - fix for a package from URI and update_only (#81568)
Fixes #81376
9 months ago
Abhijeet Kasurde da63f32d59
script: add argument validation (#81469)
partially fixes: #81349

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
9 months ago
Jordan Borean 7865b198d2
PowerShell - Improve error checking (#80984)
Improves the error checking when running PowerShell modules using
Ansible.ModuleUtils.Legacy. It will only return an rc of 1 if both the
PowerShell module runner signalled an error occurred and those error
records were present in the output. This should reduce some false
positive errors when using the older module style.
9 months ago
Jordan Borean f3976117fb
PowerShell - remove uneeded dotnet code for future compatibility (#81472) 9 months ago
Sam Doran 116948cd14
user - set current expiration correctly when no shadow entry exists (#75194) 9 months ago
Abhijeet Kasurde 2e6d849bdb
apt: ignore fail_on_autoremove and allow_downgrade when using aptitude (#81445)
* apt: ignore fail_on_autoremove and allow_downgrade when using aptitude

* fail_on_autoremove (--no-remove) and allow_downgrade (--allow-downgrades)
  parameters are only valid for apt-get and not for aptitude. Ignore them when
  aptitude is detected and used.

Fixes: #77868
9 months ago
Abhijeet Kasurde 863e2571db
debconf: idempotency for password question (#81484)
* Gather value of password using debconf-get-selections command,
  use this information for idempotency.

Fixes: #47676

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
9 months ago
Matt Clay 6627ba9ace
Unit test cleanup (#81556)
* Fix cleanup_tmp_file unit tests

* Simplify the problematic wcwidth chars unit test
9 months ago
Matt Clay f28e32c063
ansible-test - Limit deprecated check to core (#81552)
Using `# deprecated:` comment checks in collections would effectively limit those collections to a single version of ansible-core.
9 months ago
Caesarovich c69c83c962
Fix macos defaults (#79999) 9 months ago
Matt Clay 390e508d27
ansible-test - Always use managed entry points (#81537) 9 months ago
Martin Krizek a48feb4cfc
"retries" without "until": retry until success (#81531)
Fixes #20802
9 months ago
Martin Krizek 98f1627817
include_role: expose vars from parent roles to role's handlers (#81524)
* include_role: expose vars from parent roles to role's handlers

Fixes #80459
9 months ago
Matt Martz ca08261f08
Add ability to filter find on mode (#81485) 9 months ago
Martin Krizek 0cba3b7504
Last handler with same name wins for listen too (#81358)
Fixes #49371
Fixes #81013
9 months ago
Nikita Korolev bd3ffbe109
fix incorrect ansible_managed formatting (#79129)
Ansible breaks configs if file name could be parsed as jinja template
or contains `%` chars.
Especially `%n`[ame%] which is a line break pattern according to [strftime (3)](https://manpages.debian.org/bullseye/manpages-dev/strftime.3.en.html)
9 months ago
Matt Clay 47ab59753c
Clean up release script (#81488)
* Enable mypy for the entire packaging directory

* Return CompletedProcess only when capturing output

This allows stdout/stderr on CompletedProcess to be `str` instead of `str | None`.
The unused args on CompletedProcess have been removed.
Overload type hints have been added to reflect these changes.

* Relax return type on ensure_venv

This improves consistency with its usage, since `run` accepts `env` of `dict[str, t.Any]`.
Also removed unnecssary `str()` usage when updating `env`.

* Fix type hint on suppress_when

* Fix callable annotation

* Add type hint for command_parser

PyCharm complains about using a protected member, and also that it can't find the type in the type stubs.
However, mypy properly recognizes the type.

* Avoid unnecessary TypeVar usage
9 months ago
Matt Clay d0699cb44a
Add unit tests for module_utils.compat.datetime (#81483) 9 months ago
Matt Clay 580b87252c
Remove unreachable code in password lookup test (#81482) 9 months ago
Matt Clay 726d9a5fcc
Fix constructed inventory plugin unit test (#81481) 9 months ago
Matt Martz 553f51e728
Revert logic to use Popen.communicate (#80874)
* Back out use of communicate, add better comments, add bufsize, and align with subprocess._communicate

* tests

* re-order logic slightly

* more comments

* loopty loop

* yet another comment

* Revert "yet another comment"

This reverts commit 96cd8ada5fa0441b92f2298bdaa6cb40594847d2.

* Revert "loopty loop"

This reverts commit 96ea066f6a7d18902c04a14f18dd79b38e56f5e7.

* ci_complete

* Copy in comment too

* Wording updates

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

* Back out bufsize

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
9 months ago
Matt Davis 1c765a6afc
restore conditional lookup nerfing (#81460)
* a recent optimization lost the unsafe lookup disable behavior when templating conditionals with inline templates that referred to untrusted values
* added regression test to catch this case
9 months ago
Abhijeet Kasurde fa5fe8a7db
Bump test container versions to latest (#81471)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
9 months ago
Abhijeet Kasurde 493c678795
Sanity: Bump version to match Python 3.12 (#81399)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
10 months ago
Brian Coca f3a15a4a95
filters vault/unvault fix vault_id parameter usage (#81422)
* vault/unvault filters, fixed id field to match documented.

fixes #81420

Co-authored-by: Felix Fontein <felix@fontein.de>
10 months ago
Kristopher Newsome a1569ea4ca
iptables chain creation does not populate with a rule (#80257)
* iptables chain creation does not populate with a rule

fixes #80256

* Add changelog fragment

* Add rules and flush chain during integration tests

* Check chain rule on comment

* Update test/integration/targets/iptables/tasks/chain_management.yml
10 months ago
Abhijeet Kasurde f10d11bcdc
dpkg_selections: Check if package exists before selection operation (#81406)
* dpkg_selections: Check if the package exists before the selection operation

Fixes: #81404

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
10 months ago
Abhijeet Kasurde 95fdd555b3
galaxy: Cross check the collection type (#81423)
* User-provided collection type might differ from collection
  source. Cross-check the type before proceeding

Fixes: #79463

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
10 months ago
Matt Clay f894ce89b4
Overhaul package-data sanity test (#81427)
The sanity test now only inspects the sdist and wheel instead of trying to install the sdist using setup.py.
10 months ago
Sloane Hertel f5431321a2
password_hash - fix bcrypt algorithm when passlib is not installed (#81385) 10 months ago
Sloane Hertel 2ebeb43d6f
ansible-galaxy - improve ignoring multiple signature status codes (#77610)
* ansible-galaxy - improve ignoring multiple signature status codes when using --ignore-signature-status-code

* fix backwards compatibility by adding a new plural option instead, and hide the singular from --help
10 months ago
Matt Clay c525514994
ansible-test - Update source layout detection (#81418) 10 months ago
Matt Martz d1cd06073f
Extend setup_collections timeout to 3 minutes (#81408) 10 months ago
Matt Clay b9daa6891f
Remove unused sanity test code (#81398) 10 months ago
Abhijeet Kasurde 11e261b54f
CI: remove FreeBSD 12.4 from test matrix (#81315)
Fixes: #80417

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
10 months ago
Matt Clay 691c8e8603
Omit pre-built man pages from sdist (#81395)
Since man pages aren't accessible to users after a `pip install`, there's no need to include them in the sdist.
This change makes it trivial to build man pages from source, which makes them much easier to iterate on.
It also simplifies creation and testing of the sdist, since it no longer requires building man pages.

The new `packaging/cli-doc/build.py` script can generate both man pages and RST documentation.
This supports inclusion on the docs site without a dependency on `ansible-core` internals.
Having a single implementation for both simplifies keeping the two formats in sync.
10 months ago
Brian Coca 6d1f85bbe9
ansible-test: remove alpine 3.17 (#81124) 10 months ago
Davide Sbetti d5d1c27bf3
Add option to blockinfile to wrap inserted block with blank lines (#81083)
* Add new blockinfile options 'prepend_newline' and 'append_newline' to wrap inserted block with blank lines
10 months ago
Sloane Hertel 4c41562270
remove deprecated datetime.datetime methods (#81323)
* Remove datetime.datetime.utcfromtimestamp and datetime.datetime.uctnow
  from controller code since they are deprecated in Python 3.12.

* Update target side code to use new utcfromtimestamp and utcnow utils in ansible.module_utils.compat.datetime that return aware datetime objects on Python 2.7 and 3.

Co-authored-by: Matt Clay <matt@mystile.com>
10 months ago
Abhijeet Kasurde 923ede4f72
pep8: fix sanity for 3.12 (#81348)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
10 months ago
ERIK a5ccc0124f
Fix ansible_pkg_mgr is unknown in Kylin Linux (#81314)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
10 months ago
Matt Davis 6a8c51bb9c
fix redis cache setup (#81329)
* use https repo
* increase default download timeout of 10s for slow/lagged connections
10 months ago
freddiewanah 2a19c80b89
Refactor test cases to improve unit test quality (#81334) 10 months ago
Matt Clay c8bc393871
Raise the minimum setuptools version to 66.1.0 (#81341)
* Raise the minimum setuptools version to 66.1.0

This is the first version to support Python 3.12.

While Python 3.10 and 3.11 could use an older version, a consistent minimum is easier to work with and test against.

* Fix PEP 517 integration test
10 months ago
Sloane Hertel 5167618e46
Update ansible-test containers to test Python 3.12 with the test venvs (#81330) 10 months ago
Sloane Hertel 48dfe8e215
add Python 3.12 support to ansible-test (#80834)
* update docker containers versions to use newer ansible-test ref in the pre-built venvs

* Allow invoking ansible-test with Python 3.12

* Add python3.12 to the INTERPRETER_PYTHON_FALLBACK

* changelog

* add Python 3.12 as a non-default Python version for the test containers

* Update mypy ignores for Python 3.12

* Add Python 3.12 to CI matrix for unit tests, generic tests, and galaxy

* Update unit test for using the Python 2 collection loader path with Python 3.

Skip the existing test on Python 3.12, since find_module is removed.

Suppress the pre-existing deprecation warnings using the Python 2
codepath with Python 3.

Add a test for Python >= 3.12, which doesn't call find_module.

* Ignore sanity test errors on systems without libselinux present.
10 months ago
Sloane Hertel efbc00b6e4
Consider all configured collection paths when installing collections (#81243)
* Only install collections which can't be satisfied by a collection in any of the configured paths.

* Improve warning for unexpected collection install path

Fix warning when path is configured, but is a pip-managed path

Normalize the path before validating to fix warning consistency
10 months ago
Matt Clay c5d18c39d8
Update sanity requirements comments (#81321)
Also remove a redundant indirect dependency.

The requirements file updates are being deferred until other changes are required.
10 months ago
René Moser 99eeaf7da8
ansible-test: cloudstack: bump test container version (#81319) 10 months ago
Sloane Hertel 26d855c87e
update ansible-galaxy testserver to use SSLContext.load_cert_chain (#80961)
* update ansible-galaxy testserver to use SSLContext.load_cert_chain for Python 3.12 compatibility
10 months ago
Sloane Hertel d20a0c02cc
ansible-test - update module_utils/urls.py unit test to support cryptography >= 41.0.0 (#81296) 10 months ago
Yuri Khan 371b62eab1
Add test for 256-color configuration values (#78613)
* Add test for 256-color configuration values

See #78607.

* color is not restricted to 16 choices

 currently supports up to 256, not listing them all
 TOOD: create examples and point to/list the basic 16

---------

Co-authored-by: Brian Coca <brian.coca+git@gmail.com>
Co-authored-by: Matt Clay <matt@mystile.com>
10 months ago
Matt Clay 18cbfc688b
Add missing skip entries for selinux module_util (#81305) 10 months ago
Matt Clay e964078a83
ansible-test - Pre-build PyYAML wheels (#81300)
This works around Cython failures when attempting to install PyYAML >= 5.4 <= 6.0.
10 months ago
Matt Clay 261a12b8a9
Disable cron integration test on Alpine (#81301)
The tests are now failing due to the lack of `libfaketime` in the Alpine repos.
10 months ago
Matt Clay 765b2bd783
ansible-test - Narrow the scope of some sanity tests (#81273)
* ansible-test - Limit scope of replace-urlopen test

Only ansible-core code and plugins in collections can be expected to rely on module_utils.

* ansible-test - Limit scope of use-compat-six test

Only ansible-core code and plugins in collections can be expected to rely on module_utils.

* ansible-test - Limit scope of no-get-exception test

Only ansible-core code and plugins in collections should be checked for usage of outdated module_utils functions.

* Add integration tests
10 months ago
Matt Clay 3f7bf0bcd4
ansible-test - Fix sanity traceback with `-e` opt (#81271)
Also remove redundant warning about missing programs.

Includes integration tests to verify `-e` does not traceback.
10 months ago
Martin Krizek 39ef570e16
Remove BOTMETA.yml and sanity tests for it (#81198) 10 months ago
Matt Clay 26cb1652bc
Add `docs` and `examples` to obsolete-files test (#81258) 10 months ago
Abhijeet Kasurde c3015c5eb1
replace: handle exception while parsing escape char (#81244)
* replace: handle exception while parsing escape char

* Fail early when bad escape character is provided in replace module

Fixes: #79364

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

* Run tests in Python 3.6 or greater env

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

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
10 months ago
Sviatoslav Sydorenko b6ebb9d41a
Replace `reboot_command` integration test with unit tests (#78956)
Co-authored-by: Matt Clay <matt@mystile.com>
10 months ago
Sloane Hertel 59a791ee3b
ansible-test - remove Fedora 37 container and remote support (#81093) 10 months ago
Matt Clay 08307de366
ansible-test - Remove obsolete WinRM setup script (#81249)
The WinRM setup is handled internally by ansible-core-ci now.
10 months ago
Matt Clay b93a628aed
Omit hacking directory from MANIFEST.in (#81245)
* Omit `hacking` directory from `MANIFEST.in`

* Update package-data sanity test
10 months ago
Matt Clay 876be11f8c
Add pymarkdown sanity test for core (#81220)
* Clean up markdown

* Add pymarkdown sanity test for core

* Update unit test SHA
10 months ago
Matt Clay 72e038e823
Remove `docs` and `examples` directories (#81011)
* Remove docs dir

* Updates to reflect docs removal

* Fix integration test

* Remove examples dir

* Updates to reflect examples removal

* Remove build_library and build-ansible.py

* Remove refs to build_library and build-ansible.py

* Remove obsolete template

* Remove obsolete template reference

* Remove the now obsolete rstcheck sanity test
10 months ago
Matt Clay 38e50c9f81
Convert non-docs *.rst files to *.md (#81217)
* Rename README.rst to README.md

* Change README format from reStructuredText to Markdown

* Fix whitespace in README.md

* Update setup.cfg to use README.md

* Replace changelog placeholder with README.md

* Update package-data sanity test
10 months ago
Brian Coca c7eca0e5c0
first_found lookup, let lookup handle templating errors (#81178)
* first_found lookup, let lookup handle templating errors

Avoids case in which TE was not sending valid and templatable entries to the lookup
The lookup already handles the case TE was attempting to itself, so no need for this code anymore.

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
10 months ago
Sloane Hertel 67b78a17c4
Remove Python 3.9 support for the controller (#80973)
* Remove obsolete Python <=3.9 controller code
* Remove Python 3.9 test controller bootstrapping
* Update test requirements

Co-authored-by: Matt Clay <matt@mystile.com>
10 months ago
Martin Krizek eb19692f48
Properly disable modularity tests for dnf5 only (#81195) 10 months ago
Martin Krizek 7b2647f3b2
Re-introduce RHEL 9 modularity testing in CI (#81160) 10 months ago
Matt Clay f4ff6768f3
ansible-test - Remove old pytest-forked constraint (#81185) 11 months ago
Matt Clay 3d2ff64264
ansible-test - Fix import sanity test for targets (#81184) 11 months ago
Martin Krizek ca3ffbf4c2
ansible-test - remove test remotes: rhel 8.7/9.1 (#81065)
Fixes #80419
Fixes #80420
11 months ago
Sloane Hertel 73dde45f0f
ansible-galaxy - add pre-release hint to dependency resolution error (#81147)
* add pre-release hint to dependency resolution error if --pre wasn't provided

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
11 months ago
Matt Clay f1ddcb4ae4
Simplify release name tracking and testing (#81151)
Convert the release names list from YAML to plain text, removing the need for YAML parsing in the sanity test.
11 months ago
Matt Clay 8c9f5c9106
Remove unused unit test code (#81150) 11 months ago
Norman Ziegner bcdb82992a
user - add parameter for password expiration warning days (#79884)
* user - add parameter to set number of warning days before password expires

Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>
11 months ago
Matt Clay b06f7de24a
Remove unused strategy plugin unit tests (#81146) 11 months ago
Martin Krizek 0cc50e0673
dnf5: enable now implemented cacheonly functionality (#81141)
Note that this also fixes a traceback caused by backwards incompatible
change in dnf5 where cacheonly was changed from bool to string:
https://github.com/rpm-software-management/dnf5/pull/665/files#diff-ab65249ff7fccadfb2864b6826f6559f7f16fad43fd3bf2da0b4fe8db790d59aR179
11 months ago
Matt Clay 63946eaed6
Remove unreachable code in curses unit test (#81138) 11 months ago
Matt Clay 5f58775a1f
More unit test code coverage improvements (#81136) 11 months ago
Everson Leal 2f820381ea
Inventory Script Plugin: raise execution error (#81104)
It adds exception treatment when execute a inventory based on script with the --host argument

---------

Co-authored-by: Everson Leal <everson.leal@sonda.com>
11 months ago
Sloane Hertel ed8a404f4a
add coverage for Python 3.12 (#81125) 11 months ago
Sloane Hertel e780b5e56d
ansible-galaxy - add config option for the default ansible-galaxy timeout (#81108)
allow configuring the default server timeout via env/ini
11 months ago
Brian Coca e22fe9be56
ansible-test add alpine 3.18 as remote (#81109)
* add crun to avoid runc
11 months ago
Matt Clay e535eb625b
Remove long obsolete hacking/get_library.py (#81122) 11 months ago
Matt Clay 5b586096b3
Remove hacking/fix_test_syntax.py (#81121)
This script is no longer needed, since using tests as filters was removed in 2.9.
11 months ago
Matt Clay 82b5544b09
Improve code coverage of unit tests (#81119)
- Remove unused code
- Remove unnecessary code
- Ignore coverage for unreachable code
- Use previously unused code to increase coverage
11 months ago
Matt Clay da2cd157f1
Fix arg splitting and key/value parsing (#80030)
* Improve readability of unit test output

This drops the trailing `-expectedXXX` suffixes from test names generated by parametrize.

* Add more splitter unit tests

This fills in code coverage gaps in the exising unit tests.

* Bug fixes and code cleanup

- Fix IndexError exceptions caused by parsing a leading newline, space or escaped space.
- Fix an AttributeError exception in `parse_args` when parsing `None`.
- Fix incorrect parsing of multi-line Jinja2 blocks, which resulted in doubling newlines.
- Remove unreachable exception handlers in the `parse_kv` function.
  The unreachable code was verified through analysis of the code as well as use of the `atheris` fuzzer.
- Remove unnecessary code in the `split_args` function.
- Add an optimization to `split_args` for the empty args case.

* Add unit tests for bug fixes

The splitter code is now fully covered by unit tests.

* Add another issue ref in changelog
11 months ago
Jordan Borean 98d1cf7aa2
Deprecate plural collections_paths option (#81063)
* Deprecate plural collections_paths option

* Fix test assumption
11 months ago
Brian Coca a7d2a4e032
display, also proxy warnings and deprecations (#81060)
Use generic proxy for display  methods with decorator
11 months ago
Matt Clay c3926268e2
ansible-test - Avoid using atexit module (#81096) 11 months ago
Abhijeet Kasurde c69951daca
ansible-test: remove Ubuntu 20.04 LTS (#81070) 11 months ago
Abhijeet Kasurde bc68ae8b97
ansible-test: Added Fedora 38 (#81074) 11 months ago
Matt Martz 56b67cccc5
Resolve issues on python pre-3.10.6 with collection dirs longer than 100 characters (#81061) 11 months ago
Matt Martz 6fead15334
Pylint deprecated comment checker (#81071)
Co-authored-by: Matt Clay <matt@mystile.com>
11 months ago
Brian Coca 534f688a53
remove Freebsd 13.1 from test matrix (#81058)
* remove Freebsd 13.1 from test matrix

fixes #80416


Co-authored-by: Matt Clay <matt@mystile.com>
11 months ago
Martin Krizek cde15f3c81
Add test support for Python 3.11 on RHEL 8.8/9.2 (#80990)
Fixes #80412
Fixes #80413
11 months ago
Abhijeet Kasurde c1bc445aa7
ansible-test - Update openSUSE containers (#81062)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
11 months ago
Sloane Hertel ecbbd7e5d1
Remove Python 3.5 support (#80972)
* Remove Python 3.5 support

* changelog

* add requested changes

* Update changelogs/fragments/remove-python3.5.yml

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

* remove Python3 < 3.5 error handling

* remove Python3 < 3.5 error handling in TE too

---------

Co-authored-by: Matt Clay <matt@mystile.com>
11 months ago
James Cammarata 660f1726c8
Register handlers immediately if currently iterating handlers (#80898)
This fixes the issue where handlers notifying other handlers are
not properly run because the notification is not registered unless
another flush_handlers occurs. Instead, if the current host state
is iterating handlers we immediately register the handler to be
run so the notification is not lost.

Fixes #80880
11 months ago
Matt Martz 73e04ef2d6
Don't mutate templar.environment, only overlay on local myenv (#81005) 11 months ago
Abhijeet Kasurde cf803d6d58
Improved return docs (#81006)
* Improved the return docs for modules `sysvinit`
  and `systemd_service`

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
11 months ago
Martin Krizek f13e35cbf9
dnf5 - enable env groups testing in CI (#81032)
Implemented in https://github.com/rpm-software-management/dnf5/pull/585
11 months ago
Matt Clay 6ac0ea3567
Use *.md instead of *.rst for test READMEs (#81009) 12 months ago
Holger Dörner 25b3d3a6f7
Check if skeleton is /dev/null while creating home folder (#75948)
* Check if skeleton is /dev/null while creating home folder

* Add test for linux

Co-authored-by: Holger Dörner <h.doerner@bitexpert.de>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
12 months ago
Abhijeet Kasurde fda66eeee0
Sanity Fixes: (#80953)
* Typo fixes
* arguments-renamed
* pep8:E501
* pylint:use-a-generator
* pep8:E231
* use-argspec-type-path

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
12 months ago
Matt Martz 92d5ffda82
Update galaxy_ng container for tests (#80721) 12 months ago
Matt Clay 6e325d9e4d
Clean up MANIFEST.in (#80688)
* Remove unnecessary MANIFEST.in commands

This eliminates more setuptools warnings during build.

* Sort MANIFEST.in

Now that only include commands are used, the order of the commands no longer effects the build output.
12 months ago
Matt Martz ef3b806dd3
Fix remote_tmp tests so that they actually use the remote_tmp (#80969)
* Fix remote_tmp tests so that they actually use the remote_tmp

* Isolate remote_tmp dir during remote_tmp tests. Fixes #80965

* Do everything without become
12 months ago
Sloane Hertel 742d47fa15
replace deprecated ast.value.s with ast.value.value (#80968)
* replace deprecated ast.value.s with ast.value.value

the s attribute is deprecated since Python 3.8 and emits a warning in
3.12 causing some test failures
12 months ago
Matt Martz aa67d544fc
Handle unreachable errors in fetch properly. Fixes #27816 (#80952) 12 months ago
Matt Clay 3a1d58bc58
ansible-test - Use raise from to handle exceptions (#80905) 12 months ago
Matt Clay 43c31c5dc2
Use isinstance in unit tests for type checks (#80906) 12 months ago
Matt Clay 585b82838b
Improve code coverage of unit tests (#80904)
* Improve coverage of validate-modules unit tests

* Remove unused galaxy unit test code

* Fix galaxy unit test teardown logic

* Improve coverage of galaxy unit test code

* Improve coverage of galaxy unit tests

* Remove unused code in galaxy API tests

* Remove unused galaxy collection unit test code

* Improve coverage of galaxy collection unit tests

* Remove unused galaxy unit test code
12 months ago
Felix Fontein a5bb4c7dee
ansible-test - local change detection without --fork-point (#79734) 12 months ago
Abhijeet Kasurde e88ff32b10
deb822_repository: use http-agent with open_url (#80876)
* Use http-agent in open_url API while getting
  cloudflare content

Fixes: #80809

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
1 year ago
Abhijeet Kasurde 9f4dfff69b
Pylint fixes (#80855)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
1 year ago
Abhijeet Kasurde 56f2e65ee7
Remove unused test files (#80879)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
1 year ago
Abhijeet Kasurde c9f76f6d49
Remove unused import (#80875)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
1 year ago
Sloane Hertel 09b4cae4fb
unarchive - ensure src is an absolute path before picking handler (#80738) 1 year ago
Abhijeet Kasurde d955fb1590
Removed unused `get_md5` parameter from stat (#80871)
* removed unused, undocumented `get_md5` parameter from stat module.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
1 year ago
Matt Martz 8652b231f2
Align yum_repository documentation with arguments (#80867) 1 year ago
Brent Barbachem 0c7361d9ac
URI Module find json sub type (#80745)
* uri: fixed search for json types to include strings in the format xxx/yyy+json
1 year ago
Abhijeet Kasurde 652ddc4078
Fix pylint disallowed-name errors (#80854)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
1 year ago
Matt Martz 61157f6a9e
Switch from multiprocessing.Queue to SimpleQueue (#80838) 1 year ago
Felix Fontein 9526338273
validate-modules and docsite build: bump antsibull-docs(-parser) dependencies to new major versions (#80846)
* Bump antsibull-docs-parser version to 1.0.0.

There are no functional changes that affect the functionality used in validate-modules.

* Bump antsibull-docs to 2.0.0.
1 year ago
Brian Coca 4899d4a4d6
simple skip of connection (#80638)
Avoid 'persistent' connection handling if not needed
removed useless connection passing
added property to action classes as indicator/selector
1 year ago
Jordan Borean 8db9bd7574
Remove deprecated include (#80752)
* Remove deprecated include

* Add tombstone entry for include

* Use string for date

* Use todays date

* Remove uneeded if statement
1 year ago
Jordan Borean 2253837453
command - Add option to disable argument var expansion (#80512)
* command - Add option to disable argument var expansion

* Use test char that isn't an escape sequence
1 year ago
Arne de Laat 070ce87440
Add test for symbolic to octal when others is omitted (#80822)
* Add test for symbolic to octal when others is omitted

Add case when there should be no permissions for other.
And specific permissions for owner and group.

* Fix permissions test by explicitly setting no permissions for others

* Add additional cases where multiple permissions are specified
1 year ago
Jordan Borean 0a36cd910e
Removed testing support for Server 2012 and 2012 R2 (#80778) 1 year ago
Jordan Borean 0df794e5a4
urls - remove deprecated client key calls (#80751) 1 year ago