Commit Graph

11022 Commits (ef46bc46f459cf702f098d64b37c74cf0557ebd7)

Author SHA1 Message Date
Matt Martz ef46bc46f4
[stable-2.11] Use full python package for ansiballz cache filenames (#77090) (#77126)
* [stable-2.11] Use full python package for ansiballz cache filenames (#77090)

* Use full python package for ansiballz cache filenames

* Be a little more explicit about test goals
(cherry picked from commit 8cbe143)

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

* linting
4 years ago
Matt Clay 7a8c6d7418 ansible-test - Fix cloud plugin traceback. 4 years ago
Matt Clay 41a1fe1303 [stable-2.11] Update setup_pexpect to prefer pip user installs.
This works around issues on RHEL 7.9 when an old version of pexpect is installed from an OS package.
(cherry picked from commit 27fe26edbf)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Matt Clay 1b57ccb7a9 [stable-2.11] ansible-test - Use `--forked` instead of `--boxed`
The `--boxed` option is deprecated..
(cherry picked from commit eaeec8a65c)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Matt Clay d6b6c95498 ansible-test - Omit pyopenssl for sanity tests. 4 years ago
Matt Clay d003313544 ansible-test - Add MarkupSafe constraint.
Installation of MarkupSafe 2.1.0 and later require setuptools 39.2 or later,
or a recent version of pip which supports installation using a wheel.

Some systems will not have new enough versions of pip and/or setuptools,
especially virtual environments -- including those created by ansible-test.
4 years ago
Sloane Hertel c6d392d43d [stable-2.11] Use --no-deps when installing amazon.aws and not testing dependencies (#77091)
(cherry picked from commit 88bfb7193e)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
4 years ago
Matt Clay 79a2ee4bed [stable-2.11] ansible-test - Use quay.io containers in plugins..
(cherry picked from commit c27fd777f4)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Brian Coca 5c2251504c
ssh connection: use 'correct' host in all cases (#76017) (#76969)
ssh plugin, use 'correct' information source in all cases
  * still fallback to pc
  * added inventory to new test
  * undef var can still show as parser error on pc
    now task_exectuer has a  more accurate error handling

(cherry picked from commit be19863e44)
4 years ago
Brian Coca ee112d9984
fix block var inheritance (#75287) (#76897)
* updated tests to conform to new block inheritance

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit b1d6750e8b)
4 years ago
Matt Clay 906642edc4 ansible-test - Install pyopenssl w/ cryptography.
ci_complete
4 years ago
Matt Clay cc97353702
[stable-2.11] ansible-test - Use relative paths in junit output. (#76909)
* [stable-2.11] ansible-test - Use relative paths in junit output. (#76871)

* ansible-test - Use relative paths in junit output.
* ansible-test - Handle out-of-tree JUnit paths.
* Also fix a traceback in the junit callback during automatic fact gathering.

(cherry picked from commit fbb5d56bd2)

* Fix task path unicode error in junit callback.

(cherry picked from commit 41db6d8d35)
4 years ago
Matt Martz b4c1688809
[stable-2.11] Compare FQCN also in lockstep logic. Fixes #76782 (#76787) (#76797)
(cherry picked from commit 29bdb8b)

Co-authored-by: Matt Martz <matt@sivel.net>
4 years ago
Brian Coca 4eac144d7e
ssh connection avoid parsing own debug (#76732) (#76756)
* ssh connection avoid parsiing own debug (#76732)

  - Avoids false positives on become strings being echoed back
   by ssh cli itself
  - added test for debug lines
  - also simplified some of existing test code

(cherry picked from commit 0ff80a15ba)

* unicoode

* dont make em ascii
4 years ago
Brian Coca a72e3d14b3
ssh connection, handle 'fun' control paths (#76424) (#76694)
* handle 'fun' control paths by quoting the option when passed to ssh cli

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit aa022dba2d)
4 years ago
Jordan Borean 39b6dec937
galaxy build - ignore existing MANIFEST and FILES (#76479) (#76499)
(cherry picked from commit 8482ee4e9a)
4 years ago
Tadej Borovšak 6da3cf51a3
Fix zip content filtering in unarchive module (#76069) (#76420)
When we introduced an include parameter to the unarchive module, we
inadvertenly flipped the exclusion logic. This flip meant that the
unarchive module started rejecting files that should be extracted.

This commit flips the bad logic and adds some tests that will make
sure things do not go bad again.

(cherry picked from commit f92830d16e)
4 years ago
Matt Clay 070ae15c52 Limit pynacl for paramiko tests. 4 years ago
Sloane Hertel f5d694eba4 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)
4 years ago
Matt Clay 15ab9a086a [stable-2.11] 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>
4 years ago
Matt Clay 3c2d25014a Add sanity test ignores. 4 years ago
Matt Clay a6be3165e0 [stable-2.11] ansible-test - Fix traceback in validate-modules test.
(cherry picked from commit 41ee4a5b12)

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

Co-authored-by: Sam Doran <sdoran@redhat.com>
4 years ago
Sloane Hertel 4079bc948b
Skip recursive suboption validation if sub_parameters is not a dict (#75635) (#76189)
* Skip recursive suboption validation if sub_parameters is not a dictionary

* Ensure sub parameter elements is a sequence to prevent iterating over string characters and causing duplicate error messages for the same param

(cherry picked from commit b5ed41edb3)
4 years ago
Matt Martz a17581efa6
2.11 `action_groups` normalization (#76171)
* Have tests use shortname in action_groups to uncover an issue

* Alias shortname from action_groups to FQCR of owning collection

* Add clog frag

* Don't overwrite
4 years ago
Matt Clay 2154722490 [stable-2.11] 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>
4 years ago
Matt Clay 17ef15a534 [stable-2.11] Fix subversion test.
Switch to a different repo that isn't giving 503 errors since GitHub hasn't fixed the issue yet..
(cherry picked from commit 319b50f04c)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Jordan Borean 651e69064d ansible-test pslint - fix warning with nested objects (#75792)
* ansible-test pslint - fix warning with nested objects

(cherry picked from commit 7e19957afa)
4 years ago
Sloane Hertel 4967b8650c
Fix unexpected exception when a role has an empty argument_specs.yml (#75604) (#75684)
* Fix role with empty argument_specs.yml

* Use try/except and add changelog fragment

* Always return a dict

* Add test for empty argument_specs key

(cherry picked from commit 3e7a622204)

Co-authored-by: devon-mar <devon-mar@users.noreply.github.com>
4 years ago
Jordan Borean 15f5886479
PowerShell - Ignore LIB env var when building C# code (#75698) (#75725)
* PowerShell - Ignore environment variables when building C# code

* Just unset LIB for now

* Fix sanity issue

(cherry picked from commit 097bc07b66)
4 years ago
Sloane Hertel d9d5d2d93e
Try all galaxy servers when locating available versions for a collection (#75468) (#75750)
* If an exception occurs when getting a collection's metadata, continue to the next in the server list.

* Warn for unknown exceptions when finding versions of a collection

* Test that an invalid server is no longer fatal if a subsequent server has the collection

* Fix server for verify tests - compare checksums against the server from which it was installed

* Add tests for verify and fix that code path to mirror install/download behavior for server errors

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit 469b559ebe)
4 years ago
Matt Martz f2b14b9aa3
[stable-2.11] Don't show params when there is an issue with `set_option(s)` (#75805) (#75808)
(cherry picked from commit 79e9dae)

Co-authored-by: Matt Martz <matt@sivel.net>
4 years ago
Brian Coca 6e011d0809
various fixes to command (#74212) (#74257)
* 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)
4 years ago
Brian Coca 9437c6f465
Avoid accessing delegated vars when you dont have a host (#75524) (#75534)
* avoid getting delegated vars w/o inventory host

 fixes #75512

 In the case of imports, we don't have a host, so getting host vars for
 the delegated host makes no sense and should be avoided.

* also avoid error on vars_files with per host vars

* test

* testing given case

* oops

(cherry picked from commit 91319c5cfc)
4 years ago
Sloane Hertel 01f024df79
Fix build_ignore when installing a collection from source (#75547) (#75623)
* Make individual dirs that should exist instead of using shutil.copytree

* Test build_ignore when installing collections in git repos

* changelog

* Fix assertion
Fix git directory

* Fix nested content while building the collection dir

Test installing a collection from a git repo and artifact have the same result

Refactor to use variables

(cherry picked from commit f38a97cece)
4 years ago
Sloane Hertel e4fb928b5f
[2.11] Improve ansible-galaxy error for InconsistentCandidate exception (#75462)
* Improve ansible-galaxy error for InconsistentCandidate exception (#75235)

* Improve error for InconsistentCandidate exceptions

* Add test case for installing a collection with an inconsistent version

* Add test case for installing a collection that has a dependency with an inconsistent version

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
(cherry picked from commit e24eb59de5)

* Handle extra stderr for Python 2.7
4 years ago
Brian Coca ad4d00e1db
Clarify get_bin_path error message (#75544) (#75564)
(cherry picked from commit 3ca50a2200)
4 years ago
Brian Coca 463cf9fe24
Attributes compat (#75563)
* ignore attributes in output

* ignore 'attributes' for json dump

* actually add file

* clog

* sometimtes its not a dict

* always ignore

* also allow validation to work on newer modules

* remove attributes doc

  let existing overrides display, wont be full info but still pertinent info
  though user will have to check newer versions
4 years ago
Martin Krizek a6f24c407c
Fix templating task action with host-specific vars (#75600) (#75613)
Fixes #75568

(cherry picked from commit 9c2f44b884)
4 years ago
Martin Krizek 999c2e603d
paramiko_ssh - mark connection as connected when successful (#74459) (#75614)
* Remove unused import from test

(cherry picked from commit 74b2add460)

Co-authored-by: Sam Doran <sdoran@redhat.com>
4 years ago
Sloane Hertel e1f406699b
Fix dnf test assertion (#75426) (#75427)
(cherry picked from commit e23fdee45e)
5 years ago
Sloane Hertel f0b227009c
Fix dnf package matching (#75411) (#75418)
* 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)
5 years ago
Brian Coca de1129c8e5
Skip python interpreter discovery for 'forced local' module execution (#74824) (#75402)
mostly for use with network_os
  use 'remote is local' property as indicator
  ensure task_vars are as expected in test

(cherry picked from commit 8d41b97329)
5 years ago
Abhijeet Kasurde 7f6415ee14
[bp-2.11] unarchive - do not fail in init when trying to find required binary (#75363)
Test for the required binaries in the can_handle_archive() method and fail there. This
prevents failures for missing binaries unrelated to the archive type.

* Update missing zip binary message to match tar message
* Update unit tests
* Add integration tests
* Define packages based on the system rather than ignoring failures

(cherry picked from commit 004c33d9c5)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Martin Krizek 71a6954b51
Globals should be accessible when importing a template without the context (#75384) (#75409)
Fixes #75371

(cherry picked from commit 5a38076568)
5 years ago
Felix Fontein e2f14d94b8
[2.11] Improve handling of AnsibleModule arguments in validate-modules (#75360)
* Improve handling of AnsibleModule arguments in validate-modules (#75332)

* Make sure AnsibleModule positional arguments are validated.

* Extract ANSIBLE_MODULE_CONSTURCTOR_ARGS with inspection.

* Remove no longer necessary return value.

* Fix PR #.

* argument_spec might not have been specified, as in community.general.xenserver_facts.

* Fix typo.

(cherry picked from commit 7726b70d9a)

* Make sure self doesn't end up in fake.args (#75403)

(cherry picked from commit 2455d82c14)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Martin Krizek 66ca0abaf4
Ensure Jinja2 template header overrides are used (#75306) (#75342)
Fixes #75275

(cherry picked from commit 767b2f07b0)
5 years ago
Martin Krizek 4078765379
Fix when evaluation on Native Jinja and Python 3.10 (#75202) (#75380)
* Fix when evaluation on Native Jinja and Python 3.10

* Add unit test

* Add explaining comment

* Enable jinja2_native before tests

Co-Authored-By: Matt Martz <matt@sivel.net>

* Sanity

* Return native template module instead of modifying globals

Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 58e38044fe)
5 years ago
Sergey da1baaf485 [stable-2.11] Add packaging to requirement of ansible-test (#75356)
* Add packaging to requirement of ansible-test

Fix #75353

After requires_ansible field was added as mandatory to runtime.yml
file, ansible-test fails to check this field if it doesn't have
packaging module.

[1] https://github.com/ansible/galaxy-importer/pull/124
(cherry picked from commit 40ca87a963)

Co-authored-by: Sergey <sshnaidm@users.noreply.github.com>
5 years ago