Compare commits

...

255 Commits

Author SHA1 Message Date
c51437ee8c Remove scheduled runs (#83374) 2024-06-05 17:26:18 -07:00
ee75c90255 [backport-2.12] ansible-test - Use PyPI proxy for centos7 (#83226) (#83233)
(cherry picked from commit c0f7e9cc2c)

Co-authored-by: Matt Clay <matt@mystile.com>
2024-05-10 13:19:41 -07:00
66dededfef Use a PyPI CDN URL in unarchive integration test
This fixes a TLS problem that manifested itself as Cloudflare updated
the Let's Encrypt TLS certificate for `releases.ansible.com`
[[1]][[2]] on March 15, 2024.

It started failing the stable-2.12 CI as follows:
```console
Failed to validate the SSL certificate for releases.ansible.com:443. Make sure your managed systems have a valid CA certificate installed. If the website serving the url uses SNI you need python >= 2.7.9 on your managed machine  (the python executable used (/usr/bin/python2.6) is version: 2.6.6 (r266:84292, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]) to perform SNI verification in python >= 2.6. You can use validate_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible. The exception msg was: [Errno bad handshake] [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')].
```

[1]: https://blog.cloudflare.com/upcoming-lets-encrypt-certificate-chain-change-and-impact-for-cloudflare-customers
[2]: https://letsencrypt.org/2023/07/10/cross-sign-expiration.html
2024-03-19 11:14:12 -07:00
7d7c656f5c [stable-2.12] Disable ansible-test podman container tests on Ubuntu 22.04 (#82748) (#82755)
(cherry picked from commit 9a8be1e)
2024-02-27 11:42:49 -06:00
06e790d752 [backport][stable-2.12] 🧪 Replace GitHub SVN integration test with local TLS (#82371)
* [backport][stable-2.12] 🧪 Replace GitHub SVN integration test with local TLS

PR #82334

* Run svn integration test locally with TLS

This patch uses a `trustme` to make an ephemeral CA, and server, and
client TLS artifacts for testing. These are integrated into the Apache
web server via it's `mod_ssl`.

Resolves #82207

* Replace GitHub SVN HTTPS URL w/ localhost over TLS

This change gets rid of the need to use GitHub, which is just about to
drop support for SVN [[1]]. Moreover, it eliminates the need to use
external network for any SVN commands in the test.

[1]: https://github.blog/2023-01-20-sunsetting-subversion-support/

(cherry picked from commit dd0138ba21)

* Implement compat w/ opensuse15, centos7 & rhel7/8

* Implement compat w/ centos6
2023-12-11 10:47:06 -06:00
252273bf6a [stable-2.12] ansible-test - Fix parsing of cgroup entries
(cherry picked from commit e933d9d8a6)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-10-23 09:48:42 -07:00
d20cf325ba [stable-2.12] Fix subversion integration test (#82029)
- Remove dependency on the htpasswd module (and thus passlib)
- Fix setup/teardown of the httpd process
- Fix cleanup of temporary directories.
(cherry picked from commit 09d943445c)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-10-23 09:47:34 -07:00
9c983fb76d Fix reporting role as not found when remote_data is None (#81829) (#81834)
(cherry picked from commit 7fab552563)
2023-10-02 12:28:23 -07:00
f34aaee57b [stable-2.12] ansible-test - Pre-build PyYAML wheels (#81300) (#81312)
This works around Cython failures when attempting to install PyYAML >= 5.4 <= 6.0..
(cherry picked from commit e964078a83)
2023-07-18 21:21:02 -07:00
9237f3110c Bump azure-pipelines-test-container to v4.0.1 @ CI (#80940)
This patch updates the test container used in CI to the new v4 that
defaults to using Python 3.10 and is based on Ubuntu 22.04 Jammy[[1]].

[1]: https://github.com/ansible/azure-pipelines-test-container/pull/17
2023-06-12 11:33:39 -07:00
aefaecfb5d eol 2.12 docs (#80957) 2023-06-09 10:52:12 -07:00
2cf68c252f [stable-2.12] ansible-test - local change detection without --fork-point (#79734) (#80902)
(cherry picked from commit a5bb4c7dee)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-05-26 15:57:13 -07:00
061201ee9e Trim down 2.12 test matrix (#80805)
* Remove scheduled runs

The ansible-core 2.12 release has reached EOL with the release of ansible-core 2.15.

* Revert "Remove scheduled runs"

This reverts commit e547e202b9.

* Trim down test matrix

A smaller test matrix is being maintained for additional downstream support.
2023-05-22 10:27:15 -07:00
4d5fb74c51 [stable-2.12] ansible-test - Fix traceback when mixing sources (#80801) (#80831)
* ansible-test - Fix traceback when mixing sources

* ansible-test - Refactor layout error handling.

(cherry picked from commit b16041f1a9)
2023-05-18 11:09:10 -07:00
a675a5d0cc [stable-2.12] ansible-test - Fix handling of long timeouts (#80769) (#80775)
(cherry picked from commit aacab0633a)
2023-05-10 20:04:49 -07:00
6a5563b7cd [stable-2.12] ansible-test - Fix timeout handling (#80764). (#80768)
(cherry picked from commit 4c6aa70662)
2023-05-10 20:03:40 -07:00
aa7370f876 ansible-test - Relax pylint config for backports (#80771) 2023-05-10 17:09:31 -07:00
69d9b689fe [stable-2.12] ansible-test - Avoid use of deprecated utcnow (#80750) (#80760)
The timestamps are only used by ansible-test, not the junit callback, so this change only impacts ansible-test.

(cherry picked from commit fd341265d0)
2023-05-10 17:07:35 -07:00
a0638a205b Remove FreeBSD 12.2 from CI (#80699)
The package repositories are no longer available.
2023-05-02 15:50:52 -07:00
0e69886bf6 [stable-2.12] Release tool improvements (#80641) (#80682)
* Provide reproducible sdist builds.
* Use reproducible wheel builds.
* Add PyPI artifact checks.

(cherry picked from commit d37678c5ff)
2023-05-01 09:41:21 -07:00
ca1db748b8 Disable failing incidental_inventory_docker_swarm (#80660) 2023-04-27 09:45:27 -07:00
bbeb0bfbaf [stable-2.12] ansible-test - Use FreeBSD packaged setuptools (#80615) (#80619)
This will avoid issues during bootstrapping caused by breaking changes in setuptools.

(cherry picked from commit abc58c026b)
2023-04-24 13:44:38 -07:00
ccabbcfae0 Pin pyasn1 version in uri and unarchive tests (#80586) 2023-04-21 08:58:42 -07:00
f5224ba173 Disable failing incidental_mongodb_parameter test (#80573) 2023-04-19 09:26:55 -07:00
f79985958e [stable-2.12] ansible-test - Add support for argcomplete 3 (#80482). (#80487)
(cherry picked from commit 0371ea08d6)
2023-04-11 13:32:08 -07:00
5b70f5cdbd [stable-2.12] New upstream release tool (#80179) (#80323)
(cherry picked from commit a6bfa82bd0)
2023-03-27 13:38:27 -07:00
f302197463 [stable-2.12] Use variable instead of container resource in AZP (#80299) (#80318)
(cherry picked from commit 93d0253292)
2023-03-27 12:42:28 -07:00
cb0a7670df [stable-2.12] Fix url lookup test to use test container (#80284) (#80289)
(cherry picked from commit 054aa92158)
2023-03-23 14:26:44 -07:00
0fe380ed07 [stable-2.12] ansible-test - Update git diff handling (#80202)
This change allows ansible-test to work with newer versions of git on AZP.

(cherry picked from commit bad8843124)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-03-15 13:08:34 -07:00
4276f9c352 [stable-2.12] Relocate the AZP entry point scripts (#80114)
Scripts previously under `test/utils/shippable/` are now under `.azure-pipelines/commands/` instead..
(cherry picked from commit f47bc03599)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-03-14 17:52:30 -07:00
1062575206 [stable-2.12] ansible-test - Remove pointless comparison (#80168)
(cherry picked from commit 31658031ed)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-03-14 17:52:20 -07:00
915c83fad7 [stable-2.12] ansible-test - Fix vendoring support (#80074)
- Support loading of vendored Python packages.
- Exclude vendored Python packages from payloads.
(cherry picked from commit 6bfe6b899a)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-03-14 17:52:10 -07:00
13f9a42e1b [stable-2.12] ansible-test - Show Python version before install (#80022)
Always indicate the Python version being used before installing requirements.
(cherry picked from commit 5e3db6e441)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-03-14 17:51:58 -07:00
f630cfb50a [stable-2.12] ansible-test - Allow target prefixes to use _ (#80021)
Integration test target prefixes defined in a `tests/integration/target-prefixes.{group}` file can now contain an underscore (`_`) character.
(cherry picked from commit e6cffce0eb)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-03-14 17:51:48 -07:00
e7bf6d4bf9 [stable-2.12] ansible-test - Fix file permissions for delegation (#80205)
* [stable-2.12] ansible-test - Fix file permissions for delegation (#79932)

* ansible-test - Fix file permissions for delegation

* Set more restrictive permissions for SSH key

* Check all execute bits, not just owner

* Add a breaking_changes changelog entry.

(cherry picked from commit c8c1402ff6)

* ansible-test - Fix collection delegation (#79947)

(cherry picked from commit 0793833847)

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-14 15:56:26 -07:00
edb7635d69 [stable-2.12] ansible-test - Fix pylint error with old home dir (#80151) (#80154)
* [stable-2.12] ansible-test - Fix pylint error with old home dir (#80151)
(cherry picked from commit 27287b40c0)

Co-authored-by: Matt Clay <matt@mystile.com>

* ansible-test - Fix error with missing pylint home (#80155)

(cherry picked from commit 367d45facd)
2023-03-07 09:01:01 -08:00
2154de5eb5 [stable-2.12] Fix MANIFEST.in includes (#80147) (#80150)
* [stable-2.12] Fix MANIFEST.in includes (#80147).

(cherry picked from commit 7c62cdeecd)

* Include additional packaging files
2023-03-06 16:00:59 -08:00
42e93c1c4f [stable-2.12] ansible-test - Support Podman 4.4.0+
(cherry picked from commit 67d49734f7)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-02-14 13:20:18 -08:00
2c44adff20 Bump acme test container. (#79783) (#79814)
(cherry picked from commit 5fb8bc3ddb)
2023-02-10 14:58:19 -08:00
c34d8f4be5 [stable-2.12] ansible-test - Specify config path in plugin error (#79881) (#79979)
(cherry picked from commit d48d1c23df)
2023-02-10 14:57:01 -08:00
c6984944d1 [stable-2.12] Ansible.Basic.cs - Fix compile error on PS 7.3.x (#79848) (#79852)
(cherry picked from commit 83fe75db07)
2023-02-02 16:24:20 -08:00
4ad346c2fa [stable-2.12] Remove outdated note on relative imports in docs (#79873) (#79877)
(cherry picked from commit 58461bc204)
2023-02-02 16:09:04 -08:00
f9ae08ad00 Document callback types in documentation (#79651) (#79655)
(cherry picked from commit 51bddd862b)
2023-01-18 15:32:47 -06:00
865b457a6e ansible-test - fix ps argspec check inside cmdlet (#79699)
* ansible-test - fix ps argspec check inside cmdlet

* Added error condition test

* Fix sanity problem

(cherry picked from commit ee33be9484)
2023-01-11 10:13:41 -08:00
489b83fa30 Remove redundant RHEL extras setup. 2023-01-04 17:53:03 -08:00
3b9775d290 [stable-2.12] Fix EPEL setup for integration tests on RHEL 7
(cherry picked from commit 1243d2ace0)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-01-04 17:53:03 -08:00
c37870a735 [stable-2.12] ansible-test - Improve container management. (#79611)
* ansible-test: Set max number of open files in containers to 10240 (#75498)

(cherry picked from commit e50ad6f118)

* 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>
(cherry picked from commit 730194e2b6)

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

(cherry picked from commit abac141122)

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

(cherry picked from commit 4e70156d7e)

* ansible-test - Fix type hints.

(cherry picked from commit d2daa67b00)

* ansible-test - Fix plugin loading.

This fixes a traceback when loading plugins that use dataclasses.

(cherry picked from commit 7e814dd4db)

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

(cherry picked from commit 3a891827b7)

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

* 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

(cherry picked from commit de5f60e374)

* ansible-test - Validate collection ns and name.

Resolves https://github.com/ansible/ansible/issues/62079

(cherry picked from commit 26b43f425f)

* ansible-test - Add default for Windows remotes.

(cherry picked from commit 18ed2c64e5)

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

(cherry picked from commit d19b506ce8)

* ansible-test - Remove obsolete display of MAXFD.

Use of ``subprocess.MAXFD`` only worked on Python 2.x, which is no longer supported.

(cherry picked from commit dc6b0d4857)

* ansible-test - Code cleanup and refactoring. (#77169)

* Remove unnecessary PyCharm ignores.
* Ignore intentional undefined attribute usage.
* Add missing type hints. Fix existing type hints.
* Fix docstrings and comments.
* Use function to register completion handler.
* Pass strings to display functions.
* Fix CompositeAction handling of dest argument.
* Use consistent types in expressions/assignments.
* Use custom function to keep linters happy.
* Add missing raise for custom exception.
* Clean up key/value type handling in cloud plugins.
* Use dataclass instead of dict for results.
* Add custom type_guard function to check lists.
* Ignore return type that can't be checked (yet).
* Avoid changing types on local variables.

(cherry picked from commit a06fa496d3)

* ansible-test - Simplify type hints.

(cherry picked from commit af2b1361ff)

* Support podman-remote in ansible-test (#75753)

(cherry picked from commit 7cb581ed2c)

* docker_util: Handle error in JSON parsing (#77298)

While getting hostname from container, podman command
fails to return JSON so wrap exception and return
hostname as 'None'

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

* ansible-test - Remove RHEL 9.0b support.

Support can be restored once RHEL 9 has been released.

(cherry picked from commit 55f90ba31f)

* ansible-test - Don't fail if network cannot be disconnected (#77472)

* Don't fail if network cannot be disconnected

* add clog frag

(cherry picked from commit 66c5844978)

* ansible-test - Backport `InternalError`

NOTE: This is a partial backport, including only one new class.

(cherry picked from commit b960641759)

* ansible-test - Fix subprocess management. (#77641)

* Run code-smell sanity tests in UTF-8 Mode.
* Update subprocess use in sanity test programs.
* Use raw_command instead of run_command with always=True set.
* Add more capture=True usage.
* Don't expose stdin to subprocesses.
* Capture more output. Warn on retry.
* Add more captures.
* Capture coverage cli output.
* Capture windows and network host checks.
* Be explicit about interactive usage.
* Use a shell for non-captured, non-interactive subprocesses.
* Add integration test to assert no TTY.
* Add unit test to assert no TTY.
* Require blocking stdin/stdout/stderr.
* Use subprocess.run in ansible-core sanity tests.
* Remove unused arg.
* Be explicit with subprocess.run check=False.
* Add changelog.
* Use a Python subprocess instead of a shell.
* Use InternalError instead of Exception.
* Require capture argument.
* Check for invalid raw_command arguments.
* Removed pointless communicate=True usage.
* Relocate stdout w/o capture check.
* Use threads instead of a subprocess for IO.

(cherry picked from commit 5c2d830dea)

* ansible-test - Add support for remote Ubuntu VMs.

(cherry picked from commit 6513453310)

* ansible-test - Fix remote completion validation.

(cherry picked from commit e2200e8dfc)

* ansible-test - Add multi-arch remote support.

(cherry picked from commit 2cc74b04c4)

* ansible-test - Enhance the shell command. (#77734)

* ansible-test - Add shell --export option.

* ansible-test - Support cmd args for shell command.

Also allow shell to be used without a valid layout if no delegation is required.

* ansible-test - Improve stderr/stdout consistency.

By default all output goes to stdout only, with the exception of a fatal error.

When using any of the following, all output defaults to stderr instead:

* sanity with the `--lint` option -- sanity messages to stdout
* coverage analyze -- output to stdout if the output file is `/dev/stdout`
* shell -- shell output to stdout

This fixes issues two main issues:

* Unpredictable output order when using both info and error/warning messages.
* Mixing of lint/command/shell output with bootstrapping messages on stdout.

* ansible-test - Add changelog fragment.

(cherry picked from commit fe349a1ccd)

* ansible-test - Fix remote args restriction.

The platform-specific and global fallbacks were not working with the `--remote` option.

This regression was introduced by https://github.com/ansible/ansible/pull/77711

(cherry picked from commit 76ead1e768)

* ansible-test - Fix shell target options handling.

(cherry picked from commit f933314101)

* Refactor ansible-test integration tests. (#78168)

* Relocate update-ignore.py for easier re-use.

* Add script to ease collection testing.

* Skip ignore rewrite if file does not exist.

* Add integration test for the shebang sanity test.

* Fix ansible-test-no-tty integration test.

Previously the test only verified a TTY was not used if a TTY already existed.
This prevented the test from verifying behavior when run in CI.
Now the test creates a PTY before invoking ansible-test.

* Clean up ansible-test-docker integration test.

(cherry picked from commit f70cc2fb7e)

* ansible-test - Fix TTY and output handling. (#78350)

(cherry picked from commit a3c90dd0bc)

* ansible-test - Parse content config only once. (#78418)

(cherry picked from commit f2abfc4b3d)

* ansible-test - Fix self-test change handling. (#78521)

(cherry picked from commit 99016653a2)

* ansible-test - Fix integration test target filter. (#78862)

- Allow disabled, unsupported, unstable and destructive integration test targets to be selected using their respective prefixes.
- Allow unstable tests to run when targeted changes are made and the ``--allow-unstable-changed`` option is specified (resolves https://github.com/ansible/ansible/issues/74213).

(cherry picked from commit d3d7785472)

* [stable-2.13] ansible-test - Improve container management. (#79538)

* ansible-test - More flexible become support.

(cherry picked from commit 5666c6d6a3)

* ansible-test - Add support for more remotes.

(cherry picked from commit 24d91f552c)

* ansible-test - Enable ACLs on FreeBSD remotes.

This allows integration tests to switch from one unprivileged user
to another, sharing files between the users using ACLs.

(cherry picked from commit b63812bc08)

* ansible-test - Enable ACL support on more remotes. (#78299)

(cherry picked from commit 8bb20fe06b)

* ansible-test - Install `acl` on Alpine remotes. (#78303)

(cherry picked from commit 8565deaae3)

* ansible-test - Use sudo for all remotes. (#78310)

(cherry picked from commit f3f4ad9332)

* ansible-test - Fix Ubuntu 20.04 bootstrapping. (#78551)

(cherry picked from commit d683c5bd21)

* ansible-test - Verify executables are executable. (#78606)

(cherry picked from commit ece85abbc4)

* ansible-test - Use --tmpfs to run containers. (#78605)

(cherry picked from commit 4187707f03)

* ansible-test - Remove Fedora 35 support. (#78720)

(cherry picked from commit 38a82a5cc4)

* ansible-test - Fix container error handling. (#78739)

(cherry picked from commit 79f67ed561)

* ansible-test - Improve container management. (#78550)

See changelogs/fragments/ansible-test-container-management.yml for details.

(cherry picked from commit cda16cc5e9)

* ansible-test - Fix container detection. (#79530)

(cherry picked from commit 80d2f8da02)

* Update test matrix symlinks. (#78737)

* Add remote platform symlinks.

These were already supported by ansible-test.
This change adds the symlinks for use in the CI test matrix.

* Remove obsolete AIX test symlink.

AIX was already removed from ansible-test.

(cherry picked from commit 62221a3be2)

* Use patched containers without VOLUME instruction.

* Make test suite compatible with older ansible.

* Fix compatibility with Python 3.8.

(cherry picked from commit 1d7436935f)

* ansible-test - fix warning to include image name (#79560)

(cherry picked from commit 0a12d8a5bc)

* ansible-test - Fix target PyPI proxy config.

(cherry picked from commit dcc08eec35)

* ansible-test - Fix `--prime-containers` and `--explain` (#79581)

* Remove unused code.
* Fix explain errors.
* Fix `--prime-containers` with docker on cgroup v2.

(cherry picked from commit da3b1d3f50)

* ansible-test - Support RSA SHA-1 for SSH clients.

(cherry picked from commit 75b60b17ee)

* ansible-test - Limit paramiko to < 2.9.0

(cherry picked from commit d6588293fb)

* Add more retries to ansible-test-container test.

(cherry picked from commit f6c0e22f98)

* ansible-test - Improve container startup handling.

Also improve the ansible-test-container integration test:

 - Add coverage for the no-probe code path.
 - Add work-arounds for centos6 containers (to support backporting).
 - Avoid systemd debug when the container doesn't use cgroup.

(cherry picked from commit 04fc98c794)

* Fix shebang test.

A false positive is generated by the test and a fix was never backported to stable-2.12.

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
Co-authored-by: Dimitri Savineau <dsavinea@redhat.com>
Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2022-12-16 09:58:58 -08:00
cfbd819db3 [stable-2.12] Improve split integration test. (#78738)
* Omit redundant fact gathering.

* Add connection type to split test.

* Add user info to split integration test.
(cherry picked from commit 2e5e802)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-12-12 09:50:20 -08:00
6babd43ce0 Set explicit meta long_description_content_type (#79468) (#79488)
This is necessary for `twine check --strict` to pass.

(cherry picked from commit 80551633c7)
2022-12-06 15:15:10 -08:00
a258e013bb [backport][2.12][PRs #78402 #79289] Enable the reboot integration test in CI (#79492)
* Enable the `reboot` integration test in CI

Co-Authored-By: Matt Clay <matt@mystile.com>
(cherry picked from commit bb7ad0f0d8)

* [CI] Move running `reboot` integration test to group 2

PR #79289, follow-up for #78402.

It was breaking the integration-aliases sanity test, but only
became apparent post-merge. This patch fixes that.

(cherry picked from commit 26a4775611)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-12-06 14:30:46 -08:00
4c5069047c [stable-2.12] Don't use color in jinja_plugins test.
This should prevent color codes from interfering with string matches.
(cherry picked from commit 31f9d60b8d)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-12-05 12:03:53 -08:00
d177a8ce41 [stable-2.12] ansible-test - Improve pylint command consistency. (#78896)
* ansible-test - Improve pylint command consistency.

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit bc274f5)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-11-22 18:56:11 -08:00
3603a94dfc Fix typo 'Ansbile'. (#79318) (#79332)
(cherry picked from commit 2a03c8028e)
2022-11-10 15:48:19 -08:00
28fc2c6edc Japanese version switcher (#79276) (#79346)
* update japanese version switcher for 2.14

* update latest version

(cherry picked from commit 196084773b)
2022-11-08 16:38:11 -08:00
93f9636deb update version switcher to include 2.14 (#79273) (#79327)
(cherry picked from commit d0b6ce7473)
2022-11-07 09:16:31 -08:00
bec2592795 [2.12] Log runme.sh execution in integration tests (#79284)
* Log `runme.sh` execution in integration tests (#79263)

* Log `runme.sh` execution in integration tests

This patch adds `set -x` where it's missing in the integration tests.
It also enables `pipefail` in `runme.sh` scripts that use pipes.

* Add a change note for PR #79263

(cherry picked from commit 6674c43edd)

* Delete a bad PR #79263 change note

(cherry picked from commit 9cfb3f73e8)
2022-11-03 20:39:42 -07:00
78fdb7a35c [stable-2.12] ansible-test - Fix and update documentation links..
(cherry picked from commit 938c0fa944)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-11-03 20:38:13 -07:00
3322ba015f [stable-2.12] Fix ansible-test-git test for newer git versions.
The latest versions of `git` include a fix for CVE-2022-39253. The fix blocks the file protocol by default.

See: 45c9f05c44/Documentation/RelNotes/2.30.6.txt
(cherry picked from commit 4202acb41b)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-10-25 10:08:34 -07:00
01fde4baea [stable-2.12] Restrict wheel below v0.38.0 under Pythons < 3.7 (#79187)
* Restrict `wheel` below v0.38.0 under Pythons < 3.7

* Add a change note for PR #79187

* Update changelogs/fragments/79187--wheel-0.38.0.yml

Co-authored-by: Matt Clay <matt@mystile.com>

* Use constraints file when installing wheel.

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

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-10-24 17:04:29 -07:00
4a8d41dee5 Update Ansible release version to v2.12.10.post0. (#79098) 2022-10-11 10:51:38 -04:00
cd25764de2 New release v2.12.10 (#79074) 2022-10-10 10:27:09 -04:00
6bcb90a141 Update Ansible release version to v2.12.10rc1.post0. (#78994) 2022-10-03 15:19:58 -05:00
12ae8f56ca New release v2.12.10rc1 (#78936) 2022-10-03 11:54:02 -04:00
351fa03bc9 [stable-2.12] Add ssh_args and friends back, add var for proxy_command (#78826) (#78838)
* [stable-2.12] Add ssh_args and friends back, add var for proxy_command (#78826)

Fixes #78750
(cherry picked from commit 1b47def)

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

* Remove non-backportable changes

(cherry picked from commit ba2938a388)
2022-09-29 16:55:11 -07:00
0d68ce2efb [stable-2.12] Don't request repo updates when only testing modes (#78843) (#78851)
(cherry picked from commit 2542048)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-09-21 15:25:14 -07:00
8ab2040759 Update Ansible release version to v2.12.9.post0. (#78754) 2022-09-12 15:17:32 -04:00
fb44af4e7d New release v2.12.9 (#78752) 2022-09-12 13:45:17 -04:00
f58678f09a Update Ansible release version to v2.12.9rc1.post0. (#78719) 2022-09-06 14:03:19 -04:00
301ab2bd52 New release v2.12.9rc1 (#78716) 2022-09-06 12:41:07 -04:00
12097c81b9 Fix pytest collection during test_host partial run (#78595)
Sometimes pytest errors out with an `ImportError` during its tests
collection stage when a Python package/directory containing the test
module does not have an `__init__.py` in it. This is being observed
under Python 3.9 and higher.

The patch provides a workaround for this problem but does not address
the root cause which is currently unknown.

Ref:
https://github.com/ansible/ansible/pull/78585#issuecomment-1220885431
(cherry picked from commit beb70daf14)
2022-08-31 15:46:14 -07:00
252c6551ff Replace get_persistent_connection_options in task_executor with get_options (#74446) (#78591)
Replace get_persistent_connection_options with get_options
Remove special case for network sub_plugin in _set_plugin_options
Try to avoid mock connection pretending to be persistent
Rename variables->options to reflect what they actually are
Gather options for ssh_type_conn on network_cli
Drop reliance on sub_plugin["type"]

(cherry picked from commit bf1ef5a1f3)
2022-08-31 12:21:59 -05:00
ee7f9b7936 Fail fast in stuck ansible-galaxy-collection (#78628)
This specific integration test gets stuck periodically causing the
Galaxy jobs to be killed on timeout wasting an hour of runtime. The
module that gets stuck waiting on Pulp is an in-test one, called
`setup_collections`. When it works, the task is complete in around 70
seconds but when it doesn't, it just freezes the whole play.

This patch attempts to make it fail faster by putting a reasonable
timeout value of 2 minutes.

(cherry picked from commit f1c56e988d)
2022-08-31 12:21:44 -05:00
ce1b0b2aa4 [stable-2.12] Filter AWS test AMI selection on any Fedora-Cloud-Base image (#78669) (#78670)
(cherry picked from commit 046c59d)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-08-30 14:30:30 -05:00
7e01d8084b Fix bcrypt install for paramiko test on macOS. (#78646) 2022-08-25 13:23:25 -07:00
ae6647bb75 [2.12] Disable connection_paramiko_ssh u/ FreeBSD 13.0+12.2 (#78644) 2022-08-25 13:18:52 -07:00
632b220684 [stable-2.12] Fix file integration test chattr/lsattr check. (#78614) (#78619)
On BusyBox systems such as Alpine, chattr on a tmpfs fails with a status of 0 and output only on stderr.

This change updates the test to not assume output on stdout.

(cherry picked from commit 2e536c0afb)
2022-08-22 14:54:15 -07:00
0495e23430 Fix version switcher for Japanese docs (#78544)
* Fix version switcher for Japanese docs (#78432)

(cherry picked from commit 660aceaa77)

* update version to match branch

* remove extra symlink from cherry-pick
2022-08-19 10:15:57 -07:00
c8fa046269 fix configuration name (#78507)
(cherry picked from commit 7120f11907)
2022-08-19 10:15:31 -07:00
7f711a736d Update Ansible release version to v2.12.8.post0. (#78546) 2022-08-15 16:13:21 -04:00
c3e329f565 New release v2.12.8 (#78529) 2022-08-15 14:03:23 -04:00
553a5e292c Update Ansible release version to v2.12.8rc1.post0. (#78477) 2022-08-08 14:18:42 -04:00
19bd3ea529 New release v2.12.8rc1 (#78471) 2022-08-08 11:34:46 -04:00
45185b03e2 Ensure atomic writes for cache file (#78208) (#78218)
* Ensure atomic writes for cache file

 helps avoid errors in highly concurrent environments

(cherry picked from commit f6419a53f6)
2022-08-03 10:56:03 -05:00
3379a7e32d Decode vaulted args before sending over ansible-connection. (#78236) (#78247)
I'm not aware of a way to easily get vault secrets decoded on the
ansible-connection side without sending the vault secrets over the
connection in the same way, so just decode them for transport.

(cherry picked from commit fff14d7c1d)
2022-08-03 10:55:16 -05:00
1cfda125ed [stable-2.12] Fix KeyError for ansible-galaxy when caching paginated responses from v3 (#78325) (#78406)
* Fix KeyError for ansible-galaxy when caching paginated responses from v3

* changelog

* generate responses in loop for test

Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 5728d72)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-08-03 10:54:54 -05:00
8c07cfdc49 [stable-2.12] ansible-test - Fix handling of args after -- (#78328)
(cherry picked from commit 0012263c7a)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-07-27 10:43:56 -07:00
b53419c8f3 Drop custom repo from libuser install @ Alpine CI (#78305) (#78307)
`group` and `setup_cron` integration tests currently install `libuser` and `faketime`
packages respectively, from the non-default edge/testing repositories. It is no
longer necessary to do so for the former so this patch drops the repo option. As
for the latter, this patch includes a note explaining when the same could be done
for it too.

This patch also adds a note on installing `faketime` on Alpine in CI.

(cherry picked from commit 619a1fa7e2)
2022-07-20 13:20:10 -07:00
1c964ff27e EOL Ansible 5 2022-06-28 12:55:35 -07:00
e1ff779844 [stable-2.12] ansible-test - Improve pip bootstrap download.
(cherry picked from commit b9d13d222c)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-06-24 12:23:57 -07:00
ea451113cf Update Ansible release version to v2.12.7.post0. (#78096) 2022-06-20 11:06:56 -04:00
fbaea4c269 New release v2.12.7 (#78085) 2022-06-20 09:40:20 -04:00
2f42779548 Update Ansible release version to v2.12.7rc1.post0. (#78045) 2022-06-13 10:35:19 -04:00
531123a311 New release v2.12.7rc1 (#78034) 2022-06-13 09:47:26 -04:00
fa3f74af91 [stable-2.12] Update AZP test container to 3.0.0. (#78023)
(cherry picked from commit 1321d6ecd5)
2022-06-09 17:29:41 -07:00
117414e5c2 [stable-2.12] ansible-test - Adjust unit test mock usage. (#78003)
* ansible-test - Prefer unittest.mock for core.

(cherry picked from commit 81351022d8)

* ansible-test - Adjust unit test mock usage. (#77961)

(cherry picked from commit 23914d3f0b)
2022-06-09 10:11:45 -05:00
482ce8fa8b fix pip module resolution (#78000) (#78005)
* `importlib.util` appears to be lazily imported and is sometimes unavailable as an attribute of `importlib` without an explicit import

(cherry picked from commit 6e78425f8d)
2022-06-09 10:11:00 -05:00
2cc9333e97 [stable-2.12] Make fuzzy plugin matching deterministic. (#77998)
(cherry picked from commit 5a0b230e24)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-06-08 12:07:28 -05:00
daf160bc67 Add toggle to fix module_defaults with module-as-redirected-action on a per-module basis (#77265) (#77900)
* If there is a platform specific handler, prefer the resolved module over the resolved action when loading module_defaults

Add a toggle for action plugins to prefer the resolved module when loading module_defaults

Allow moving away from modules intercepted as actions pattern

Fixes #77059

(cherry picked from commit 621e782ed0)
2022-06-08 12:07:21 -05:00
f4d7f33513 Update PSF-license.txt to version from CPython 3.9.5. (#77805) (#77828)
(cherry picked from commit 201aba3d0f)
2022-06-08 12:07:12 -05:00
0eb8e5e571 stub out ipaddr page and point to new home (#77281) (#77939)
(cherry picked from commit dfda04894f)
2022-06-02 16:24:13 -07:00
832a762c2b [stable-2.12] Avoid deprecated method in unit tests.
(cherry picked from commit 5f74350fd5)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-05-24 09:22:08 -07:00
f6b028341b Update Ansible release version to v2.12.6.post0. (#77881) 2022-05-23 18:09:43 -04:00
a1683d3dab New release v2.12.6 (#77864) 2022-05-23 11:46:35 -04:00
04ab182ef9 Update Ansible release version to v2.12.6rc1.post0. (#77813) 2022-05-16 15:04:47 -04:00
01cbef9476 New release v2.12.6rc1 (#77810) 2022-05-16 13:34:35 -04:00
48689b63e4 update version switcher to include 2.13 (#77786) (#77796)
(cherry picked from commit f5642cea28)
2022-05-13 15:04:36 -07:00
092d298b5c fix SELinux facts tests (#77708)
* make the pre-flight sniffing more robust to different failure conditions (was failing on Ubuntu 22.04 VMs)
* remove skip aliases (the test needs to function everywhere to assert that the selinux facts bits behave properly when it's N/A)

(cherry picked from commit 4ff10fcd31)
2022-05-10 16:40:42 -05:00
a9f17d0532 dont rely on path to set config defs for plugins (#77659) (#77695)
(cherry picked from commit a3cc6a581e)
2022-05-10 16:40:33 -05:00
4bde2d8a97 [stable-2.12] arg_spec - Return aliases in validation result and update aliases (#77576) (#77602)
* [stable-2.12] arg_spec - Return aliases in validation result and update aliases (#77576)

When looking up the `no_log` setting for a parameter that is an alias in
`AnsibleModule._log_invocation()`, the alias value will always be an
empty dictionary since `self.aliases` on the `AnsibleModule` instance is
never updated after initialization. Since the `no_log` setting is on the
canonical parameter not the alias, an incorrect warning is issued if the
parameter matches `PASSWORD_MATCH`.

This PR returns the aliases dictionary as an attribute of the
`ValidationResult` and updates the `aliases` attribute on the
`AnsibleModule` instance.
(cherry picked from commit 1b947eaf92)

Co-authored-by: Sam Doran <github@samdoran.com>

* Rewrite test comprehension for Python 2.6

* No need for list inside the dict constructor
2022-05-10 16:40:19 -05:00
625a99aa32 Prevent losing unsafe from lookups (#77609) (#77651)
This patch fixes a bug which under certain conditions results in data
returned from lookups not being marked as unsafe.

Each time Templar.do_template is invoked a new AnsibleContext is
created and stored effectively at two places:
1) as an instance variable in templar_obj.cur_context
2) as a local variable called new_context in do_template method of Templar

Due to custom functionality in Ansible's Context that allows for nested
templating it is possible that during resolving variable's value
template/do_template method is called recursively again, again creating
a new context. At that point the problem manifests itself because as
mentioned in 1) above the context is overwriten on the templar object
which means that any subsequent calls to _lookup will use the new
context to mark it as unsafe which is now different to the local
new_context which is used for testing for unsafe property.

The solution to the problem appears to be to restore the original
context inside do_template and also to eliminate the local variable
new_context to prevent problems in the future.

It appears that we don't have a better way of storing the context other
than as some form of global variable and so this appears to be the
"best" solution possible at this point. Hopefully data tagging will be
the solution here.

For more examples see unit and integration tests included in this patch.

Fixes #77535

(cherry picked from commit 3980eb8c09)
2022-05-09 14:57:55 -05:00
013be12888 varaiblemanager, more efficienet vars file reads (#77570) (#77595)
(cherry picked from commit 2c2a204dc6)
2022-05-09 14:57:35 -05:00
b667639c2c Update Ansible release version to v2.12.5.post0. (#77633) 2022-04-25 12:42:54 -04:00
b104478f17 New release v2.12.5 (#77628) 2022-04-25 10:34:11 -04:00
3ea4cdaddf Update Ansible release version to v2.12.5rc1.post0. (#77559) 2022-04-18 14:51:46 -07:00
e3ee19fbb8 New release v2.12.5rc1 (#77543) 2022-04-18 12:12:05 -07:00
fbc7502050 Pin antsibull to 0.42.0 (#77539) 2022-04-14 11:26:46 -07:00
04afeffed7 SID - Use literal UPN value when attempting a user to SID lookup (#77334) (#77348)
(cherry picked from commit ff184b0815)
2022-04-13 12:32:05 -05:00
db69d93c1c [2.12] fix shell/command/script tasks skipping in check mode (#76353) (#77389)
* fix shell/command/script tasks skipping in check mode (#76353)

* fix shell/command/script tasks skipping in check mode

* changelog

(cherry picked from commit de11a1ce78)

* Add portion of tests from #76429 for skipping/not skipping shell/command tasks in check mode
2022-04-13 12:07:45 -05:00
374882e4df winrm - ensure callers PATH for kinit is set (#77401) (#77403)
* winrm - ensure callers PATH for kinit is set

* Fix unit test expectations

* Fix type annotation

(cherry picked from commit 60b4200bc6)
2022-04-13 11:53:07 -05:00
2ce5d99e83 [bp-2.12] hostname - fix TypeError in FileStrategy (#77365)
* Use file_get_content() to read the file containing the host name

(cherry picked from commit d60efd9768)

Signed-off-by: Emmanuel Benoît <tseeker@nocternity.net>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

Co-authored-by: Emmanuel Benoît <tseeker@nocternity.net>
2022-04-13 11:34:33 -05:00
8bbcfebd5c Get git executable for collections in git repos (#77493) (#77501)
* Fix traceback installing collections from git repos if git is not installed

(cherry picked from commit 477c55b0d2)
2022-04-13 11:21:55 -05:00
efbe050c29 [stable-2.12] Fix sanity test crash.
(cherry picked from commit 6216c9fc93)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-11 18:08:35 -07:00
de70bfbcb0 [stable-2.12] ansible-test - Fix origin host target filtering.
(cherry picked from commit 4b51e61645)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-03-30 15:42:13 -07:00
d8bc9c4056 Update Ansible release version to v2.12.4.post0. (#77380) 2022-03-28 16:08:27 -07:00
bfd93c835a New release v2.12.4 (#77374) 2022-03-28 11:19:09 -07:00
36be99b52d Update Ansible release version to v2.12.4rc1.post0. (#77332) 2022-03-21 22:27:32 -04:00
5c97f7e16f New release v2.12.4rc1 (#77329) 2022-03-21 13:19:17 -07:00
660e8fa07d unarchive: fix io_buffer_size option, remove ignore.txt entry (#77271) (#77311)
* Fix io_buffer_size option.

* Remove ignore.txt entry by adding action plugin only options to module's argument spec.

* Add changelog fragment.

* Adjust unit tests.

(cherry picked from commit e3c72230cd)
2022-03-18 15:50:22 -07:00
7ddf9c6bff 2.12: Add YAML representers for NativeJinjaUnsafeText and NativeJinjaText (#77299)
* Add a YAML representer for NativeJinjaUnsafeText (#76186)

(cherry picked from commit dd220ddc2f)

* Add a YAML representer for NativeJinjaText (#77282)

Fixes #77280

(cherry picked from commit c9db73f04e)
2022-03-18 15:49:15 -07:00
26fd20c287 [2.12 backport] use same timeout for galaxy api interactions (backport of #77088) (#77142)
* use same timeout for galaxy api interactions (#77088)

Also, bump the default. A number of people have reported problems with
this 20 second timeout for a couple of years on
https://github.com/ansible/galaxy/issues/2302

It is mentioned in the issue that resolving dns can sometimes take up to
30 seconds, and that this timeout includes dns resolution.

Includes a changelog message

* fix type hint

Co-authored-by: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2022-03-15 11:39:57 -07:00
b3968340a0 [2.12] Fix collection redirects for filter and test plugins (#77210) (#77227)
* Fix collection redirects for filter and test plugins (#77210)

* Fix collection redirects for jinja2 filters/tests

* Handle recursive redirects

Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 8063643b4c)

* The error message is only capitalized on 2.13. Make test more flexible.
2022-03-15 11:08:32 -07:00
17836f8e65 first_found: allow spaces in names (#77141) (#77207)
* first_found: allow spaces in names

Fixes #77136

(cherry picked from commit 74a204e6f1)
2022-03-15 11:04:15 -07:00
2ff3ee75a5 [stable-2.12] Mention ansible-core RPM package in Ansible Core Installation Guide (backport #76801) (#77179) 2022-03-15 11:00:39 -07:00
bedff70f3e [2.12] ansible-galaxy collection verify - display new files/dirs as modified content (#77128)
* Fix 'ansible-galaxy collection verify' to report files/directories not listed in the FILES.json

(cherry picked from commit a1d467dbb2)

* changelog

(cherry picked from commit 3d49d6f69e)
2022-03-15 10:57:32 -07:00
a45c4aadb8 [stable-2.12] Use full python package for ansiballz cache filenames (#77090) (#77125)
* 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>
2022-03-15 10:55:55 -07:00
2d98b94f6c [stable-2.12] ansible-test - Fix delegation inventory path.
(cherry picked from commit e8afdac06e)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-03-10 19:15:50 -08:00
a90ef30282 Update Ansible release version to v2.12.3.post0. (#77161) 2022-03-01 09:48:55 -05:00
b801ef15c9 [stable-2.12] 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>

ci_complete
2022-02-28 14:38:13 -08:00
0ee3815c55 New release v2.12.3 (#77158) 2022-02-28 10:13:48 -05:00
7efb3caf76 Update Ansible release version to v2.12.3rc1.post0. (#77131) 2022-02-23 19:13:22 -05:00
bcdde7ebe3 New release v2.12.3rc1 (#77124)
Signed-off-by: Christian M. Adams <chadams@redhat.com>
2022-02-23 15:58:50 -05:00
586e40facf ansible-test - Update default containers to 4.2.0. 2022-02-22 16:12:37 -08:00
2f0b8398c9 [stable-2.12] ansible-test - Fix CParser import in yamllint.
(cherry picked from commit d286c2e8b3)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-02-22 11:59:39 -08:00
7df9c1bc91 [stable-2.12] ansible-test - Managed venv fixes. (#77100)
* ansible-test - Remove cap on cryptography version.

(cherry picked from commit 00a2b7788e)

* ansible-test - Fix consistency of managed venvs. (#77028)

(cherry picked from commit 68fb3bf90e)

* Avoid system-site-packages in AZP coverage venvs.

The use of `--venv-system-site-packages` was an optimization to use the `coverage` package pre-installed in the AZP test container.
However, now that the venv is bootstrapped by ansible-test that optimization no longer makes sense, since other downloads are already taking place.

(cherry picked from commit 177336a9d3)

* ansible-test - Clean up venv code.

(cherry picked from commit addb9baec2)

* Adjust virtualenv version for Python 2.6.

* Adjust bootstrap URL to work with Python 2.6.

* Enable PyPI proxy for generic tests.

This is needed to support ansible-test integration tests on Python 2.6.

* Freeze plugin import sanity test requirements.

Based on https://github.com/ansible/ansible/pull/76308
2022-02-22 11:50:19 -08:00
972bcfe7eb Fix integration tests that install MarkupSafe. 2022-02-21 23:47:25 -08:00
65792c3035 [stable-2.12] Remove unused task from template integration test.
(cherry picked from commit c1a271c792)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-02-21 22:07:21 -08:00
5caa97962e [stable-2.12] Fix warning in unit tests for _yaml import.
(cherry picked from commit de9a3bda2c)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-02-21 22:07:02 -08:00
010b143743 [stable-2.12] 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>
2022-02-21 17:57:13 -08:00
2a1aabed33 Fix filter_mathstuff integration test. 2022-02-21 10:18:05 -08:00
582d3b1488 [stable-2.12] ansible-test - Use quay.io containers in plugins.
(cherry picked from commit c27fd777f4)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-02-17 16:18:29 -08:00
782b8645b8 gather_facts sees collection networking connection (#76954) (#76963)
needed to properly propagate some arguments by convention: subset, filter

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit 5bddecb048)
2022-02-16 17:21:08 -08:00
ce60a37683 ssh connection: use 'correct' host in all cases (#76017) (#76968)
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)
2022-02-16 17:20:44 -08:00
6f94380767 Remove more whitelist and blacklist occurances (docs only). (#76845) (#76860)
(cherry picked from commit ee80e856c2)
2022-02-16 17:11:22 -08:00
c3ee359726 ansible-test - No pyopenssl in sanity test venvs. 2022-02-16 15:26:44 -08:00
de9fb8087e fix block var inheritance (#75287) (#76896)
* 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)
2022-02-16 10:56:11 -06:00
cd0ebed875 [stable-2.12] unarchive: fix non-english locales (#76542) (#76933)
* 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
(cherry picked from commit 49e1cb9)

Co-authored-by: Jonathan Neuhauser <jonathan.hofinger@gmx.de>

Co-authored-by: Jonathan Neuhauser <jonathan.hofinger@gmx.de>
2022-02-16 10:55:56 -06:00
317ff44f6d clean_facts only show variable name (#76974) (#76984)
(cherry picked from commit 47faa6e206)
2022-02-16 10:55:14 -06:00
ae35fc04c3 Fix final fact delegation (#77008) (#77017)
* fix facts delegation loop overwrite

 partial revert of change to allow facts to be present in each loop iteration
 was not needed in final results as result processing alreayd had the disctiontion
 and ended up breaking the assumptions in the calling code.

 fixes #76676

(cherry picked from commit c9d3518d2f)
2022-02-16 10:55:03 -06:00
613519d294 [stable-2.12] restore inadvertently deleted default for convert_data. Fixes #77004 (#77016) (#77021)
(cherry picked from commit 3779c1f)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-02-16 10:54:46 -06:00
bd0756e113 [stable-2.12] ansible-test - Use newer pip to bootstrap FreeBSD.
(cherry picked from commit ef4c5cd61b)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-02-15 15:35:14 -08:00
88cf272df0 [stable-2.12] Fix package-data sanity test for newer setuptools.
(cherry picked from commit 3a662ef2c1)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-02-15 13:38:38 -08:00
f574333395 [stable-2.12] ansible-test - Fix collection loader import. (#76986)
* ansible-test - Fix collection loader import.

Resolves https://github.com/ansible/ansible/issues/76960
(cherry picked from commit 0d40423f1c)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-02-08 13:05:44 -08:00
a9814fb3fe [stable-2.12] ansible-test - Fix import test for collections.
(cherry picked from commit e56e47faa7)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-02-08 12:52:01 -08:00
aa3747d116 [stable-2.12] ansible-test - Update alpine3 container to 3.3.0. (#76978)
This updates the base image from 3.14.2 to 3.15.0, which includes support for installing binary wheels using pip..
(cherry picked from commit e27b94c467)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-02-07 15:20:34 -08:00
e312665990 [stable-2.12] Update codecov download URL.
(cherry picked from commit e2d4c41ac0)
2022-02-03 15:39:34 -08:00
b5c49f1023 [stable-2.12] ansible-test - Update bootstrap URL to not use S3.
(cherry picked from commit 7e64c4fe55)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-02-03 15:39:16 -08:00
4ba819ad56 [stable-2.12] Stop publishing code coverage to the AZP UI.
Azure Pipelines only supports publishing a single code coverage file.
This limits us to reporting on either Python or PowerShell.
It also prevents us from reporting coverage per test command without further aggregation.
Most of our users are only aware of the reports published to codecov.io.
(cherry picked from commit a926b1dbab)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-02-03 14:57:59 -08:00
0e7d0d0038 [stable-2.12] docs - remove broken link in ACI scenario guide (#76940)
(cherry picked from commit 2767a4cf4a)

Co-authored-by: Matt Clay <mclay@redhat.com>
2022-02-03 12:14:58 -08:00
7f08acd46a [stable-2.12] Fix task path unicode error in junit callback.
(cherry picked from commit 41db6d8d35)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-02-02 17:57:36 -08:00
9e4a49ded8 [stable-2.12] ansible-test - Limit installed pyopenssl version.
(cherry picked from commit 995d7e4db3)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-02-01 09:50:38 -08:00
1ef0bc3fd6 [stable-2.12] 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.
(cherry picked from commit fbb5d56bd2)

Co-authored-by: Matt Clay <mclay@redhat.com>
2022-01-31 16:12:44 -08:00
f496edc6e9 Update Ansible release version to v2.12.2.post0. (#76904) 2022-01-31 18:03:37 -05:00
6c75cf5c83 New release v2.12.2 (#76892) 2022-01-31 15:19:57 -05:00
e81005e910 Remove centos8 from CI.
CentOS 8 has been EOL for ~1 month now.
2022-01-31 10:49:12 -08:00
5c208f0d71 [stable-2.12] 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.
(cherry picked from commit e9ffcf3c85)

Co-authored-by: Matt Clay <mclay@redhat.com>
2022-01-25 16:12:17 -08:00
ddc9575260 Update Ansible release version to v2.12.2rc1.post0. (#76834) 2022-01-24 12:18:05 -05:00
f81225c3e5 New release v2.12.2rc1 (#76831) 2022-01-24 11:02:08 -05:00
30aeba87c3 [stable-2.12] Resolve perf issue with async callback events (#76783) (#76816)
* Don't send full task with async callback events. Fixes #76729

* Use args for async_status task, instead of k=v

* Make sure we send back the async task attrs for polling

* Add clog frag

* load is a staticmethod
(cherry picked from commit 96ce480)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-01-21 13:20:12 -06:00
fdb93a912b [stable-2.12] Do not require SystemdStrategy subclasses for every distro (#76800). (#76808)
(cherry picked from commit 374720fc97)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-01-21 09:32:02 -06:00
3ded47c3d3 [stable-2.12] Attempt 2: Catch errors getting filters and tests (#76806). (#76809)
(cherry picked from commit 9f46f6eb30)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-01-20 14:06:17 -06:00
dd2e695c93 ansible-config avoid _terms and _input in --only-changed (#76597) (#76763)
dont display _terms or _intput on only changed
 those always change and it expected for the plugins that support them

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 2246ed9678)
2022-01-20 09:13:52 -06:00
83d7716e02 [stable-2.12] Compare FQCN also in lockstep logic. Fixes #76782 (#76787) (#76791)
(cherry picked from commit 29bdb8b)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-01-18 17:33:41 -08:00
3edae9b3e8 include_vars initialize failed (#76754) (#76784)
* include_vars initialize failed

  if source dir is given, but not present and traversal is empty you
  can end up trying to access failed w/o it ever being defined.

  also future proof for more corner cases in decision tree

(cherry picked from commit 89c884e2a2)
2022-01-18 17:31:10 -08:00
a60b79d8e8 ssh connection avoid parsiing own debug (#76732) (#76755)
- 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)
2022-01-18 17:25:13 -08:00
ec8b1d267d ansible-galaxy - fix the --ignore-certs flag for the implicit galaxy server (#76735) (#76738)
* 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

(cherry picked from commit 76220c4a7b)
2022-01-18 17:21:35 -08:00
645f74732c end_play: end the current play only (#76674) (#76730)
Fixes #76672

(cherry picked from commit f78deccec2)
2022-01-18 17:20:43 -08:00
5407c953ec ssh connection, handle 'fun' control paths (#76424) (#76693)
* 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)
2022-01-18 17:19:46 -08:00
841135bd42 [2.12] Use correct markup in documentation (#76574)
* Use correct markup in documentation (#76545)

(cherry picked from commit 9d1898b1ef)

* Fix markup.

(cherry picked from commit c24c479061)
2022-01-18 17:17:04 -08:00
6fa408a99a Fix AttributeError when providing file via --conn-password-file (#76534) (#76558)
Fixes #76530

(cherry picked from commit ac2bdd6834)
2022-01-18 17:15:17 -08:00
ca3889bf77 yum: avoid storing unnecessary cache data (#76345) (#76553)
Fixes #76336

(cherry picked from commit 461f30c160)
2022-01-18 17:14:06 -08:00
52d5adf6bc Properly set finalize for the new environment (#76435) (#76469)
* Properly set finalize for the new environment

Fixes #76379

* Fix sanity

(cherry picked from commit 4e7be293a5)
2022-01-18 17:12:48 -08:00
8b5ae59b36 galaxy build - ignore existing MANIFEST and FILES (#76479) (#76500)
(cherry picked from commit 8482ee4e9a)
2022-01-18 17:09:28 -08:00
ba1e93114c better handling of sudo flag replacement (#76389) (#76440)
* better handling of sudo flag replacement

(cherry picked from commit b02168d644)
2022-01-18 17:04:24 -08:00
f88efd57cb Fix zip content filtering in unarchive module (#76069) (#76418)
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)
2022-01-18 17:03:09 -08:00
5619368075 [stable-2.12] 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.
(cherry picked from commit c1df36e3ae)

Co-authored-by: Matt Clay <mclay@redhat.com>
2022-01-12 11:54:10 -08:00
295a22f0b6 [stable-2.12] 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>
2022-01-10 09:58:33 -08:00
2f2267a6e5 [stable-2.12] ansible-test - Fix delegation from install.
(cherry picked from commit 470c89518c)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-01-04 17:45:44 -08:00
ff7fc58269 [stable-2.12] ansible-test - Hide ansible._vendor in import test (#76503)
(cherry picked from commit 82f59d4843)

Co-authored-by: Matt Clay <mclay@redhat.com>
2022-01-04 15:53:50 -08:00
5771261825 [stable-2.12] ansible-test - Use ansible-core for docs links.
(cherry picked from commit 16cdac66fe)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-01-04 15:52:42 -08:00
7262d38dda 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)
2022-01-04 12:45:53 -08:00
73a631911c [stable-2.12] 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>
2022-01-04 12:17:48 -08:00
394c331c6d per marketing request - add note for AAP on Azure availability (#76512) (#76517)
* per marketing request - add note for AAP on Azure availability (#76512)

(cherry picked from commit 0df60f3b61)

* remove aws from the azure note (#76518)

(cherry picked from commit 0cec4d1cfc)
2021-12-09 13:53:09 -06:00
9d7ecaa8f7 add intersphinx mapping for Ansible 5 (#76470) (#76511)
* add intersphinx mapping for Ansible 5

* add the other files

(cherry picked from commit bccfb83e00)
2021-12-09 09:37:25 -06:00
8bab2e309b [stable-2.12] ansible-test - Fix traceback in validate-modules test.
(cherry picked from commit 41ee4a5b12)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-12-07 17:23:13 -08:00
a9ade42930 Update Ansible release version to v2.12.1.post0. (#76482) 2021-12-06 18:12:27 -05:00
f00f12393b New release v2.12.1 (#76477) 2021-12-06 10:47:53 -08:00
d7364ecbc4 set VERSION to 5 for realz 2021-12-01 09:38:48 -08:00
b00bdf2081 [stable-2.12] pin mongodb libraries in test
A recent release of PyMongo 4.0 caused tests to fail
2021-11-30 15:47:25 -08:00
3741551f8a set latest to Ansible 5 (#76405) 2021-11-30 12:34:32 -08:00
4bd007a089 set latest Ansible version to 5 (#76304) (#76406)
(cherry picked from commit 862a2a3599)
2021-11-30 12:34:14 -08:00
1522300cdf Update Ansible release version to v2.12.1rc1.post0. (#76395) 2021-11-29 17:18:15 -05:00
3740f03b0a New release v2.12.1rc1 (#76392) 2021-11-29 15:05:56 -05:00
036a8acd55 Localization: Update japanese documentation (#76337) 2021-11-24 10:13:34 -08:00
04967a5664 [Backport][Docs] Docs 2.12 backportapalooza7 (#76298)
* Stop using "checksumming" instead of "encrypting" in the docs (#76168)

* Hashing is not encrypting

All encryption systems have a formal inverse function to decrypt
A hash is a one way function without inverse by definition

* Update docs/docsite/rst/user_guide/playbooks_filters.rst

Co-authored-by: Sandra McCann <samccann@redhat.com>

* ansible-core 2.12 dropped support for galaxy.yaml. (#76179)

* apt - remove obsolete documentation (#76243)

The lock_timeout feature was recently added to the apt module making
this section in the documentation no longer necessary

* Documentation for other types in collection `requirements.yml` (#75872)

* Docs: Link to valid data types for role parameters (#76276)

* Fixed typo in keyword_desc.yml (#76280)

The description of 'max_fail_percentage' had a typo.

* Restore documentation on M() and R() (#76284)

* Undo most of bf9944266c, add note on where R() does not work.
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>

Co-authored-by: Vicente Jimenez Aguilar <googuy@gmail.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sam Doran <sdoran@redhat.com>
Co-authored-by: Daniel Goldman <merkavabuilder@gmail.com>
Co-authored-by: nkoechling <nkoechling@users.noreply.github.com>
2021-11-24 10:13:15 -08:00
ecbe4a1530 Keep pre Python 3.10 literal_eval behavior (#76261) (#76287)
(cherry picked from commit 95e120ed02)
2021-11-24 10:12:01 -08:00
c2eb014ad4 [stable-2.12] Use new codecov uploader (#75938) (#76267)
* Use new codecov uploader
* Rewrite coverage uploader in Python
(cherry picked from commit 74dc830dd4)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-11-24 10:11:11 -08:00
0ac22985cb [stable-2.12] check /.dockerenv and /.dockerinit to guess a dockercontainer (#74349) (#76218)
* use os.path.exists for docker-check

Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>
(cherry picked from commit 17ec2d4952)

Co-authored-by: Jan Fader <jan.fader@web.de>

Co-authored-by: Jan Fader <jan.fader@web.de>
2021-11-24 10:10:30 -08:00
3194f60998 LinkUtil - ignore LIB env var (#76184) (#76204)
(cherry picked from commit db2aee558b)
2021-11-24 10:09:39 -08:00
2556e33077 Skip recursive suboption validation if sub_parameters is not a dict (#75635) (#76190)
* 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)
2021-11-24 10:09:10 -08:00
8e8c4be23f loop/fact delegation fix (#75768) (#76187)
now set_fact and include_vars intermediate results are congruent with delegation

(cherry picked from commit 7bec196061)
2021-11-24 09:55:57 -08:00
f3de38a975 ansible-test - Update default test containers.
The updated containers include the recently updated `import` sanity test requirements.
2021-11-09 15:53:17 -08:00
9e1ef1b21f [stable-2.12] 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>
2021-11-09 15:31:24 -08:00
7d324cea42 [stable-2.12] ansible-test - Fix collection import test priming.
The bug was introduced in https://github.com/ansible/ansible/pull/76137
(cherry picked from commit d7fbb209b4)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-11-09 09:03:39 -08:00
6cba4c11d4 [stable-2.12] ansible-test - Multiple related backports. (#76136)
* [stable-2.12] ansible-test - Fix Python real prefix detection.

(cherry picked from commit b4cbe1adcf)

* ansible-test - Remove duplicate code.

(cherry picked from commit b9694ce4fb)

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

(cherry picked from commit cae7d2a671)

* ansible-test - Fix import test on old Pythons. (#76137)

(cherry picked from commit cd64e0b070)

* Skip ansible-test tests on Python 2.6.
2021-11-08 14:25:09 -08:00
48e2fc3b9b [stable-2.12] 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.
(cherry picked from commit 97f729c3d6)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-11-08 13:36:24 -08:00
1cade8390f [stable-2.12] Don't use output_dir in target tests (#76107) (#76110)
* 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
(cherry picked from commit e40a0e5)

Co-authored-by: Matt Martz <matt@sivel.net>
2021-11-08 15:35:12 -06:00
a020694891 [stable-2.12] ansible-test - Move constants to remove symlink.
(cherry picked from commit d099e19796)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-11-08 12:40:04 -08:00
273e09158f set 2.12 to latest (#76191) (#76249)
* set 2.12 to latest
* add 2.10 back

(cherry picked from commit b16d5ff7a7)
2021-11-08 10:31:28 -06:00
fce742a2d5 set VERSION to 2.12 (#76246) 2021-11-08 10:31:13 -06:00
745b1455cd Update Ansible release version to v2.12.0.post0. (#76245) 2021-11-08 10:45:34 -05:00
cb779ee9bb New release v2.12.0 (#76241) 2021-11-08 09:55:20 -05:00
99f694bfb7 [Backport][Docs] Docs 2.12 backportapalooza6 (#76231)
* Fix broken M() refs. (#76202)

* update backport instructions for 2.12 (#76209)

* Update dev guide for vars plugins in collections (#75861)

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Sebastian Wiesinger <sebastian@karotte.org>
2021-11-05 08:20:16 -05:00
227da1ccc5 [stable-2.12] Explicitly require iptables for incidental_setup_docker on RHEL8 (#76212) (#76214)
(cherry picked from commit 27a5116)

Co-authored-by: Matt Martz <matt@sivel.net>
2021-11-03 12:34:57 -05:00
a7b06d9c81 [Backport][Docs] Docs 2.12 backportapalooza5 (#76198)
* Update `argcomplete` install via apt command (#76139)

To install `argcomplete` on Ubuntu 21.10 we need to update the install line to use Python3

* Update module documentation about ref links (#76088)

* Update module documentation about ref links

* Docs: Change API endpoint for hub to console.redhat.com in user guide (#76080)

The cloud.redhat.com has changed to console.redhat.com

* Clarify that "requires_ansible" means Ansible Core (#76100)

Clarify that the `requires_ansible` field in meta/runtime.yml refers to the version of Ansible Core (ansible-core), not any package called "ansible" e.g. https://pypi.org/project/ansible/

* Docs: Fix text for contributing to collection link (#76174)

* use filesystem object instead of specific objects (#76054)

since the fragment is imported by different modules that support
 different set of filesystem objects

 fixes #72375

* Docs: fedora32 is no longer supported (for integration tests) (#76159)

* Update playbooks_tests.rst (#76047)

Co-authored-by: Nedko Hristov <NedkoHristov@users.noreply.github.com>
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
Co-authored-by: Sean Cavanaugh <sean@cavanaugh.pro>
Co-authored-by: Richard Megginson <richm@stanfordalumni.org>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Matthew Donoughe <mdonoughe@gmail.com>
Co-authored-by: Paul <suchko@users.noreply.github.com>
2021-11-02 13:02:08 -05:00
4ef593e4b0 stub out porting guides and point to devel (#76090) 2021-10-29 12:41:50 -05:00
ffc4b065be stub out release and maint page and point to devel (#76089)
(cherry picked from commit 5414af8769cf67c57760e48f0d3add083152106c)
2021-10-29 12:41:35 -05:00
50b9f08db6 [Backport][Docs] Docs 2.12 backportapalooza4 (#76154)
* Docs: Add code-block:: to examples in ipaddr filters doc(#75951)

* Add code-block elements to playbooks_filters_ipaddr
* Add punctuation to lead-in sentences for code blocks

* Docs: add code-block::  to playbook variables doc in user guide(#75985)

* update code-block formatting changes.

* Code block format user guide/windows setup.rst #75914 (#75956)

* set changes for code boxes.

* post changes to attempt to fix seealso links.

* attempting to fix seealso tag

* fix un-indention for sanity check.

* Docs: changed :: to code-block:: in 9 files (#75994)

* Fixed 9 files in user guide

* Misc typo fix (#76008)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* docs - wrap examples in code-block:: in sample setup (#75964)

* docs: Use code-block to format code in sample setup
Fixes #75905
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* Docs - Fix "kubernetes.core" typos in code snippets (#75930)

Replace "kuberernetes.core" with "kubernetes.core" in filter examples.

* Docs: Change note for rackspace cloud guide (#75898)

* Fix rackspace cloud guide docs
* Fix syntax error

* Docs: dash - character invalid in playbook names in collections(#75891)

* collection playbooks, note no -
fixes #75890

* docs: clarify skip_broken option in dnf/yum (#76038)

* docs - Replace :: with code-block:: in playbooks_conditionals doc (#75965)

Fixes #75906

* Docs: add code-blocks to User Guide modules_intro  (#75932)

* docs - Add code-block to code examples in playbooks_strategies.rst (#75960)

Fixes ansible#75911.

Co-authored-by: Miroslav Brabenec <brabemi@gmail.com>
Co-authored-by: Tim Pogue <t.pogue.python@gmail.com>
Co-authored-by: NarayanAdithya <57533346+NarayanAdithya@users.noreply.github.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: marie <marie.payne@hotmail.ca>
Co-authored-by: Chris Hepner <me@chrishepner.info>
Co-authored-by: Deepansh <34774585+rootbid@users.noreply.github.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: jaydesl <35102795+jaydesl@users.noreply.github.com>
Co-authored-by: Alfred Tso <32275603+alfredtso@users.noreply.github.com>
Co-authored-by: Nathan Tsai <natesigh@gmail.com>
Co-authored-by: Joshua Ford <joshua.ford@protonmail.com>
2021-10-27 12:49:33 -05:00
228e563a73 [2.12][backport]Docsbackportapalooza3 (#76132)
* remove fest banner (#75901)

* remove fest banner

* fix nit

(cherry picked from commit 8e77943a97)

* code-block wrapping for playbooks_advanced_syntax.rst (#75981)

* code-block wrapping for playbooks_advanced_syntax.rst

* fixed spacing

(cherry picked from commit 89bc7ebfe6)

* Adding code-block elements in user_guide/playbooks_prompts.rst (#75935)

(cherry picked from commit b03afeec6c)

* Docs: issue 75922 add code-blocks to user_guide/playbooks_environment.rst (#75929)

Add code-blocks in the 6 outlined examples from the Issue

(cherry picked from commit 4381336fbb)

* Docs: Add code-blocks to user_guide/intro_patterns.rst (#75941)

(cherry picked from commit a4a7a34893)

* Docs: code-block wrapping for playbooks_module_defaults.rst #75936 (#75942)

(cherry picked from commit 81eec4a05a)

* Docs: Code-block wrapping for playbooks_startnstep.rst #75934 (#75943)

* Code-block wrapping for playbooks_startnstep.rst #75934
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 22a540e109)

* Docs: code-block wrapping for playbooks_checkmode.rst #75925 (#75931)

* code-block wrapping for playbooks_checkmode.rst #75925
* Fixes typo in previously introduced code-block
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 71811407c5)

* Docs: add code blocks elements for user_guide/vault.rst (#75963)

* feat:(docs) add code blocks elements for user_guide/vault.rst
Addresses issue #75921
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit fffa9412f4)

* Docs: add code block elements in user_guide/playbooks_async.rst (#75947)

* Fix for code block

(cherry picked from commit cd540544fd)

* docs: code-block wrapping for playbooks_debugger.rst (#75968)

* code-block wrapping for playbooks_debugger.rst #75919
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit d0edf69fe0)

* Docs: Add code-blocks to Playbooks-Delegation in user guide(#75973)

Co-authored-by: Holger Dörner <h.doerner@bitexpert.de>
(cherry picked from commit 84ec976378)

* Docs: Add code-blocks to examples in Windows-WinRM guide (#75974)

Co-authored-by: Holger Dörner <h.doerner@bitexpert.de>
(cherry picked from commit 37eefb47c5)

* docs - wrap examples in code-blocks in playbooks_vars_facts.rst (#75961)

Fixes ansible#75912.

(cherry picked from commit fd346565d3)

* docs - Change :: to  code-block:: in error handling guide (#75978)

Fixes #75908

(cherry picked from commit d6dbc1a26f)

* Docs: Add code-blocks to user guide doc (#75928)

* Add code-block elements to 5 examples

* Add :

(cherry picked from commit 5c4bbed2de)

* docs - Wrap examples in code-block:: in loops guide (#75916)

* docs - Use code-block to format examples in loops guide
Resolves #75900

(cherry picked from commit 6319a0f415)

* Docs - Added code-block:: wrappers in playbook tests doc (#75952)

(cherry picked from commit 6bf65f6246)

* documenting_modules_network.rst: Add missing space (#75972)

(cherry picked from commit afbef70bad)

Co-authored-by: Lucas Culley <33206171+feverbrew@users.noreply.github.com>
Co-authored-by: Pinky <pinky00ch@gmail.com>
Co-authored-by: nicpayne713 <32268273+nicpayne713@users.noreply.github.com>
Co-authored-by: Mahesh <maheshbr@users.noreply.github.com>
Co-authored-by: Tamas Szabo <szabtam@gmail.com>
Co-authored-by: Angel Mendez <amendez1988@gmail.com>
Co-authored-by: Sanjula Madurapperuma <32578617+sanjulamadurapperuma@users.noreply.github.com>
Co-authored-by: Holger Dörner <42909210+HolgerDoerner@users.noreply.github.com>
Co-authored-by: Joshua Ford <joshua.ford@protonmail.com>
Co-authored-by: Matěj G <mgrabovsky@users.noreply.github.com>
Co-authored-by: Midhun R Nair <24776450+midhun1998@users.noreply.github.com>
Co-authored-by: Paul Capron <PaulCapron@users.noreply.github.com>
2021-10-27 12:37:26 -05:00
3b06e0a9a9 Update Ansible release version to v2.12.0rc1.post0. (#76074) 2021-10-18 11:43:54 -04:00
634916b9cb New release v2.12.0rc1 (#76072) 2021-10-18 10:42:52 -04:00
3fa64176af Update Japanese translation for stable-2.12 (#76001) 2021-10-18 08:27:40 -05:00
069e0ec058 [Backport][Docs] Docs 2.12 backportapalooza2 (#76055)
* uri: add documentation for return value path (#75795)

* Move ansible-5.1 to 2021-12-21 (#75865)

We moved the target date for ansible-5.0 one week back so there's now
time to do 5.1 before the holidays start.

* Corrected mytask.yml file name (#75860)

* docs - Use code-block to format code examples in Developer Guide (#75849)

Fixes #75663

* docs - Use code-block to format examples in Network Guide (#75850)

Fixes #75676

* docs - Use code-block to format code examples in Community Guide (#75847)

Fixes #75675

* Docs: Clarify adding newlines in YAML folded block scalar (#75875)

* Removed translatable words from code blocks

##### SUMMARY
Removed translatable words from codeblocks as per #59449

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

* Maintaining intend as well as clearity

* Preserving "save_as" as the key

* showing equivalence and keeping same context

* Docs: Moves the AWS Scenario Guide out of the main docs (#74704)

* removes AWS scenario  guide, moving to collection

* first attept to replace TOC entries

* not sure what I did, but saving it

* updates TOCs to reflect new location of aws guide

* reinstates original page as a stub

* adds links to new location for AWS guide, updates header

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>

Co-authored-by: Daniel Ziegenberg <daniel@ziegenberg.at>
Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
Co-authored-by: RamblingPSTech <34667559+RamblingPSTech@users.noreply.github.com>
Co-authored-by: Samuel Gaist <samuel.gaist@idiap.ch>
Co-authored-by: Ankur H. Singh <49074231+sankur-codes@users.noreply.github.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-10-18 08:19:20 -05:00
d0abb7e081 [stable-2.12] 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>
2021-10-14 11:32:54 -07:00
7ca335d61f Update Ansible release version to v2.12.0b2.post0. (#76005) 2021-10-11 16:55:50 -04:00
217c0c29e5 New release v2.12.0b2 (#76000) 2021-10-11 10:47:53 -04:00
6ccd35cd7c ansible-test pslint - fix warning with nested objects (#75792)
* ansible-test pslint - fix warning with nested objects

(cherry picked from commit 7e19957afa)
2021-10-07 14:19:37 -07:00
e2c4d046a9 [stable-2.12] ansible-test - Fix inventory path.
(cherry picked from commit 8cef40f839)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-10-07 11:16:43 -07:00
d603412891 [Backport][Docs]Docs 2.12 backportapalooza1 (#75882)
* Docs: add install link for windows (#75811)

* No Ansible Engine (#75812)

* ansible is now ansible-core in AUR too (#75145)

Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-10-07 09:55:18 -05:00
72c1eec1ea [stable-2.12] ansible-test - Update base and default containers.
The containers now include Python 3.10.0 instead of Python 3.10.0rc2..
(cherry picked from commit 2f531d73dd)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-10-06 13:27:44 -07:00
e112ca934d Bump antsibull version to get support for attributes and CLI options (#75787) (#75818)
* Bump antsibull version to get support for attributes and CLI options.

* Include fix for attributes.

* Include fix for rst_epilog collision and for #75799.

(cherry picked from commit 8643db5ac3)
2021-10-02 09:53:11 -05:00
35152d8cb8 [stable-2.12] Don't show params when there is an issue with set_option(s) (#75805) (#75807)
(cherry picked from commit 79e9dae)

Co-authored-by: Matt Martz <matt@sivel.net>
2021-10-02 09:52:58 -05:00
0270c2306d ansible-test - Update distro test containers.
(cherry picked from commit f4d4391a1f)
2021-10-01 12:15:51 -07:00
8980985d06 [stable-2.12] ansible-test - Fix inventory generation.
(cherry picked from commit 099d80829f)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-09-30 21:26:44 -07:00
8669f27d48 Update Ansible release version to v2.12.0b1.post0. 2021-09-27 17:32:48 -04:00
b03f06ba4f New release v2.12.0b1 2021-09-27 09:30:07 -04:00
871 changed files with 46210 additions and 19413 deletions

View File

@ -12,31 +12,17 @@ pr:
- devel
- stable-*
schedules:
- cron: 0 7 * * *
displayName: Nightly
always: true
branches:
include:
- devel
- stable-*
variables:
- name: checkoutPath
value: ansible
- name: coverageBranches
value: devel
- name: pipelinesCoverage
value: coverage
- name: entryPoint
value: test/utils/shippable/shippable.sh
value: .azure-pipelines/commands/entry-point.sh
- name: fetchDepth
value: 500
resources:
containers:
- container: default
image: quay.io/ansible/azure-pipelines-test-container:1.9.0
- name: defaultContainer
value: quay.io/ansible/azure-pipelines-test-container:4.0.1
pool: Standard
@ -70,43 +56,37 @@ stages:
- test: 3.8
- test: 3.9
- test: '3.10'
- stage: Windows
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Server {0}
testFormat: windows/{0}/1
targets:
- test: 2012
- test: 2012-R2
- test: 2016
- test: 2019
- test: 2022
- stage: Remote
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
targets:
- name: macOS 11.1
test: macos/11.1
- name: RHEL 7.9
test: rhel/7.9
- name: RHEL 8.4 py36
test: rhel/8.4@3.6
- name: RHEL 8.4 py38
test: rhel/8.4@3.8
- name: FreeBSD 12.2
test: freebsd/12.2
- name: FreeBSD 13.0
test: freebsd/13.0
groups:
- 1
- 2
- 3
- 4
- 5
- template: templates/matrix.yml # context/controller (ansible-test container management)
parameters:
targets:
- name: RHEL 8.4
test: rhel/8.4
- name: RHEL 9.0
test: rhel/9.0
- name: Ubuntu 20.04
test: ubuntu/20.04
- name: Ubuntu 22.04
test: ubuntu/22.04
groups:
- 6
- stage: Docker
dependsOn: []
jobs:
@ -114,26 +94,10 @@ stages:
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3
test: alpine3
- name: CentOS 6
test: centos6
- name: CentOS 7
test: centos7
- name: CentOS 8
test: centos8
- name: Fedora 33
test: fedora33
- name: Fedora 34
test: fedora34
- name: openSUSE 15 py2
test: opensuse15py2
- name: openSUSE 15 py3
test: opensuse15
- name: Ubuntu 18.04
test: ubuntu1804
- name: Ubuntu 20.04
test: ubuntu2004
groups:
- 1
- 2
@ -170,18 +134,12 @@ stages:
parameters:
testFormat: i/{0}
targets:
- name: macOS 11.1
test: macos/11.1
- name: RHEL 7.9
test: rhel/7.9
- name: RHEL 8.4 py36
test: rhel/8.4@3.6
- name: RHEL 8.4 py38
test: rhel/8.4@3.8
- name: FreeBSD 12.2
test: freebsd/12.2
- name: FreeBSD 13.0
test: freebsd/13.0
- stage: Incidental_Docker
displayName: Incidental Docker
dependsOn: []
@ -194,64 +152,16 @@ stages:
test: centos6
- name: CentOS 7
test: centos7
- name: CentOS 8
test: centos8
- name: Fedora 33
test: fedora33
- name: Fedora 34
test: fedora34
- name: openSUSE 15 py2
test: opensuse15py2
- name: openSUSE 15 py3
test: opensuse15
- name: Ubuntu 18.04
test: ubuntu1804
- name: Ubuntu 20.04
test: ubuntu2004
- stage: Incidental_Windows
displayName: Incidental Windows
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Server {0}
testFormat: i/windows/{0}
targets:
- test: 2012
- test: 2012-R2
- test: 2016
- test: 2019
- test: 2022
- stage: Incidental
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: i/{0}/1
targets:
- name: IOS Python
test: ios/csr1000v/
- name: VyOS Python
test: vyos/1.1.8/
- name: AWS Python 2.7
test: aws/2.7
- name: AWS Python 3.6
test: aws/3.6
- name: Cloud Python
test: cloud/
- stage: Summary
condition: succeededOrFailed()
dependsOn:
- Sanity
- Units
- Windows
- Remote
- Docker
- Galaxy
- Generic
- Incidental_Remote
- Incidental_Docker
- Incidental_Windows
- Incidental
jobs:
- template: templates/coverage.yml

View File

@ -59,4 +59,4 @@ fi
ansible-test env --dump --show --timeout "${timeout}" --color -v
"test/utils/shippable/${script}.sh" "${test}"
".azure-pipelines/commands/${script}.sh" "${test}"

View File

@ -15,4 +15,4 @@ fi
# shellcheck disable=SC2086
ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
--docker default --python "${python}"
--docker default --python "${python}" --pypi-proxy

View File

@ -11,4 +11,4 @@ script="${args[1]}"
IFS='/' test="${args[*]:1}"
"test/utils/shippable/incidental/${script}.sh" "${test}"
".azure-pipelines/commands/incidental/${script}.sh" "${test}"

View File

@ -23,7 +23,7 @@ python_default="$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._int
single_version=2012-R2
# shellcheck disable=SC2086
ansible-test windows-integration --explain ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} > /tmp/explain.txt 2>&1 || { cat /tmp/explain.txt && false; }
ansible-test windows-integration --list-targets -v ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} > /tmp/explain.txt 2>&1 || { cat /tmp/explain.txt && false; }
{ grep ' windows-integration: .* (targeted)$' /tmp/explain.txt || true; } > /tmp/windows.txt
if [ -s /tmp/windows.txt ] || [ "${CHANGED:+$CHANGED}" == "" ]; then

View File

@ -0,0 +1 @@
remote.sh

View File

@ -7,12 +7,6 @@ IFS='/:' read -ra args <<< "$1"
group="${args[1]}"
if [ "${BASE_BRANCH:-}" ]; then
base_branch="origin/${BASE_BRANCH}"
else
base_branch=""
fi
case "${group}" in
1) options=(--skip-test pylint --skip-test ansible-doc --skip-test docs-build --skip-test package-data --skip-test changelog --skip-test validate-modules) ;;
2) options=( --test ansible-doc --test docs-build --test package-data --test changelog) ;;
@ -23,5 +17,5 @@ esac
# shellcheck disable=SC2086
ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
--docker --keep-git --base-branch "${base_branch}" \
--docker \
"${options[@]}" --allow-disabled

View File

@ -0,0 +1 @@
remote.sh

View File

@ -24,7 +24,7 @@ python_default="$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._int
single_version=2012-R2
# shellcheck disable=SC2086
ansible-test windows-integration --explain ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} > /tmp/explain.txt 2>&1 || { cat /tmp/explain.txt && false; }
ansible-test windows-integration --list-targets -v ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} > /tmp/explain.txt 2>&1 || { cat /tmp/explain.txt && false; }
{ grep ' windows-integration: .* (targeted)$' /tmp/explain.txt || true; } > /tmp/windows.txt
if [ -s /tmp/windows.txt ] || [ "${CHANGED:+$CHANGED}" == "" ]; then

View File

@ -9,9 +9,9 @@ PATH="${PWD}/bin:${PATH}"
mkdir "${agent_temp_directory}/coverage/"
options=(--venv --venv-system-site-packages --color -v)
options=(--venv --color -v)
ansible-test coverage combine --export "${agent_temp_directory}/coverage/" "${options[@]}"
ansible-test coverage combine --group-by command --export "${agent_temp_directory}/coverage/" "${options[@]}"
if ansible-test coverage analyze targets generate --help >/dev/null 2>&1; then
# Only analyze coverage if the installed version of ansible-test supports it.

View File

@ -0,0 +1,101 @@
#!/usr/bin/env python
"""
Upload code coverage reports to codecov.io.
Multiple coverage files from multiple languages are accepted and aggregated after upload.
Python coverage, as well as PowerShell and Python stubs can all be uploaded.
"""
import argparse
import dataclasses
import pathlib
import shutil
import subprocess
import tempfile
import typing as t
import urllib.request
@dataclasses.dataclass(frozen=True)
class CoverageFile:
name: str
path: pathlib.Path
flags: t.List[str]
@dataclasses.dataclass(frozen=True)
class Args:
dry_run: bool
path: pathlib.Path
def parse_args() -> Args:
parser = argparse.ArgumentParser()
parser.add_argument('-n', '--dry-run', action='store_true')
parser.add_argument('path', type=pathlib.Path)
args = parser.parse_args()
# Store arguments in a typed dataclass
fields = dataclasses.fields(Args)
kwargs = {field.name: getattr(args, field.name) for field in fields}
return Args(**kwargs)
def process_files(directory: pathlib.Path) -> t.Tuple[CoverageFile, ...]:
processed = []
for file in directory.joinpath('reports').glob('coverage*.xml'):
name = file.stem.replace('coverage=', '')
# Get flags from name
flags = name.replace('-powershell', '').split('=') # Drop '-powershell' suffix
flags = [flag if not flag.startswith('stub') else flag.split('-')[0] for flag in flags] # Remove "-01" from stub files
processed.append(CoverageFile(name, file, flags))
return tuple(processed)
def upload_files(codecov_bin: pathlib.Path, files: t.Tuple[CoverageFile, ...], dry_run: bool = False) -> None:
for file in files:
cmd = [
str(codecov_bin),
'--name', file.name,
'--file', str(file.path),
]
for flag in file.flags:
cmd.extend(['--flags', flag])
if dry_run:
print(f'DRY-RUN: Would run command: {cmd}')
continue
subprocess.run(cmd, check=True)
def download_file(url: str, dest: pathlib.Path, flags: int, dry_run: bool = False) -> None:
if dry_run:
print(f'DRY-RUN: Would download {url} to {dest} and set mode to {flags:o}')
return
with urllib.request.urlopen(url) as resp:
with dest.open('w+b') as f:
# Read data in chunks rather than all at once
shutil.copyfileobj(resp, f, 64 * 1024)
dest.chmod(flags)
def main():
args = parse_args()
url = 'https://ci-files.testing.ansible.com/codecov/linux/codecov'
with tempfile.TemporaryDirectory(prefix='codecov-') as tmpdir:
codecov_bin = pathlib.Path(tmpdir) / 'codecov'
download_file(url, codecov_bin, 0o755, args.dry_run)
files = process_files(args.path)
upload_files(codecov_bin, files, args.dry_run)
if __name__ == '__main__':
main()

View File

@ -1,27 +0,0 @@
#!/usr/bin/env bash
# Upload code coverage reports to codecov.io.
# Multiple coverage files from multiple languages are accepted and aggregated after upload.
# Python coverage, as well as PowerShell and Python stubs can all be uploaded.
set -o pipefail -eu
output_path="$1"
curl --silent --show-error https://ansible-ci-files.s3.us-east-1.amazonaws.com/codecov/codecov.sh > codecov.sh
for file in "${output_path}"/reports/coverage*.xml; do
name="${file}"
name="${name##*/}" # remove path
name="${name##coverage=}" # remove 'coverage=' prefix if present
name="${name%.xml}" # remove '.xml' suffix
bash codecov.sh \
-f "${file}" \
-n "${name}" \
-X coveragepy \
-X gcov \
-X fix \
-X search \
-X xcode \
|| echo "Failed to upload code coverage report to codecov.io: ${file}"
done

View File

@ -14,4 +14,4 @@ fi
# Generate stubs using docker (if supported) otherwise fall back to using a virtual environment instead.
# The use of docker is required when Powershell code is present, but Ansible 2.12 was the first version to support --docker with coverage.
ansible-test coverage xml --stub --docker --color -v || ansible-test coverage xml --stub --venv --venv-system-site-packages --color -v
ansible-test coverage xml --group-by command --stub --docker --color -v || ansible-test coverage xml --group-by command --stub --venv --color -v

View File

@ -6,7 +6,7 @@
jobs:
- job: Coverage
displayName: Code Coverage
container: default
container: $[ variables.defaultContainer ]
workspace:
clean: all
steps:
@ -23,20 +23,7 @@ jobs:
- bash: .azure-pipelines/scripts/report-coverage.sh
displayName: Generate Coverage Report
condition: gt(variables.coverageFileCount, 0)
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
# Azure Pipelines only accepts a single coverage data file.
# That means only Python or PowerShell coverage can be uploaded, but not both.
# Set the "pipelinesCoverage" variable to determine which type is uploaded.
# Use "coverage" for Python and "coverage-powershell" for PowerShell.
summaryFileLocation: "$(outputPath)/reports/$(pipelinesCoverage).xml"
# Override the root (sources) path specified in the coverage XML files.
# This allows coverage to be reported in Azure Pipelines even if the report was generated in a container.
pathToSources: "$(Agent.BuildDirectory)/$(checkoutPath)"
displayName: Publish to Azure Pipelines
condition: gt(variables.coverageFileCount, 0)
- bash: .azure-pipelines/scripts/publish-codecov.sh "$(outputPath)"
- bash: .azure-pipelines/scripts/publish-codecov.py "$(outputPath)"
displayName: Publish to codecov.io
condition: gt(variables.coverageFileCount, 0)
continueOnError: true

View File

@ -11,7 +11,7 @@ jobs:
- ${{ each job in parameters.jobs }}:
- job: test_${{ replace(replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_'), '@', '_') }}
displayName: ${{ job.name }}
container: default
container: $[ variables.defaultContainer ]
workspace:
clean: all
steps:

View File

@ -21,7 +21,11 @@ recursive-include lib/ansible/modules/windows *.ps1
recursive-include lib/ansible/galaxy/data *.yml *.j2 README.md ansible.cfg inventory .git_keep
recursive-include lib/ansible/config *.yml
recursive-include licenses *.txt
recursive-include packaging *
recursive-include packaging Makefile *.py
recursive-include packaging/arch *
recursive-include packaging/debian *
recursive-include packaging/gentoo *
recursive-include packaging/macports *
recursive-include test/ansible_test *.py Makefile
recursive-include test/integration *
recursive-include test/lib/ansible_test/config *.yml *.template
@ -29,7 +33,7 @@ recursive-include test/lib/ansible_test/_data *.cfg *.ini *.ps1 *.txt *.yml cove
recursive-include test/lib/ansible_test/_util *.cfg *.json *.ps1 *.psd1 *.py *.sh *.txt *.yml
recursive-include test/lib/ansible_test/_util/controller/sanity/validate-modules validate-modules
recursive-include test/sanity *.json *.py *.txt
recursive-include test/support *.py *.ps1 *.psm1 *.cs
recursive-include test/support *.py *.ps1 *.psm1 *.cs *.md
exclude test/sanity/code-smell/botmeta.*
recursive-include test/units *
include Makefile

View File

@ -32,8 +32,6 @@ You can install a released version of Ansible with ``pip`` or a package manager.
`installation guide <https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html>`_ for details on installing Ansible
on a variety of platforms.
Red Hat offers supported builds of `Ansible Engine <https://www.ansible.com/ansible-engine>`_.
Power users and developers can run the ``devel`` branch, which has the latest
features and fixes, directly. Although it is reasonably stable, you are more likely to encounter
breaking changes when running the ``devel`` branch. We recommend getting involved

View File

@ -0,0 +1,757 @@
====================================================
ansible-core 2.12 "Dazed and Confused" Release Notes
====================================================
.. contents:: Topics
v2.12.10
========
Release Summary
---------------
| Release Date: 2022-10-10
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Bugfixes
--------
- paramiko - Add back support for ``ssh_args``, ``ssh_common_args``, and ``ssh_extra_args`` for parsing the ``ProxyCommand`` (https://github.com/ansible/ansible/issues/78750)
v2.12.9
=======
Release Summary
---------------
| Release Date: 2022-09-12
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Bugfixes
--------
- Fix for network_cli not getting all relevant connection options
v2.12.8
=======
Release Summary
---------------
| Release Date: 2022-08-15
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Minor Changes
-------------
- ansible-test - An improved error message is shown when the download of a pip bootstrap script fails. The download now uses ``urllib2`` instead of ``urllib`` on Python 2.
Bugfixes
--------
- ansible-connection - decrypt vaulted parameters before sending over the socket, as vault secrets are not available on the other side.
- ansible-galaxy - fix setting the cache for paginated responses from Galaxy NG/AH (https://github.com/ansible/ansible/issues/77911).
- ansible-test - Delegation now properly handles arguments given after ``--`` on the command line.
- file backed cache plugins now handle concurrent access by making atomic updates to the files.
v2.12.7
=======
Release Summary
---------------
| Release Date: 2022-06-20
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Minor Changes
-------------
- Add an 'action_plugin' field for modules in runtime.yml plugin_routing.
This fixes module_defaults by supporting modules-as-redirected-actions
without redirecting module_defaults entries to the common action.
.. code: yaml
plugin_routing:
action:
facts:
redirect: ns.coll.eos
command:
redirect: ns.coll.eos
modules:
facts:
redirect: ns.coll.eos_facts
command:
redirect: ns.coll.eos_command
With the runtime.yml above for ns.coll, a task such as
.. code: yaml
- hosts: all
module_defaults:
ns.coll.eos_facts: {'valid_for_eos_facts': 'value'}
ns.coll.eos_command: {'not_valid_for_eos_facts': 'value'}
tasks:
- ns.coll.facts:
will end up with defaults for eos_facts and eos_command
since both modules redirect to the same action.
To select an action plugin for a module without merging
module_defaults, define an action_plugin field for the resolved
module in the runtime.yml.
.. code: yaml
plugin_routing:
modules:
facts:
redirect: ns.coll.eos_facts
action_plugin: ns.coll.eos
command:
redirect: ns.coll.eos_command
action_plugin: ns.coll.eos
The action_plugin field can be a redirected action plugin, as
it is resolved normally.
Using the modified runtime.yml, the example task will only use
the ns.coll.eos_facts defaults.
- ansible-test - Avoid using the ``mock_use_standalone_module`` setting for unit tests running on Python 3.8 or later.
Bugfixes
--------
- pip - fix cases where resolution of pip Python module fails when importlib.util has not already been imported
- plugin loader - Sort results when fuzzy matching plugin names (https://github.com/ansible/ansible/issues/77966).
v2.12.6
=======
Release Summary
---------------
| Release Date: 2022-05-23
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Bugfixes
--------
- Prevent losing unsafe on results returned from lookups (https://github.com/ansible/ansible/issues/77535)
- arg_spec - Fix incorrect ``no_log`` warning when a parameter alias is used (https://github.com/ansible/ansible/pull/77576)
- plugin loader will now load config data for plugin by name instead of by file to avoid issues with the same file being loaded under different names (fqcn + short name).
- variablemanager, more efficient read of vars files
v2.12.5
=======
Release Summary
---------------
| Release Date: 2022-04-25
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Bugfixes
--------
- Ansible.ModuleUtils.SID - Use user principal name as is for lookup in the ``Convert-ToSID`` function - https://github.com/ansible/ansible/issues/77316
- Fix traceback when installing a collection from a git repository and git is not installed (https://github.com/ansible/ansible/issues/77479).
- ansible-test - Correctly detect when running as the ``root`` user (UID 0) on the origin host. The result of the detection was incorrectly being inverted.
- ansible-test - Fix skipping of tests marked ``needs/python`` on the origin host.
- ansible-test - Fix skipping of tests marked ``needs/root`` on the origin host.
- ansible-test compile sanity test - do not crash if a column could not be determined for an error (https://github.com/ansible/ansible/pull/77465).
- hostname - use ``file_get_content()`` to read the file containing the host name in the ``FileStrategy.get_permanent_hostname()`` method. This prevents a ``TypeError`` from being raised when the strategy is used (https://github.com/ansible/ansible/issues/77025).
- script - skip in check mode since the plugin cannot determine if a change will occur.
- shell/command - only skip in check mode if the options `creates` and `removes` are both None.
- winrm - Ensure ``kinit`` is run with the same ``PATH`` env var as the Ansible process
v2.12.4
=======
Release Summary
---------------
| Release Date: 2022-03-28
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Bugfixes
--------
- Add a YAML representer for ``NativeJinjaText``
- Add a YAML representer for ``NativeJinjaUnsafeText``
- AnsiballZ - Ensure we use the full python package in the module cache filename to avoid a case where ``collections:`` is used to execute a module via short name, where the short name duplicates another module from ``ansible.builtin`` or another collection that was executed previously.
- Fix collection filter/test plugin redirects (https://github.com/ansible/ansible/issues/77192).
- ansible-galaxy collection verify - display files/directories not included in the FILES.json as modified content.
- ansible-test - Fix ``windows-integration`` and ``network-integration`` when used with the ``--docker`` option and user-provided inventory.
- extend timeout for ansible-galaxy when communicating with the galaxy server api, and apply it to all interactions with the api
- first_found - fix to allow for spaces in file names (https://github.com/ansible/ansible/issues/77136)
- unarchive - the ``io_buffer_size`` option added in 2.12 was not accepted by the module (https://github.com/ansible/ansible/pull/77271).
v2.12.3
=======
Release Summary
---------------
| Release Date: 2022-02-28
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Minor Changes
-------------
- The collection loader now reports a Python warning if an attempt is made to install the Ansible collection loader a second time. Previously this condition was reported using an Ansible warning.
- ansible-test - Installation of ``cryptography`` is no longer version constrained when ``openssl`` 1.1.0 or later is installed.
- ansible-test - Requirements for the plugin import test are now frozen.
- ansible-test - The ``pip`` and ``wheel`` packages are removed from all sanity test virtual environments after installation completes to reduce their size. Previously they were only removed from the environments used for the ``import`` sanity test.
- ansible-test - The hash for all managed sanity test virtual environments has changed. Containers that include ``ansible-test sanity --prime-venvs`` will need to be rebuilt to continue using primed virtual environments.
- ansible-test - Update ``pip`` used to bootstrap remote FreeBSD instances from version 20.3.4 to 21.3.1.
- ansible-test - Update the ``alpine`` container to version 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.
- ansible-test - Update the ``galaxy`` test plugin to get its container from a copy on quay.io.
- ansible-test - Update the ``openshift`` test plugin to get its container from a copy on quay.io.
- junit callback - Add support for replacing the directory portion of out-of-tree relative task paths with a placeholder.
Bugfixes
--------
- ansible-test - All virtual environments managed by ansible-test are marked as usable after being bootstrapped, to avoid errors caused by use of incomplete environments. Previously this was only done for sanity tests. Existing environments from previous versions of ansible-test will be recreated on demand due to lacking the new marker.
- ansible-test - Fix the ``validate-modules`` sanity test to avoid double-loading the collection loader and possibly failing on import of the ``packaging`` module.
- ansible-test - Import ``yaml.cyaml.CParser`` instead of ``_yaml.CParser`` in the ``yamllint`` sanity test.
- ansible-test - Replace the directory portion of out-of-tree paths in JUnit files from integration tests with the ``out-of-tree:`` prefix.
- ansible-test - Sanity tests run with the ``--requirements` option for Python 2.x now install ``virtualenv`` when it is missing or too old. Previously it was only installed if missing. Version 16.7.12 is now installed instead of the latest version on Python 2.7.
- ansible-test - The ``import`` sanity test no longer reports errors about ``packaging`` being missing when testing collections.
- ansible-test - Update the ``default`` containers to version 4.2.0.
- ansible-test - Use https://ci-files.testing.ansible.com/ for instance bootstrapping instead of an S3 endpoint.
- ansible-test - Use relative paths in JUnit files generated during integration test runs.
- ansible-test - Virtual environments managed by ansible-test now use consistent versions of ``pip``, ``setuptools`` and ``wheel``. This avoids issues with virtual environments containing outdated or dysfunctional versions of these tools. The initial bootstrapping of ``pip`` is done by ansible-test from an HTTPS endpoint instead of creating the virtual environment with it already present.
- cleaning facts will now only warn about the variable name and not post the content, which can be undesireable to disclose
- correctly inherit vars from parent in block (https://github.com/ansible/ansible/issues/75286).
- gather_facts action now handles the move of base connection plugin types into collections to add/prevent subset argument correctly
- junit callback - Fix traceback during automatic fact gathering when using relative paths.
- junit callback - Fix unicode error when handling non-ASCII task paths.
- ssh connection now uses more correct host source as play_context can ignore loop/delegation variations.
- task_executor reverts the change to push facts into delegated vars on loop finalization as result managing code already handles this and was duplicating effort to wrong result.
- template lookup - restore inadvertently deleted default for ``convert_data`` (https://github.com/ansible/ansible/issues/77004)
- unarchive - Make extraction work when the LANGUAGE environment variable is set to a non-English locale.
v2.12.2
=======
Release Summary
---------------
| Release Date: 2022-01-31
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Bugfixes
--------
- Fix ``AttributeError`` when providing password file via ``--connection-password-file`` (https://github.com/ansible/ansible/issues/76530)
- Fix ``end_play`` to end the current play only (https://github.com/ansible/ansible/issues/76672)
- Templating - Ensure we catch exceptions when getting ``.filters`` and ``.tests`` attributes on their respective plugins and properly error, instead of aborting which results in no filters being added to the jinja2 environment
- ``Templar.copy_with_new_env`` - set the ``finalize`` method of the new ``Templar`` object for the new environment (https://github.com/ansible/ansible/issues/76379)
- ansible-config avoid showing _terms and _input when --only-changed.
- ansible-galaxy - Fix using the '--ignore-certs' option when there is no server-specific configuration for the Galaxy server.
- ansible-galaxy collection build - Ignore any existing ``MANIFEST.json`` and ``FILES.json`` in the root directory when building a collection.
- ansible-test - Fix the ``import`` sanity test to work properly when Ansible's built-in vendoring support is in use.
- ansible-test - Fix traceback in the ``validate-modules`` sanity test when testing an Ansible module without any callables.
- ansible-test - Fix traceback when running from an install and delegating execution to a different Python interpreter.
- ansible-test - Show an error message instead of a traceback when running outside of a supported directory.
- ansible-test - Update help links to reference ``ansible-core`` instead of ``ansible``.
- ansible-test - Update unit tests to use the ``--forked`` option instead of the deprecated ``--boxed`` option.
- async - Improve performance of sending async callback events by never sending the full task through the queue (https://github.com/ansible/ansible/issues/76729)
- default callback - Ensure we compare FQCN also in lockstep logic, to ensure using the FQCN of a strategy plugin triggers the correct behavior in the default callback plugin. (https://github.com/ansible/ansible/issues/76782)
- hostname - Do not require SystemdStrategy subclasses for every distro (https://github.com/ansible/ansible/issues/76792)
- include_vars, properly initialize variable as there is corner case in which it can end up referenced and not defined
- ssh connection - properly quote controlpersist path given by user to avoid issues with spaces and other characters
- ssh connection avoid parsing ssh cli debug lines as they can match expected output at high verbosities.
- sudo become plugin, fix handling of non interactive flags, previous substitution was too naive
- unarchive - Fix zip archive file listing that caused issues with content postprocessing (https://github.com/ansible/ansible/issues/76067).
- yum - prevent storing unnecessary cache data by running `yum makecache fast` (https://github.com/ansible/ansible/issues/76336)
v2.12.1
=======
Release Summary
---------------
| Release Date: 2021-12-06
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Minor Changes
-------------
- jinja2_native - keep same behavior on Python 3.10.
Bugfixes
--------
- Ansible.ModuleUtils.LinkUtil - Ignore the ``LIB`` environment variable when loading the ``LinkUtil`` code
- ansible-test - Automatic target requirements installation is now based on the target environment instead of the controller environment.
- ansible-test - Fix Python real prefix detection when running in a ``venv`` virtual environment.
- ansible-test - Fix installation and usage of ``pyyaml`` requirement for the ``import`` sanity test for collections.
- ansible-test - Fix traceback in ``import`` sanity test on Python 2.7 when ``pip`` is not available.
- ansible-test - Relocate constants to eliminate symlink.
- ansible-test - Target integration test requirements are now correctly installed for target environments running on the controller.
- ansible-test - Update the ``default`` containers to version 4.1.1, which includes the updated ``import`` sanity test requirements.
- ansible-test - Use the legacy collection loader for ``import`` sanity tests on target-only Python versions.
- set_fact/include_vars correctly handle delegation assignments within loops
- setup - detect docker container with check for ./dockerenv or ./dockinit (https://github.com/ansible/ansible/pull/74349).
- validate_argument_spec - Skip suboption validation if the top level option is an invalid type (https://github.com/ansible/ansible/issues/75612).
v2.12.0
=======
Release Summary
---------------
| Release Date: 2021-11-05
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Major Changes
-------------
- Python Controller Requirement - Python 3.8 or newer is required for the control node (the machine that runs Ansible) (https://github.com/ansible/ansible/pull/74013)
- ansible-test - All "cloud" plugins which use containers can now be used with all POSIX and Windows hosts. Previously the plugins did not work with Windows at all, and support for hosts created with the ``--remote`` option was inconsistent.
- ansible-test - Collections can now specify controller and target specific integration test requirements and constraints. If provided, they take precedence over the previously available requirements and constraints files.
- ansible-test - Integration tests run with the ``integration`` command can now be executed on two separate hosts instead of always running on the controller. The target host can be one provided by ``ansible-test`` or by the user, as long as it is accessible using SSH.
- ansible-test - Most container features are now supported under Podman. Previously a symbolic link for ``docker`` pointing to ``podman`` was required.
- ansible-test - New ``--controller`` and ``--target`` / ``--target-python`` options have been added to allow more control over test environments.
- ansible-test - Python 3.8 - 3.10 are now required to run ``ansible-test``, thus matching the Ansible controller Python requirements. Older Python versions (2.6 - 2.7 and 3.5 - 3.10) can still be the target for relevant tests.
- ansible-test - SSH port forwarding and redirection is now used exclusively to make container ports available on non-container hosts. When testing on POSIX systems this requires SSH login as root. Previously SSH port forwarding was combined with firewall rules or other port redirection methods, with some platforms being unsupported.
- ansible-test - Sanity tests always run in isolated Python virtual environments specific to the requirements of each test. The environments are cached.
- ansible-test - Sanity tests are now separated into two categories, controller and target. All tests except ``import`` and ``compile`` are controller tests. The controller tests always run using the same Python version used to run ``ansible-test``. The target tests use the Python version(s) specified by the user, or all available Python versions.
- ansible-test - Sanity tests now use fully pinned requirements that are independent of each other and other test types.
- ansible-test - Tests run with the ``centos6`` and ``default`` test containers now use a PyPI proxy container to access PyPI when Python 2.6 is used. This allows tests running under Python 2.6 to continue functioning even though PyPI is discontinuing support for non-SNI capable clients.
- ansible-test - The ``future-import-boilerplate`` and ``metaclass-boilerplate`` sanity tests are limited to remote-only code. Additionally, they are skipped for collections which declare no support for Python 2.x.
- ansible-test - The ``import`` and ``compile`` sanity tests limit remote-only Python version checks to remote-only code.
- ansible-test - Unit tests for controller-only code now require Python 3.8 or later.
- ansible-test - Version neutral sanity tests now require Python 3.8 or later.
- junit callback - The ``junit_xml`` and ``ordereddict`` Python modules are no longer required to use the ``junit`` callback plugin.
Minor Changes
-------------
- Add ``end_batch`` meta task.
- Allow connection and become passwords to be set by file/executable script. Also document this was already the case for vault.
- CLI - Remove ``__requires__`` attribute for ``pkg_resources``
- Collections can define action_groups in ``meta/runtime.yml``.
- Introduce a config option to enable/disable emitting warning about Jinja2 version being old for ``jinja2_native``. The option is on by default, only in CI it is off.
- Make the code structure of ansible-doc's generic snippet feature more maintainable.
- On RHEL 9, CentOS Stream 9 etc., use /usr/bin/python3 as the default interpreter; /usr/libexec/platform-python is just a backwards-compatibility symbolic link there.
- PowerShell - Added support for optional module_util imports by scanning for ``-Optional`` at the end of the import declaration
- Python 2.6 Target Support - Deprecate Python 2.6 for targets, requiring Python 2.7 or newer. ``ansible-core==2.13`` will drop support for Python 2.6. (https://github.com/ansible/ansible/pull/74165)
- Task - Add a resolved_action attribute for Task objects to get the final resolved plugin.
- Templar - remove ``_fail_on_lookup_errors`` and ``_fail_on_filter_errors`` instance variables that were never used. (https://github.com/ansible/ansible/pull/73785)
- The AnsiballZ Python wrapper now changes the working directory to ``~`` or ``/`` if the current one is not accessible. This allows become to drop privileges on macOS when using pipelining.
- Update test container ansible-core-test-container to version 3.6.0
- Update test container ansible-core-test-container to version 3.7.0
- Update test container default-test-container to version 3.6.0
- Update test container default-test-container to version 3.7.0
- Update vendored copy of ``six`` to 1.16.0 to eliminate warnings for deprecated python loader methods in Python 3.10+ (https://github.com/ansible/ansible/issues/74659)
- Update vendored copy of distro to 1.6.0
- Vendor ``distutils.version`` due to it's deprecation in Python 3.10 and impending removal in Python 3.12 (https://github.com/ansible/ansible/issues/74599)
- YAML parsing - Create common utils for loading and dumping YAML that prefer the C extensions if available
- ``include_role`` - Allow use of ``omit`` in the ``from_*`` arguments (https://github.com/ansible/ansible/issues/66349)
- ``uri``/``get_url`` - Expose ``unredirected_headers`` to modules to allow user control
- `ansible.plugins.callback.CallbackBase.host_label()` has been factored out as a static method (https://github.com/ansible/ansible/pull/73814).
- action_groups can include actions from other groups by using the special ``metadata`` dictionary field.
- add a quick short circuit when checking if a string is a template to improve performance on large strings (https://github.com/ansible/ansible/issues/74336)
- add host label to retry print statements
- added new function to module utils to choose best possible locale.
- adds the ``undef`` keyword to the templating environment. This allows for directly creating Undefined values in templates. It is most useful for providing a hint for variables which must be overridden.
- ansbile-doc now also shows snippets for inventory and lookup, adding to existing modules.
- ansible adhoc, clarified the help to some options, also added some comments to code.
- ansible-cli - remove unnecessary trailing space in ``ansible --version`` (https://github.com/ansible/ansible/issues/74875).
- ansible-config can now list and dump for specific documentable plugins by specifying them in the command line
- ansible-config has new 'init' option to create, highly commented, example configurations as ini (ansible.cfg), environment variables (shell) or Ansible variable files (YAML)
- ansible-config now supports displaying plugin configuration info.
- ansible-doc - ``version_added`` in ``attributes`` now comes with ``version_added_collection`` (https://github.com/ansible/ansible/pull/74602).
- ansible-doc - show ``version_added`` for the plugin/module itself in text output, and improve ``version_added`` formatting (https://github.com/ansible/ansible/pull/73602).
- ansible-doc now supports 'attributes' for plugins as per proposal.
- ansible-doc pretty cli options output.
- ansible-doc, improve handling of rstisms, try to make the display more meaningfull for the terminal users.
- ansible-galaxy - Allow specification of client_id override value for Keycloak Token (https://github.com/ansible/ansible/issues/75593).
- ansible-galaxy - Allow validate_certs to be configured for individual Galaxy servers (https://github.com/ansible/ansible/issues/75677).
- ansible-galaxy - Installing a collection from a git repository without specifying a version (or using the version ``HEAD``) will clone the repository using --depth=1.
- ansible-galaxy - Non-HTTP exceptions from Galaxy servers are now a warning and only fatal if the collection to download|install|verify is not available from any of the servers (https://github.com/ansible/ansible/issues/75443).
- ansible-test - A new ``base`` test container is available. It is similar to the ``default`` test container, but contains no pre-installed Python packages other than ``pip`` and its dependencies.
- ansible-test - Add RHEL 8.4 as a remote.
- ansible-test - Add ``--prime-venvs`` option to create virtual environments without running tests.
- ansible-test - Add constraint for ``decorator`` for Python versions prior to 3.5.
- ansible-test - Add support for Windows Server 2022.
- ansible-test - Add support for an ansible-test configuration file in collections under ``tests/config.yml``.
- ansible-test - Add support for testing with Python 3.10.
- ansible-test - Added a ``--prime-containers`` option to support downloading containers without running tests.
- ansible-test - Adding DigitalOcean cloud support to ansible-test (https://github.com/ansible/ansible/pull/74222).
- ansible-test - All "cloud" plugins have been refactored for more consistency. For those that use docker containers, management of the containers has been standardized.
- ansible-test - All "cloud" plugins now use fixed hostnames and ports in tests. Previously some tests used IP addresses and/or randomly assigned ports.
- ansible-test - Changes made to the ``hosts`` file on test systems are now done using an Ansible playbook for both POSIX and Windows systems. Changes are applied before a test target runs and are reverted after the test target finishes.
- ansible-test - Clean up code in the cloud plugins.
- ansible-test - Collections can declare their remote-only code (modules/module_utils and related tests) as controller-only.
- ansible-test - Collections can limit the Python versions used for testing their remote-only code (modules/module_utils and related tests).
- ansible-test - Command line help has been updated to hide the ``--remote`` option (and related options) when the user lacks an API key to use the feature.
- ansible-test - Constraints provided by ``ansible-test`` for Python package installs have been reduced.
- ansible-test - Default settings are now applied to unknown versions of known ``--remote`` platforms.
- ansible-test - Distribution specific test containers have been updated to version 3.0.0.
- ansible-test - Environment checking (``pip``, ``python``, ``~/.ssh/known_hosts``, etc.) is no longer performed when running integration tests.
- ansible-test - Environment variables exposed by "cloud" plugins are now available to the controller for role based tests. Previously only script based tests had access to the exposed environment variables.
- ansible-test - Fedora 32 and 33 (``fedora32`` and ``fedora33``) containers have been updated and now allow for ssh in more container environments.
- ansible-test - Fedora 34 (``fedora34``) container has been added.
- ansible-test - Installation of ``cryptography`` no longer occurs when it is already installed. This avoids downgrading existing OS packages.
- ansible-test - Minor code cleanup.
- ansible-test - More efficient string splitting.
- ansible-test - Most scripts used internally by ``ansible-test`` no longer have a shebang or the executable bit set.
- ansible-test - Move code from ``_data`` directory to ``_util`` directory.
- ansible-test - Relocate change classification code.
- ansible-test - Remove CI provider support for Shippable, now that the service has been discontinued.
- ansible-test - Remove check for legacy ``core`` and ``extras`` directories.
- ansible-test - Remove deprecated container ``fedora32``.
- ansible-test - Remove deprecated remote platforms ``freebsd/11.4`` and ``rhel/8.3```.
- ansible-test - Removed the warning filter for ``PyYAML`` in the ``import`` sanity test.
- ansible-test - Removed unused pip constraints. Collections may need to add their own constraints if they depended on any which were removed.
- ansible-test - Reorganize code for individual commands.
- ansible-test - Reorganize integration test implementation by command.
- ansible-test - Rewrite the ``compile`` sanity test to improve error handling and support Python 3.10.
- ansible-test - Sanity test warnings relating to Python version support have been improved.
- ansible-test - Set minimum version constraints for ``pytest``.
- ansible-test - Split out shell command implementation.
- ansible-test - The "injector" scripts are now generated at runtime to avoid issues with symlinks and shebangs.
- ansible-test - The HTTP Tester can now be used without the ``--docker`` or `--remote`` options. It still requires use of the ``docker`` command to run the container.
- ansible-test - The HTTP Tester has been converted to a "cloud" plugin and can now be requested using the ``cloud/httptester`` alias. The original ``needs/httptester`` alias is still supported for backwards compatibility.
- ansible-test - The ``--docker-keep-git`` option (used only for testing ansible-core) has been renamed to ``--keep-git``.
- ansible-test - The ``--python`` option can be used without another delegation option such as the ``--venv`` or ``--docker`` options.
- ansible-test - The ``ansible-test coverage`` commands ``combine``, ``report``, ``html`` and ``xml`` now support delegation.
- ansible-test - The ``default`` test container has been updated to version 3.4.0 and now uses Python 3.9 by default instead of Python 3.6.
- ansible-test - The ``docker run`` option ``--link`` is no longer used to connect test containers. As a result, changes are made to the ``/etc/hosts`` file as needed on all test containers. Previously containers which were used with the ``--link`` option did not require changes to the ``/etc/hosts`` file.
- ansible-test - The ``import`` sanity test now requires that Ansible modules guard instantiation of ``AnsibleModule`` with a ``if __name__ == '__main__'`` conditional, or equivalent logic.
- ansible-test - The ``import`` sanity test now requires that non-modules do not instantiate ``AnsibleModule`` on import.
- ansible-test - The ``validate-modules`` sanity test codes ``ansible-deprecated-module`` and ``collection-deprecated-module`` have been added.
- ansible-test - The ``validate-modules`` sanity test codes ``last-line-main-call``, ``missing-if-name-main`` and ``missing-main-call`` have been removed.
- ansible-test - The ``validate-modules`` sanity test no longer enforces the ``missing-if-name-main``, ``last-line-main-call`` or ``missing-main-call`` checks on non-deleted Ansible modules. Modules are still required to instantiate ``AnsibleModule`` when ``__name__ == '__main__'``.
- ansible-test - Unit tests are now run in separate contexts (``controller``, ``modules``, ``module_utils``), each using separate invocations of ``pytest``.
- ansible-test - Unit tests other than ``modules`` and ``module_utils`` are now run only on Python versions supported by the controller (Python 3.8+).
- ansible-test - Update ``typed-ast`` constraint to version 1.4.3 for compatibility with Python 3.10.
- ansible-test - Update distribution test containers from version 2.0.1 to 2.0.2.
- ansible-test - Update the Ansible Core and Ansible Collection default test containers to 3.2.0 and 3.2.2 respectively.
- ansible-test - Update the ``base`` and ``default`` containers from Python 3.10.0rc2 to 3.10.0.
- ansible-test - Update the ``import`` sanity test to avoid a new warning in Python 3.10.
- ansible-test - Update the ``runtime-metadata`` sanity test to handle a new warning on Python 3.10.
- ansible-test - Updated the ``default`` containers to version 4.0.1.
- ansible-test - Updated the help message for failed tests in the ``azure`` test plugin.
- ansible-test - Upgrade ``pylint`` to version 2.9.3 and update its dependencies to the latest versions as well.
- ansible-test - Using an unknown ``--docker`` or ``--remote`` environment now requires specifying a Python version.
- ansible-test - add freebsd/13.0 as a remote option.
- ansible-test - aws creates and exposes a new tiny_prefix variable to provide a shorter prefix for the AWS tests.
- ansible-test - display recent ``ssh`` debug logs after connection failures (https://github.com/ansible/ansible/pull/75374)
- ansible-test - validate-modules now properly checks ``attributes`` for plugins (https://github.com/ansible/ansible/pull/74602).
- ansible-test - virtualenv-isolated.sh is no longer provided. Prefer virtualenv.sh in its place.
- ansible-test validate-modules - enforce that ``_info`` and ``_facts`` modules set ``supports_check_mode=True`` (https://github.com/ansible/ansible/pull/75324).
- ansible-vault - remove support for ``PyCrypto`` (https://github.com/ansible/ansible/issues/72646)
- apt - added an ``allow_downgrade`` option to enable safe downgrade of packages without using ``force`` which doesn't verify signatures (https://github.com/ansible/ansible/issues/29451, https://github.com/ansible/ansible/pull/74852).
- apt, added a 'lock_timeout' to be more resilient when encountering the apt db already locked and handle it w/o haveing to rerun task.
- async tasks - the use of the task-level ``ANSIBLE_ASYNC_DIR`` variable within ``environment:`` is no longer valid. Use the shell configuration variable ``async_dir`` instead.
- async_wrapper, better reporting on timeout, slight refactor on reporting itself.
- basic module_util - Clean up ``selinux`` compat import.
- blockinfile - Remove unused code for Ansible 1.x.
- cache base - More efficient string splitting.
- callback API - implemented ``v2_runner_on_async_ok`` and ``v2_runner_on_async_failed`` callbacks (https://github.com/ansible/ansible/pull/74953).
- cli scripts - remove trailing blank space in help after newline when outputting.
- collection - match skip message as per role installation.
- command - update the user warning message to point out command name (https://github.com/ansible/ansible/pull/74475).
- config lookup now can handle plugin settings.
- config, default site for ansible-core is now under /ansbile-core/.
- connection base - Avoid using deprecated ``@abstractproperty`` decorator.
- constructed - a new options ``trailing_separator`` and ``default_value`` to deal with key's value empty on keyed group.
- cron - ``name`` is now a required parameter always
- cron - ``reboot`` parameter has been dropped in favor of ``special_time: reboot``
- cron, removed previously deprecated 'reboot' and now requires either 'name' as unique identifier.
- default callback plugin - displays output for ``v2_runner_on_async_ok`` and ``v2_runner_on_async_failed`` callbacks.
- deprecate ``_remote_checksum()`` and remove all internal uses (https://github.com/ansible/ansible/pull/74848)
- dnf - Add ``cacheonly`` option (https://github.com/ansible/ansible/issues/69397).
- dnf - allow for ``download_only`` to be run without root privileges (https://github.com/ansible/ansible/issues/75530)
- encrypt - add new parameter ``ident`` to specify version of BCrypt algorithm to be used (https://github.com/ansible/ansible/issues/74571).
- fact cache - Remove deprecated backwards compatibility shim for the FactCache `update` method to accept multiple arguments.
- fact cache - Remove the deprecated location for FactCache. Import FactCache from `ansible.vars.fact_cache` instead.
- facts - add fiber channel facts for HP-UX (https://github.com/ansible/ansible/pull/57406)
- galaxy - support role artifact download from API response ``download_url`` location (https://github.com/ansible/ansible/issues/73103).
- get_distribution - ``lib.ansible.module_utils.common.sys_info.get_distribution`` now returns distribution information for all platforms not just Linux (https://github.com/ansible/ansible/issues/17587)
- get_distribution_version - ``lib.ansible.module_utils.common.sys_info.get_distribution_version`` now returns the version for all platfroms not just Linux (https://github.com/ansible/ansible/issues/17587)
- git - Add ``accept_newhostkey`` option (https://github.com/ansible/ansible/issues/69846).
- hostname - add support RedOS (https://github.com/ansible/ansible/issues/74779).
- import_role - Template tasks_from, vars_from, defaults_from, and handlers_from with --extra-vars (https://github.com/ansible/ansible/issues/69097).
- include_vars - add ``hash_behaviour`` option (https://github.com/ansible/ansible/pull/72944).
- ini - added new parameter ``allow_no_value`` to ini lookup plugin (https://github.com/ansible/ansible/issues/50594).
- ini lookup - add case sensitive option (https://github.com/ansible/ansible/issues/74601)
- interpreter discovery - allow the default list of ``INTERPRETER_PYTHON_FALLBACK`` to be changed using a variable
- interpreter discovery - prefer Python 3 over Python 2
- inventory plugins - Remove the deprecated cache interface. Set top level keys in the inventory plugin's `_cache` attribute (a dictionary) instead.
- jinja2_native - short-circuit ``ast.literal_eval`` for non-string values
- module_utils distro - when a 'distro' package/module is in PYTHONPATH but isn't the real 'distro' package/module that we expect, gracefully fall back to our own bundled distro.
- modules - add Anolis distro in hostname.py. project website https://openanolis.org/
- move all builtin modules to use the best possible locale function instead of hardcoding 'C'.
- password - add new parameter ``ident`` to specify version of BCrypt algorithm to be used (https://github.com/ansible/ansible/issues/74571).
- password - add new parameter ``seed`` in lookup plugin (https://github.com/ansible/ansible/pull/69775).
- password_hash uses passlib default if option isn't set
- playbook - Error if a playbook is an empty list instead of just skipping
- playbook - Error if using ``include`` instead of ``import_playbook``
- replaced examples/ansible.cfg with instructions on how to generate an up to date copy.
- service - add description how service module works internally (https://github.com/ansible/ansible/issues/74507).
- service_facts now handles more states/statuses from systemd and in a more reliable way (failed, not-found, masked).
- setup - add ``epoch_int`` option to date_time facts (https://github.com/ansible/ansible/pull/73822).
- ssh - added pkcs11 support by adding the pkcs11_provider option in the ssh connection module. (https://www.github.com/ansible/ansible/pull/32829)
- ssh connection, can not configure ssh_transfer_method with a variable.
- ssh connection, ssh_transfer_method is now configurable via variable.
- subelements lookup - Use generator in instance type check.
- tempfile - Remove unnecessary conditional for creating a temporary directory.
- template - Add comment attributes (``comment_start_string`` and ``comment_end_string``)
- unicode utils - Fix ``__all__`` which was incorrectly declared as a string instead of a tuple.
- user - Add ``umask`` option (https://github.com/ansible/ansible/issues/40359).
- user module - Remove unused code.
- validation testcases for check_* APIs (https://github.com/ansible/ansible/issues/55994).
- winrm - Allow explicit environment variables to be passed through to the ``kinit`` call for Kerberos authentication
- yaml dumper - YAML representer for AnsibleUndefined (https://github.com/ansible/ansible/issues/75072).
- yum - Add ``cacheonly`` option (https://github.com/ansible/ansible/issues/69397).
Breaking Changes / Porting Guide
--------------------------------
- Action, module, and group names in module_defaults must be static values. Their values can still be templates.
- Fully qualified 'ansible.legacy' plugin names are not included implicitly in action_groups.
- Unresolvable groups, action plugins, and modules in module_defaults are an error.
- ansible-test - Automatic installation of requirements for "cloud" test plugins no longer occurs. The affected test plugins are ``aws``, ``azure``, ``cs``, ``hcloud``, ``nios``, ``opennebula``, ``openshift`` and ``vcenter``. Collections should instead use one of the supported integration test requirements files, such as the ``tests/integration/requirements.txt`` file.
- ansible-test - The HTTP Tester is no longer available with the ``ansible-test shell`` command. Only the ``integration`` and ``windows-integration`` commands provide HTTP Tester.
- ansible-test - The ``--disable-httptester`` option is no longer available. The HTTP Tester is no longer optional for tests that specify it.
- ansible-test - The ``--httptester`` option is no longer available. To override the container used for HTTP Tester tests, set the ``ANSIBLE_HTTP_TEST_CONTAINER`` environment variable instead.
- ansible-test - Unit tests for ``modules`` and ``module_utils`` are now limited to importing only ``ansible.module_utils`` from the ``ansible`` module.
- conditionals - ``when`` conditionals no longer automatically parse string booleans such as ``"true"`` and ``"false"`` into actual booleans. Any non-empty string is now considered true. The ``CONDITIONAL_BARE_VARS`` configuration variable no longer has any effect.
- hostname - Drops any remaining support for Python 2.4 by using ``with open()`` to simplify exception handling code which leaked file handles in several spots
- hostname - On FreeBSD, the string ``temporarystub`` no longer gets written to the hostname file in the get methods (and in check_mode). As a result, the default hostname will now appear as ``''`` (empty string) instead of ``temporarystub`` for consistency with other strategies. This means the ``before`` result will be different.
- hostname - On OpenRC systems and Solaris, the ``before`` value will now be ``''`` (empty string) if the permanent hostname file does not exist, for consistency with other strategies.
- intersect, difference, symmetric_difference, union filters - the default behavior is now to be case-sensitive (https://github.com/ansible/ansible/issues/74255)
- unique filter - the default behavior is now to fail if Jinja2's filter fails and explicit ``case_sensitive=False`` as the Ansible's fallback is case-sensitive (https://github.com/ansible/ansible/pull/74256)
Deprecated Features
-------------------
- ansible-test - The ``--docker-no-pull`` option is deprecated and has no effect.
- ansible-test - The ``--no-pip-check`` option is deprecated and has no effect.
- include action is deprecated in favor of include_tasks, import_tasks and import_playbook.
- module_utils' FileLock is scheduled to be removed, it is not used due to its unreliable nature.
Removed Features (previously deprecated)
----------------------------------------
- The built-in module_util ``ansible.module_utils.common.removed`` was previously deprecated and has been removed.
- connections, removed password check stubs that had been moved to become plugins.
- task, inline parameters being auto coerced into variables has been removed.
Security Fixes
--------------
- Do not include params in exception when a call to ``set_options`` fails. Additionally, block the exception that is returned from being displayed to stdout. (CVE-2021-3620)
- templating engine fix for not preserving usnafe status when trying to preserve newlines. CVE-2021-3583
Bugfixes
--------
- Add RockyLinux to fact gathering (https://github.com/ansible/ansible/pull/74530).
- Add unicode support to ``ansible-inventory`` CLI (https://github.com/ansible/ansible/issues/57378)
- Add yaml representer for VarsWithSources (https://github.com/ansible/ansible/pull/68525).
- Added page describing terminal plugins to docsite
- AnsibleModule.set_mode_if_different - don't check file existence when check_mode is activated (https://github.com/ansible/ansible/issues/61185).
- Apply ``display_failed_stderr`` callback option on loop item results. (https://github.com/ansible/ansible/issues/74864)
- Binary GnuPG keys downloaded via URLs by the 'ansible.builtin.apt_key' module were corrupted so 'gpg' could not import them (https://github.com/ansible/ansible/issues/74424).
- Ensure end_play ends play, not batch (https://github.com/ansible/ansible/issues/73971)
- Ensure we get full path for extra vars into cliargs to avoid realpath issues after initial load.
- Fix ``keys()`` implementation of ``BaseFileCacheModule`` to strip the prefix from the key and only return keys that share the same prefix as the cache.
- Fix ``when`` evaluation on Native Jinja and Python 3.10.
- Fix templating task action with host-specific vars (https://github.com/ansible/ansible/issues/75568)
- Fully qualified 'ansible.legacy' and 'ansible.builtin' plugin names work in conjunction with module_defaults.
- Give a warning instead of an error if a handler name contains undefined variables and has no listen topics (https://github.com/ansible/ansible/issues/58841).
- Improve resilience of ``ansible-galaxy collection`` by increasing the page size to make fewer requests overall and retrying queries with a jittered exponential backoff when rate limiting HTTP codes (520 and 429) occur. (https://github.com/ansible/ansible/issues/74191)
- Jinja2 globals should be accessible even when importing a template without the context (https://github.com/ansible/ansible/issues/75371)
- PlayContext - Remove deprecated ``make_become_cmd`` (https://github.com/ansible/ansible/issues/74136)
- PowerShell - Ignore the ``LIB`` environment variable when compiling C# Ansible code
- Prevent ``ansible_failed_task`` from further templating (https://github.com/ansible/ansible/issues/74036)
- Remove 'default' from ssh plugin as we want to rely on default from ssh itself or ssh/config.
- Replace usage of private dnf.Base() attribute by future dnf API
- Save unreachable hosts between plays by adding them to the PlayIterator's _play._removed_hosts (https://github.com/ansible/ansible/issues/66945).
- Solaris - correct version check in svcadm_supports_sync (https://github.com/ansible/ansible/pull/73860).
- Task depth - Prevent exception when the task depth exceeds Pythons recursion depth (https://github.com/ansible/ansible/issues/73996)
- Templating - Ensure we catch exceptions when calling ``.filters()`` or ``.tests()`` on their respective plugins and properly error, instead of aborting which results in no filters being added to the jinja2 environment (https://github.com/ansible/ansible/pull/74127)
- The ``apt_key`` module did not properly handle GnuPG errors (https://github.com/ansible/ansible/issues/74477)
- The error message about the failure to import a ```gpg`` key by the ``apt_key`` module was incorrect (https://github.com/ansible/ansible/issues/74423).
- Update network user guide to explain use of cli_parse and validate plugins.
- Variable Manager - Only check if ``play.hosts`` is a template when the play hasn't been finalized (https://github.com/ansible/ansible/issues/73926)
- WorkerProcess - Python 3.5 fix for workaround for stdout deadlock in multiprocessing shutdown to avoid process hangs. (https://github.com/ansible/ansible/issues/74149)
- ``AnsibleModule.run_command`` - Address thread safety issues, concerning mutating the environment, current working directory, and umask. (https://github.com/ansible/ansible/issues/74783)
- ``failed_when``/``changed_when`` - Catch templating errors to prevent masking of module output (https://github.com/ansible/ansible/issues/37187)
- ``heuristic_log_sanitize`` - Return the full string if there is no password (https://github.com/ansible/ansible/issues/75542)
- ``pip`` now uses the ``pip`` Python module installed for the Ansible module's Python interpreter, if available, unless ``executable`` or ``virtualenv`` were specified.
- advanced_host_list inventory plugin - Fixed variable referenced before assignment when hostname/range could not be parsed.
- ansiballz - avoid treating path to site_packages as regex; escape it. This prevents a crash when ansible is installed to, or running from, an oddly named directory like ``ansi[ble``
- ansible-doc - in text output, do not show empty ``version_added_collection`` values (https://github.com/ansible/ansible/pull/74999).
- ansible-doc can now dump kewyords with --metadata-dump (still just for internal use)
- ansible-doc, fix output for internal metadata dump option
- ansible-doc, make inventory plugin selection for snippets generic and not a hardcoded list
- ansible-galaxy - Fix a bug with build_ignore when installing collections from source (https://github.com/ansible/ansible/issues/75528).
- ansible-galaxy - Fix handling HTTP exceptions from Galaxy servers. Continue to the next server in the list until the collection is found.
- ansible-galaxy - Improve error message from dependency resolution when a candidate has inconsistent requirements (https://github.com/ansible/ansible/issues/75139).
- ansible-inventory - handle an exception while parsing inventory in toml format (https://github.com/ansible/ansible/issues/74404).
- ansible-playbook, more robust handling of --list-hosts and undefined vars in hosts keyword.
- ansible-pull - update documentation for ``--directory`` option to clarify path must be absolute.
- ansible-pull, restore other options to use as repo other than git.
- ansible-test - Add constraint for ``pyspnego>=0.1.6`` for Python 3.10 - https://github.com/ansible/ansible/pull/74612
- ansible-test - Avoid publishing the port used by the ``pypi-test-container`` since it is only accessed by other containers. This avoids issues when trying to run tests in parallel on a single host.
- ansible-test - Failure to download test results from a remote host no longer hide test failures. If a download failure occurs after tests fail, a warning will be issued instead.
- ansible-test - Fix docker container IP address detection. The ``bridge`` network is no longer assumed to be the default.
- ansible-test - Fix path to inventory file for ``windows-integration`` and ``network-integration`` commands for collections.
- ansible-test - Fix traceback when generating coverage reports and no coverage directory exists.
- ansible-test - Random port selection is no longer handled by ``ansible-test``, avoiding possible port conflicts. Previously ``ansible-test`` would, under some circumstances, use one host's available ports to determine those of another host.
- ansible-test - Running tests in a single test run with multiple "cloud" plugins no longer results in port conflicts. Previously two or more containers with overlapping ports could not be used in the same test run.
- ansible-test - Tab completion after options like ``--docker`` which accept an optional argument will no longer provide incorrect completions.
- ansible-test - The ``--python`` and ``--venv`` options are no longer ignored by some commands, such as ``coverage``.
- ansible-test - The ``docker inspect`` command is now used to check for existing images instead of the ``docker images`` command. This resolves an issue where a ``docker pull`` would be unnecessarily executed for an image referenced by checksum.
- ansible-test - Update distribution test containers to version 3.1.0.
- ansible-test - Use ``--strict`` for ``pytest`` on Python 2.6 since ``--strict-markers`` is not available.
- ansible-test - Use documented API to retrieve build information from Azure Pipelines.
- ansible-test - Use pwsh to generate correct coverage line counts for stub files to get a more accurate coverage result
- ansible-test - Use the correct variable to reference the client's SSH key when generating inventory.
- ansible-test - add packaging python module to ``ansible-doc`` sanity test requirements.
- ansible-test - allow the same listening port on all container interfaces
- ansible-test - ensure the correct unit test target is given when the ``__init__.py`` file is modified inside the connection plugins directory
- ansible-test - make the ``a/`` and ``b/`` prefixes an optional match since these can be turned off with the ``diff.noprefix`` setting in ``git``
- ansible-test - restrict ``packaging`` to ``< 21.0`` for Python ``< 3.6`` (https://github.com/ansible/ansible/pull/75186).
- ansible-test pslint - Fix error when encountering validation results that are highly nested - https://github.com/ansible/ansible/issues/74151
- ansible-test validate-modules - EXAMPLES will no longer be marked as invalid YAML when it uses Ansible-specific YAML tags (https://github.com/ansible/ansible/pull/74384).
- ansible-test validate-modules - correctly validate positional parameters to ``AnsibleModules`` (https://github.com/ansible/ansible/pull/75332).
- ansible.builtin.cron - Keep non-empty crontabs, when removing cron jobs (https://github.com/ansible/ansible/pull/74497).
- ansible.utils.encrypt now handles missing or unusable 'crypt' library.
- ansible_test - add constraint for ``MarkupSafe`` (https://github.com/ansible/ansible/pull/74666)
- apt_key - set --recv argument as last one in apt-key command when using env var HTTP_PROXY (https://github.com/ansible/ansible/issues/74946)
- arg_spec - remove unused imports
- async_status, ensure we always get documented returns
- async_status, resurrected module to deprecate for those that were invoking it directly.
- basic - skip over module parameters which are used in ``journal.send`` API call (https://github.com/ansible/ansible/issues/71343).
- become - fix a regression on Solaris where chmod can return 5 which we interpret as auth failure and stop trying become tmpdir permission fallbacks
- become - work around setfacl not existing on modern Solaris (and possibly failing on some filesystems even when it does exist)
- callbacks, restore displaying delegation to host as host label.
- cli defaults for ssh args set to None as '' was bypassing normal default.
- command - remove unreachable code path when trying to convert the value for ``chdir`` to bytes (https://github.com/ansible/ansible/pull/75036)
- command module, clarify order of remove/creates checks.
- command module, correctly handles chdir to symlinks.
- command module, move to standarized messages in 'msg' vs abusing 'stdout'.
- command module, now all options work in ad-hoc execution.
- command module, now always returns what we documented as 'returns always'.
- config - use ``callbacks_enabled`` instead ``callback_enabled`` in a deprecated message (https://github.com/ansible/ansible/issues/70028).
- config lookup, can also handle collection plugins now
- config, ensure 'quoted' lists from ini or env do not take the quotes literally as part of the list item.
- connection ssh, no ssh_args cli option, so removed doc entry.
- constants, internal _deprecated function always requires version.
- correct doc links for become on warnings over world readable settings.
- correctly use world readable setting since old constant is not 'settable' anymore.
- dnf - align the return value of the list argument with the ``yum`` module (https://github.com/ansible/ansible/issues/75483)
- dnf - properly capture transaction error (https://github.com/ansible/ansible/issues/72651)
- dnf - refactor code to use `dnf whatprovides` API (https://github.com/ansible/ansible/issues/73503).
- dnf - support non-english environments (https://github.com/ansible/ansible/issues/75021)
- dnf module - Use all components of a package name to determine if it's installed (https://github.com/ansible/ansible/issues/75311).
- do not trigger interpreter discovery in the forced_local module path as they should use the ansible playbook python unless otherwise configured.
- facts - detect homebrew installed at /opt/homebrew/bin/brew
- facts, service_mgr, handle issues if ps command fails or returns empty.
- filter plugins - patch new versions of Jinja2 to prevent warnings/errors on renamed filter decorators (https://github.com/ansible/ansible/issues/74667)
- find - fix a bug where ``size`` argument was ignored for regular files with ``file_type`` of ``any``.
- find action, correctly convert path to text when warning about skiping.
- find does not ignore errors from os.walk anymore and issues warnings as expected.
- gather_facts, improved message on timeout.
- gather_facts, package, service - fix using module_defaults for the modules in addition to the action plugins. (https://github.com/ansible/ansible/issues/72918)
- get_bin_path, clarify with quotes what the missing required executable is.
- get_url - Fixed checksum validation for binary files (leading asterisk) in checksum files (https://github.com/ansible/ansible/pull/74502).
- getent, fix return data for when there are multiple results for the same key
- git - Fix git path used when .git file is present (https://github.com/ansible/ansible/issues/75608).
- host_group_vars vars plugin fixed ini entry, section and key were reversed.
- hostname - Add Rocky Linux support
- hostname - No longer modifies system files in get_* methods and therefore when consulted in check_mode (https://github.com/ansible/ansible/issues/66432)
- include - Remove deprecated ``static`` argument for ``include`` (https://github.com/ansible/ansible/issues/74135)
- includes - Remove the deprecated ability to specify ``tags`` as ``vars`` on includes (https://github.com/ansible/ansible/issues/74144)
- ini lookup - better error on mixed/bad parameters
- ini lookup - handle errors for duplicate keys and missing sections (https://github.com/ansible/ansible/issues/74601)
- interpreter discovery - Debian 8 and lower will avoid unsupported Python3 version in interpreter discovery
- interpreter discovery is now handling special (ansible_network_os) cases in less noisy ways.
- interpreter_discovery - hide warning 'No python interpreters...' when ANSIBLE_PYTHON_INTERPRETER=auto_silent (https://github.com/ansible/ansible/issues/74274).
- module_common - handle exception when multiple workers try to create the cache directory
- module_defaults - Fix action defaults for legacy actions/modules (https://github.com/ansible/ansible/issues/75279).
- module_utils - detect symlinked init systems, even if unable to read /proc/1/comm (https://github.com/ansible/ansible/issues/74866).
- netconf - catch and handle exception to prevent stack trace when running in FIPS mode
- network module_utils - fix bug where ``to_bits()`` returned the ``str`` type instead of a useful value.
- paramiko_ssh - mark connection as connected when ``_connect()`` is called (https://github.com/ansible/ansible/issues/74081)
- password - Handle passlib wrapped algos bsd_nthash, django_argon2, django_bcrypt, ldap_bcrypt, ldap_bsdi_crypt, ldap_des_crypt, ldap_hex_md5, ldap_hex_sha1, ldap_md5_crypt, ldap_pbkdf2_sha1, ldap_pbkdf2_sha256, ldap_pbkdf2_sha512, ldap_sha1_crypt, ldap_sha256_crypt, ldap_sha512_crypt, roundup_plaintext (https://github.com/ansible/ansible/pull/75527).
- pause - ensure control characters are always set to an appropriate value (https://github.com/ansible/ansible/issues/73264)
- pkg_mgr.py - Lower the priority of rpm-ostree detection to avoid false positives on systems not using it as the main package manager (https://github.com/ansible/ansible/issues/74578)
- play - validate the ``hosts`` entry in a play (https://github.com/ansible/ansible/issues/65386)
- playbook loaded from collection subdir now does not ignore subdirs.
- plugin config now allows list type options to have multiple valid choices (#74225).
- psrp - Always cleanup the last run pipeline if a second pipeline is invoked to avoid violating any resource limits.
- psrp - Fix error when resetting a connection that was initialised but not connected - (https://github.com/ansible/ansible/issues/74092).
- psrp - Try to clean up any server-side resources when resetting a connection.
- recursive_diff - handle condition when parameters are not dict (https://github.com/ansible/ansible/issues/56249).
- register - Ensure that ``register`` used on ``set_fact`` or ``include_vars`` does not automatically wrap the facts as unsafe. (https://github.com/ansible/ansible/issues/21088)
- rekey_on_member - handle undefined positional arguments better.
- remote tmpdir permissions - fix type error in macOS chmod ACL fallback (https://github.com/ansible/ansible/pull/74613).
- replace - better handling of file operation exceptions (https://github.com/ansible/ansible/pull/74686).
- roles - allow for role arg specs in new meta file (https://github.com/ansible/ansible/issues/74525).
- roles - fix unexpected ``AttributeError`` when an empty ``argument_specs.yml`` is present (https://github.com/ansible/ansible/pull/75604).
- roles - make sure argspec validation task is tagged with ``always`` (https://github.com/ansible/ansible/pull/74994).
- roles - make sure argspec validation task templates suboptions (https://github.com/ansible/ansible/issues/75070).
- schema validation now uses dynamic range of versions for valid deprecation entries vs hardcoded out of date list.
- script inventory plugin - Remove deprecated caching support (https://github.com/ansible/ansible/issues/74143)
- sequence - fix error message so that unrecognized options to the plugin display correctly as a list and normalize error messages.
- service - compare version without LooseVersion API (https://github.com/ansible/ansible/issues/74488).
- set ssh host_key_checking defaults to True, restoring original behaviour (https://github.com/ansible/ansible/issues/75168)
- setup module should now not truncate hpux interface names.
- setup module, fix filter to adjust for missing ``ansible_`` prefix on query.
- setup, while gathering linux hardware facts be more resilient to errors and try to return more info.
- slurp - Fix error messages for unreadable files and directories(https://github.com/ansible/ansible/issues/67340).
- slurp - handle error when ``path`` is a directory and not a file (https://github.com/ansible/ansible/pull/74930).
- slurp - improve the logic in the error handling and remove ``os.stat()`` call (https://github.com/ansible/ansible/pull/75038)
- ssh connection now correctly handle ssh_transfer_method and scp_if_ssh interactions.
- ssh connection, fix interaction between trasnfer settings options.
- ssh connection, use self.host which has the most up2date info instead of pc.remote_addr
- ssh_connection - rename ``retries`` to ``reconnection_retries`` to avoid conflicts with task vars (https://github.com/ansible/ansible/issues/75142).
- ssh_connection - set the default for ``reconnection_retries`` back to ``0`` (https://github.com/ansible/ansible/issues/75142).
- subversion - fix stack trace when getting information about the repository (https://github.com/ansible/ansible/issues/36498)
- system_service - use a context manager for file handling.
- task_executor, Actions using AnsibleActionFail/Skip will now propagate 'results' if given
- task_executor/ssh_connection - use the ``retries`` value from ``ssh_connection`` settings, not the default from the ``Task`` field attributes (https://github.com/ansible/ansible/issues/75142).
- template - ensure Jinja2 overrides from template header are used (https://github.com/ansible/ansible/issues/75275)
- unarchive - allow extracting archives that contain files which size exceeds free system memory (https://github.com/ansible/ansible/issues/73985).
- unarchive - fail when zipinfo binary is not found in executable paths (https://github.com/ansible/ansible/issues/39029).
- unarchive - move failure for missing binary to ``can_handle_archive()`` rather than ``__init__()``
- uri - Fix traceback and provide error message when trying to use non-string or mapping for ``form-multipart`` body - https://github.com/ansible/ansible/issues/74276
- urls - Fix logic in matching ``unredirected_headers`` to perform case insensitive matching
- validate_argument_spec, correct variable precedence and merge method and add missing examples
- variable manager, avoid sourcing delegated variables when no inventory hostname is present. This affects scenarios like syntax check and imports.
- version test - improve error message when an empty version is provided
- yum - Fixed typo in failure message (https://github.com/ansible/ansible/pull/72964).
- yum - When upgrading, every architecture of a package is now included in the module results, instead of just one (https://github.com/ansible/ansible/issues/73284).
- yum - fix ``yumstate`` return value when wildcards are used in the ``list`` argument (https://github.com/ansible/ansible/issues/74557)
- yum - fix parsing of multiple subsequent empty lines from ``yum check-update`` output (https://github.com/ansible/ansible/issues/70949)
- yum - yum action plugin changes to support 'use' as an alias of 'use_backend' (https://github.com/ansible/ansible/issues/70774).
Known Issues
------------
- ansible-test - Tab completion anywhere other than the end of the command with the new composite options will provide incorrect results. See https://github.com/kislyuk/argcomplete/issues/351 for additional details.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
bugfixes:
- Templating - Ensure we catch exceptions when getting ``.filters`` and
``.tests`` attributes on their respective plugins and properly error,
instead of aborting which results in no filters being added to the
jinja2 environment

View File

@ -0,0 +1,2 @@
bugfixes:
- setup - detect docker container with check for ./dockerenv or ./dockinit (https://github.com/ansible/ansible/pull/74349).

View File

@ -0,0 +1,3 @@
---
bugfixes:
- Fix for network_cli not getting all relevant connection options

View File

@ -0,0 +1,2 @@
bugfixes:
- validate_argument_spec - Skip suboption validation if the top level option is an invalid type (https://github.com/ansible/ansible/issues/75612).

View File

@ -0,0 +1,3 @@
bugfixes:
- unarchive - Fix zip archive file listing that caused issues with content
postprocessing (https://github.com/ansible/ansible/issues/76067).

View File

@ -0,0 +1,2 @@
bugfixes:
- yum - prevent storing unnecessary cache data by running `yum makecache fast` (https://github.com/ansible/ansible/issues/76336)

View File

@ -0,0 +1,3 @@
bugfixes:
- shell/command - only skip in check mode if the options `creates` and `removes` are both None.
- script - skip in check mode since the plugin cannot determine if a change will occur.

View File

@ -0,0 +1,2 @@
bugfixes:
- "``Templar.copy_with_new_env`` - set the ``finalize`` method of the new ``Templar`` object for the new environment (https://github.com/ansible/ansible/issues/76379)"

View File

@ -0,0 +1,2 @@
bugfixes:
- Fix ``AttributeError`` when providing password file via ``--connection-password-file`` (https://github.com/ansible/ansible/issues/76530)

View File

@ -0,0 +1,2 @@
bugfixes:
- unarchive - Make extraction work when the LANGUAGE environment variable is set to a non-English locale.

View File

@ -0,0 +1,2 @@
bugfixes:
- Fix ``end_play`` to end the current play only (https://github.com/ansible/ansible/issues/76672)

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy collection verify - display files/directories not included in the FILES.json as modified content.

View File

@ -0,0 +1,3 @@
bugfixes:
- async - Improve performance of sending async callback events by never sending the full task through the queue
(https://github.com/ansible/ansible/issues/76729)

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy - Fix using the '--ignore-certs' option when there is no server-specific configuration for the Galaxy server.

View File

@ -0,0 +1,4 @@
bugfixes:
- default callback - Ensure we compare FQCN also in lockstep logic, to ensure
using the FQCN of a strategy plugin triggers the correct behavior in the
default callback plugin. (https://github.com/ansible/ansible/issues/76782)

View File

@ -0,0 +1,3 @@
bugfixes:
- hostname - Do not require SystemdStrategy subclasses for every distro
(https://github.com/ansible/ansible/issues/76792)

View File

@ -0,0 +1,3 @@
bugfixes:
- template lookup - restore inadvertently deleted default for ``convert_data``
(https://github.com/ansible/ansible/issues/77004)

View File

@ -0,0 +1,2 @@
bugfixes:
- hostname - use ``file_get_content()`` to read the file containing the host name in the ``FileStrategy.get_permanent_hostname()`` method. This prevents a ``TypeError`` from being raised when the strategy is used (https://github.com/ansible/ansible/issues/77025).

View File

@ -0,0 +1,2 @@
bugfixes:
- first_found - fix to allow for spaces in file names (https://github.com/ansible/ansible/issues/77136)

View File

@ -0,0 +1,2 @@
bugfixes:
- Fix collection filter/test plugin redirects (https://github.com/ansible/ansible/issues/77192).

View File

@ -0,0 +1,55 @@
minor_changes:
- |
Add an 'action_plugin' field for modules in runtime.yml plugin_routing.
This fixes module_defaults by supporting modules-as-redirected-actions
without redirecting module_defaults entries to the common action.
.. code: yaml
plugin_routing:
action:
facts:
redirect: ns.coll.eos
command:
redirect: ns.coll.eos
modules:
facts:
redirect: ns.coll.eos_facts
command:
redirect: ns.coll.eos_command
With the runtime.yml above for ns.coll, a task such as
.. code: yaml
- hosts: all
module_defaults:
ns.coll.eos_facts: {'valid_for_eos_facts': 'value'}
ns.coll.eos_command: {'not_valid_for_eos_facts': 'value'}
tasks:
- ns.coll.facts:
will end up with defaults for eos_facts and eos_command
since both modules redirect to the same action.
To select an action plugin for a module without merging
module_defaults, define an action_plugin field for the resolved
module in the runtime.yml.
.. code: yaml
plugin_routing:
modules:
facts:
redirect: ns.coll.eos_facts
action_plugin: ns.coll.eos
command:
redirect: ns.coll.eos_command
action_plugin: ns.coll.eos
The action_plugin field can be a redirected action plugin, as
it is resolved normally.
Using the modified runtime.yml, the example task will only use
the ns.coll.eos_facts defaults.

View File

@ -0,0 +1,2 @@
bugfixes:
- "unarchive - the ``io_buffer_size`` option added in 2.12 was not accepted by the module (https://github.com/ansible/ansible/pull/77271)."

View File

@ -0,0 +1,2 @@
bugfixes:
- "ansible-test compile sanity test - do not crash if a column could not be determined for an error (https://github.com/ansible/ansible/pull/77465)."

View File

@ -0,0 +1,3 @@
bugfixes:
- ansible-test - Don't fail if network cannot be disconnected
(https://github.com/ansible/ansible/pull/77472)

View File

@ -0,0 +1,2 @@
bugfixes:
- Fix traceback when installing a collection from a git repository and git is not installed (https://github.com/ansible/ansible/issues/77479).

View File

@ -0,0 +1,2 @@
bugfixes:
- Prevent losing unsafe on results returned from lookups (https://github.com/ansible/ansible/issues/77535)

View File

@ -0,0 +1,2 @@
bugfixes:
- arg_spec - Fix incorrect ``no_log`` warning when a parameter alias is used (https://github.com/ansible/ansible/pull/77576)

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy - fix setting the cache for paginated responses from Galaxy NG/AH (https://github.com/ansible/ansible/issues/77911).

View File

@ -0,0 +1,3 @@
bugfixes:
- paramiko - Add back support for ``ssh_args``, ``ssh_common_args``, and ``ssh_extra_args`` for parsing the ``ProxyCommand``
(https://github.com/ansible/ansible/issues/78750)

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Add ``wheel < 0.38.0`` constraint for Python 3.6 and earlier.

View File

@ -0,0 +1,2 @@
bugfixes:
- "ansible-test local change detection - use ``git merge-base <branch> HEAD`` instead of ``git merge-base --fork-point <branch>`` (https://github.com/ansible/ansible/pull/79734)."

View File

@ -0,0 +1,2 @@
minor_changes:
- "ansible-test acme test container - update version to update used Pebble version, underlying Python and Go base containers, and Python requirements (https://github.com/ansible/ansible/pull/79783)."

View File

@ -0,0 +1,2 @@
bugfixes:
- Ansible.ModuleUtils.SID - Use user principal name as is for lookup in the ``Convert-ToSID`` function - https://github.com/ansible/ansible/issues/77316

View File

@ -0,0 +1,3 @@
bugfixes:
- ansible-connection - decrypt vaulted parameters before sending over the socket, as
vault secrets are not available on the other side.

View File

@ -0,0 +1,3 @@
minor_changes:
- ansible-test - Update the ``alpine`` container to version 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.

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Avoid using the ``mock_use_standalone_module`` setting for unit tests running on Python 3.8 or later.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Add support for ``argcomplete`` version 3.

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Update ``pip`` used to bootstrap remote FreeBSD instances from version 20.3.4 to 21.3.1.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Automatically enable the PyPI proxy for the ``centos7`` container to restore the ability to use ``pip`` in that container.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Fix parsing of cgroup entries which contain a ``:`` in the path (https://github.com/ansible/ansible/issues/81977).

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Use https://ci-files.testing.ansible.com/ for instance bootstrapping instead of an S3 endpoint.

View File

@ -1,2 +1,4 @@
minor_changes:
- ansible-test - Minor code cleanup.
- ansible-test - Miscellaneous code cleanup and type hint fixes.
- ansible-test - Remove unused Python 2.x compatibility code.

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Stop early with an error if the current working directory contains an invalid collection namespace or name.

View File

@ -0,0 +1,3 @@
minor_changes:
- ansible-test - Update the ``galaxy`` test plugin to get its container from a copy on quay.io.
- ansible-test - Update the ``openshift`` test plugin to get its container from a copy on quay.io.

View File

@ -0,0 +1,70 @@
major_changes:
- ansible-test - Docker and Podman are now supported on hosts with cgroup v2 unified.
Previously only cgroup v1 and cgroup v2 hybrid were supported.
- ansible-test - Docker Desktop on WSL2 is now supported (additional configuration required).
- ansible-test - Podman on WSL2 is now supported.
- ansible-test - Podman now works on container hosts without systemd.
Previously only some containers worked, while others required rootfull or rootless Podman,
but would not work with both. Some containers did not work at all.
- ansible-test - When additional cgroup setup is required on the container host, this will be automatically detected.
Instructions on how to configure the host will be provided in the error message shown.
minor_changes:
- ansible-test - When using Podman, ansible-test will detect if the loginuid used in containers is incorrect.
When this occurs a warning is displayed and the container is run with the AUDIT_CONTROL capability.
Previously containers would fail under this situation, with no useful warnings or errors given.
- ansible-test - Failure to connect to a container over SSH now results in a clear error.
Previously tests would be attempted even after initial connection attempts failed.
- ansible-test - Warnings are now shown when using containers that were built with VOLUME instructions.
- ansible-test - Unit tests now support network disconnect by default when running under Podman.
Previously this feature only worked by default under Docker.
- ansible-test - Additional log details are shown when containers fail to start or SSH connections to containers fail.
- ansible-test - Containers included with ansible-test no longer disable seccomp by default.
- ansible-test - A new ``cgroup`` option is available when running custom containers.
This option can be used to indicate a container requires cgroup v1 or that it does not use cgroup.
The default behavior assumes the container works with cgroup v2 (as well as v1).
- ansible-test - A new ``audit`` option is available when running custom containers.
This option can be used to indicate whether a container requires the AUDIT_WRITE capability.
The default is ``required``, which most containers will need when using Podman.
If necessary, the ``none`` option can be used to opt-out of the capability.
This has no effect on Docker, which always provides the capability.
- ansible-test - More details are provided about an instance when provisioning fails.
- ansible-test - Connection failures to remote provisioned hosts now show failure details as a warning.
- ansible-test - When setting the max open files for containers, the container host's limit will be checked.
If the host limit is lower than the preferred value, it will be used and a warning will be shown.
- ansible-test - Use ``stop --time 0`` followed by ``rm`` to remove ephemeral containers instead of ``rm -f``.
This speeds up teardown of ephemeral containers.
- ansible-test - Reduce the polling limit for SSHD startup in containers from 60 retries to 10.
The one second delay between retries remains in place.
- ansible-test - Integration tests can be excluded from retries triggered by the ``--retry-on-error`` option by
adding the ``retry/never`` alias. This is useful for tests that cannot pass on a retry or are too
slow to make retries useful.
- ansible-test - The ``ansible-test env`` command now detects and reports the container ID if running in a container.
- ansible-test - SSH connections from OpenSSH 8.8+ to CentOS 6 containers now work without additional configuration.
However, clients older than OpenSSH 7.0 can no longer connect to CentOS 6 containers as a result.
The container must have ``centos6`` in the image name for this work-around to be applied.
- ansible-test - SSH shell connections from OpenSSH 8.8+ to ansible-test provisioned network instances now work without additional configuration.
However, clients older than OpenSSH 7.0 can no longer open shell sessions for ansible-test provisioned network instances as a result.
bugfixes:
- ansible-test - Multiple containers now work under Podman without specifying the ``--docker-network`` option.
- ansible-test - Prevent concurrent / repeat pulls of the same container image.
- ansible-test - Prevent concurrent / repeat inspections of the same container image.
- ansible-test - Prevent concurrent execution of cached methods.
- ansible-test - Handle server errors when executing the ``docker info`` command.
- ansible-test - Show the exception type when reporting errors during instance provisioning.
- ansible-test - Pass the ``XDG_RUNTIME_DIR`` environment variable through to container commands.
- ansible-test - Connection attempts to managed remote instances no longer abort on ``Permission denied`` errors.
- ansible-test - Detection for running in a Podman or Docker container has been fixed to detect more scenarios.
The new detection relies on ``/proc/self/mountinfo`` instead of ``/proc/self/cpuset``.
Detection now works with custom cgroups and private cgroup namespaces.
- ansible-test - Avoid using ``exec`` after container startup when possible.
This improves container startup performance and avoids intermittent startup issues with some old containers.
known_issues:
- ansible-test - Using Docker on systems with SELinux may require setting SELinux to permissive mode.
Podman should work with SELinux in enforcing mode.
- ansible-test - Additional configuration may be required for certain container host and container combinations.
Further details are available in the testing documentation.
- ansible-test - Systems with Podman networking issues may be unable to run containers, when previously the issue
went unreported. Correct the networking issues to continue using ``ansible-test`` with Podman.
- ansible-test - Custom containers with ``VOLUME`` instructions may be unable to start, when previously the containers
started correctly. Remove the ``VOLUME`` instructions to resolve the issue. Containers with this
condition will cause ``ansible-test`` to emit a warning.

View File

@ -0,0 +1,5 @@
bugfixes:
- ansible-test - Test containers are now run with the ``--tmpfs`` option for ``/tmp``, ``/run`` and ``/run/lock``.
This allows use of containers built without the ``VOLUME`` instruction.
Additionally, containers with those volumes defined no longer create anonymous volumes for them.
This avoids leaving behind volumes on the container host after the container is stopped and deleted.

View File

@ -0,0 +1,3 @@
bugfixes:
- "ansible-test - Test configuration for collections is now parsed only once, prior to delegation.
Fixes issue: https://github.com/ansible/ansible/issues/78334"

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Update the ``base`` and ``default`` containers from Python 3.10.0rc2 to 3.10.0.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Update the ``default`` containers to version 4.1.1, which includes the updated ``import`` sanity test requirements.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Update the ``default`` containers to version 4.2.0.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Fix ``windows-integration`` and ``network-integration`` when used with the ``--docker`` option and user-provided inventory.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Fix traceback when running from an install and delegating execution to a different Python interpreter.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Update distribution test containers to version 3.1.0.

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Change the maximum number of open files in a test container from the default to ``10240``.

View File

@ -0,0 +1,4 @@
bugfixes:
- ansible-test - Fix broken documentation link for ``aws`` test plugin error messages.
minor_changes:
- ansible-test - Improve consistency of version specific documentation links.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Delegation now properly handles arguments given after ``--`` on the command line.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Removed pointless comparison in diff evaluation logic.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Fix type hints.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - fix a typo in validate-modules.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - fix warning message about failing to run an image to include the image name

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - When bootstrapping remote FreeBSD instances, use the OS packaged ``setuptools`` instead of installing the latest version from PyPI.

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Become support for remote instance provisioning is no longer tied to a fixed list of platforms.

Some files were not shown because too many files have changed in this diff Show More