Commit Graph

11499 Commits (f6fb402d1feab0c66e9eb107bdb37b8ae9c3ce4c)

Author SHA1 Message Date
Matt Clay e27b94c467 ansible-test - Update alpine3 container to 3.3.0.
This updates the base image from 3.14.2 to 3.15.0, which includes support for installing binary wheels using pip.
2 years ago
Brian Coca be19863e44
ssh connection: use 'correct' host in all cases (#76017)
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
2 years ago
Martin Krizek 394d216922
add_host/group_by: fix using changed_when in a loop (#71719)
Fixes #71627
Fixes #75971
2 years ago
Jordan Borean 2749d9fbf9
incidental - remove win_lineinfile coverage (#76952) 2 years ago
Matt Clay 17dd9ff924 ansible-test - Update default containers to 5.5.0. 2 years ago
Felix Fontein bc1e29d722
Bump antsibull version from 0.40.1 to 0.41.0 and ansible sphinx theme version to fix HTML generation in return value tables (#76759)
* Use Jinja2 comment instead of HTML comment to avoid W3C validator warning (-- inside comment).

(For those interested in the history of this: http://www.howtocreate.co.uk/SGMLComments.html#doubledash)
2 years ago
Matt Clay b568e0db6f ansible-test - Remove outdated remote support. 2 years ago
Matt Clay 7e64c4fe55 ansible-test - Update bootstrap URL to not use S3. 2 years ago
Matt Clay 6c29028f05 Update ci-files URL in integration tests.
This uses the CloudFront URL instead of going directly to S3.
2 years ago
Matt Clay 995d7e4db3 ansible-test - Limit installed pyopenssl version. 2 years ago
Matt Clay fbb5d56bd2
ansible-test - Use relative paths in junit output. (#76871)
* ansible-test - Use relative paths in junit output.

Also fix a traceback in the junit callback during automatic fact gathering.

* ansible-test - Handle out-of-tree JUnit paths.
2 years ago
Brian Coca b1d6750e8b
fix block var inheritance (#75287)
* 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>
2 years ago
Brian Coca 29b5eb6ba9
updated metadata dump to do full docs dump (#76170)
* minor refactor in other options by pushing common code into functions
 * consolidate coll_filter
 * more normalizing loader
 * dont pass plugin_loader, its global import
 * Also dump roles and collections
 * adjusted tests to new err msg
 * disable namespace filter (unused)
2 years ago
Matt Clay d19b506ce8
ansible-test - Clean up future boilerplate. (#76874)
* ansible-test - Clarify need for empty __init__.py
* ansible-test - Update code-smell boilerplate.
* Update code-smell boilerplate for core.
* Update future boilerplate test for ansible-test.

All ansible-test code (except for targets) and core-specific sanity tests now use the same boilerplate.

The test also checks for unwanted `__future__` and `metaclass` boilerplate.

* Relocate target tools to the correct directory.

Several tools used on target Python versions were incorrectly placed in the controller directory.
2 years ago
Martin Krizek 3816815db0
Track failures in the includes results to avoid special handling of include errors (#53688)
* Make include_role/include_tasks work with any_errors_fatal v2

Fixes #50897

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

* Add failed to results in free strategy too

* Fix

* Avoid duplicating results

* ci_complete

Co-authored-by: Matt Martz <matt@sivel.net>
2 years ago
Martin Krizek f501b579e5
ansible-vault encrypt_string: fix --output to write into file (#76856)
Fixes #75101
Fixes #59590
2 years ago
Matt Clay 18ed2c64e5 ansible-test - Add default for Windows remotes. 2 years ago
Matt Clay 26b43f425f ansible-test - Validate collection ns and name.
Resolves https://github.com/ansible/ansible/issues/62079
2 years ago
Matt Clay de5f60e374
ansible-test - Improve help for unsupported cwd. (#76866)
* ansible-test - Improve help for unsupported cwd.

* The `--help` option is now available when an unsupported cwd is in use.
* The `--help` output now shows the same instructions about cwd as would be shown in error messages if the cwd is unsupported.
* Add `--version` support to show the ansible-core version.
* The explanation about cwd usage has been improved to explain more clearly what is required.

Resolves https://github.com/ansible/ansible/issues/64523
Resolves https://github.com/ansible/ansible/issues/67551
2 years ago
Matt Clay 029c991b0d ansible-test - Update outdated links in comments. 2 years ago
Matt Martz 3cf71ddf69
The final `output_dir` pr (#76862) 2 years ago
Martin Krizek 29de2cccba
Fix task debugger to work with run_once using linear strategy (#76814)
* Fix task debugger to work with run_once using linear strategy

Fixes #76049

* Fix clog

* Add integration test
2 years ago
Matt Martz cad200406a
group2 - switch to setup_remote_tmp_dir instead of using output_dir (#76853)
* group2 - switch to setup_remote_tmp_dir instead of using output_dir

* output_file needs to be in the tmp dir

* Use comparison that should work with macos

* remove unused dep
2 years ago
Matt Clay e9ffcf3c85
ansible-test - Defer loading of completion entries. (#76852)
* ansible-test - Defer loading of completion entries.

This avoids a traceback when running ansible-test outside of a supported directory.
2 years ago
Daniel Goldman dbde2c2ae3
user module password expiration fixes (#75390)
* allow inputting 0 for password_expire_{min|max}
   0 is meaningful for min days (any time)   
   0 is technically valid for max_days
* add test for setting both min and max expiry
* [0] return result of execute_command from set_password_expire*
* [1] better return for set_password_expire
* [2] handle returns from set_password_expire*
* only set password expiry if user exists
* collect return-handling code
* combine password min and max into one execution
* handle case where spwd is not present like on macOS and FreeBSD

Co-authored-by: Sam Doran <sdoran@redhat.com>
2 years ago
Éloi Rivard 3889ddeb4b
iptables - added a ``chain_management`` parameter to control chain (#76378)
creation and deletion

fixes #25099
closes #32158
2 years ago
Matt Martz 9f46f6eb30
Attempt 2: Catch errors getting filters and tests (#76806) 2 years ago
Matt Clay 553e75df95 Remove obsolete skip/windows test aliases. 2 years ago
Matt Martz 29bdb8bf1e
Compare FQCN also in lockstep logic. Fixes #76782 (#76787) 2 years ago
Dimitri Savineau a0f6747f07
ansible-test: fix typo in validate-modules (#76765)
The correct error strategy for the to_text method is surrogate_or_strict

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2 years ago
Brian Coca 0ff80a15ba
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
2 years ago
Brian Coca 9142be2f6c
Allow specifying specific python via shebang (#76677)
modules with python were always normalized to /usr/bin/python,
  while other interpreters could have specific versions.

* now shebang is always constructed by get_shebang and args are preserved
* only update shebang if interpreter changed
* updated test expectation
* added python shebang test
2 years ago
Matt Clay 7fff408652 ansible-test - Remove azure support for Sherlock. 2 years ago
Matt Clay 3a891827b7
ansible-test - Remove AIX provisioning support. (#76747)
* ansible-test - Remove AIX provisioning support.
* Remove `skip/aix` integration test aliases.
* Remove build for AIX binary module.
2 years ago
Matt Clay bab315b780
ansible-test - Add support for FreeBSD 12.3. (#76745)
* ansible-test - Add support for FreeBSD 12.3.
* Use OS package for yaml if available with CLoader.
* Make sure libyaml is available.
2 years ago
Adrian Likins 20cc87f059
Expect upper case message 'levels' for galaxy publish results (#63530) 2 years ago
Matt Clay c1df36e3ae
Update dnf tests to reflect new behavior. (#76743)
* Update dnf tests to reflect new behavior.

Previously dnf would report there was nothing to do when trying to install a package from the cache when it was not present.

A recent update to dnf has changed this behavior to match yum, resulting in a failure instead.

* Allow dnf to fail or report no changes.
2 years ago
Matt Clay b1ebc192b5 ansible-test - Update default containers. 3 years ago
Matt Clay d6588293fb ansible-test - Limit paramiko to < 2.9.0 3 years ago
Sloane Hertel 76220c4a7b
ansible-galaxy - fix the --ignore-certs flag for the implicit galaxy server (#76735)
* ansible-galaxy - fix the --ignore-certs flag for the implicit galaxy server

* changelog

* Add a test without the server config

* Fix respecting --ignore-certs for individual --server URLs also

* Update changelogs/fragments/76735-ansible-galaxy-fix-ignore-certs.yaml
3 years ago
Martin Krizek f78deccec2
end_play: end the current play only (#76674)
Fixes #76672
3 years ago
Patrick Hemmer 4a62c4e3e4
apt: add support for package version >= (#75002)
This adds the ability to specify a package version using >=. This will ensure the package is at the specified version or above.

* If the package is not installed, the latest version will be installed.
* If the package is installed and less than the specified version, it will be upgraded.
* If the package is installed and greater than or equal to the specified version, it will be left alone.

The version selection is handled by Apt itself, so things like the system policy, pinning, etc, are considered.
3 years ago
Felix Fontein c53e6d94e9
Use antsibull 0.40.1 for docsite build (#76675) 3 years ago
Brian Coca aa022dba2d
ssh connection, handle 'fun' control paths (#76424)
* handle 'fun' control paths by quoting the option when passed to ssh cli

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Martz 0ef5274a3c Don't assert stdlib behavior, just assert that urllib was called 3 years ago
Jordan Borean aaa7944b02
Fix tests failing on pytest 7 (#76670)
* Fix pytest 7 failures with leaky fixture
3 years ago
Matt Clay b30b8fb79c ansible-test - Set pytest rootdir option. 3 years ago
Matt Clay eaeec8a65c ansible-test - Use `--forked` instead of `--boxed`
The `--boxed` option is deprecated.
3 years ago
Matt Clay 97104f1221
Avoid deprecated TestCase functions in unit tests. (#76678)
* Avoid deprecated TestCase functions in unit tests.
* Add assertRaisesRegex for Python 2.7.
* Fix indentation.
3 years ago
Sloane Hertel b17557ae8e
Add check_mode tests for shell/command/script and make skipped=True/changed=True mutually exclusive (#76429)
* Add additional tests for check_mode with shell/command/script
* update check_mode documentation: if a module/action is not skipped in check mode and accurately reflects whether a change is made to the remote support should be 'full'
* Make reporting skipped in check mode mutually exclusive with 'changed: True'
* Add missing documented attributes
* Fix tests to expect skipped=True and changed=True do not occur together
* Fix script check_mode support documentation
* Fix earlier changelog
* document platforms attribute
* Use tasks's check mode since the value from PlayContext does not reflect loop items

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
3 years ago
Martin Krizek 094a0746b3
ansible_concat: return strings only unless eval (#76634)
Fixes #76610
3 years ago
Matt Clay aa67ff2cf2
Remove shebangs from core Python modules. (#76664)
* Remove module shebangs.
* Relax shebang check in validate-modules.
* Add changelog fragment.
3 years ago
Brian Coca 8e0654504f
stat document 'version' return doc (#76589)
* stat document 'version' return doc

	fixes #76588

* str

* no output_dir for you!
3 years ago
Sloane Hertel 15ace5a854
ansible-galaxy - validate version for directories and collections in git repos (#76579)
* Ensure the version is valid for directories and collections in git repos before installing

Fix the error message for invalid semantic versions

* Make requested changes

* Add a test case for unhandled ValueError exception

* Add changelog

* Update lib/ansible/galaxy/collection/galaxy_api_proxy.py

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

* Reword error message

Include link to learn how to compose a semver version

* Move version validation into the caller, find_matches

* Add tests for more invalid version types

* Remove unused import

Fix raising unexpected error

* Update lib/ansible/galaxy/collection/__init__.py

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

* Update lib/ansible/galaxy/dependency_resolution/providers.py

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

* Update lib/ansible/galaxy/dependency_resolution/providers.py

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
3 years ago
Matt Clay 6e57c8c084 Add missing typing import for _distro.py.
See: 116cdad222/distro.py (L42-L72)
3 years ago
Matt Clay 7e814dd4db ansible-test - Fix plugin loading.
This fixes a traceback when loading plugins that use dataclasses.
3 years ago
Matt Clay d2daa67b00 ansible-test - Fix type hints. 3 years ago
Jaromaz 16def8050a
facts - Set correct OS family for EuroLinux (#76624)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
3 years ago
Matt Clay a5f4a25d32 Fix wait_for integration test.
Pin the `psutil` package to 5.8.0 since 5.9.0 is broken on macOS.
3 years ago
Jean Raby 594b11dc0c
unarchive: Keep stderr when pick_handler fails (#76365)
* fixes #28977

* Include the original error message when pick_handler fails

* Add a test to unarchive a tar file with an invalid extra option

* add a changelog
3 years ago
Sloane Hertel fa617fcd7b
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
3 years ago
James Livulpi eedf2e476c
check for indirect service in systemd (#76462)
* check if service is indirect status / add integration test

* Update changelogs/fragments/76453-indirect-systemd-status.yml

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* simplify indirect check / remove integration test restriction on rhel9

* add dummy indirect service for integration tests
3 years ago
mbanas 43e99e4132
Adding modularity tag to task modularity.yml (#76557)
Co-authored-by: Martin Banas <mbanas@redhat.com>
3 years ago
Jonathan Neuhauser 49e1cb9f42
unarchive: fix non-english locales (#76542)
* unarchive: fix non-english locales

For GNU Gettext, the LANGUAGE environment variable takes precedence over LANG or LC_ALL. On systems where LANGUAGE was set to a non-english locale, the output of the tar command therefore not understood and the module failed silently ("changed": false, but the archive was not extracted).

* add tests

* changelog
3 years ago
Matt Clay 4e70156d7e
ansible-test - Code cleanup. (#76540)
* Add missing typing imports.
* Remove unnecessary non-capturing group.
* Whitespace.
* Add type hints.
* Ignore PyCharm false positives.
* Remove Python 2.x plugin loading logic.
* Remove Python 2.x exception handling.
* Remove Python 2.x display logic.
* Add changelog.
3 years ago
Matt Clay 21b9389a02 ansible-test - Remove invalid type hint. 3 years ago
Matt Clay 470c89518c ansible-test - Fix delegation from install. 3 years ago
Sloane Hertel ed6581e4db
check finder type before passing path (#76448)
* check finder type before passing path

ci_complete

* Reduce nesting

* Test find_module does not cause a traceback with Python 3 FileFinder

* Update lib/ansible/utils/collection_loader/_collection_finder.py
3 years ago
Matt Clay 16cdac66fe ansible-test - Use ansible-core for docs links. 3 years ago
Matt Clay e56e47faa7 ansible-test - Fix import test for collections. 3 years ago
Matt Clay 82f59d4843
ansible-test - Hide ansible._vendor in import test (#76503) 3 years ago
Matt Clay c45989c76f ansible-test - Remove RHEL 8.4 support. 3 years ago
Matt Clay 97ef1d031c Revert "ansible-test - Fix import test when vendoring."
This reverts commit 33a8d06332.
3 years ago
Jordan Borean 8482ee4e9a
galaxy build - ignore existing MANIFEST and FILES (#76479) 3 years ago
James Livulpi 7830e5308e
add tencentos fact distro (#76459)
Fixes #76459

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
3 years ago
Brian Coca 472028c869
catch the case that cowsay is broken (#76326)
* catch the case that cowsay is broken

fixes https://github.com/ansible/ansible/issues/72582

  add changelog
  raise Exception for broken cowsay
  add test for broken cowsay

Co-authored-by: Matthias Bernt <m.bernt@ufz.de>
3 years ago
Matt Clay 41ee4a5b12 ansible-test - Fix traceback in validate-modules test. 3 years ago
Matt Clay 33a8d06332 ansible-test - Fix import test when vendoring. 3 years ago
Brian Coca 47448f1458
Add 'default' to 'env' lookup (#76327)
* Add 'default' to 'env' lookup

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
3 years ago
Matt Martz eca97a19a3
Handle HTTPError being partially initialized due to the error. Fixes #76386 (#76421) 3 years ago
Matt Clay d22bdcfdc7 ansible-test - Update NIOS container to 1.4.0. 3 years ago
Brian Coca b02168d644
better handling of sudo flag replacement (#76389)
* better handling of sudo flag replacement
3 years ago
Sloane Hertel b50f16db91
Update collection loader for Python 3.10 (#76225)
* Implement find_spec and exec_module to remove reliance on deprecated methods in the collection loader

ci_complete

* Move module execution to exec_module

Remove extra sys.modules handling

Use default module initialization by returning None from loader.create_module

Refactor

ci_complete

* Remove ansible-test's copy of the collection loader

ci_complete

* Fix metaclass for Python 2.x

ci_complete

* Fix Py2/Py3 syntax compatibility

* Refactor

ci_complete

* update collection_loader comments

ci_complete

* simplify find_module

ci_complete

* Fix Py2 compatibility - don't get loader from nonexistent spec

Remove unnecessary PY3 checking

* Refactor common code in load_module and exec_module

ci_complete

* tidy diff

ci_complete

* Include collection_loader in target paths for 'compile' sanity test

* add changelog

* Add "return None" instead of doing it implicitly

Remove get_filename

short-circuit exec_module if it's a redirect

ci_complete
3 years ago
Sviatoslav Sydorenko 392b16c21c
Test integration of loop and until options (#44927)
Ref #44741
Ref ansible/proposals#140

* Replace select filter with a more portable thing
* Add context
    This is needed for split controller/remote

Co-authored-by: Sam Doran <sdoran@redhat.com>
3 years ago
Thomas Stähle cd2d8b77fe
apt - add allow_change_held_packages option (#73629)
* Add changelog fragment and integration tests
* Break up function signature into multiple lines
    It passed the 160 character width. Change it to multi-line for easier reading
    and better diffs in the future.
* Remove unused import
* Update version added for new feature
* Move changelog fragment to correct location

Co-authored-by: Thomas Stähle <thomas.staehle@check24.de>
Co-authored-by: Sam Doran <sdoran@redhat.com>
3 years ago
Sam Doran d8aeffc8b7
Add macOS 12 to CI (#76328)
* Disable lookup_url test of macOS 12
3 years ago
Richie B2B 1b34933414
Fix ansible-doc -l ansible.builtin / ansible.legacy (#76235) 3 years ago
Matt Clay c8a14c6be8 ansible-test - Update base and default containers. 3 years ago
Matt Clay bb63c97c16
ansible-test - Update import test and sanity requirements. (#76308)
* Add script to freeze sanity requirements.
* Declare sanity test requirements and freeze
* Use pinned requirements for import.plugin test.
* Expand scope of import test for ansible-core.
* Add ignores for galaxy import errors.
* Update test-constraints sanity test.
3 years ago
Matt Clay 21ac52435b
ansible-test - Add support for RHEL 8.5 instances. (#76305)
* ansible-test - Add support for RHEL 8.5 instances.
* Clear libdnf checksum cache from unsigned package in dnf integration test.

Co-authored-by: Matt Martz <matt@sivel.net>
3 years ago
Matt Martz 4073a22d55
uri module improvements (#50771) 3 years ago
Matt Clay a71ba817b0 ansible-test - Remove unused test constraint. 3 years ago
Matt Clay 5e3d469738 ansible-test - Remove near-EOL test containers.
- fedora33
- centos8
3 years ago
Matt Martz 0668538a3e
Default callback result format (#76166)
* First pass of adding yaml result format output to default callback

* Add clog frag

* flow style always false

* Further normalization of results across distros

* no lossy, now pretty

* Fix env var in runme.sh

* Rename variable to better self document

* include NativeJinjaUnsafeText

* Linting cleanup

* Add tests specific to the prior yaml callback

* Make data munging more exact, following the checks in libyaml/pyyaml

* Remove unused import

* Extend comment

* more correct and some comments

* Fix consistency of tab vs space in this section of the file

* Add str representer

* be cooler

* faster character filtering

* Clarify None as a sentinel for default behavior

* Flip filtering logic to avoid CRLF issues with 'space break' filtering

* Py3 change and comment about the use of __call__

Co-authored-by: Matt Davis <mrd@redhat.com>
3 years ago
Martijn Pieters 08af0fbf95
Unbreak hostname.RedHatStrategy (#76032)
- On Python 3, decode bytes to str
- Tolerate whitespace around the line.
- Report a missing HOSTNAME line as an error.
- Don't clobber line separators when setting a new hostname.
- Add some tests for this strategy to verify correct operation.
3 years ago
Matt Davis abac141122
fix support containers under podman (#76292)
* `podman inspect` falls back to a same-named image if the named container is not present; since eg `http-test-container` is both the name of the image and container, it wasn't working properly under podman in many instances. Switching to `docker|podman container inspect` limits the query to containers only for both podman and docker, allowing the support container detection/creation to work properly.
3 years ago
Jordan Borean fb55d878db
psrp - remove deprecated psrp put_file code (#76252)
* psrp - remove deprecated psrp put_file code

* Removed unused import and fix missing var
3 years ago
Felix Fontein fe77bc9e3c
Validate some markup in documentation in validate-modules (#76262)
* Validate some markup in documentation.

* Add changelog fragment.

* Use urlparse instead of URL regex.

* Document new error code.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
3 years ago
Jordan Borean 9985b8a975
ansible-test pssa update and new rules (#76256) 3 years ago
Matt Clay b6725ec6c9 Fix pip integration test.
- Use `fallible==0.0.1a2` instead of `black==19.10b`
- Test on both Python 2 and 3.
3 years ago
Martin Krizek 5c225dc0f5
Introduce public methods to access PlayIterator._host_states (#74416) 3 years ago
Matt Clay d7fbb209b4 ansible-test - Fix collection import test priming.
The bug was introduced in https://github.com/ansible/ansible/pull/76137
3 years ago
Sam Doran 74dc830dd4
Use new codecov uploader (#75938)
* Use new codecov uploader
* Rewrite coverage uploader in Python
3 years ago
Matt Clay f42ffe16d2
ansible-test - Add Fedora 35 test container. (#76228)
* ansible-test - Add Fedora 35 test container.
* Added Fedora 35 to CI and removed Fedora 33 from CI.
* Fix dnf integration test.
* Fix connection_paramiko_ssh test.
3 years ago
Matt Clay 57989c2bcb Remove install of setuptools in venv for pip test.
This task was previously added in https://github.com/ansible/ansible/pull/25243 as a work-around for a setuptools bug.

The pinned version does not work with Python 3.10, and the task should no longer be needed.
3 years ago
Matt Clay 39509ff216 Fix pip test to use setup_remote_tmp_dir. 3 years ago
Matt Clay 730194e2b6
ansible-test - Add RHEL 9 support. (#76217)
* Move RHEL pip package install into function.
* Add RHEL 9 support to bootstrap script.
* ansible-test - Add RHEL 9 support.
* Add install and uninstall instructions for RHEL9 to paramiko tests
* Skip incidental_inventory_docker_swarm on RHEL 9.
* Update dnf tests for rhel9
* Fix prepare_http_tests on RHEL 9.
* fix RHEL9 Python discovery tests to match distro map
* Skip subversion test on RHEL 9.0b.

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Matt Davis <mrd@redhat.com>
3 years ago
Jan Fader 17ec2d4952
check /.dockerenv and /.dockerinit to guess a dockercontainer (#74349)
* use os.path.exists for docker-check

Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>
3 years ago
Matt Martz 27a5116e19
Explicitly require iptables for incidental_setup_docker on RHEL8 (#76212) 3 years ago
Martin Krizek 150faf25d3
dnf: add more specific error message for GPG check (#76194)
Fixes #76192
3 years ago
Sloane Hertel b5ed41edb3
Skip recursive suboption validation if sub_parameters is not a dict (#75635)
* 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
3 years ago
Brian Coca 7bec196061
loop/fact delegation fix (#75768)
now set_fact and include_vars intermediate results are congruent with delegation
3 years ago
Sloane Hertel 8bbecc7cac
exhaust list of vault ids before failing (#75540)
* Try to find any valid vault id before raising an exception
* Apply the same logic during vault password file loading
* Also. Improve the warning msg and tests
3 years ago
Martin Krizek 47ee282227
Parser errors from within includes should not be rescueable (#73722)
* Parser errors from within includes should not be rescueable
* Also fixes unit tests
Fixes #73657
3 years ago
Tadej Borovšak f92830d16e
Fix zip content filtering in unarchive module (#76069)
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.
3 years ago
Jonas I. Liechti 0b0acef423
bug fix: using non-FQDN in plugin choices fails plugin name verification (#75991)
* enable both non-FQDN and FQDN plugin name
* add info about matching requirement of plugin name in config and plugin source file
3 years ago
Andrew Klychkov e50ad6f118
ansible-test: Set max number of open files in containers to 10240 (#75498) 3 years ago
Matt Clay 1ab2443e2d ansible-test - Update default containers. 3 years ago
Martin Krizek 26707a3c6b
Heisen jinja2_native (#75587)
* Use NativeEnvironment for all templating

ci_complete

* Keep Templar.copy_with_new_env for backwards compat

* Mention that AnsibleUndefined.__repr__ changed in the porting guide

* Templar.copy_with_new_env backwards compat

* ci_complete
3 years ago
Matt Clay 97f729c3d6 Fix Windows CI scripts.
The scripts now use `--list-targets -v` instead of `--explain` to evaluate changes.

This is faster and does not trigger parsing of a non-existent inventory file.
3 years ago
Martin Krizek 395e5e20fa
PlayIterator: use enums for states (#74511) 3 years ago
Matt Clay cd64e0b070
ansible-test - Fix import test on old Pythons. (#76137) 3 years ago
Matt Clay cae7d2a671
Overhaul ansible-test integration tests. (#76111)
* Overhaul ansible-test integration tests.
* ansible-test - Fix import test pyyaml usage.
* ansible-test - Remove unused import.
* ansible-test - Fix traceback when pip is unavailable.
* ansible-test - Fix typo in port forwarding message.
* ansible-test - Fix controller logic in requirements install.
* Fix unit tests in ansible-test integration test.

Unit tests are now run for available Python versions which
provide `virtualenv` (Python 2.x) or `venv` (Python 3.x).
3 years ago
Matt Clay b9694ce4fb ansible-test - Remove duplicate code. 3 years ago
Matt Clay b4cbe1adcf ansible-test - Fix Python real prefix detection. 3 years ago
Matt Martz e40a0e5c90
Don't use output_dir in target tests (#76107)
* Don't use output_dir in user tests

* Move blockinfile tests from using output_dir to depending on setup_remote_tmp_dir

* Don't use output_dir in git tests

* Don't use output_dir in uri tests
3 years ago
Martin Krizek 7621784b94
Require Jinja2 3.0.0 (#75881)
* Require Jinja2 3.0.0

ci_complete

* Fix sanity

* Remove Jinja min/max tests

* ansible-test changes

* ci_complete

* More cleanup

ci_complete

* Revert _count_newlines_from_end :( and other stuff

* Fix sanity

* It's using host_vars ...

* Unused import

* Remove overridden groupby filter

* environmentfilter -> pass_environment

* Explain preserve_trailing_newlines

* Add changelog

* ci_complete

* Deprecated ANSIBLE_JINJA2_NATIVE_WARNING

* native_helpers.py cleanup

* More cleanup in the find intgration test
3 years ago
Matt Martz 66a83314b9
Modernize install (#76021)
Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Davis <mrd@redhat.com>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
3 years ago
Martin Krizek afb8a008c2 Remove incidental_deploy_helper 3 years ago
Martin Krizek 2f3fbaac3c
Remove unused test/support plugins (#76078) 3 years ago
Felix Fontein 227f4398c2
Fix choices for return values. (#76070) 3 years ago
Martin Krizek 0c1b839c10 Remove incidental_win_copy
ci_complete
ci_coverage
3 years ago
Martin Krizek 90f670090c Remove incidental_setup_tls
ci_complete
ci_coverage
3 years ago
Martin Krizek 7e79411701 Remove incidental_cs_common 3 years ago
Matt Clay d099e19796 ansible-test - Move constants to remove symlink. 3 years ago
Martin Krizek 23f95300bd
Intentional tests (#76051)
ci_complete
ci_coverage
3 years ago
Martin Krizek 80f4b67f43
Removed unused test/support modules (#76048) 3 years ago
Matt Clay 2af4d30b9b Remove incidental mongodb tests.
They no longer provide unique coverage.

ci_complete
ci_coverage
3 years ago
Matt Clay cca9013df8 Remove incidental_win_data_deduplication test.
It no longer provides unique coverage.

ci_complete
ci_coverage
3 years ago
Martin Krizek 7cf29ded9c Intentional tests
ci_complete
ci_coverage
3 years ago
Matt Clay 609cba5017 Remove incidental_win_dsc test.
It no longer provides any unique test coverage.

ci_complete
ci_coverage
3 years ago
Matt Clay 319b50f04c Fix subversion test.
Switch to a different repo that isn't giving 503 errors since GitHub hasn't fixed the issue yet.
3 years ago
Matt Clay 3d46670622
Remove incidental_win_ping test. (#76031)
It no longer provides any unique test coverage.

ci_complete
ci_coverage
3 years ago
Matt Clay 2437fb3718 Add more ansible-test cloud tests. 3 years ago
Martin Krizek b1211429d5
Fix executing includes in the free strategy (#75649)
Fixes #75642
3 years ago
Felix Fontein 7a28246248
validate_modules: allow 'choices' for return values (#76009)
* Allow 'choices' for return values.
3 years ago
Matt Clay 5cb1210f82 ansible-test - Update base and default containers.
- The containers are now based on Ubuntu 20.04 instead of Ubuntu 18.04.
- The default Python version used for the containers is now Python 3.10.
- The included version of PowerShell was upgraded to version 7.1.4.
- The included version of shellcheck was upgraded to version 0.7.0.

ci_complete
3 years ago
Matt Clay 801eb73ccb
ansible-test - Update Python constraints. (#75959)
* Remove obsolete constraints.
* Simplify constraints.
* Add changelog fragment.
3 years ago
Jordan Borean 7e19957afa
ansible-test pslint - fix warning with nested objects (#75792)
* ansible-test pslint - fix warning with nested objects
3 years ago
Matt Martz 8510db4935
Allow ca_path to point to a bundle (#75894)
* Allow ca_path to point to a bundle. Fixes #75015
3 years ago