Commit Graph

10672 Commits (92fb7dbec1f3ba03a4a55d25ea4ca4ce4179516e)

Author SHA1 Message Date
Matt Clay 8519c3ecdd Limit pynacl for paramiko tests. 3 years ago
Sloane Hertel 03b7db736c Disable the _distutils_hack in newer setuptools (#76600)
* Disable the _distutils_hack in newer setuptools. Doesn't fix the underlying issue of the venv finding the _distutils_hack of a setuptools that is not its own.

ci_complete

* re-throw blanket

(cherry picked from commit fa617fcd7b)
3 years ago
Matt Clay 964bc8bf10 [stable-2.10] Fix wait_for integration test.
Pin the `psutil` package to 5.8.0 since 5.9.0 is broken on macOS.
(cherry picked from commit a5f4a25d32)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 9f421b10c3 Add sanity test ignores. 3 years ago
Matt Clay 70e75e6a3b [stable-2.10] ansible-test - Fix traceback in validate-modules test.
(cherry picked from commit 41ee4a5b12)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Sam Doran 91687afddd [stable-2.10] pin mongodb libraries in test
A recent release of PyMongo 4.0 caused tests to fail
3 years ago
Sam Doran 63e958ebc9
[stable-2.10] Use new codecov uploader (#75938) (#76269)
* Use new codecov uploader
* Rewrite coverage uploader in Python.
(cherry picked from commit 74dc830dd4)

Co-authored-by: Sam Doran <sdoran@redhat.com>
3 years ago
Matt Clay 08404fc511 [stable-2.10] Fix pip integration test.
- Use `fallible==0.0.1a2` instead of `black==19.10b`
- Test on both Python 2 and 3.
(cherry picked from commit b6725ec6c9)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay c7996fe90e ansible-test - remove obsolete power/centos remote 3 years ago
Jordan Borean 87e77a93a9
PowerShell - Ignore LIB env var when building C# code (#75698) (#75724)
* PowerShell - Ignore environment variables when building C# code

* Just unset LIB for now

* Fix sanity issue

(cherry picked from commit 097bc07b66)
3 years ago
Matt Martz 2cdc3834c9
[stable-2.10] Don't show params when there is an issue with `set_option(s)` (#75805) (#75809)
(cherry picked from commit 79e9dae)

Co-authored-by: Matt Martz <matt@sivel.net>
3 years ago
Matt Clay a00c61719b ansible-test - Fix `pylint` error.
This prevents `pylint` from failing with warnings reported as errors and with no test results given.

Resolves https://github.com/ansible/ansible/issues/75791
3 years ago
Sam Doran ac1132e2a5
[stable-2.10] ansible-test - pin antsibull to prevent failures (#75801)
A recent release of antsibull is causing docs-build sanity tests to fail and
it was not properly pinned in stable-2.10 branch.
3 years ago
Brian Coca e10a4d511d
various fixes to command (#74212) (#74258)
* various fixes to command

  - Updated splitter to allow for all expected args in ad-hoc
  - Ensure we always return the returns we promissed to always return (i.e stderr/stdout)
  - Updated docs to clarify creates/removes precdence in checking
  - Removed abspath from chdir to allow reporting to handle symlinks correctly
  - Corrected tests to new output messages

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b3b1dde648)
3 years ago
Brian Coca 12c4661bbb
Attributes compat (#75563) (#75621)
* ignore 'attributes' for json dump

  let existing overrides display, wont be full info but still pertinent info
  though user will have to check newer versions

(cherry picked from commit 463cf9fe24)
3 years ago
Sloane Hertel ff19924a7d
Fix dnf test assertion (#75426) (#75428)
(cherry picked from commit e23fdee45e)
3 years ago
Sloane Hertel c1dd0caf2a
Fix dnf package matching (#75411) (#75417)
* Fix a bug with the dnf module not using all components of a package name when filtering to determine if it's installed

* changelog

* Simplify splitting on the last '.'

* Update lib/ansible/modules/dnf.py

(cherry picked from commit b541a148d5)
3 years ago
Matt Martz 0cf5666778
[stable-2.10] allow env to override unspecified unsafe_writes (#73282) (#75396)
* allow env var for fallback value for unspecified unsafe_writes
(cherry picked from commit c7d4acc)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
3 years ago
Felix Fontein 46819a65fa Allow to ignore rstcheck errors. 3 years ago
René Moser 3ee1694dfe
[2.10] get_url: Fix checksum binary validation (#74674)
* get_url: Handle same SHA sum for downloaded files (#71435)

Fixes: #71420

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 159544610e)

* modules: get_url: Fix checksum binary validation (#74502)

From the sha512sum man page:

... The default mode is to print a line with checksum, a character indicating type ('*' for binary, ' ' for text), and name for each FILE.

(cherry picked from commit 403a5d147d)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
3 years ago
Abhijeet Kasurde e0cb0671af
[bp-2.10] get_url - Allow checksum file to be local file:// (#75052)
This would be a partial solution for #69364 in that the
SHASUMS file can be downloaded and gpg verified but then
used from the downloaded location to verify the get_url's file.

* Make checksum url parsing more explicit

Use urlsplit to test if the checksum string has a (currently tested and) supported url scheme.

(cherry picked from commit eb8b3a8479)

Co-authored-by: Edwin Hermans <edwin@madtech.cx>
3 years ago
Gonéri Le Bouder 9e5091ab5c
ansible-test: exposes tiny_prefix variable (#75129)
ansible-test aws provider now creates and exposes a new tiny_prefix
variable to provide a shorter prefix for the AWS tests.

(cherry picked from commit 5b8fb4dcd3)
3 years ago
Felix Fontein 676ed22a99 [stable-2.10] Restrict packaging to < 21.0 for Python < 3.6. (#75186).
(cherry picked from commit 67bc49e001)

Co-authored-by: Felix Fontein <felix@fontein.de>
3 years ago
Sloane Hertel e30ffb8499
[2.10] Fix using module-specific module_defaults in action plugins (#74850)
* Use the module redirect_list when getting defaults for action plugins (#73864)

* Fix module-specific defaults in the gather_facts, package, and service action plugins.

* Handle ansible.legacy actions better in get_action_args_with_defaults

* Add tests for each action plugin

* Changelog

Fixes #72918

(cherry picked from commit 5640093f1c)

* Fix tests for < 3.8

(cherry picked from commit 267b7215b3)
3 years ago
Brian Coca 8aa850e357
fix unsafe preservation across newlines (#74960) (#74975)
CVE-2021-3583
  ensure we always have unsafe

Co-authored-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit 4c8c40fd3d)
4 years ago
Sloane Hertel 093986dfaf
[2.10] ansible-galaxy - increase page size and add retry decorator (#74649)
* ansible-galaxy - increase page size and add retry decorator for throttling (#74240)

* Get available collection versions with page_size=100 for v2 and limit=100 for v3

* Update unit tests for larger page sizes

* Add a generic retry decorator in module_utils/api.py that accepts an Iterable of delays and a callable to determine if an exception inheriting from Exception should be retried

* Use the new decorator to handle Galaxy API rate limiting

* Add unit tests for new retry decorator

* Preserve the decorated function's metadata with functools.wraps

ci_complete

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit ee725846f0)

* Add changelog for ansible-galaxy improvements (#74738)

Changelog for #74240

(cherry picked from commit 9cfedcd9c9)
4 years ago
Sam Doran ee4e3564f0 [stable-2.10] Remove leftover test file from incidental_setup_rabbitmq removal 4 years ago
elara-leitstellentechnik 2b29428f22
[2.10] Do not remove non-empty cron tabs (#74697)
* Only remove crontabs if they are empty

(cherry picked from commit fefda12827)

* Add integration test to ensure system cron tab doesn't get removed. Increase cron integration tests separation.

(cherry picked from commit 1e37fa86b4)

* Also detect crontab which only contains whitespace as empty.

(cherry picked from commit 4b69c8f501)

* cron integration test: Adjust system crontab path to be distribution specific.

(cherry picked from commit 70be3730db)

* Add changelog fragment for #74497.

(cherry picked from commit c606b50a3d)

Co-authored-by: Fabian Klemp <fabian.klemp@elara-gmbh.de>
4 years ago
David Shrewsbury 62d69fc724
Fix fileglob parameter order bug (#72879) (#72904)
(cherry picked from commit fe17cb6eba)
4 years ago
Sam Doran c34bfc58cc [stable-2.10] Remove incidental_setup_rabbitmq integration test
All tests using this have been removed..
(cherry picked from commit 8d3dce49bf)

Co-authored-by: Sam Doran <sdoran@redhat.com>
4 years ago
Matt Clay a28aa38f6c Remove incidental_lookup_rabbitmq test.
It is no longer contributing unique code coverage.

(cherry picked from commit 26e8c07f32)
4 years ago
Sam Doran d1978c64e8
[stable-2.10] Remove incidental Azure tests (#74681) 4 years ago
Sam Doran b345760393 [stable-2.10] CI and compat fixes for Jinja2 >= 3.0 (#74666)
* Add constraint for MarkupSafe

MarkupSafe >= 2.0.0 requires Python >= 3.6.0. Add a constraint for older Python versions
and fix the `groupby_filter` test.

* Fix template_jinja2_latest test.

* patch filter decorators on newer Jinja2

* Jinja2 >= 3.0 renames several filter decorators used by Ansible itself, as well as by filters in collections. This patch ensures that the old names are usable within Ansible and by collections without warnings or errors.

* Ignore docs-build issues.

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Davis <mrd@redhat.com>.
(cherry picked from commit f99d024851)

Co-authored-by: Sam Doran <sdoran@redhat.com>
4 years ago
Matt Clay 357714a7c4 [stable-2.10] Fix ansible-test AZP build lookup.
(cherry picked from commit 877e5b3dfe)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Matt Clay 369af59c6c [stable-2.10] Remove obsolete Shippable specific scripts.
Also remove some other unncessary code from CI scripts.
(cherry picked from commit be7de9844e)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Sam Doran b69a23fe0e
[stable-2.10] incidental_setup_rabbitmq test - Use official repo for rabbitmq-erlang (#74452)
Previously it was hosted on bintray, but that service is shutting down on May 1. Using the new
repository also required using a newer version of RabbitMQ..
(cherry picked from commit 62cba4a6ad)

Co-authored-by: Sam Doran <sdoran@redhat.com>
4 years ago
Martin Krizek 316dbd50ed
Prevent ansible_failed_task from further templating (#74290) (#74307)
(cherry picked from commit 664531d7d6)
4 years ago
Matt Clay 768c165a84 [stable-2.10] Fix pypi-test-container port conflict.
(cherry picked from commit cb7f4f1971)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Martin Krizek 115e5998f4
Actually run blocks/finalized_task test (#74291) (#74311)
(cherry picked from commit 7fecb7ccc3)
4 years ago
Brian Coca 55ad72992d defend against bad or missing crypt (#74304)
* defend against bad or missing crypt

  fixes #74279

(cherry picked from commit 4494ef3a9d)
4 years ago
Matt Davis 768f3d75f9
Map Debian 8 to Python 2 (#74152) (#74360)
If Python 3 is installed on Debian 8 Ansible cannot run, as the version
is too old (3.4)

* Add integration test for python interpreter discovery on Debian 8
* fix test issue on Debian 9, add changelog
* un"fix" not broken test :D

Co-authored-by: Fabian Klemp <fabian.klemp@elara-gmbh.de>
Co-authored-by: Matt Davis <mrd@redhat.com>
(cherry picked from commit 437a08eb6d)

Co-authored-by: elara-leitstellentechnik <elara-leitstellentechnik@users.noreply.github.com>
4 years ago
Matt Clay cb4209489f
[stable-2.10] Fix ansible-test docker container IP detection.. (#74389)
(cherry picked from commit 14ff5e213c)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Fernando Correia 0d25d392aa
Detect Homebrew on Mac M1 (Apple Silicon) (#74378) (#74400)
Homebrew's default install location for macOS on ARM is /opt/homebrew.
Source: https://docs.brew.sh/FAQ

On a Mac M1 (Apple Silicon), homebrew will be installed at
/opt/homebrew/bin/brew.
4 years ago
Matt Clay 3d11b480d0
[stable-2.10] Switch to hashlib.sha256() for ansible-test (#72411) (#74169)
When FIPs mode is enable on centos-8, we are not able to load md5
functions.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
(cherry picked from commit a95213d2f5)

Co-authored-by: Paul Belanger <pabelanger@redhat.com>

Co-authored-by: Paul Belanger <pabelanger@redhat.com>
4 years ago
Sam Doran 19ab9ed7b9
[stable-2.10] ansible-test - ensure trailing separator is added for connection unit test target (#74176) (#74181)
For connection units tests, if the `__init__.py` file is modified, the trailing separator was
not added, making the target invalid.
(cherry picked from commit 7b79b69369)

Co-authored-by: Sam Doran <sdoran@redhat.com>
4 years ago
Matt Clay f5e27ef7ea
[stable-2.10] Add PyPI proxy container for tests on Python 2.6. (#74205)
(cherry picked from commit becf941673)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Brian Coca 9f74f0663a
Nonfatal facts (#73804) (#73830)
continue with local facts vs at script error
 actually capture execution errors
 better error messages in general
 add more local facts tests

 fixes #52427

(cherry picked from commit 9db557e431)
4 years ago
Brian Coca 1995b1b6e0
find - set proper default based on use_regex (#73961) (#73965)
When using "use_regex: yes" and setting an excludes: without
specifying a pattern: the existing code passes the file-glob '*' to
the regex matcher.  This results in an internal invalid-regex
exception being thrown.

This maintains the old semantics of a default match-all for pattern:
but switches the default to '.*' when use_regex is specified.

The code made sense as-is before excludes: was added (2.5).  In that
case, it made no sense to set use_regex but *not* set a pattern.
However, with excludes: it now makes sense to only want to exclude a
given regex but not specify a specific matching pattern.

Closes: #50067

* moved change to new location
added changelog

* Update lib/ansible/modules/find.py

Co-authored-by: Ian Wienand <iwienand@redhat.com>
(cherry picked from commit 089d0a0508)

* Fix up bad rebase, nuke duplicate "elements:" lines

Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Sam Doran <sdoran@redhat.com>
4 years ago
Brian Coca 7683dfb727
Fix setup subset (#74022) (#74047)
* fix error msg on bad subset
* added test
* handle more raised but not handled fact exceptions

(cherry picked from commit 4a82e2c486)

* Update fix_setup_bad_subset.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
4 years ago
Brian Coca adae63e053
Fix debug factsetter (#74067) (#74084)
* Fix debug factsetter (#74067)

* prevent debug from setting namespaced facts as tlv
* also added tests

(cherry picked from commit f9f839fa08)

* Update debug_dont_set_facts.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
4 years ago