Commit Graph

8101 Commits (2d2ea756a61deabf80f63da82fb83c647afeb91c)

Author SHA1 Message Date
Sam Doooran 2d2ea756a6 [stable-2.8] Constrain pexpect and ptyprocess (#73109)
The recent update of ptyprocess to 0.7.0 is incompatible with Python 2.6 and
is causing test failures.

* Add setup_pexpect role to expect test
(cherry picked from commit 003a9e890d)

Co-authored-by: Sam Doooran <sdoran@redhat.com>
5 years ago
Jordan Borean 0f1bd4de10
Disable win_rds* tests in CI (#72889) 5 years ago
Rick Elrod 41f1209186
[2.8] [cloud_init_data_facts tests] fix for centos8 (#72886) (#72888)
Change:
- `udev` is provided by `systemd-udev`, which our `state=present` check
  doesn't match. For now, work around this so we don't end up trying to
  upgrade all of systemd.
- In the future, we should discuss if the `yum` module does the right
  thing here.

Test Plan:
- Locally in docker
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit 8eaa7423d4)
5 years ago
Matt Clay 35409b732d [stable-2.8] Use AZP config for integration-aliases test.
No changelog entry since this test is limited to the ansible/ansible repo.

Backport of https://github.com/ansible/ansible/pull/72842
5 years ago
Matt Clay 94df5ab8e2 [stable-2.8] Fix Azure Pipelines change detection. (#72824)
(cherry picked from commit 08842cd6bb)

Co-authored-by: Matt Clay <mclay@redhat.com>
5 years ago
Matt Clay b279a05efa Fix resource name. 5 years ago
Matt Clay a7fad72319 Fix resource name length. 5 years ago
Rick Elrod 14bde6cb84 [iso_extract tests] Fix another bad EPEL hardcode
Change:
- Use mirrorlist instead of baseurl here.

Test Plan:
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Matt Clay 6f771ebe2f [stable-2.8] Azure Pipelines config. 5 years ago
Rick Elrod 7666b7f035 [yum_repository tests] account for EOL'd EPEL
Change:
- Let the tests continue to run on EOL'd CentOS 6 and EOL'd EPEL 6.

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Rick Elrod 8192ed4454 [centos6] update container for EOL
Change:
- Reference:
  https://lists.centos.org/pipermail/centos-devel/2020-December/056208.html
- Bump centos6 container to 1.25.0

Test Plan:
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Sam Doran a9ac2a02c1
[stable-2.8] Pull images from Quay to avoid Docker Hub limits (#72700)
* Pull image from Quay to avoid Dockerhub limits

CI tests are failing in certain situations due to the new Docker Hub limits on anonymous pulls. Switch
to pulling an equivalent image from Quay.io.

* Use images in Quay that we control for CI

* Use images from a single test repo on Quay with tags

* Use correct hello-world image

* More image cleanup

* Fix bad replacement

* A few more alpine images

* Adjust expected output to match what the playbook sets it to
5 years ago
Jordan Borean 773ae7c3b2
Add RHEL 7.9 (#72558) - 2.8 (#72566)
* Add RHEL 7.9 - ci_complete (#72558)

(cherry picked from commit d451433e5d)

* Added changelog for RHEL 7.9 (#72572)

(cherry picked from commit bdd0c48837)
5 years ago
Rick Elrod dc7f8badd5
[zypper_repository test] Use repo that doesn't 404 (#72779)
Change:
- The repo we were testing with no longer seems to exist. Point to one
  that does.

Test Plan:
- local test in docker
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Sam Doran 9d1047f326 [stable-2.8] - ansible-test - add cryptography constraint for cffi (#72761)
The recently released version of cffi fails to install on systems with an older version of gcc. In
our case, this in the CentOS 6 test image. There is a fix but it has not yet been released.

https://foss.heptapod.net/pypy/cffi/-/issues/480
5 years ago
David Shrewsbury 643c118cbd
Test pip fix (#72766)
(cherry picked from commit 2eb9795543)
5 years ago
Matt Clay 0ea82ba711 [stable-2.8] Fix container discovery for the acme test plugin.
(cherry picked from commit f022dedd0a)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 2529281ed8 Fix ansible-test tar format handling.
Effectively a backport of https://github.com/ansible/ansible/pull/66926
5 years ago
Matt Martz 92128720bf
[stable-2.8] Update pip tests to omit install dev extras to avoid dep issues (#72436) (#72440)
(cherry picked from commit 2ee5af5)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Matt Clay 73b2199fa2
[stable-2.8] [stable-2.9] [stable-2.10] Fix ansible-test handling of user-defined docker networks. (#72256) (#72310)
* Fix ansible-test docker container detection.

* Attach test containers to the correct network.

* Do not assume `localhost` for accesing Docker.

* Look for containers on current network.

* Always map /var/run/docker.sock into containers.

This fixes issues when using a remote Docker host.

* Support container IP lookup from networks list.

* Fix container network attachment.

* Remove redundant container detection messages.

* Limit DOCKER_HOST parsing to TCP.

* Restore docker socket existence check.

The check is skipped if the docker hostname is not localhost.

* Correct changelog entry..
(cherry picked from commit 3c2e8b99be)

Co-authored-by: Matt Clay <mclay@redhat.com>.
(cherry picked from commit 6362232c30)

Co-authored-by: Matt Clay <mclay@redhat.com>.
(cherry picked from commit 7c83f1f045)

Co-authored-by: Matt Clay <mclay@redhat.com>
5 years ago
Matt Clay d86d4285e1
CI stability updates. (#72307)
* Avoid issues with user-defined docker networks.
* Increase CI timeout.
* Increase unit test timeout.
5 years ago
Matt Clay 785fa40dc5 [stable-2.8] Fix ansible-test Azure Pipelines container auth.
(cherry picked from commit 2ef4b7e07e)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Rick Elrod b926f73309
[tests] --no-use-pep517 in kubevirt_conformance (#72016)
Change:
- This enables the inventory_kubevirt_conformance test to pass again on
  freebsd.
- This was due to a google-auth version bump. The dep chain looks like
  this: openshift -> kubernetes -> google-auth -> aiohttp -> multidict

Test Plan:
- ansible-test integration inventory_kubevirt_conformance --remote
  freebsd/12.0

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Matt Clay aac6ed13e6 [stable-2.8] Disabled inconsistent pylint checks..
(cherry picked from commit 8152d8bc1a)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay b8f6c2d4b9
[stable-2.8] CI provider fixes for ansible-test. (#71929) (#71934)
* Make Azure Pipelines resource_prefix lowercase.

* Make classification of CI files consistent.

* Update package-data sanity test for AZP..
(cherry picked from commit 92b66e3e31)

Co-authored-by: Matt Clay <mclay@redhat.com>
5 years ago
Rick Elrod 97c4064b87 [2.8] [tests] uninstall docker stuff for podman
Change:
- This isn't a direct backport of #71949 because in stable-2.8,
  setup_docker doesn't use handlers like more modern branches to clean
  up after itself.
- Instead, here we just make sure the docker packages are gone before
  the podman test runs.

Test Plan:
- CI
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Rick Elrod 4616b3bbac
[incidental_setup_docker] changes to upstream repo (#71897) (#71901)
Change:
- The docker-ce.repo file for centos does not work on RHEL since it uses
  $releasever and on RHEL that is, e.g., "7Server".
- Instead, set up the repo manually.
- Additionally, the docker centos8 repo no longer has old versions, so
  we use the (only) version in the repo instead.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit 31ddca4c0d)
(cherry picked from commit 651c0a2d03)
5 years ago
Matt Clay e35aafa81c [stable-2.8] Fix attribute testing in file integration test. (#71843)
The file test will no longer attempt to test attributes if `lsattr -vd` does not work on the system under test.
(cherry picked from commit 17765cd4e8)

Co-authored-by: Matt Clay <mclay@redhat.com>
5 years ago
Sam Doran caf82158d0 [stable-2.8] openssl_privatekey test - Add pause for macOS
The stat time granularity on macOS is one second. We recently upgraded
to faster macOS hosts, so some tests that run closely together to see if
something changed will have the same timestamp intermittently.
5 years ago
Sam Doran 81f660f606 [stable-2.8] incidental_setup_openssl - Pin version of Python packages
A recent update to cffi that was yanked is still being installed on our
Mac OS X 10.11 test image since the version of pip there is very old and
does not ignore yanked packages.

Pin the version of pyOpenSSL and its dependencies to fix this and avoid
future spontaneous failures..
(cherry picked from commit 65cdb86c8a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Matt Clay 909ac41247
[stable-2.8] Backport ansible-test CI provider support. (#71625)
* Add types.py from devel to support backport.

* [stable-2.9] Backport ansible-test CI provider support. (#71614)

* Add encoding.py from devel to support backports.

* Add io.py from devel to support backports.

* Update ansible-test support for CI providers. (#69522)

Refactored CI provider code to simplify multiple provider support and addition of new providers.

(cherry picked from commit d8e0aadc0d)

* Add Shippable request signing to ansible-test. (#69526)

(cherry picked from commit e7c2eb519b)

* ansible-test local change detection: use --base-branch if specified (#69508)

(cherry picked from commit 43acd61901)

* Add Azure Pipelines support to ansible-test.

(cherry picked from commit 8ffaed00f8)

* Update ansible-test remote endpoint handling. (#71413)

* Request ansible-core-ci resources by provider.
* Remove obsolete us-east-2 CI endpoint.
* Add new --remote-endpoint option.
* Add warning for --remote-aws-region option.
* Update service endpoints.
* Allow non-standard remote stages.
* Add changelog fragment.

(cherry picked from commit d099591964)

* Fix ansible-test coverage traceback. (#71446)

* Add integration test for ansible-test coverage.

* Fix ansible-test coverage traceback.

* Fix coverage reporting on Python 2.6.

(cherry picked from commit f5b6df14ab)

* Use new endpoint for Parallels based instances.

(cherry picked from commit 98febab975)

* Add pause to avoid same mtime in test.

(cherry picked from commit 3d769f3a76)

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

(cherry picked from commit 417e408f59)
5 years ago
Rick Elrod 83eda14330
[tests] fix fallout from dnf gpg fix (#71550)
Change:
- Missed needed gpg ignores

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Sam Doran a0ddefde38
Fix inventory_kubevirt_conformance test (#71545) 5 years ago
Rick Elrod 1fa2d5fd6b
[dnf] ensure packages are gpg-verified (#71541)
Change:
- By default the dnf API does not gpg-verify packages. This is a feature
  that is executed in its CLI code. It never made it into Ansible's
  usage of the API, so packages were previously not verified.
- This fixes CVE-2020-14365.

Test Plan:
- New integration tests

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Rick Elrod 555b1fdd7a
tests: Use `hg serve` instead of bitbucket for hg (#71403)
Change:
- Uses `hg serve` instead of a bitbucket repo for hg tests
- bitbucket no longer serves hg

Backport of #71398

Test Plan:
- CI, fixed integration tests

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Matt Clay eddb0920e4 Revert "[stable-2.8] Cap pytest version to avoid relative import issue."
This reverts commit 9c5663699f.
6 years ago
Sam Doran c6eff6bdb2
Revert "[stable-2.8] Change default file permissions so they are not world readable (#70221) (#70827)" (#71233)
This reverts commit 11738aed97.
6 years ago
Rick Elrod eb1114a1b1
[tests] pin docker to <4.3.0 (#71193)
Change:
- New python docker lib wants a newer docker than we have in CI.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
6 years ago
David Shrewsbury f35e825440
[2.8] Sanitize URI module keys with no_log values (#70762) (#70822)
* Sanitize URI module keys with no_log values (#70762)

* Add sanitize_keys() to module_utils.

* More robust tests

* Revert 69653 change

* Allow list or dict

* fix pep8

* Sanitize lists within dict values

* words

* First pass at uri module

* Fix insane sanity tests

* fix integration tests

* Add changelog

* Remove unit test introduced in 69653

* Add ignore_keys param

* Sanitize all-the-things

* Ignore '_ansible*' keys

* cleanup

* Use module.no_log_values

* Avoid deep recursion issues by using deferred removal structure.

* Nit cleanups

* Add doc blurb

* spelling

* ci_complete

(cherry picked from commit bf98f031f3)

* update changelog for security_fixes

* Update 70762-sanitize-uri-keys.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
6 years ago
Rick Elrod d73793fac7
Update integration tests to support rpmfluff-0.6 (#71155) (#71161)
Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Sloane Hertel 291f94934c
copy - redact 'content' from invocation in check mode (#71033) (#71069)
* sanitize copy module invocation secrets in check mode

(cherry picked from commit 991714b9d1)
6 years ago
Sam Doran 11738aed97
[stable-2.8] Change default file permissions so they are not world readable (#70221) (#70827)
* [stable-2.8] Change default file permissions so they are not world readable (#70221)

* Change default file permissions so they are not world readable

CVE-2020-1736

Set the default permissions for files we create with atomic_move() to 0o0660. Track
which files we create that did not exist and warn if the module supports 'mode'
and it was not specified and the module did not call set_mode_if_different(). This allows the user to take action and specify a mode rather than using the defaults.

A code audit is needed to find all instances of modules that call atomic_move()
but do not call set_mode_if_different(). The findings need to be documented in
a changelog since we are not warning. Warning in those instances would be frustrating
to the user since they have no way to change the module code.

- use a set for storing list of created files
- just check the argument spac and params rather than using another property
- improve the warning message to include the default permissions.
(cherry picked from commit 5260527c4a)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* Fix service test

* Fix lamdba_policy test

* Fix aws_lamdba test

* Fix warning for new default permissions when mode is not specified (#70976)

Follow up to #70221
Related to #67794
CVE-2020-1736

When set_mode_if_different() is called with mode of 'None', ensure we issue
a warning about the change in default permissions.

Add integration tests to ensure the warning works properly.

* Fix tests
- actually use custom module 🤦‍♂️
- verify file permission on created files
- use remote_tmp_dir so we're ready for split controller
- improve test module so we can skip the call to set_fs_attributes_if_different()
- fix tests for CentOS 6

(cherry picked from commit dc79528cc6)

* Use new category in changelog fragments
6 years ago
Sam Doran b95e520602
[stable-2.8] Drop "rhui-" prefix from RHEL repositories in AMI (#71130) (#71133)
The repository names seem to have changed and no longer have the "rhui-" prefix.
(cherry picked from commit 6ac4439a6a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Matt Clay 9c5663699f [stable-2.8] Cap pytest version to avoid relative import issue.
(cherry picked from commit 3a8ac62596)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Sam Doran eb7597c5cb
[stable-2.8] Pin psutil version in pids test (#70716) 6 years ago
Sam Doran 9d7594c627
[stable-2.8] ansible_runner test - Add constraints (#70667) (#70671)
A recent updated to psutil, which is a dependency of ansible-runner, fails
to install on older versions of pip.

Commit with the breaking change:

  135628639b
(cherry picked from commit 9d27d7c8b1)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Matt Clay 0f96e7e4cf [stable-2.8] Default ansible-test provisioning to us-east-1.
Previously windows instances on Shippable would be automatically directed to us-east-2.
(cherry picked from commit 1cf26896c5)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Matt Clay 9fa105f183 Remove Azure module tests from CI. 6 years ago
Rick Elrod 0923e156c1 pip tests, use py2 compat sampleproject fork
Change:
- sampleproject has gone py3 only. Use a py2 compatible fork.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
6 years ago
Sam Doran b354b66c4b [stable-2.8] Pin version of netaddr and jmespath in filters test 6 years ago