Commit Graph

9607 Commits (ef8f41c940e83fc1900a05cb883da149e786d89a)

Author SHA1 Message Date
Matt Clay ef8f41c940 Revert "[stable-2.9] Add additional constraint for `setuptools` (#75651)"
This reverts commit 5faae7f464.

Now that `setuptools` version 58.0.3 has been released, this change is no longer needed.
4 years ago
Sam Doran 5faae7f464
[stable-2.9] Add additional constraint for `setuptools` (#75651)
The recent release of setuptools 58.0.2 breaks installation of coverage since
it references the 'use_2to3' feature.
4 years ago
Brian Coca 19261a7bed
Attributes compat (#75563) (#75622)
* Attributes compat (#75563)

* 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)
(cherry picked from commit 93cc74ba13)

* Update test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/schema.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
4 years ago
Sloane Hertel 081a93caa3
[2.9] Fix dnf package matching (#75411) (#75416)
* Fix dnf package matching (#75411)

* 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)

* Fix dnf test assertion

(cherry picked from commit 91a26ddcef)
5 years ago
Felix Fontein e9bc474208
Allow to ignore rstcheck errors. (#75405)
(cherry picked from commit 46819a65fa)
5 years ago
Matt Martz cab637a733
[stable-2.9] allow env to override unspecified unsafe_writes (#73282) (#75397)
* [stable-2.9] allow env to override unspecified unsafe_writes (#73282)

* allow env var for fallback value for unspecified unsafe_writes.
(cherry picked from commit c7d4acc12f)

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

* ensure unsafe writes fallback (#70722)

* Ensure we actually fallback to unsafe_writes when set to true

 add integration test
 add fix for get_url not passing the parameter from args

(cherry picked from commit 932ba36160)

* Added clog missing for issue 70722 (#73175)

(cherry picked from commit d6670da1d7)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
5 years ago
Gonéri Le Bouder 4e4f2a37f8
ansible-test: exposes tiny_prefix variable (#75130)
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)
5 years ago
Matt Martz 9b20405210
[stable-2.9] Prevent ansible_failed_task from further templating (#74290) (#75220)
* Prevent ansible_failed_task from further templating
Fixes #74036
* Add changelog.
(cherry picked from commit 664531d7d6)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
5 years ago
Felix Fontein 7a5c66fe14 [stable-2.9] Restrict packaging to < 21.0 for Python < 3.6. (#75186).
(cherry picked from commit 67bc49e001)

Co-authored-by: Felix Fontein <felix@fontein.de>
5 years ago
Sam Doran 332ca6e298 [stable-2.9] Skip docker_container test when running in a container 5 years ago
Sam Doran b3fd2b5012 Skip broken test on OS X 5 years ago
Sam Doran 60c03e8af4
Add constraints for new ruamel release (#75134)
Newer releases of ruamel.yaml and ruamel.yaml.clib require newer Python versions.
5 years ago
Abhijeet Kasurde 4acad228f0
[bp-2.9] firewalld: Ensure idempotency (#74992)
Fixes: https://github.com/ansible-collections/ansible.posix/issues/179

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Brian Coca 8b17e5b922
fix unsafe preservation across newlines (#74960) (#74976)
CVE-2021-3583
  ensure we always have unsafe

Co-authored-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit 4c8c40fd3d)
5 years ago
Sam Doran 88eb0f1dfb
Skip task for CentOS 8 as well (#74913)
Something change in the packages that was failing on RHEL
a few weeks ago. Now it is failing in CentOS 8 as well
5 years ago
Rick Elrod 4f0e584ea4
[2.9] [tests] add websocket-client constraint, python 2 (#74750)
Change:
- websocket-client >= 1 requires python 3, so add constraint for python
  2.

Test Plan:
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>

* avoid a mysql_variables check on rhel 8

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Sam Doran 6fe7640fa5 [stable-2.9] Disable rabbitmq integration tests 5 years ago
Matt Clay c310830553
[stable-2.9] CI and compat fixes for Jinja2 >= 3.0 (#74666) (#74672)
* [stable-2.9] 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.

* Remove unnecessary ignore.

* Disable failing nuage_vspk test.

* Fix inventory_aws_conformance integration test.

(cherry picked from commit f99d024851)

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Davis <mrd@redhat.com>.
Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Matt Clay d8d20a2ff9 [stable-2.9] Fix ansible-test AZP build lookup.
(cherry picked from commit 877e5b3dfe)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 6afac6878c [stable-2.9] 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>
5 years ago
Rick Elrod fb177b3878
shift a few CI groups [2.9] (#74553)
ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Sam Doran 9380d74c02
[stable-2.9] incidental_setup_rabbitmq test - Use official repo for rabbitmq-erlang (#74453)
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>
5 years ago
Matt Clay 14036d154d [stable-2.9] Fix pypi-test-container port conflict.
(cherry picked from commit cb7f4f1971)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Rick Elrod d4a3d6cd0a
[ansible-test] Sync opensuse containers with 2.10 (#74436)
* [ansible-test] Sync opensuse containers with 2.10

Change:
- OpenSuSE 15.1 is now EOL
- Switch containers to use what 2.10 uses, which has 15.2.

Test Plan:
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>

* docker version

Signed-off-by: Rick Elrod <rick@elrod.me>

* needs p7zip-full, otherwise we only get 7zr

Signed-off-by: Rick Elrod <rick@elrod.me>

* Make sure py2 stays py2

Signed-off-by: Rick Elrod <rick@elrod.me>

* no wildcard?

Signed-off-by: Rick Elrod <rick@elrod.me>

* -x instead of --xml

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Martin Krizek e8c1c1d636
Actually run blocks/finalized_task test (#74291) (#74310)
(cherry picked from commit 7fecb7ccc3)
5 years ago
Matt Clay dfe3a4d345
[stable-2.9] Fix ansible-test docker container IP detection. (#74390)
(cherry picked from commit 14ff5e213c)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Sam Doran 4b23ac77e1 Disable failing hcloud_server test 5 years ago
Matt Clay 225709ca20
[stable-2.9] Switch to hashlib.sha256() for ansible-test (#72411) (#74170)
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>
5 years ago
Gonéri Le Bouder f4ec55b2d8
[stable-2.9] validate_modules: fails with .id attribute not found (#73322) (#74179)
* validate_modules: fails with .id attribute not found

This patch addresses a problem in the `found_try_except_import` test.

This module tries to identify lines like:

`HAS_FOO = True`

In this case, the target (`HAS_FOO`) is of type `ast.Name` and has a
`id` attribute which provide the name.

In my case, I've a line that set a module attribute`. In this case, the
target (`module.var`) has the type `ast.Attribute` and no `id`
attribute. The code trigger an `AttributeError` exception.

This patch ensures we compare a `ast.Name`.

* Update test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py

(cherry picked from commit 7cf80f50d1)
5 years ago
Sam Doran cc97479f9d
[stable-2.9] ansible-test - ensure trailing separator is added for connection unit test target (#74176) (#74182)
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>
5 years ago
Matt Clay 3155c8c26c
[stable-2.9] Add PyPI proxy container for tests on Python 2.6.. (#74206)
(cherry picked from commit becf941673)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Sam Doran 0d668b6046
[stable-2.9] find - set proper default based on use_regex (#73961) (#73966)
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)

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

* Update fix_find_default.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
5 years ago
Matt Davis f8caa43dc7
add optional module_utils import support (#73832) (#73916)
Treat  core and collections module_utils imports nested within any Python block statement (eg, `try`, `if`) as optional. This allows Ansible modules to implement runtime fallback behavior for missing module_utils (eg from a newer version of ansible-core), where previously, the module payload builder would always fail when unable to locate a module_util (regardless of any runtime behavior the module may implement).

* sanity test fixes

ci_complete

(cherry-picked from 3e1f6484d7)
5 years ago
Matt Martz 1592c8b0fd
[stable-2.9] Ensure task from the worker is finalized/squashed (#73881) (#73929)
* Ensure task from the worker is finalized/squashed. Fixes #57399. Fixes #49942
(cherry picked from commit 832631b)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Rick Elrod 9052b0e7f2
[security] Add more missing no_logs (#74115)
Change:
- Add missing no_log on fields and subfields which should have it.
- Update several changelogs with CVE id.

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Matt Clay 7fa32b9b44 [stable-2.9] Fix ansible-test coverage exporting.
(cherry picked from commit b75844af45)
5 years ago
Mark Chappell 84e61b32f8 Ensure unit test paths for connection and inventory plugins are based on the context (#73877) 5 years ago
Sam Doran 21eac8aba4 Move file needed by cs_volume test to S3
There is a bad mirror missing the file and it is causing tests to fail.
5 years ago
Rhys d0703a8c7d
Update mongodb replicaset check_compatibility function (#72299)
* Update check_compatibility function
5 years ago
Felix Fontein 68f32e43c1
Backport of https://github.com/ansible-collections/community.docker/pull/88 to stable-1. (#73816) 5 years ago
Sam Doran 35c3b3d42d
[stable-2.9] Add AlmaLinux to the family of Red Hat-like operating systems (#73541) (#73544)
* Add changelog and fixtures for AlmaLinux support

Co-authored-by: Christoph Schug <com+github@schug.net>.
(cherry picked from commit 2f5c83dfb1)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Matt Martz 4c503fe3b1
[stable-2.9] Don't treat host_pinned as lockstep (#73484) (#73513)
* [stable-2.9] Don't treat host_pinned as lockstep (#73484)

* Don't treat host_pinned as lockstep. Fixes #73364

* Add intg tests.
(cherry picked from commit d3f3784b86)

Co-authored-by: Matt Martz <matt@sivel.net>

* Make non-lockstep callback tests more deterministic (#73511)

(cherry picked from commit 125c220343)
5 years ago
Felix Fontein fc4c154a8e
Backport of 8702713ac3 (#73638) 5 years ago
Gonéri Le Bouder cf53554cf5
[ansible-test] attempt to work around podman (#72096) (#73570)
Change:
- podman > 2 && < 2.2 does not support "images --format {{json .}}"
- podman also now outputs images JSON differently than docker
- Work around both of the above.

Test Plan:
- Tested with podman 2.0.6 in Fedora 31.

Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit 0332046699)
5 years ago
Gonéri Le Bouder 462edf003e
ansible-test: yamllint, check the assigment (#73584)
Ensure `yamllint`'s `check_assignment()` correctly ignore the
attribute assignment. Those don't have any `.id` attribute and will
trigger an `AttributeError` exception.

See: https://github.com/ansible/ansible/pull/73322
(cherry picked from commit 0a8d5c0983)
5 years ago
Matt Martz 0d20c829a2
[stable-2.9] Normalize ConfigParser between Python2 and Python3 (#73715) (#73724)
* [stable-2.9] Normalize ConfigParser between Python2 and Python3 (#73715)

* Normalize config parser between py2 and py3

* Add tests and changelog

* Use different config entry, since we supply certain env vars.
(cherry picked from commit 950ab74758)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Sam Doran 5a9f4f7bb3 Move win_uri to a group that does not reboot the test instance
Another test in group3 reboots the test instance, killing the ssh connections
needed for access to the httptest container.

ci_complete
5 years ago
Sam Doran 733704f97e Rebalance Windows test groups to avoid timeouts 5 years ago
Sam Doran 55a3f2e1eb Update signing key used in incidental_setup_flatpak_remote tests
The original key was created using the default expiration time of two years.
Signed the repo again using a key that expires in twenty years.
5 years ago
Ashwini Mhatre 67e0d9a481
[stable-2.9]:Fix IOSXR integration test (#73607)
* Fix integration testcase in netconf_config for iosxr
5 years ago