Compare commits

...

311 Commits

Author SHA1 Message Date
4976685a6a Remove scheduled CI runs
The ansible-core 2.13 release will be EOL next week with the release of ansible-core 2.16.
2023-11-01 17:50:47 -07:00
d9160f6005 [stable-2.13] 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:27 -07:00
9a3ca0b08c [stable-2.13] 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:22 -07:00
c8de45e553 ansible-test - Use Azure for Windows 2012/2012-R2 (#81973) 2023-10-13 16:26:43 -07:00
457baad4c4 Update Ansible release version to v2.13.13.post0. (#81938) 2023-10-09 17:51:11 +00:00
c2b0ea52e2 New release v2.13.13 (#81935) 2023-10-09 10:51:30 -05:00
1a9edcd1b6 win_fetch - improve test time by not scanning Win dir (#81884) (#81885)
(cherry picked from commit dfc62589f6)
2023-10-04 10:25:00 -07:00
5fc7e9c86f Update Ansible release version to v2.13.13rc1.post0. (#81877) 2023-10-03 22:16:25 +00:00
b8ebc3653d New release v2.13.13rc1 (#81860) 2023-10-03 17:34:36 -04:00
3f12097a41 Fix reporting role as not found when remote_data is None (#81829) (#81835)
(cherry picked from commit 7fab552563)
2023-10-02 15:22:25 -04:00
820dae4aff [stable-2.13] Prevent roles from using symlinks to overwrite files outside of the installation directory (#81780) (#81787)
* [stable-2.13] Prevent roles from using symlinks to overwrite files outside of the installation directory (#81780)

* Sanitize linkname during role installs

* Add tests

* add clog frag.
(cherry picked from commit ddf0311c63)

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

* Update syntax for py3.8
2023-09-27 08:43:58 -05:00
d3b531fc73 Update Ansible release version to v2.13.12.post0. (#81686) 2023-09-12 08:33:59 -05:00
a4bab0bae2 New release v2.13.12 (#81683) 2023-09-11 17:12:11 -05:00
644c1d0f8c Update Ansible release version to v2.13.12rc1.post0. (#81642) 2023-09-05 16:18:13 -05:00
551b672247 New release v2.13.12rc1 (#81637) 2023-09-05 14:59:51 -05:00
590e46c422 [stable-2.13] tarfile: Handle deprecation warning for extract and extractall (#81545) (#81634)
* [stable-2.13] tarfile: Handle deprecation warning for extract and extractall (#81545)

* Python 3.11.4 introduces a new parameter 'filter' in extract and
extractall in tarfile. Handle deprecation warning message emitted
in Python 3.12.
* added probing mechanism in ansible-galaxy code to detect broken
data filter implementation in tarfile.

Fixes: #80832

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 1cc5efa)

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

* py3.8 doesn't have functools.cache

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-05 12:44:59 -05:00
fca71e4357 [stable-2.13] ansible-test - Always use managed entry points (#81537). (#81541)
(cherry picked from commit 390e508d27)
2023-08-22 12:27:44 -07:00
a5400d5e92 [stable-2.13] Remove obsolete text from release.py PR template (#81526) (#81529)
(cherry picked from commit 9afaf2216b)
2023-08-16 11:19:27 -07:00
e302f5cdb8 [stable-2.13] Fix f-string whitespace in release script (#81477) (#81480)
(cherry picked from commit 85d3305889)
2023-08-14 13:35:40 -07:00
d05ddfe8bb [stable-2.13] Clean up release script (#81488) (#81491)
* Enable mypy for the entire packaging directory

* Return CompletedProcess only when capturing output

This allows stdout/stderr on CompletedProcess to be `str` instead of `str | None`.
The unused args on CompletedProcess have been removed.
Overload type hints have been added to reflect these changes.

* Relax return type on ensure_venv

This improves consistency with its usage, since `run` accepts `env` of `dict[str, t.Any]`.
Also removed unnecssary `str()` usage when updating `env`.

* Fix type hint on suppress_when

* Fix callable annotation

* Add type hint for command_parser

PyCharm complains about using a protected member, and also that it can't find the type in the type stubs.
However, mypy properly recognizes the type.

* Avoid unnecessary TypeVar usage.
(cherry picked from commit 47ab59753c)
2023-08-14 13:35:05 -07:00
5c7d361b6e [stable-2.13] Replace FreeBSD 12.{3->4} & 13.{0->1} @ testing (#81498)
* Replace FreeBSD 12.3 w/ 12.4 in CI & ansible-test

FreeBSD 12.3 bootstrap packages stopped being available.

* Replace FreeBSD 13.0 w/ 13.1 in CI & ansible-test
2023-08-14 13:34:33 -07:00
28fb37d6c2 [stable-2.13] ansible-test - Update source layout detection (#81418) (#81436)
(cherry picked from commit c525514994)
2023-08-03 20:43:12 -07:00
586392519b [stable-2.13] Overhaul package-data sanity test (#81427) (#81437)
The sanity test now only inspects the sdist and wheel instead of trying to install the sdist using setup.py..
(cherry picked from commit f894ce89b4)
2023-08-03 20:43:01 -07:00
6da138c61f Skip apt_repository test on Ubuntu 18.04 (#81441) 2023-08-03 19:44:13 -07:00
54a489c396 [stable-2.13] Update update-sanity-requirements.py script (#81424) (#81433)
Frozen requirements can now preserve any explicitly installed package that would normally be omitted, not just setuptools.
(cherry picked from commit dbb3feddaf)
2023-08-03 13:31:17 -07:00
31d948e1d8 [stable-2.13] Revert "define code owners to support branch-protection rules on docs (#81041)" (#81228) (#81430)
This reverts commit 9117762358.
(cherry picked from commit 7c6564ad0e)
2023-08-03 13:06:29 -07:00
c391cf01e4 [stable-2.13] Clean up MANIFEST.in (#81416)
* Clean up MANIFEST.in (#80688)

* Remove unnecessary MANIFEST.in commands

This eliminates more setuptools warnings during build.

* Sort MANIFEST.in

Now that only include commands are used, the order of the commands no longer effects the build output.

(cherry picked from commit 6e325d9e4d)

* Omit hacking directory from MANIFEST.in (#81245)

* Omit `hacking` directory from `MANIFEST.in`

* Update package-data sanity test

(cherry picked from commit b93a628aed)
2023-08-02 13:34:38 -07:00
1a22a1be8a [stable-2.13] Add changelog fragment for docs/examples removal (#81410) (#81413)
(cherry picked from commit 0c03a6bcf6)
2023-08-02 13:00:11 -07:00
3999c5bc45 Remove BOTMETA.yml and sanity tests for it (#81198) (#81265)
(cherry picked from commit 39ef570e16)
2023-08-02 12:44:54 -07:00
abab52a7b4 [stable-2.13] Docs removal and other backports (#81409)
* Remove straight.plugin dependency (#80084)

(cherry picked from commit f587856beb)

* Update package-data sanity test (#80344)

The test no longer relies on the Makefile.

(cherry picked from commit 46362bbd27)

* Remove obsolete release bits (#80347)

Releases are now built using the `packaging/release.py` tool.
This makes the `Makefile` and associated files in `packaging/release/` and `packaging/sdist/` obsolete.

(cherry picked from commit 6a66761e0e)

* Use --no-isolation for package-data sanity test (#80377)

The dependencies are already in the sanity test venv. This avoids use of unpinned dependencies and a dependency on a network connection.

(cherry picked from commit 7fcb9960e6)

* Set the minimum setuptools to 45.2.0 (#80649)

Also update the package-data sanity test to use the minimum setuptools version.

(cherry picked from commit 4d25e3d54f)

* Use package_data instead of include_package_data (#80652)

This resolves warnings generated by setuptools such as the following:

_Warning: Package 'ansible.galaxy.data' is absent from the `packages` configuration.

(cherry picked from commit 5ac292e12d)

* Fix os.walk issues in package-data sanity test (#80703)

(cherry picked from commit eea7137449)

* Remove `docs` and `examples` directories (#81011)

* Remove docs dir

* Updates to reflect docs removal

* Fix integration test

* Remove examples dir

* Updates to reflect examples removal

* Remove build_library and build-ansible.py

* Remove refs to build_library and build-ansible.py

* Remove obsolete template

* Remove obsolete template reference

* Remove the now obsolete rstcheck sanity test

(cherry picked from commit 72e038e823)

* Omit pre-built man pages from sdist (#81395)

Since man pages aren't accessible to users after a `pip install`, there's no need to include them in the sdist.
This change makes it trivial to build man pages from source, which makes them much easier to iterate on.
It also simplifies creation and testing of the sdist, since it no longer requires building man pages.

The new `packaging/cli-doc/build.py` script can generate both man pages and RST documentation.
This supports inclusion on the docs site without a dependency on `ansible-core` internals.
Having a single implementation for both simplifies keeping the two formats in sync.

(cherry picked from commit 691c8e8603)
2023-08-02 12:26:38 -07:00
3e08ed79b0 Fix backport of #81379 (#81387)
Two copies of the file existed in this branch, but only one was updated previously.
2023-07-31 18:03:53 -07:00
1a71911041 [stable-2.13] Include subcommands in generated man pages (#81378) (#81384)
Sub commands of `ansible-galaxy role` and `ansible-galaxy collection` are now documented.
(cherry picked from commit 081c60b9d3)
2023-07-31 15:48:35 -07:00
dea32ac962 [stable-2.13] Fix misrendered sections in manpage generation (#81381)
This change fixes bugs in the manpage generator that existed since it
was first added.

It exposes CLI `ARGUMENTS` value to manpage templates.

Before this change, the code contained a typo, causing the `for`-loop
iterate over individual characters of the `'ARGUMENTS'` string rather
than iterating over a tuple. A missing comma was at fault.

The updated code gets rid of the `for`-loop and conditionals since it
seems to have been a premature complexity increase and no other things
than `'ARGUMENTS'` were ever added into the broken iterable.

The functional change is that `arguments` is now always present in the
Jinja2 context, unlike being missing sometimes because of the previous
design (not that it was ever present, because of the bug! sigh...)

The Jinja2 templates perform an `{% if arguments %}` check, letting
the template engine silently ignore the missing variable. The clause
was always falsy, meaning that the arguments section was not included
in the manpages for at least the last 6 years. With this fix, it will
be.

This patch also deduplicates calling `opt_doc_list` @ generate_man.

It was called late in the execution, more times than necessary. This
patch makes sure it happens once by putting it at the top of the scope.

It fixes rendering library and inventory in manpages.

The corresponding Jinja2 templates have blocks wrapped with
conditionals like `{% if inventory %}` and `{% if library %}` but said
variables were never injected into the context, nor were they even
deduced on the Python side of the generator. This means that the
conditional clauses were always falsy, never showing the portions of
the manpages.

The Python script has hints for how the `inventory` variable was to be
calculated, which is confirmed through the Git paleontology efforts.

The block of code that references to the `inventory` bit was
incorrectly checking a variable with a list of nested objects for the
presence of a string which was never going to work.

This patch fixes this check by verifying the CLI flag against the
correct variable containing a list of options and exposes it to the
Jinja2 templates.
It also exposes the `library` variable in a similar way.

The block displaying other binaries in Sphinx CLI docs has been
synchronized with the manpage template.
Previously, the current binary was displayed also. This patch gets rid
of the unwanted trailing comma there too.

Finally, the CLI executables list in the manpage template now reuses
the same variable as the RST template that doesn't need any
post-processing in Jinja2.
Before, it was already used in the RST template so this patch aligns
both templates to use the same logic as they got out-of-sync over time.

PR #80450.
(cherry picked from commit a84b3a4e72)

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
2023-07-31 14:04:31 -07:00
c3dd88e770 [stable-2.13] Fix missing command descriptions in manpages/docs (#81366). (#81372)
(cherry picked from commit 32b388b4ca)
2023-07-28 19:26:20 -07:00
e58f1b47b7 [stable-2.13] Fix command doc lookup in man page generation (#81365) (#81367)
(cherry picked from commit f9d674fcfd)
2023-07-28 18:08:14 -07:00
94281e77f0 [stable-2.13] Exclude internal options from man pages and docs (#81360) (#81363)
(cherry picked from commit fead654671)
2023-07-28 15:26:15 -07:00
66f04c276a [stable-2.13] ansible-test - update module_utils/urls.py unit test to support cryptography >= 41.0.0 (#81296) (#81318)
(cherry picked from commit d20a0c02cc)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2023-07-20 12:26:43 -07:00
b203e0a285 [stable-2.13] Convert non-docs *.rst files to *.md (#81217) (#81224)
* [stable-2.13] Convert non-docs *.rst files to *.md (#81217)

* Rename README.rst to README.md

* Change README format from reStructuredText to Markdown

* Fix whitespace in README.md

* Update setup.cfg to use README.md

* Replace changelog placeholder with README.md

* Update package-data sanity test
(cherry picked from commit 38e50c9f81)

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

* Remove README.rst from MANIFEST.in
2023-07-18 20:14:59 -07:00
bbf1aacf16 [stable-2.13] Add missing skip entries for selinux module_util (#81305) (#81309)
(cherry picked from commit 18cbfc688b)
2023-07-18 20:14:40 -07:00
191cdf5ae5 [stable-2.13] ansible-test - Pre-build PyYAML wheels (#81300) (#81311)
* [stable-2.13] ansible-test - Pre-build PyYAML wheels (#81300)

This works around Cython failures when attempting to install PyYAML >= 5.4 <= 6.0..
(cherry picked from commit e964078a83)

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

* Skip PEP 517 tests on FreeBSD
2023-07-18 20:14:29 -07:00
3ad838b86c [stable-2.13] Disable cron integration test on Alpine (#81301) (#81304)
The tests are now failing due to the lack of `libfaketime` in the Alpine repos.
(cherry picked from commit 261a12b8a9)
2023-07-18 18:12:24 -07:00
0951694932 Update Ansible release version to v2.13.11.post0. (#81288) 2023-07-17 20:26:53 -07:00
a1bad8755a New release v2.13.11 (#81285) 2023-07-17 19:07:25 -07:00
d03bf6430c Replace reboot_command integration test with unit tests (#78956) (#81268)
Co-authored-by: Matt Clay <matt@mystile.com>

(cherry picked from commit b6ebb9d41a)
2023-07-14 14:27:51 -07:00
c8b5d96ee0 [stable-2.13] Use *.md instead of *.rst for test READMEs (#81009). (#81231)
(cherry picked from commit 6ac0ea3567)
2023-07-12 00:17:29 +00:00
4589e30b02 [stable-2.13] Reorganize CI sanity test matrix (#81004) (#81227)
(cherry picked from commit ff359fa8e1)
2023-07-11 23:32:41 +00:00
3bce7bc1c5 Update Ansible release version to v2.13.11rc1.post0. (#81211) 2023-07-10 19:45:41 +00:00
dc54ab1ad9 New release v2.13.11rc1 (#81206) 2023-07-10 21:03:39 +02:00
58ae119ccf Re-introduce RHEL 9 modularity testing in CI (#81160) (#81194)
(cherry picked from commit 7b2647f3b2)
2023-07-10 11:17:28 -07:00
b2114ef794 [stable-2.13] define code owners to support branch-protection rules on docs (#81041) (#81045)
* during interim docs/ (and related dirs) split to separate repo, prevent merges that might require a rebase of the target repo
(cherry picked from commit 9117762358)
2023-06-12 11:41:39 -07:00
c745853d4c Bump azure-pipelines-test-container to v4.0.1 @ CI (#80939)
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 09:26:35 -07:00
ffee15678d [stable-2.13] Remove hacking dir dependency from build backend (#81027)
* Copy man generation files into build backend

* Use copied files in build backend
2023-06-09 21:02:33 -07:00
be6a990a89 [stable-2.13] Remove docs dir dependency from man page build (#81003) (#81024)
* [stable-2.13] Remove docs dir dependency from man page build (#81003)
(cherry picked from commit b3f1290bcd)

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

* Update path in Makefile
2023-06-09 20:29:41 -07:00
2765ab6f28 Remove straight.plugin dependency (#80084) (#81020)
(cherry picked from commit f587856)
2023-06-09 17:03:11 -07:00
bf09febd98 [stable-2.13] ansible-test - local change detection without --fork-point (#79734) (#80901)
(cherry picked from commit a5bb4c7dee)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-05-26 15:57:01 -07:00
c55729d3cd update version switcher for 2.15 (#80792)
Co-authored-by: Sandra McCann <samccann@redhat.com>
2023-05-22 13:10:47 -05:00
2babffb5c5 [stable-2.13] ansible-test - Fix traceback when mixing sources (#80801) (#80830)
* ansible-test - Fix traceback when mixing sources

* ansible-test - Refactor layout error handling.

(cherry picked from commit b16041f1a9)
2023-05-22 10:26:10 -07:00
44605cae72 Update Ansible release version to v2.13.10.post0. (#80864) 2023-05-22 10:25:06 -07:00
d4f0771c9b New release v2.13.10 (#80859) 2023-05-22 10:20:09 -05:00
4d01ecb865 Update Ansible release version to v2.13.10rc1.post0. (#80802) 2023-05-15 15:49:07 -05:00
e69ca3420c New release v2.13.10rc1 (#80797) 2023-05-15 12:34:18 -05:00
1141376de5 [stable-2.13] ansible-test - Fix handling of long timeouts (#80769) (#80774)
(cherry picked from commit aacab0633a)
2023-05-10 20:04:41 -07:00
9ce8eb56be [stable-2.13] ansible-test - Fix timeout handling (#80764). (#80767)
(cherry picked from commit 4c6aa70662)
2023-05-10 20:03:35 -07:00
8f07fda2b5 [stable-2.13] ansible-test - Avoid use of deprecated utcnow (#80750) (#80759)
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:26 -07:00
ab220107d5 ansible-test - Relax pylint config for backports (#80770) 2023-05-10 17:05:26 -07:00
339d42332c [stable-2.13] pep517 backend - Copy symlinks when copying source (#80690) (#80702)
(cherry picked from commit 54576cd794)
2023-05-09 14:26:50 -05:00
7aefdb493b [ansible-galaxy] Fix installing signed collections (#80661) (#80667)
* Fix installing signed collections by using the fqcn, version, source, and type as a unique identifier.

Define __hash__ and __eq__ methods to handle Candidate/Requirement comparison excluding signatures which aren't fully populated until install time.

* Remove PinnedCandidateRequests since it is redundant now.

* Fix verifying against a signed remote when the keyring isn't configured

(cherry picked from commit d5e2e7a0a8)
2023-05-09 14:26:39 -05:00
8bf75b6686 [stable-2.13] Release tool improvements (#80641) (#80681)
* Provide reproducible sdist builds.
* Use reproducible wheel builds.
* Add PyPI artifact checks.

(cherry picked from commit d37678c5ff)
2023-05-01 09:41:14 -07:00
4aa5de7a8b Disable failing incidental_inventory_docker_swarm (#80659)
Also remove remote incidental tests from the test matrix, as this was the last one.
2023-05-01 09:05:37 -07:00
8fb7c10498 [stable-2.13] ansible-test - Use FreeBSD packaged setuptools (#80615) (#80618)
This will avoid issues during bootstrapping caused by breaking changes in setuptools.

(cherry picked from commit abc58c026b)
2023-04-24 13:44:30 -07:00
80c7cff394 Update Ansible release version to v2.13.9.post0. (#80613) 2023-04-24 12:42:02 -05:00
1e80e4319f New release v2.13.9 (#80610) 2023-04-24 10:52:31 -05:00
67a0cf505f Update Ansible release version to v2.13.9rc1.post0. (#80538) 2023-04-17 15:52:50 -05:00
2449b9a09e New release v2.13.9rc1 (#80535) 2023-04-17 14:13:40 -05:00
ae02b5353d password lookup, handle ident properly when saved (#80251) (#80312)
* password lookup, handle ident properly when saved (#80251)

* password lookup, handle ident properly when saved

  Currently we format and save ident when present but we didn't account for this when reading the saved file
  Also added some more robust error handling.

(cherry picked from commit 0fd88717c9)

* fix try indent

* clog

* fix bad merge indentation
2023-04-17 12:26:07 -05:00
261e5b74cc Ansible.Basic - Improve temporary file cleanup process (#80293) (#80325)
* Ansible.Basic - Improve temporary file cleanup process

* Add comment on struct value used

(cherry picked from commit ba4505f5cb)
2023-04-14 14:49:13 -07:00
e267230a6b Improve Ansible.Basic.cs tempdir uniqueness (#80328) (#80330)
* Improve Ansible.Basic.cs tempdir uniqueness

The current tempdir naming scheme can result in the same name if the
remote worker starts at the same time as another. By using the process
id it should add enough uniqueness to avoid this situation.

* Fix sanity issues

* Fix up compile issue on older hosts

(cherry picked from commit fb6b90fe42)
2023-04-14 13:07:45 -07:00
25e77b7c98 Fetch signatures from galaxy after the dependency resolver runs (#80334) (#80399)
Reduce the number of Galaxy API calls made during dependency resolution by fetching remote signatures afterwards, since these are not used in backtracking.

Reduce the verbosity to `-vvvv` (to match other Galaxy API calls) to see this activity.

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
(cherry picked from commit 460abe0cef)
2023-04-14 13:07:11 -07:00
dab3640527 [stable-2.13] ansible-galaxy collection install retry improvements (#80180) (#80275)
* clog frag

* Fix retries so that each explicit call to _call_galaxy is retried for the correct number of attempts. Fixes #80174

* Extend retry logic to common URL related connection errors. Fixes #80170

* Extend retries to downloading artifacts

* Extend param docs for change

* Rework the exception handling

* Don't be overly broad, reduce to TimeoutError, and BadStatusLine for now

* _download_file needs to raise AnsibleError.orig_exc

* Remove unused import

* Add IncompleteRead

* Add socket.timeout for py39

* Add 502 to retry codes

* Move http error code checking first

* Use itertools.tee to replay the backoff_iterator instead of using a callable

* Actually set a CLI default of 60s for timeout, to prevent implicit galaxy from using 10s as default from Request.open

* Import typing

* fix type hints

* Use http.HTTPStatus instead of int HTTP error codes where feasible

* Split exception handling



* Add missing import

---------

.
(cherry picked from commit 2ae013667e)
2023-04-12 15:13:45 -05:00
2e50a9e482 [stable-2.13] pep517 backend - Use correct import_module import (#80480) (#80503)
(cherry picked from commit e87802cf2c)
2023-04-12 10:25:58 -07:00
af1cbc9bb6 [stable-2.13] ansible-test - Add support for argcomplete 3 (#80482) (#80486)
(cherry picked from commit 0371ea08d6)
2023-04-11 13:31:52 -07:00
ef0924883b [stable-2.13] ansible-test - Fix packaging change classification (#80360). (#80362)
(cherry picked from commit 5d64024f1a)
2023-03-29 19:25:12 -07:00
18d6ae1e1f Fix entry_points integration test for PEP 517 (#80357)
This patch pre-builds the sdist via build using the self-eliminating
in-tree build backend and then, feeds the result to a pottentially
outdated pip (below v20) so that it uses the setuptools' native
PEP 517 build backend to build a wheel on install.
2023-03-29 15:58:14 -07:00
77d221c0ac [backport-2.13] 📦 Integrate manpage builds into PEP 517 build backend (#80130)
This change includes backports of the PRs #79606, #80098, #80253, #80255 and #80262, with a number of backward compatibility changes that make it work and be testable in older CI environments.

This patch creates a thin wrapper around the `setuptools`' PEP 517 build backend in-tree. It features an ability to request generating the manpage files in-memory, in the process of building a source distribution. The build is happening in an isolated temporary directory. This toggle is implemented using the `config_settings` mechanism of PEP 517.
One must explicitly pass it a CLI option to the build front-end to trigger said behavior. The packagers are expected to use the following call:

    python -m build --config-setting=--build-manpages

This option has no effect on building wheels.

🧪 The change includes integration tests

This test runs building and re-building sdists and wheels with and without the `--build-manpages` config setting under the oldest-supported and new `setuptools` pinned.

It is intended to preserve the interoperability of the packaging setup across Python runtimes.

An extra smoke test also verifies that non PEP 517 interfaces remain functional.

📦 The sdist build-system is switched to pure setuptools upon the first build from Git checkout

This patch modifies the in-tree build backend to build sdists that swap
out pointers to it in the `pyproject.toml`'s `[build-system]` section.

The effect of this is that the first build from source (for example,
from a Git checkout) uses our PEP 517 in-tree build backend. But the
produced tarball has `build-backend` set to `setuptools.build_meta`
which is the native build backend of `setuptools`. So any following
builds from that sdist will skip using the in-tree build backend,
calling the setuptools' one.
The good news is that if the first build generated the manpages, they
will be included and won't go anywhere even though, a different build
system is in place.

Combined with #80253, this makes sure not to modify the current
source checkout on that first build.

Co-Authored-By: Matt Clay <matt@mystile.com>
Co-Authored-By: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

(cherry picked from commit 56036013cd)
(cherry picked from commit 67bafafbc0)
(cherry picked from commit 888abf5d6e)
(cherry picked from commit 7097df3eed)
(cherry picked from commit eebfd71a6d)
2023-03-28 17:14:07 -07:00
e9603d233c [2.13] ansible-doc: fix broken seealso links in text output (#80286)
* ansible-doc: fix broken seealso links in text output (#80280)

* Fix broken URLs.

* Also remove auto-generated description for modules outside ansible.builtin.

(cherry picked from commit fafb23094e)

* Fix URL processing. (#80295)

(cherry picked from commit 086ae42209)
2023-03-28 11:06:58 -07:00
c6e717cdf0 [stable-2.13] New upstream release tool (#80179) (#80322)
(cherry picked from commit a6bfa82bd0)
2023-03-27 13:38:24 -07:00
ff3f06a8c4 [stable-2.13] Use variable instead of container resource in AZP (#80299) (#80317)
(cherry picked from commit 93d0253292)
2023-03-27 12:42:24 -07:00
6e6b6f1a55 [stable-2.13] Fix url lookup test to use test container (#80284) (#80288)
(cherry picked from commit 054aa92158)
2023-03-23 14:26:37 -07:00
a35e8015e5 [stable-2.13] 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:23 -07:00
8cc8aa268d [stable-2.13] 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:50:24 -07:00
130fbe8ba5 [stable-2.13] ansible-test - Remove pointless comparison (#80168)
(cherry picked from commit 31658031ed)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-03-14 17:50:13 -07:00
a5d7c73cc9 [stable-2.13] 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:50:02 -07:00
ef5842798d [stable-2.13] 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:49:52 -07:00
866d91bb7d [stable-2.13] 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:49:41 -07:00
8e2148943b [stable-2.13] ansible-test - Fix file permissions for delegation (#80204)
* [stable-2.13] 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)

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

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

(cherry picked from commit 0793833847)

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-14 15:56:21 -07:00
15e9438b06 [stable-2.13] ansible-test - Fix pylint error with old home dir (#80151) (#80153)
* [stable-2.13] 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:00:52 -08:00
74ea1b8f85 [stable-2.13] Fix MANIFEST.in includes (#80147) (#80149)
(cherry picked from commit 7c62cdeecd)
2023-03-06 15:59:05 -08:00
6cffa10de0 [stable-2.13] Do not use hardcoded httpbin.org in uri tests (#80101) (#80103)
(cherry picked from commit 060a27f)
2023-02-28 14:58:53 -06:00
ff17c23359 Update Ansible release version to v2.13.8.post0. (#80099) 2023-02-27 19:21:40 -05:00
009089d4c5 New release v2.13.8 (#80082) 2023-02-27 10:00:06 -05:00
65376df2bd Update Ansible release version to v2.13.8rc1.post0. (#80042) 2023-02-20 11:16:39 -05:00
4deb8bc4c5 New release v2.13.8rc1 (#80028) 2023-02-20 09:59:34 -05:00
d5fd83265d [2.13] don't ignore templated _raw_params that k=v parser failed to parse (#79913) (#79965)
* don't ignore templated _raw_params that k=v parser failed to parse (#79913)

fixes #79862

* backport test changes
2023-02-15 13:34:54 -06:00
344230fca5 [stable-2.13] 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:13 -08:00
695d3c7927 Bump acme test container. (#79783) (#79815)
(cherry picked from commit 5fb8bc3ddb)
2023-02-10 14:58:14 -08:00
696b7936a9 [stable-2.13] ansible-test - Specify config path in plugin error (#79881) (#79978)
(cherry picked from commit d48d1c23df)
2023-02-10 14:56:54 -08:00
522019c317 [stable-2.13] ansible-test - fix warning to include image name (#79560) (#79974)
(cherry picked from commit 0a12d8a5bc)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2023-02-10 14:55:36 -08:00
63429138d9 [stable-2.13] Ansible.Basic.cs - Fix compile error on PS 7.3.x (#79848) (#79851)
(cherry picked from commit 83fe75db07)
2023-02-02 16:24:13 -08:00
df0e58f20b [stable-2.13] Remove outdated note on relative imports in docs (#79873) (#79876)
(cherry picked from commit 58461bc204)
2023-02-02 16:08:48 -08:00
e12ff0a734 Document callback types in documentation (#79651) (#79654)
(cherry picked from commit 51bddd862b)
2023-01-18 15:32:56 -06:00
2e541a5450 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:27 -08:00
7e7908a3e1 Remove redundant RHEL extras setup. 2023-01-04 17:52:59 -08:00
a76adbccca [stable-2.13] 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:52:59 -08:00
9e3363f8b7 [stable-2.13] 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)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-12-15 20:35:33 -08:00
e6ac16674c [stable-2.13] Add more retries to ansible-test-container test.
(cherry picked from commit f6c0e22f98)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-12-14 15:56:08 -08:00
55a198da11 [stable-2.13] ansible-test - Support RSA SHA-1 for SSH clients..
(cherry picked from commit 75b60b17ee)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-12-14 12:43:29 -08:00
862047cafd Ansible 6 is EOL (#79555) 2022-12-13 16:47:27 -06:00
ad59db8256 [stable-2.13] 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)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-12-12 13:59:29 -08:00
7783c9b1ee [stable-2.13] ansible-test - Fix target PyPI proxy config..
(cherry picked from commit dcc08eec35)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-12-12 12:17:10 -08:00
000f3244a4 [stable-2.13] 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:06 -08:00
1d7436935f [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.
2022-12-06 14:29:45 -08:00
0dfd6c868e [stable-2.13] Fix file touch check mode result (backport of #79422) (#79526)
* Fix file touch check mode result (#79360) (#79422)

Fixes #79360

(cherry picked from commit 3936b5c471)

* Rename changelog fragment according to PR number
2022-12-06 14:27:17 -08:00
03233e676a [backport][2.13][PRs #78402 #79289] Enable the reboot integration test in CI (#79491)
* 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:26:46 -08:00
5a2e551999 Set explicit meta long_description_content_type (#79468) (#79487)
This is necessary for `twine check --strict` to pass.

(cherry picked from commit 80551633c7)
2022-12-06 14:26:25 -08:00
84695c9158 [stable-2.13] 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:42 -08:00
f039a1d229 Update Ansible release version to v2.13.7.post0. (#79529) 2022-12-05 19:00:52 +01:00
fbefd45600 New release v2.13.7 (#79528) 2022-12-05 17:40:35 +01:00
c91c4d6fa5 Update Ansible release version to v2.13.7rc1.post0. (#79494) 2022-11-28 16:32:17 -05:00
8faeed30f9 New release v2.13.7rc1 (#79477) 2022-11-28 15:56:49 +01:00
ea9b9716f0 [stable-2.13] 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:05 -08:00
5f6537b644 file lookup now works with general lookup error framework (#79339) (#79388)
* file lookup now works with general lookup error framework

(cherry picked from commit 3448fcabc5)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2022-11-16 12:36:36 -06:00
fd63b2f306 Fix typo 'Ansbile'. (#79318) (#79331)
(cherry picked from commit 2a03c8028e)
2022-11-10 15:48:36 -08:00
63c8719a76 Add Ansible community 6.6.0 porting guide (#79340) (#79349)
(cherry picked from commit d5e90e1737)

Co-authored-by: Christian Adams <chadams@redhat.com>
2022-11-08 16:39:15 -08:00
fd9dd09377 Japanese version switcher (#79276) (#79345)
* update japanese version switcher for 2.14

* update latest version

(cherry picked from commit 196084773b)
2022-11-08 16:37:56 -08:00
b80680559a update version switcher to include 2.14 (#79273) (#79326)
(cherry picked from commit d0b6ce7473)
2022-11-07 09:16:20 -08:00
90f389c11b Update Ansible release version to v2.13.6.post0. (#79323) 2022-11-07 10:30:26 -05:00
b14bbf1c11 New release v2.13.6 (#79315) 2022-11-07 09:22:29 -05:00
99ff446a3b [2.13] Log runme.sh execution in integration tests (#79283)
* 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:29 -07:00
53f2ef7774 [stable-2.13] 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:06 -07:00
33852737fd Update Ansible release version to v2.13.6rc1.post0. (#79261) 2022-10-31 16:16:37 +01:00
485a9e9c9d New release v2.13.6rc1 (#79258) 2022-10-31 14:32:58 +01:00
cb6e106d7d File lookup handle missing file more gracefully (#79230) (#79245)
previously it would have a 2nd tb due to bad error raising
 also remove superfluous warning

(cherry picked from commit aaab0791d9)
2022-10-28 16:18:24 -07:00
25f8b9829d mention acl in permissions errors (#79209) (#79251)
as chmod/mode is not the only thing we attempt and Ubuntu not shipping acl
  in newer versions can lead to some confusion

  fixes #79146

(cherry picked from commit 0f18ddca9f)
2022-10-28 16:17:13 -07:00
5c8928fa44 stable docs build: do not use YAML parsing/serialization for .deps files (#79233) (#79237)
* Do not use YAML parsing/serialization for .deps files.

* Prevent crash.

(cherry picked from commit 9545f2e0de)
2022-10-27 13:07:27 -05:00
b6a24d0031 Communication docs: note that editing Matrix messages causes IRC spam (#79238) (#79241)
(cherry picked from commit bc83da9a1b)
2022-10-27 13:07:13 -05:00
e0d20bc478 [stable-2.13] Don't assume column index for netmask and broadcast (#79121) (#79133)
* Don't assume column index for netmask and broadcast. Fixes #79117

* fix typo
(cherry picked from commit f53dbf9)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-10-26 16:07:29 -05:00
1a583e3c0d [stable-2.13] Use python re to parse service output instead of grep (#79015) (#79051)
* Use python re to parse service output instead of grep. Fixes #78541

* Add clog frag

* Add an extra guard to abort if rc is 4, and /etc/init.d is missing
(cherry picked from commit 4458128)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-10-26 16:06:43 -05:00
65fd4e182b [2.13] ansible-galaxy - fix unnecessary api check when installing role (#79143)
* ansible-galaxy install - fix unnecessary api check when installing a role from git repo (#79090)

* delay server api evaluation until a GalaxyRole needs to make an api call for info, list, and install

(cherry picked from commit cb2e434dd2)

* fix type for older python

* Fix isinstance check (#79159)

Use GalaxyAPI for isinstance check instead of RoleDistributionServer, since the latter is defined in __main__ sometimes (when running integration tests or ansible-galaxy from source) and importing from ansible.cli.galaxy won't reference the same object.

(cherry picked from commit 89d682464b)
2022-10-26 16:05:17 -05:00
a5480c330d copy, avoid moving non temp remote 'non' files (#79102) (#79155)
* copy, avoid moving non temp remote files that are not dirs/files
fix tests

(cherry picked from commit f66016df0e)
2022-10-26 16:05:03 -05:00
5dd04e54a8 fix password lookup's use of f=v settings (#76551) (#79108)
* fix password lookup's  use of f=v settings (#76551)

update tests

(cherry picked from commit 5d253a1380)

* fix password unit tests (#79113)

(cherry picked from commit c4d6629bce)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-10-26 14:09:46 -05:00
a61016fb97 [stable-2.13] 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:03:26 -07:00
2d6747bcbf [stable-2.13] 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 16:19:23 -07:00
b44cb7aa99 remove AnsibleFest banner (#79156) (#79158) 2022-10-18 09:13:27 -05:00
7e85f94349 Add Ansible community 6.5.0 porting guide (#79124)
Co-authored-by: Ansible Service Account <chadams@redhat.com>
2022-10-12 17:20:33 -04:00
be95a3a8ad Update Ansible release version to v2.13.5.post0. (#79099) 2022-10-11 10:51:55 -04:00
09cf0ed123 New release v2.13.5 (#79075) 2022-10-10 10:27:11 -04:00
dcc60165d1 Update Ansible release version to v2.13.5rc1.post0. (#78995) 2022-10-03 15:20:03 -05:00
2935773482 New release v2.13.5rc1 (#78937) 2022-10-03 11:53:54 -04:00
43cfdf3822 apt module, prevent tb from invalid type for pkg (#78666) (#78908)
* apt module, prevent tb from invalid type for pkg

 see #78663

(cherry picked from commit 7acd4f75c0)
2022-09-29 16:57:40 -07:00
1a7f3b403c [stable-2.13] Add ssh_args and friends back, add var for proxy_command (#78826) (#78837)
* [stable-2.13] 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:56:13 -07:00
45abd5b685 [2.13] apt - fix failure when package is not installed and only_upgrade=True (#78791)
* apt - fix failure when package is not installed and only_upgrade=True (#78781)

* apt - fix module failure when package is not installed and only_upgrade is True

* changelog

(cherry picked from commit 4b45b4b09d)

* apt - fix module short-circuiting when a package is not installed and only_upgrade is True

(cherry picked from commit 14f46845f9)
2022-09-29 16:55:51 -07:00
551ddebeab [2.13] Limit Galaxy API calls during ansible-galaxy dependency resolution (#78722)
* Limit Galaxy API calls during ansible-galaxy collection dependency resolution when possible

Installing a tarfile with a dependency from a Galaxy server (e.g. dependencies: {'ns.coll': '>=1.0.0'}) does not get the available versions of the dependency from the galaxy server if a sufficient version is already installed.

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit 41b62f7db4)
2022-09-28 09:12:30 -05:00
00d60a45fa [stable 2.13] Fix known host changed status when removing non-existing key #78598 (#78878)
* Fix known_hosts changed status when removing non-existing key (#78748)

* Ensure no change is reported when removing missing key for host with other keys

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

* Add changelog for fix known hosts wrong changed status cherry pick

* Remove old changelog for fix known hosts wrong changed status

* Rename changelog according to PR number

Co-authored-by: Matt Martz <matt@sivel.net>
2022-09-28 08:16:57 -05:00
0d188114c6 plugin loader fix existing config testing (#78859) (#78890)
create specific function to find config entry to avoid repopulating constantly

(cherry picked from commit 4115ddd135)
2022-09-28 08:16:40 -05:00
fa0655228a [stable-2.13] 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)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-09-22 13:38:19 -07:00
cd58c50b97 [stable-2.13] Don't request repo updates when only testing modes (#78843) (#78849)
(cherry picked from commit 2542048)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-09-21 15:24:52 -07:00
e69c1812c9 Backportapalooza 9 15 (#78787)
* add galaxy docs back to core' (#78764)

(cherry picked from commit df6a564abd)

* Ansible 6.4.0: Porting Guide (#78775)

(cherry picked from commit d4407ca688)

* Documented connection parameters required to enable scp (OpenSSH >=9.0) (#78745)

(cherry picked from commit 952ee88f33)

* Fix Issue #78564 (#78741)

(cherry picked from commit f50ff1c2db)

* faq legacy vs builtin (#78769)

(cherry picked from commit db33ca8e1a)

* Removed repeated introduction paragraph (#78691)

(cherry picked from commit e276770ee9)

Co-authored-by: Ompragash Viswanathan <21008429+Ompragash@users.noreply.github.com>
Co-authored-by: wnjuguna <jbworldus@gmail.com>
Co-authored-by: Ronan <ronandoudies@gmail.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2022-09-15 14:40:55 -05:00
811d05e1ba Update Ansible release version to v2.13.4.post0. (#78753) 2022-09-12 15:17:26 -04:00
faa7be50e1 New release v2.13.4 (#78751) 2022-09-12 13:45:14 -04:00
ba18134ad8 Update Ansible release version to v2.13.4rc1.post0. (#78718) 2022-09-06 14:03:23 -04:00
c31541a3c9 New release v2.13.4rc1 (#78717) 2022-09-06 12:41:01 -04:00
2e760f6bda Fix typos in stat module examples (#78651) (#78687)
(cherry picked from commit 38c3b5e8f1)

Co-authored-by: NitrogenPointBlue <110332643+NitrogenPointBlue@users.noreply.github.com>
2022-09-01 14:36:31 -05:00
770a4a35d6 new: documentation update for galaxy usr guide (#78649) (#78688)
Co-authored-by: Adrian Brown <ap.brown011@gmail.com>
2022-09-01 14:36:20 -05:00
c51c5f97a4 [stable-2.13] Guard urllib3 imports against all exceptions. Fixes #78648 (#78667) (#78672)
(cherry picked from commit f8e24e4)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-08-31 15:45:56 -07:00
9917b9f9f9 [stable-2.13] wait_for - Read file and perform comparisons using bytes to avoid decode errors (#78317) (#78660)
* wait_for - Read file and perform comparisons using bytes to avoid decode errors. Fixes #78214

* Write non-ascii via script instead of static file

* Use contexlib.closing to support py27 context manager

* Use executable from task, instead of shebang

* Update encoded bytes to utf16
(cherry picked from commit 9d4ced1)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-08-31 15:44:42 -07:00
96d0053925 Fix pytest collection during test_host partial run (#78594)
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:43:12 -07:00
6b77033d63 [stable-2.13] Fix exit codes for role search and delete. Fixes #78516 (#78578) (#78583)
(cherry picked from commit 4c8b8a0)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-08-31 15:42:37 -07:00
1cef724544 [stable-2.13] Fix --role-file arg detection (#78475) (#78522)
* Fix --role-file arg detection. Fixes #78204

* Do not traceback, give better error

* Add coverage for compound shortopts to match -r. Fixes #78491
(cherry picked from commit 86298b7)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-08-31 15:42:11 -07:00
47d34ce582 Fail fast in stuck ansible-galaxy-collection (#78627)
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:23:14 -05:00
f75ecde228 Replace get_persistent_connection_options in task_executor with get_options (#74446) (#78590)
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:22:59 -05:00
702eadf21b Fix apt making changes in check mode (#78496) (#78530)
* Don't actually update the cache in check mode

Add tests for updating the cache in check mode

* Don't mark packages as manually installed in check mode and add a test for it

* changelog

* Update test/integration/targets/apt/tasks/apt.yml

* fix test

(cherry picked from commit 3add5e9321)
2022-08-31 12:22:47 -05:00
b2553d162d apt: include apt preferences (e.g. pinning) when selecting packages (#78327) (#78462)
Fixes #77969

(cherry picked from commit 04e8927579)

Co-authored-by: Patrick Hemmer <phemmer@users.noreply.github.com>
2022-08-31 12:22:32 -05:00
046c59d851 Filter on any Fedora-Cloud-Base image (#78669) 2022-08-30 12:16:39 -07:00
a55ffb8d17 Backportapalooza 08 25 (#78647)
* fix adhoc dev example (#78593)

(cherry picked from commit 5ac40b358d)

* Docs: fix issue-76133-apt-repository (#78586)

(cherry picked from commit 3b9f1871e5)

* Fixes parameter name in expect module examples (#78635)

(cherry picked from commit 81813b7f23)

* doc: Correct mixed up commentary and task name (#78610)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit 87ba1e29d3)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Arnold Kamanzi <kamstan6@gmail.com>
Co-authored-by: gmdmi <gmdmi@ya.ru>
Co-authored-by: rawtaz <rawtaz@users.noreply.github.com>
2022-08-25 13:33:03 -07:00
8071f014f6 [2.13] Disable connection_paramiko_ssh under FreeBSD 13.0 (#78643) 2022-08-25 13:12:37 -07:00
6f6e38feaf Add Porting Guide for ansible-community v6 (#78625) (#78631)
(cherry picked from commit df497ea13b)

Co-authored-by: Christian Adams <chadams@redhat.com>
2022-08-24 09:39:27 -05:00
45b064f3fd [stable-2.13] Fix file integration test chattr/lsattr check. (#78614) (#78618)
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:02 -07:00
fe60c4eb08 Backportapalooza 08 16 (#78584)
* Supply some descriptions for settings used in ansible.cfg (#78536)

(cherry picked from commit 4604ea38dd)

* Targeting a small typo correction (#78531)

(cherry picked from commit b6f42547f4)

* clarify collection signature not available from Community Galaxy (#78386)

(cherry picked from commit 7ae1eabaa4)

* update FAQ with not about libyaml (#78483)

(cherry picked from commit 33ee5d4c1b)

* add note to use package_facts module (#78484)

(cherry picked from commit 8dc097989b)

* Fix ansible-docs: shipping ansible in wheel format  #78485 (#78524)

(cherry picked from commit 7f69629fa7)

* update link for RH customers in docs banner (#78563)

(cherry picked from commit 2fdaee143a)

Co-authored-by: Andrew Latham <lathama@users.noreply.github.com>
Co-authored-by: Ian Wienand <iwienand@redhat.com>
Co-authored-by: Arnold Kamanzi <kamstan6@gmail.com>
2022-08-19 10:24:15 -07:00
e97c2cd178 Fix version switcher for Japanese site (#78543)
* Fix version switcher for Japanese docs (#78432)

(cherry picked from commit 660aceaa77)

* update version to match branch
2022-08-19 10:17:18 -07:00
e03527e722 Backportapalooza 08 11 (#78526)
* update the documentation for the _collection init_ command (#78404)

(cherry picked from commit 69c7e3f4a3)

* fix configuration name in porting guide 2.12  (#78472)

(cherry picked from commit 82246df5b7)

* docs: misc fixes in The Ansible Development Cycle (#78513)

(cherry picked from commit 0d3523df8f)

Co-authored-by: Alex <aizquier@redhat.com>
Co-authored-by: Akira Yokochi <akira6592@gmail.com>
2022-08-19 10:16:48 -07:00
fd1935048c Update mypy test. Fix type hints for Python 3.9. (#78587)
This also bumps the minimum controller version (for mypy only) to Python 3.9.

(cherry picked from commit cc5ac88c4c)
2022-08-19 10:05:43 -07:00
d6b40a5bc6 [stable-2.13] ansible-test - Fix ansible-doc sanity test FQCN. (#78518). (#78519)
(cherry picked from commit 2b63fdd1b8)
2022-08-15 14:47:44 -07:00
9ec6e331bf [stable-2.13] ansible-test - Fix self-test change handling. (#78521) (#78523)
(cherry picked from commit 99016653a2)
2022-08-15 14:47:30 -07:00
bb675432b2 Update Ansible release version to v2.13.3.post0. (#78547) 2022-08-15 16:13:15 -04:00
c1bb0c6ab8 New release v2.13.3 (#78527) 2022-08-15 14:03:26 -04:00
4e0f81a01f Update Ansible release version to v2.13.3rc1.post0. (#78476) 2022-08-08 14:18:36 -04:00
00c3da9d51 New release v2.13.3rc1 (#78470) 2022-08-08 11:34:22 -04:00
7a24541d18 Backportapalooza 08 04 (#78450)
* fix broken link (#78434)

(cherry picked from commit eb46ab1399)

* Fix escaped asterisk in code block demonstrating wildcards (#78375)

The code block is rendered verbatim. This currently results in `\*` being shown, which is incorrect (i.e., not parsed as a wildcard pattern).
Removing the superfluous `\` fixes the rendering.
This PR fixes all instances of this issue on that page.

(cherry picked from commit 9bf5da8f75)

* add example to import a playbook from collection (#78443)

(cherry picked from commit eb462edb16)

* docs: Fix control node reference links (#78424)

(cherry picked from commit f5cac6bc5d)

* Update galaxy_server_list (#78398)

(cherry picked from commit d92f6da592)

* Improve grammar (#78391)

(cherry picked from commit ddd8b8bfd9)

Co-authored-by: Tom Janson <priv.tom.janson@gmail.com>
Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
Co-authored-by: Ian Wienand <iwienand@redhat.com>
Co-authored-by: Tabah Baridule <dulemartins07@gmail.com>
Co-authored-by: Geoffrey van Wyk <geoffrey@vanwyk.biz>
2022-08-04 15:48:41 -05:00
b2481eb158 Module/plugin docs: (#78380) (#78447)
(cherry picked from commit 7e634f54c3)
2022-08-04 15:48:18 -05:00
a2984758dc [2.13] Add basic docs on how to create a collection docsite with antsibull-docs (#78446)
* Add basic docs on how to create a collection docsite with antsibull-docs. (#78387)

(cherry picked from commit 733a767948)

* Fix typo: missing 'install'. (#78448)

(cherry picked from commit 2218b63aef)
2022-08-04 15:47:59 -05:00
775cf85491 Fix default value documentation for pipelining. (#78441) (#78445)
(cherry picked from commit 51f94570a6)
2022-08-04 15:47:38 -05:00
2efb33d200 Fix listing collections that are missing the metadata required by build (#76596) (#78411)
* Rethread pr/70185 through the dependency resolver

Hang optional metadata toggle on the ConcreteArtifactsManager instead of threading it through whole list codepath

Don't error while listing collections if a collection's metadata is missing keys required for building a collection.

Give an informative warning if metadata has been badly formatted.

Co-authored-by: Sam Doran <sdoran@redhat.com>
(cherry picked from commit 05608b20e8)
2022-08-03 11:20:58 -07:00
253c30441b Fix removing existing dir/files with ansible-galaxy collection init --force (#78403) (#78412)
* Remove collection contents when re-initializing with --force

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

(cherry picked from commit a2174fc6d9)
2022-08-03 10:33:01 -07:00
d6555399b8 [ansible-galaxy] Fix listing collections with null namespace/name/version metadata (#77014) (#78410)
* Fall back to implicit namespace.name from the path if the metadata is invalid

* Test listing a collection with null namespace/name/version fields in its galaxy.yml

(cherry picked from commit f8ec660e62)
2022-08-03 10:32:08 -07:00
ced2b93697 config error origin (#78407) (#78409)
(cherry picked from commit 9b79d6ba35)
2022-08-03 10:31:19 -07:00
f6fcb56695 [stable-2.13] swallow all exceptions in type annotation support shim imports (#77860) (#78373)
* swallow all exceptions in type annotation support shim imports

* add changelog
(cherry picked from commit 813afcb)

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2022-08-03 10:30:23 -07:00
ff4bb5500a PluginLoader now installs module-to-be-imported in sys.modules before exec (as Python import does). (#78364) (#78367)
(cherry picked from commit 1368bfa348)
2022-08-03 10:29:51 -07:00
426e4899a3 [stable-2.13] ansible-test - Parse content config only once. (#78418) (#78426)
(cherry picked from commit f2abfc4b3d)
2022-08-03 10:11:22 -07:00
cbec27fefc chmod aix errors with 255 is not unreachable (#78249) (#78356)
* chmod aix errors with 255 is not unreachable

  fixes #78210

* added another 'aix chmod msg'
check stderr also

(cherry picked from commit c135a47f44)
2022-08-03 09:59:53 -07:00
2aa3cc9e40 2.13: template module/lookup: fix convert_data for macros (#78259) (#78269)
* template module/lookup: fix convert_data for macros (#78259)

Fixes #78141

(cherry picked from commit 9afdb7fec1)

* Fix templating nested vars with convert_data=False (#78273)

Regression introduced in #78259.

(cherry picked from commit d070b03ad8)
2022-08-03 09:58:19 -07:00
bf1e031eb2 honor use_proxy parameter (#77312) (#78261)
* honor use_proxy parameter
* fix uri test with "use_proxy: no"
* fix urls.py module

Co-authored-by: Carlos <Juan.Carlos.Cardenas.Viera@ibm.com>
(cherry picked from commit 1d9c68d27e)

Co-authored-by: h4rr21 <juankchess13@hotmail.com>
2022-08-03 09:56:22 -07:00
fc82d215a6 yum: fix releasever for latest (#78066) (#78242)
Fixes #78058

(cherry picked from commit 2bc2153c01)
2022-08-03 09:54:24 -07:00
63f6fa0714 dnf: fix output parsing on non-English LANGUAGE systems (#78233) (#78241)
Fixes #78193

(cherry picked from commit 630616103e)
2022-08-03 09:53:42 -07:00
31db1a3a11 Decode vaulted args before sending over ansible-connection. (#78236) (#78246)
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:56:40 -05:00
70e5673319 [stable-2.13] Fix KeyError for ansible-galaxy when caching paginated responses from v3 (#78325) (#78405)
* 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:56:25 -05:00
b095367eab Ansible 6.2.0: porting_guide changes (#78408) (#78416)
(cherry picked from commit 27ce607a14)

Co-authored-by: Ompragash Viswanathan <21008429+Ompragash@users.noreply.github.com>
2022-08-02 15:18:43 -05:00
a290e187cc Docs Backportapalooza (#78379)
* Add missing colon to a snippet in complex data doc (#78349)

(cherry picked from commit e4087baa83)

* update the out-of-date ansible-test sanity ignores (#78342)

(cherry picked from commit 0f688f07af)

* Update information on the Intro_patterns.rst (#78192)

(cherry picked from commit 85bc2bcfcd)

* add note about permission change (#78128)

(cherry picked from commit b6ec06ab25)

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
Co-authored-by: Muhammad Rafly Andrianza <luphieanza@gmail.com>
Co-authored-by: Tabah Baridule <dulemartins07@gmail.com>
2022-07-30 13:18:43 -07:00
e81bca3634 update Fest url per marketing (#78361) (#78363)
(cherry picked from commit eba15885cf)
2022-07-30 13:18:14 -07:00
24359537bb [stable-2.13] ansible-test - Fix TTY and output handling. (#78350).
(cherry picked from commit a3c90dd0bc)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-07-27 11:34:58 -07:00
4bb1907084 [stable-2.13] 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:41 -07:00
e806c4e64d [stable-2.13] Refactor ansible-test integration tests. (#78168) (#78362)
* 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)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-07-27 10:43:13 -07:00
8f96331f4c Backportapalooza 07 21 (#78326)
* Update cheetsheet to fix meaning of -k (#78271)

(cherry picked from commit 691dde645c)

* Add note about package managers (#78260)

(cherry picked from commit fedd386998)

* dnf: clarify comparison operators in docs (#78316)

Fixes #78295

(cherry picked from commit b0a84cc9ca)

* Fix minor typos (#78294)

Signed-off-by: Hu Shuai <hus.fnst@fujitsu.com>
(cherry picked from commit fd810e88d6)

* Add cli docs for interacting with gpg for collection signing (#78321)

Co-authored-by: Jan-Piet Mens <jp@mens.de>
Co-authored-by: Desmond Obisi <51109125+DesmondSanctity@users.noreply.github.com>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
Co-authored-by: Hu Shuai <hus.fnst@fujitsu.com>
Co-authored-by: Matt Martz <matt@sivel.net>
2022-07-21 14:01:38 -07:00
b6fc894010 add AnsibleFest 2022 registration banner (#78291) (#78309)
(cherry picked from commit 5e74693215)
2022-07-21 13:57:48 -07:00
3cffcfda9b Drop custom repo from libuser install @ Alpine CI (#78305) (#78306)
`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:19:55 -07:00
591f39b6e0 Documentation: Update japanese translation (#78292)
* Documentation: Update japanese translation

* Replace MySQL by Ansible where it was mistakenly translated

Co-authored-by: Sandra McCann <samccann@redhat.com>
2022-07-19 14:10:48 -05:00
0f986325bb Update Ansible release version to v2.13.2.post0. (#78290) 2022-07-18 12:05:14 -04:00
0863427230 New release v2.13.2 (#78276) 2022-07-18 10:48:41 -04:00
5d8bf08e06 Backportapalooza 7 15 (#78277)
* Pr 72292- Add context to inventory plugins (#78070)

* Add context to inventory plugins documentation

* Show how to add the inventory plugin to the `enable_plugins` configuration item - not just replace it.
* Show adding tags to `keyed_groups` without specifying the separator.
* Show adding more complex `groups` and `compose` statements, including using the ternary filter.
* As I added an additional group, I've updated the resulting `ansible-inventory` output accordingly.

(cherry picked from commit a77fc2e822)

* Update dpkg_selections.py (#78177)

* Update dpkg_selections.py to include an syntax example showing how to remove package holds

* Fix pep8 issue: dpkg_selections.py

Missed some trailing spaces when adding example text.

(cherry picked from commit 489b7f1859)

* fix ternary problem (#78186)

(cherry picked from commit 7ec8916097)

* documentation: become plugins: correct pluralization in description (#78196)

fixes #78195

(cherry picked from commit e10851d495)

* Update python_3_support.rst (#78239)

Fix invalid characters warning when using example group names. (Replace dashes in example group name with underscores.)

(cherry picked from commit be88250a83)

* Adding applicable licensing requirements (#78162)

(cherry picked from commit 6ddccc1604)

* Document choice to use Ansible Project in copyright lines (#78164)

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

* stat only returns pw_name/gr_name if those can be looked up (#78183)

(cherry picked from commit 221af7640d)

* example showing how to deal with keys w/o apt_key (#78206)

(cherry picked from commit 0590ce065c)

* Migrate vmware.vmware_rest Dev Guide to collection (#78255)

(cherry picked from commit 048adac5b7)

* Updated release_and_maintenance.rst (#78272)

(cherry picked from commit 358a8ad7af)

Co-authored-by: Micah Beasley <MBfromOK@users.noreply.github.com>
Co-authored-by: Alex Willmer <alex@moreati.org.uk>
Co-authored-by: Nathan Hyde <nathanhyde@gmail.com>
Co-authored-by: Desmond Obisi <51109125+DesmondSanctity@users.noreply.github.com>
Co-authored-by: Evgeni Golov <evgeni@golov.de>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Mario Lenz <m@riolenz.de>
Co-authored-by: Ompragash Viswanathan <21008429+Ompragash@users.noreply.github.com>
2022-07-15 13:36:34 -07:00
4b9434788b Ansible 6.1.0: Updated porting_guide_6.rst (#78245) (#78250)
(cherry picked from commit 3658c26ad4)

Co-authored-by: Ompragash Viswanathan <21008429+Ompragash@users.noreply.github.com>
2022-07-12 12:41:04 -07:00
5bc6adf2c2 Update Ansible release version to v2.13.2rc1.post0. (#78238) 2022-07-11 16:15:31 -04:00
a689972b56 New release v2.13.2rc1 (#78229) 2022-07-11 11:08:29 -04:00
69562a8db6 Fix wording for :ref|term: substitution (#78216) (#78221)
* Fix workding for :ref|term: subsitution

 now matches 'seealso' and makes more sense:

  ```
  delay:
  applies_to:
  - Task
  description: Number of seconds to delay between retries. This setting is only used
    in combination with `until`.
  ```
 vs
  ```
  delay:
  applies_to:
  - Task
  description: Number of seconds to delay between retries. This setting is only used
    in combination with website for `until`.
  ```

* updated unit tests

* match see also

* more sanity

(cherry picked from commit d26801e994)
2022-07-07 16:49:49 -05:00
357ca6394e Ensure atomic writes for cache file (#78208) (#78217)
* Ensure atomic writes for cache file

 helps avoid errors in highly concurrent environments

(cherry picked from commit f6419a53f6)
2022-07-07 16:49:34 -05:00
3ef4609bca password lookup argument parsing fix (#78080) (#78102)
fixes #78079

(cherry picked from commit cea18bf60a)
2022-07-06 12:54:22 -05:00
bdeeaa528d Fix 'Permission denied' in user module while generating SSH keys (#78040) (#78054)
* Fix 'Permission denied' in user module while generating SSH keys

Fix #78017
Use try/except for spwd usage to prevent "Permission denied".

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 30a923fb5c)
2022-07-06 12:54:04 -05:00
6468bb0cb6 Move undefined check from concat to finalize (#78165) (#78179)
In the classic Jinja2's Environment str() is called on the return value of the
finalize method to potentially trigger the undefined error. That is not
the case in NativeEnvironment where string conversion of the return value is
not desired. We workaround that by checking for Undefined in all of our concat
functions. It seems simpler to do it earlier in the finalize method(s) instead.
As a side-effect it fixes an undefined variable detection in imported templates.

Fixes #78156

ci_complete

(cherry picked from commit 17d52c8d64)
2022-07-06 10:28:35 -05:00
d4cd1853b0 Make unit test for missing git executable more generic (#78173) (#78174)
* Make unit test for missing git executable more generic

* use MagicMock side_effect to raise exception instead

(cherry picked from commit 1562672bd1)
2022-07-06 10:28:16 -05:00
27890cd659 Backportapalooza 06 30 (#78176)
* fixed hyperlinks to galaxy.ansible for issue #78104 (#78152)

(cherry picked from commit 4bd7e50612)

* Fix documentation with misleading data type (#78157)

##### SUMMARY
The sample value given for the 'mode' parameter is shown without quotes, but the data type is string. If you actually try to use an unquoted numeric string for this value you're in for a nasty surprise! I added quotation marks to the sample value.
##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

(cherry picked from commit 4c9385dab7)

* Update README.md (#78139)

Update Python version requirement to >= 3.8.

(cherry picked from commit 58b42abede)

* elaborate on import/include conditional example (#78138)

(cherry picked from commit 7ec84c511f)

* Update vault.rst (#78140)

(cherry picked from commit 84105e39f4)

Co-authored-by: Lewis Brogan <ilewisbrogan@gmail.com>
Co-authored-by: mlevens-hw <55262896+mlevens-hw@users.noreply.github.com>
Co-authored-by: Diana S. Cardona <89112552+Flecha21@users.noreply.github.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: jlownie <jlownie@hotmail.com>
2022-07-05 08:35:27 -07:00
036fc02c27 [stable-2.13] ansible-doc: list modules in collections recursively (#78137)
* List modules in collections recursively.

* Skip symlinks when listing plugins and modules.
2022-07-05 08:30:01 -07:00
99217ca2b6 [stable-2.13] ansible-test - Improve pip bootstrap download.
(cherry picked from commit b9d13d222c)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-06-24 12:23:51 -07:00
a2022a37db Backportapalooza 06 23 (#78134)
* Add tutorial links to the docs #78073 (#78084)

(cherry picked from commit 717f178870)

* Updated the document 'src' in URI (#78105)

(cherry picked from commit 08b438c4ba)

* update documentation of 'unarchive' (#77643)

(cherry picked from commit c321e3baad)

* Update list for gather_subset (#78133)

(cherry picked from commit 3e3f8cb004)

* issue #78076 fix diagram (#78077)

(cherry picked from commit 59f3f1b625)

Co-authored-by: paulreece <96156234+paulreece@users.noreply.github.com>
Co-authored-by: Tabah Baridule <dulemartins07@gmail.com>
Co-authored-by: optica-phoffmann <103563417+optica-phoffmann@users.noreply.github.com>
Co-authored-by: Don Naro <dnaro@redhat.com>
2022-06-24 09:04:46 -07:00
6dad4b9f70 update intersphinx links for Ansible 6 (#78121) (#78126)
(cherry picked from commit 70543402c7)
2022-06-24 09:01:15 -07:00
271097434b set current version to 6 (#78110) 2022-06-21 11:40:26 -07:00
16970567bf update conf.py for Ansible 6 release (#78049) (#78109)
(cherry picked from commit e8a77626a3)
2022-06-21 11:40:04 -07:00
d9f999f1c3 update release page to reflect Ansible 6 release (#78047) (#78108)
Co-authored-by: Iheanacho Amarachi Sharon  <58210919+Iheanacho-ai@users.noreply.github.com>
(cherry picked from commit a9ce358f98)
2022-06-21 11:39:40 -07:00
45920f1d2e docs: Update porting guide for Ansible 6.0.0 (#78101) (#78106)
(cherry picked from commit 1b63e7d3fa)

Co-authored-by: Ompragash Viswanathan <ompragash.viswanathan@gmail.com>
2022-06-21 11:38:47 -07:00
f09e6b7769 Backportapalooza 06 16 (#78072)
* Docsite: Updated style guide resources (#78048)

(cherry picked from commit 561cf1956d)

* Create reusable role layout snippet for documentation (#78057)

* reuse role structure
* reuse role snippet in role docs

(cherry picked from commit f4ad1c771e)

* Docsite: update links to community docs (#78043)

(cherry picked from commit 46d86a882d)

* Windows - incorrect python-devel package in WinRM docs (#78037)

Co-authored-by: Emanuele Barbato <manu@Giuseppes-MacBook-Air.local>
(cherry picked from commit 681dc6eab9)

* issue #72449 winrm script rm (#77931)

(cherry picked from commit 3cd2c494bd)

* reword the regex note (#75393)

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
(cherry picked from commit 66c0882314)

* Document debconf interaction with dpkg-reconfigure (#74196)

Signed-off-by: David Greaves <david@dgreaves.com>
(cherry picked from commit 5b90601ca4)

Co-authored-by: Lewis Brogan <ilewisbrogan@gmail.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Emanuele Barbato <30394740+emanuelebarbato@users.noreply.github.com>
Co-authored-by: Don Naro <dnaro@redhat.com>
Co-authored-by: David Greaves <david@dgreaves.com>
2022-06-21 09:01:11 -07:00
739fb490c7 Update Ansible release version to v2.13.1.post0. (#78095) 2022-06-20 10:28:23 -04:00
e9f633ec72 New release v2.13.1 (#78086) 2022-06-20 09:40:16 -04:00
34203f6b56 Update Ansible release version to v2.13.1rc1.post0. (#78044) 2022-06-13 10:39:31 -04:00
d34ba977fb New release v2.13.1rc1 (#78033) 2022-06-13 09:47:10 -04:00
fa898f4fcc Docs Backportapalooza 06 09 (#78020)
* Move AWS guidelines to collection (#77959)

(cherry picked from commit 0ff1ba3e12)

* docs: Update porting guide for ansible 5.9.0 (#77982)

(cherry picked from commit f9d4c26143)

* docs: Update porting guide for ansible 6.0.0rc1 (#77991)

(cherry picked from commit a30500144e)

* Fix docs links for the steering committee (#77974)

(cherry picked from commit ca9be6e27e)

* Add macOS fork issue to FAQ (#77965)

* Add macOS fork issue to FAQ

* Remove colon from error msg

(cherry picked from commit 0fae2383da)

* Docs: change community collection inclusion process (#77905)

(cherry picked from commit e589eba506)

* update backport instructions to reflect stable-2.13 (#77958)

Co-authored-by: Divine Odazie <dodazie@gmail.com>
(cherry picked from commit 85329beb90)

* mention different results for password_hash depending on library used (#76863) (#77963)

(cherry picked from commit fa840d4c7c)

* Rephrase-community (#77985)

(cherry picked from commit 556ac89664)

Co-authored-by: Mario Lenz <m@riolenz.de>
Co-authored-by: Ompragash Viswanathan <ompragash.viswanathan@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Philippe Kueck <philfry@users.noreply.github.com>
Co-authored-by: Bennykillua <67695793+Bennykillua@users.noreply.github.com>
2022-06-10 12:43:05 -07:00
cf5c0c9b06 ansible-galaxy - support resolvelib versions >= 0.5.3, < 0.9.0 (#77649) (#78008)
* ansible-galaxy - support resolvelib versions >= 0.5.3, <= 0.8.1

Test incompatibilities are removed for resolvelib >= 0.6.0

Test against the latest 0.8.x version and fix requirements

* Fix tests - use a venv for testing the range of resolvelib versions

* Update temporary hardcoded fallback for ansible-test

* Update hardcoded upperbound for sanity tests

* Make error check more flexible

(cherry picked from commit 143e7fb45e)
2022-06-10 12:39:30 -07:00
44e249df3a [stable-2.13] Update AZP test container to 3.0.0. (#78022)
(cherry picked from commit 1321d6ecd5)
2022-06-09 17:29:26 -07:00
977c2480db [2.13] Fix ansible-galaxy traceback when unexpected version of resolvelib is installed (#77901)
* Fix ansible-galaxy traceback when unexpected version of resolvelib is installed (#77630)

* Fix traceback when a supported version of resolvelib is not installed

Try to read the supported version range from the package distribution info and fall back to a hardcoded lowerbound/upperbound (>=0.5.3,<0.6.0).

* Add tests for unsupported resolvelib versions

* Resolve remaining import sanity test issues.

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 82f3a57bee)

* Fix boolean condition so that ansible-galaxy collection install works when a valid resolvelib is installed. (#77906)

(cherry picked from commit 6fbc8bd2bc)

* ansible-galaxy - ensure variable is defined for any error when getting the ansible-core distribution (#77993)

(cherry picked from commit db335498d0)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-09 10:13:28 -05:00
3957913485 fix pip module resolution (#78000) (#78006)
* `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:38 -05:00
be9c208cb4 apt: fix virtual package install version detection (#76781) (#77909)
* apt: fix virtual package install version detection

Change 4a62c4e3e4 introduced version
matching in installation.

The problem stems from

 if version_installable or version:
     pkg_list.append("'%s=%s'" % (name, version_installable or version))

When the package is a virtual-package, package_status() is returning
the "version_installable" of the package *satisfying* the
virtual-package; but then this is trying to install the
virtual-package with this version pin.

For example, "yaml-mode" is a virtual package satisifed by
"elpa-yaml-mode" (currently 0.0.14-1) and trying to install it fails
with

 $ usr/bin/apt-get -y ... install 'yaml-mode=0.0.14-1'
 ... failed: E: Version '0.0.14-1' for 'yaml-mode' was not found ...

In the case of a virtual-package with nothing installed to satisfy it,
we should just return blank values to allow apt-get to do it's thing.

The tests are updated to install and remove this package.

Fixes: #76779
(cherry picked from commit e4c0bbf885)

Co-authored-by: Ian Wienand <iwienand@redhat.com>
2022-06-08 12:06:57 -05:00
63a0860231 Add toggle to fix module_defaults with module-as-redirected-action on a per-module basis (#77265) (#77899)
* 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 11:29:20 -05:00
f80f58903b Fix windows connection options (#77844) (#77894)
* winrm, psrps added missing var entry

 this handles issue with the default being set to inventory_hostname
 but defaults not being templated implicitly

 fixes #77841

(cherry picked from commit eecbaee7f4)
2022-06-08 11:29:11 -05:00
02104472e2 Update PSF-license.txt to version from CPython 3.9.5. (#77805) (#77829)
(cherry picked from commit 201aba3d0f)
2022-06-08 11:29:02 -05:00
e5e3bc849d template/__init__.py - fix KeyError when wantlist=False with non-list (#77824)
(cherry picked from commit c9ce7d08a2)
2022-06-08 11:28:52 -05:00
9796d055b9 fix SELinux facts tests (#77707)
* 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-06-08 11:28:41 -05:00
f02e870b1b dont rely on path to set config defs for plugins (#77659) (#77694)
(cherry picked from commit a3cc6a581e)
2022-06-08 11:28:29 -05:00
f026e3dcf9 Fix 'ansible-config dump --only-changed -t all' verbosity (#77898) (#77922)
* Fix 'ansible-config dump --only-changed -t all' to only display headers if plugin options are changed

* changelog

* add a test

(cherry picked from commit 1214b63f4f)
2022-06-08 10:49:30 -05:00
0c76edb63a Pin PyYAML version compatible with Python 3.8+ (#77936) (#77986)
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit e89176caac)
2022-06-08 10:49:16 -05:00
68c2f09ae8 [2.13] fix ansible-galaxy-collection integration test (#77992)
* ansible-galaxy-collection - use --pinentry-mode loopback for gpg key revocation (#77967)

(cherry picked from commit 1706d35fc4)

* fix ansible-galaxy-collection test with revoked key (#77989)

* Remove unnecessary gpg passphrase

(cherry picked from commit a43112290a)
2022-06-08 10:00:11 -05:00
6291280ef8 [stable-2.13] Make fuzzy plugin matching deterministic. (#77997)
(cherry picked from commit 5a0b230e24)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-06-08 09:52:48 -05:00
567a295c00 [stable-2.13] ansible-test - Adjust unit test mock usage. (#77961) (#77999)
(cherry picked from commit 23914d3f0b)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-06-08 09:52:26 -05:00
ae380e3bef [stable-2.13] ansible-test - Multiple backports (#77951)
* 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)
2022-06-02 16:39:52 -07:00
f3b56ec661 Backportapalooza 06 02 (#77960)
* docs: update porting guide for ansible 6.0.0b1 (#77913)

(cherry picked from commit 7c89562580)

* docs: add missing notes in porting guide for 6.0.0b1 (#77926)

There was an issue with the changelog in community.network 4.0.0, it's
been fixed in 4.0.1 and now properly included.

(cherry picked from commit 9f7956ba30)

* Remove platform dev guides from core docs (#77915)

(cherry picked from commit f3c684564c)

* Migrate community.vmware Dev Guide to collection (#77723)

(cherry picked from commit b69eb28ed2)

* Issue #77681 revamp getting started guide (#77897)

(cherry picked from commit 89e4fb71e6)

* ssh retry docs addition (#77930)

(cherry picked from commit 15750aec52)

* fix: update button text to "Load token" (#77925)

(cherry picked from commit 16e0d4a121)

* fix bad merge conflict resolution

Co-authored-by: David Moreau Simard <moi@dmsimard.com>
Co-authored-by: Mario Lenz <m@riolenz.de>
Co-authored-by: Don Naro <dnaro@redhat.com>
Co-authored-by: Dan Kolepp <10145457+dkolepp@users.noreply.github.com>
2022-06-02 16:34:16 -07:00
2ac74197af [stable-2.13] ansible-test - Prefer unittest.mock for core.
(cherry picked from commit 81351022d8)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-06-01 17:19:04 -07:00
44ce9fe998 [stable-2.13] ansible-test - Fix shell target options handling.
(cherry picked from commit f933314101)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-06-01 13:20:38 -07:00
2b6df9ea36 Add RHEL 9.0 to ansible-test and CI. (#77923)
* ansible-test - Add RHEL 9.0 remote support.

* Add RHEL 9.0 to CI. (#77853)

* Add RHEL 9.0 to CI.

* Restrict network manager inspection to RHEL8

* Skip module tests when astream_name is undefined, undefine it for RHEL9 until 9.1

* Remove redundant test.

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

* Include test fix from https://github.com/ansible/ansible/pull/77847
2022-06-01 12:51:24 -07:00
e6b16ddeb5 Docs backportapalooza 05 26 (#77921)
* Remove statement about dependencies and includes. Fixes #75055 (#77912)

(cherry picked from commit a2eb472fb6)

* doc: Clarify stride/increment in inventory intro (#77893)

(cherry picked from commit 9010f0fbe3)

* Remove double spaces in errormessage (#77839)

(cherry picked from commit 711b51fad6)

* add anchors for crossreferencing (#77800)

(cherry picked from commit a99623bce1)

* [docs]Mention that global variables are not mapped to hostvars (#77783)

(cherry picked from commit 74469bf54a)

* Point to Kerberos as a safer winrm setup method (#77794)

(cherry picked from commit 45d930e9c1)

* more context on multiple facts modules (#77896)

(cherry picked from commit dbbeea0686)

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: rawtaz <rawtaz@users.noreply.github.com>
Co-authored-by: Wouter Schoot <wouter@schoot.org>
Co-authored-by: Sergei Petrosian <30409084+spetrosi@users.noreply.github.com>
Co-authored-by: TheBigBear <TheBigBear@users.noreply.github.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2022-05-26 15:35:12 -07:00
c45ba4f9ca docs: Update porting guide for ansible 5.8.0 (#77843) (#77859)
(cherry picked from commit 059204b871)

Co-authored-by: David Moreau Simard <moi@dmsimard.com>
2022-05-26 15:33:14 -07:00
8d99c1cc0c docs: Update porting guide for ansible 6.0.0a3 (#77842) (#77858)
(cherry picked from commit 66e92a3aff)

Co-authored-by: David Moreau Simard <moi@dmsimard.com>
2022-05-26 15:32:54 -07:00
46a1eb6832 [stable-2.13] Prefer unittest.mock over mock. (#77886)
(cherry picked from commit 2595b42aca)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-05-23 14:09:36 -07:00
47e1cc38fd [stable-2.13] Use unittest.mock instead of mock. (#77883)
This can only be done for controller tests.
(cherry picked from commit 3a9a23fb1a)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-05-23 12:21:37 -07:00
93b8ccda21 [stable-2.13] Avoid deprecated method in unit tests.
(cherry picked from commit 5f74350fd5)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-05-23 12:02:38 -07:00
006ea84f70 Update Ansible release version to v2.13.0.post0. (#77809) 2022-05-16 12:09:01 -04:00
ad609fa57e New release v2.13.0 (#77799) 2022-05-16 10:47:48 -04:00
d0d1cc9e54 05 12 backportapalooza (#77787)
* stub out ovirt dev guide with pointer to new location (#77751)

(cherry picked from commit 5e22fe21fd)

* Docsite/communication.rst: fix formatting (#77760)

(cherry picked from commit 97e574fe6e)

* Updated the playbook section in this docs (#77747)

(cherry picked from commit 42086c14a3)

* 2.13 GA has been bumped up a week to release on May 16 (#77772)

(cherry picked from commit 75bc630565)

* Fix plugin dev examples (#77759)

* Fix plugin dev examples

* Update docs/docsite/rst/dev_guide/developing_plugins.rst

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9923e92d97)

* docs: Update ansible-core release date in Ansible roadmap (#77775)

(cherry picked from commit 235f2598b1)

* revamp basic concepts docs (#77748)

(cherry picked from commit 8e91403412)

* core-2.13 - update release table (#77780)

(cherry picked from commit 6230244537)

* clarify Ansible EOL details (#77778)

* clarify Ansible EOL details: update docs/docsite/rst/reference_appendices/release_and_maintenance.rst
Co-authored-by: Felix Fontein <felix@fontein.de>

(cherry picked from commit 654fff05e6)

* Update url to quickstart video. (#77779)

(cherry picked from commit f75bb09a8b)

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Desmond Obisi <51109125+DesmondSanctity@users.noreply.github.com>
Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Mario Lenz <m@riolenz.de>
Co-authored-by: David Moreau Simard <moi@dmsimard.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Tabah Baridule <dulemartins07@gmail.com>
Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2022-05-13 15:26:58 -07:00
256641b780 set stable-2.13 to latest (#77798) 2022-05-13 15:05:15 -07:00
0d1d1b74b3 update version switcher to include 2.13 (#77786) (#77795)
(cherry picked from commit f5642cea28)
2022-05-13 15:04:10 -07:00
14f64ae38f core-2.13 - update release table (#77780) (#77785)
(cherry picked from commit 6230244537)
2022-05-13 14:59:36 -07:00
a6d7eb8710 [docs][backport] 5 06 docs backportapalooza (#77749)
* Docsite: move a stepped down steering committee member to past members (#77715)

(cherry picked from commit a1ddb83fc1)

* add collection pr review checklist (#77661)

Co-authored-by: Emmanuel Ugwu <32464178+ugwutotheeshoes@users.noreply.github.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
(cherry picked from commit ef2fe6823c)

* clarify latest release (#77577)

* clarify latest release
* fix tables

(cherry picked from commit f633b62cbc)

* typo in doc (#77672)

(cherry picked from commit c71faec595)

* Docs: `ansible-test sanity` example with a folder

##### SUMMARY
The docs mentions explicitly that you can run the tests against certain files which might not relay that it works on folders too!

Let's make this clear :)

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

(cherry picked from commit 52bd59c481)

* docs: update porting guide for ansible 6.0.0a2 (#77736)

(cherry picked from commit 0cfc291573)

* simplify developing modules (#77647)

(cherry picked from commit 255745b3e6)

* Mention admin requirement for runas become (#77722)

(cherry picked from commit dd094a4413)

* core branch descriptions (#76152)

(cherry picked from commit d352f2ec21)

* Fix ansible-test import analysis warning.

Fix overlooked in https://github.com/ansible/ansible/pull/68372/

(cherry picked from commit 77732ed50d)

* Revert "Fix ansible-test import analysis warning."

This reverts commit 676f1056cb.

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com>
Co-authored-by: David Moreau Simard <moi@dmsimard.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Jordan Borean <jborean93@gmail.com>
Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2022-05-13 14:59:00 -07:00
a07e3eb45b 4 28 docs backportapalooza (#77686)
* docs: Update porting guide for ansible 5.7.0 (#77646)

(cherry picked from commit 709ae7c050)

* remove import_play examples from include module (#77597)

(cherry picked from commit d321fa3f15)

* trim down to use sanity test docs requirements file (#77612)

* trim down to use sanity test docs requirements file
* add requirements back
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update docs/docsite/rst/community/documentation_contributions.rst

(cherry picked from commit a65fbfad5b)

* Typo fix (#77648)

(cherry picked from commit cf5f0690f0)

* Update guide_vultr.rst (#77665)

(cherry picked from commit f6fb402d1f)

* add select distro installs to docs (#77567)

(cherry picked from commit 096393a221)

* community_steering_committee.rst: add new member (#77589)

(cherry picked from commit 3cbfee7852)

* clarify latest release (#77577)

* clarify latest release
* fix tables

(cherry picked from commit f633b62cbc)

* typo in doc (#77672)

(cherry picked from commit c71faec595)

Co-authored-by: David Moreau Simard <moi@dmsimard.com>
Co-authored-by: deosrc <deosrc@g-de.co.uk>
Co-authored-by: Jan-Piet Mens <jp@mens.de>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-05-13 14:57:50 -07:00
f4f1f772c1 [stable-2.13] shift to ansible_core_version
(cherry picked from commit 7471c036ec)

Co-authored-by: samccann <samccann@redhat.com>
2022-05-05 12:19:07 -07:00
511389ef3a Update Ansible release version to v2.13.0rc1.post0. (#77718) 2022-05-02 13:54:20 -04:00
f282306b1b New release v2.13.0rc1 (#77717) 2022-05-02 10:26:31 -04:00
89e6dcda26 Prevent losing unsafe from lookups (#77609) (#77650)
* Prevent losing unsafe from lookups

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-04-28 16:16:36 -05:00
8f1c25d154 Update Ansible release version to v2.13.0b1.post0. (#77634) 2022-04-25 12:43:02 -04:00
5d9d0fe39b New release v2.13.0b1 (#77629) 2022-04-25 10:36:03 -04:00
9a7b645c50 ansible-test - Update default containers to 5.9.0. 2022-04-22 12:25:58 -07:00
cad892125c [stable-2.13] Replace antsibull with antsibull-docs (#77504)
(cherry picked from commit 841bdb74eb)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-22 10:30:49 -07:00
e03069a444 [docs][backport] Docs backports week 4-18-22 (#77557)
* Update reporting_bugs_and_features.rst (#77518)

(cherry picked from commit fa7c5d9b10)

* docs: Add porting guide for Ansible 6.0.0a1 (#77526)

(cherry picked from commit 0d9a580f24)

* Steering Committee: add new member (#77529)

(cherry picked from commit 553a226da5)

* Update pip example with standard lowercase http[s]_proxy env vars (#77515)

(cherry picked from commit 2ba39fcf8c)

* Update docs to recommend the TTY for prompts over stderr (#77533)

(cherry picked from commit 789d29e895)

* update python devel docs (#77499)

* update python devel docs

Co-authored-by: Sandra McCann <samccann@redhat.com>
(cherry picked from commit 2fc73a9dc3)

* setup: remove 'any' as seemingly valid option (#77532)

fixes #59783

(cherry picked from commit 762d97f1b8)

* Update developing_collections_shared.rst (#77497)

##### SUMMARY
Use of the meta/runtime.yml file to specify the ansible-core version for collections

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

(cherry picked from commit eef0a1cef9)

* Update developing_collections_structure.rst (#77496)

(cherry picked from commit 538a19b748)

* Fix a broken link and some grammatical errors (#77531)

(cherry picked from commit 0c1cb0e9d4)

* Add contributor path page (#77494)

Co-authored-by: Emmanuel Ugwu <32464178+ugwutotheeshoes@users.noreply.github.com>
(cherry picked from commit 3b0d74c145)

Co-authored-by: Iheanacho Amarachi Sharon <58210919+Iheanacho-ai@users.noreply.github.com>
Co-authored-by: David Moreau Simard <moi@dmsimard.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Emmanuel Ugwu <32464178+ugwutotheeshoes@users.noreply.github.com>
Co-authored-by: Kajsa Gauza <nimrod7@gmail.com>
2022-04-21 16:53:52 -05:00
91fb18bf31 [stable-2.13] arg_spec - Return aliases in validation result and update aliases (#77576) (#77601)
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>
2022-04-21 16:53:28 -05:00
3e1db5d753 git fix docs and wrapper script (#77588) (#77603)
* git fix docs and wrapper script

 fixes #77582

 now env var is set to wrapper or full command depending on version
 as was the intent of previous PR
 added ref to git commit from git for why/how we used the env vars

* handle key_file

(cherry picked from commit d06d99cbb6)
2022-04-21 16:53:07 -05:00
e51e36ea6a varaiblemanager, more efficienet vars file reads (#77570) (#77596)
(cherry picked from commit 2c2a204dc6)
2022-04-21 16:52:53 -05:00
9deb5ad45a [stable-2.13] Exclude Python 2.6 from interpreter discovery. (#77528)
(cherry picked from commit 32d67ce998)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-04-13 11:34:38 -05:00
8dedf7f06c Update Ansible release version to v2.13.0b0.post0. (#77508) 2022-04-11 11:39:45 -04:00
220917e2af New release v2.13.0b0 (#77502) 2022-04-11 10:57:40 -04:00
2cba3e8c42 Get git executable for collections in git repos (#77493) (#77500)
* Fix traceback installing collections from git repos if git is not installed

(cherry picked from commit 477c55b0d2)
2022-04-08 13:28:53 -05:00
c4901aa08f [docs][backport] 0407 weekly docs backports (#77490)
* INI: values with spaces can be single or double quoted (#77369)

(cherry picked from commit ac56647f4a)

* community_steering_committee.rst: add chairperson (#77454)

(cherry picked from commit 82c622a26a)

* Document how to release a collection  (#77391)

Co-authored-by: Divine Odazie <dodazie@gmail.com>
(cherry picked from commit 26631de88c)

* docs: Update porting guide for ansible 5.6.0 (#77466)

(cherry picked from commit 36371500b7)

* Trivial (#77467)

Co-authored-by: Iheanacho Amarachi Sharon  <58210919+Iheanacho-ai@users.noreply.github.com>
(cherry picked from commit e8dbc84afe)

* Update installing_collections_file.rst (#77439)

(cherry picked from commit 6da4186f6e)

* template module: document jinja2_native behavior (#77445)

(cherry picked from commit a85261342a)

* avoid recursion in example (#77436)

(cherry picked from commit d7d2afd203)

* Clarifying how handlers are handled (#77372)

(cherry picked from commit 7126bfc61c)

Co-authored-by: Dr. András Korn <korn-github.com@elan.rulez.org>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: David Moreau Simard <moi@dmsimard.com>
Co-authored-by: Travis Michette <tmichett@redhat.com>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2022-04-08 12:54:36 -05:00
bd1da60bf2 Ensure correct environment_class is set on Template (#77485) (#77488)
(cherry picked from commit c7e198b907)
2022-04-07 10:46:38 -05:00
30f96bb75e [stable-2.13] ansible-test - Don't fail if network cannot be disconnected (#77472) (#77482)
* Don't fail if network cannot be disconnected

* add clog frag
(cherry picked from commit 66c5844)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-04-07 08:45:23 -05:00
3b20b02272 [stable-2.13] Fix sanity test crash. (#77475)
(cherry picked from commit 6216c9fc93)

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-07 08:45:08 -05:00
6b6b324618 [docs][backport][2.13] Backportapalooza 3-31 (#77438)
* add links.yml to collection structure docs (#77415)

* add links.yml to collection structure docs
* fix link
* Update docs/docsite/rst/dev_guide/developing_collections_structure.rst

(cherry picked from commit 8caa6efaab)

* Example is a single play, not a playbook

(cherry picked from commit bf8e186c68)

* Fix list formatting (#77354)

(cherry picked from commit e918cfa588)

* Most Matrix channels are ansible.com and not .im (#77352)

(cherry picked from commit 6557a60d08)

* Docs cheatsheet - skeleton and ansible-playbook (#76655)

(cherry picked from commit 21addac5da)

Co-authored-by: rwhector <richard@walnut.gen.nz>
Co-authored-by: Christian Adamini <christian.adamini@invision.de>
Co-authored-by: bluikko <14869000+bluikko@users.noreply.github.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2022-04-05 15:29:38 -05:00
f720c58949 winrm - ensure callers PATH for kinit is set (#77401) (#77404)
* winrm - ensure callers PATH for kinit is set

* Fix unit test expectations

* Fix type annotation

(cherry picked from commit 60b4200bc6)
2022-04-05 15:29:28 -05:00
85341c3e5d [stable-2.13] Catch ImportError when pyyaml doesn't have libyaml extension (#77434) (#77459)
* [stable-2.13] Catch ImportError when pyyaml doesn't have libyaml extension (#77434)
(cherry picked from commit e3aa73c)

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

* Add test to assert that missing libyaml doesn't result in an error. Fixes #77437

(cherry picked from commit 2797dc644a)
2022-04-05 15:28:56 -05:00
ee9705a1ce [stable-2.13] ansible-test - Fix origin host target filtering.
(cherry picked from commit 4b51e61645)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-03-30 15:41:19 -07:00
1269 changed files with 15654 additions and 124382 deletions

View File

@ -12,29 +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: 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
@ -49,9 +37,6 @@ stages:
targets:
- test: 1
- test: 2
- test: 3
- test: 4
- test: 5
- stage: Units
dependsOn: []
jobs:
@ -94,16 +79,35 @@ stages:
test: rhel/8.5@3.6
- name: RHEL 8.5 py38
test: rhel/8.5@3.8
- name: FreeBSD 12.3
test: freebsd/12.3
- name: FreeBSD 13.0
test: freebsd/13.0
- name: RHEL 9.0
test: rhel/9.0
- name: FreeBSD 12.4
test: freebsd/12.4
- name: FreeBSD 13.1
test: freebsd/13.1
groups:
- 1
- 2
- 3
- 4
- 5
- template: templates/matrix.yml # context/controller (ansible-test container management)
parameters:
targets:
- name: Alpine 3.16
test: alpine/3.16
- name: Fedora 36
test: fedora/36
- name: RHEL 8.5
test: rhel/8.5
- 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:
@ -155,18 +159,6 @@ stages:
- test: 3.8
- test: 3.9
- test: '3.10'
- stage: Incidental_Remote
displayName: Incidental Remote
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: i/{0}
targets:
- name: RHEL 8.5 py36
test: rhel/8.5@3.6
- name: RHEL 8.5 py38
test: rhel/8.5@3.8
- stage: Incidental_Windows
displayName: Incidental Windows
dependsOn: []
@ -208,7 +200,6 @@ stages:
- Docker
- Galaxy
- Generic
- Incidental_Remote
- Incidental_Windows
- Incidental
jobs:

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

@ -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

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

View File

@ -0,0 +1,41 @@
#!/usr/bin/env bash
set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
group="${args[1]}"
group2_include=(
ansible-doc
changelog
package-data
pep8
pylint
validate-modules
)
group1_exclude=(
"${group2_include[@]}"
)
options=()
case "${group}" in
1)
for name in "${group1_exclude[@]}"; do
options+=(--skip-test "${name}")
done
;;
2)
for name in "${group2_include[@]}"; do
options+=(--test "${name}")
done
;;
esac
# shellcheck disable=SC2086
ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
--docker \
"${options[@]}" --allow-disabled

View File

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

View File

@ -6,7 +6,7 @@
jobs:
- job: Coverage
displayName: Code Coverage
container: default
container: $[ variables.defaultContainer ]
workspace:
clean: all
steps:

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:

151
.github/BOTMETA.yml vendored
View File

@ -1,151 +0,0 @@
automerge: false
collection_redirect: true
notifications: false
files:
$module_utils/csharp: &id001
labels: windows
maintainers: $team_windows_core
support: core
$module_utils/network:
labels: networking
$module_utils/network/common:
maintainers: $team_networking
support: network
$module_utils/powershell: *id001
$modules:
ignored: ryansb tomaszkiewicz
$modules/lineinfile.py: $team_ansible samdoran
$modules/stat.py:
ignored: bpennypacker
$modules/unarchive.py:
ignored: dagwieers
labels: m:unarchive
maintainers: pileofrogs
$modules/add_host.py:
ignored: skvidal
maintainers: $team_ansible
$modules/get_url.py: ptux
$modules/uri.py:
ignored: romeotheriault
maintainers: $team_ansible
$modules/pip.py: Lujeni webknjaz
$modules//yum.py:
ignored: skvidal
maintainers: $team_ansible kustodian
$modules/user.py: $team_ansible samdoran
$modules/pause.py: samdoran
$modules/wait_for.py: gregswift
$plugins/cliconf/:
labels: networking
$plugins/connection/psrp.py: *id001
$plugins/connection/winrm.py: *id001
$plugins/doc_fragments/url_windows.py:
labels: windows
maintainers: $team_windows_core
support: core
$plugins/httpapi:
labels: networking
maintainers: $team_networking
support: network
$plugins/netconf/:
labels: networking
maintainers: $team_networking
support: network
$plugins/shell/powershell.py: *id001
$plugins/terminal/:
labels: networking
$plugins/terminal/__init__.py:
support: network
.github/BOTMETA.yml:
labels: botmeta
support: core
docs/:
maintainers:
- acozine
docs/docsite/rst/community/:
maintainers:
- gundalow
docs/docsite/rst/dev_guide/:
maintainers:
- gundalow
docs/docsite/rst/network/:
labels: networking
maintainers:
- samccann
docs/docsite/rst/user_guide/windows: *id001
hacking/report.py:
notified: mattclay
hacking/shippable/:
notified: mattclay
lib/ansible/cli/scripts/ansible_connection_cli_stub.py:
keywords:
- persistent connection
labels: networking
lib/ansible/config/ansible_builtin_runtime.yml:
labels: runtime
maintainers: gundalow
lib/ansible/executor/powershell: *id001
lib/ansible/inventory:
keywords:
- core inventory
- inventory
- inventory parsing
lib/ansible/playbook/handler.py:
keywords:
- handlers
lib/ansible/playbook/role:
keywords:
- roles path
- roles_path
- role
- role path
lib/ansible/playbook/role/include.py:
keywords:
- include role
- include_role
- role include
lib/ansible/playbook/role/requirement.py:
keywords:
- role dependencies
- role dep
- role dependency
lib/ansible/release.py:
notified: mattclay nitzmahone
lib/ansible/template:
keywords:
- jinja
- jinja2
lib/ansible/utils/collection_loader.py:
notified: mattclay nitzmahone
test/integration/targets/incidental_:
notified: mattclay
test/lib/:
notified: mattclay
test/lib/ansible_test/_util/controller/sanity/validate-modules:
keywords:
- validate-modules
notified:
- mattclay
test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py:
notified:
- gundalow
- sivel
test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/schema.py:
notified:
- gundalow
- sivel
test/sanity/:
notified: mattclay
test/sanity/ignore.txt:
notified: tremble
test/support/:
notified: mattclay
test/utils/shippable/:
notified: mattclay
macros:
module_utils: lib/ansible/module_utils
modules: lib/ansible/modules
plugins: lib/ansible/plugins
team_ansible: []
team_networking: Qalthos ganeshrn trishnaguha justjais NilashishC danielmellado rohitthakur2590 GomathiselviS
team_windows_core: nitzmahone jborean93

1
.gitignore vendored
View File

@ -38,6 +38,7 @@ docs/docsite/rst/cli/ansible-*.rst
docs/docsite/rst/cli/ansible.rst
docs/docsite/rst/dev_guide/collections_galaxy_meta.rst
docs/docsite/rst/dev_guide/testing/sanity/index.rst.new
docs/docsite/rst/dev_guide/index.rst
docs/docsite/rst/modules/*.rst
docs/docsite/rst/collections/*.rst
!docs/docsite/rst/collections/all_plugins.rst

View File

@ -1,50 +1,12 @@
include README.rst
include COPYING
include SYMLINK_CACHE.json
include requirements.txt
recursive-include docs *
include docs/docsite/rst/collections/all_plugins.rst
exclude docs/docsite/rst_warnings
exclude docs/docsite/rst/conf.py
exclude docs/docsite/rst/index.rst
exclude docs/docsite/rst/dev_guide/testing/sanity/bin-symlinks.rst
exclude docs/docsite/rst/dev_guide/testing/sanity/botmeta.rst
exclude docs/docsite/rst/dev_guide/testing/sanity/integration-aliases.rst
exclude docs/docsite/rst/dev_guide/testing/sanity/release-names.rst
recursive-exclude docs/docsite/_build *
recursive-exclude docs/docsite/_extensions *.pyc *.pyo
include examples/hosts
include examples/ansible.cfg
include examples/scripts/ConfigureRemotingForAnsible.ps1
include examples/scripts/upgrade_to_ps3.ps1
include lib/ansible/keyword_desc.yml
recursive-include lib/ansible/executor/powershell *.ps1
recursive-include lib/ansible/module_utils/csharp *.cs
recursive-include lib/ansible/module_utils/powershell *.psm1
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 test/ansible_test *.py Makefile
recursive-include test/integration *
recursive-include test/lib/ansible_test/config *.yml *.template
recursive-include test/lib/ansible_test/_data *.cfg *.in *.ini *.ps1 *.txt *.yml coveragerc
recursive-include test/lib/ansible_test/_util *.cfg *.ini *.json *.ps1 *.psd1 *.py *.sh *.txt *.yml
recursive-include test/lib/ansible_test/_util/controller/sanity/validate-modules validate-modules
recursive-include test/sanity *.in *.json *.py *.txt
recursive-include test/support *.py *.ps1 *.psm1 *.cs
exclude test/sanity/code-smell/botmeta.*
exclude test/sanity/code-smell/release-names.*
exclude test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py
exclude test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py
recursive-include test/units *
include Makefile
include MANIFEST.in
include bin/*
include changelogs/CHANGELOG*.rst
include changelogs/changelog.yaml
recursive-include hacking/build_library *.py
include hacking/build-ansible.py
include hacking/test-module.py
include hacking/update-sanity-requirements.py
include bin/*
include licenses/*.txt
include requirements.txt
recursive-include packaging *.py *.j2
recursive-include test/ansible_test *.py Makefile
recursive-include test/integration *
recursive-include test/sanity *.in *.json *.py *.txt
recursive-include test/support *.py *.ps1 *.psm1 *.cs *.md
recursive-include test/units *

154
Makefile
View File

@ -1,154 +0,0 @@
# WARN: gmake syntax
########################################################
# Makefile for Ansible
#
# useful targets:
# make clean ---------------- clean up
# make sdist ---------------- produce a tarball
# make tests ---------------- run the tests (see https://docs.ansible.com/ansible/devel/dev_guide/testing_units.html for requirements)
########################################################
# variable section
NAME = ansible-core
OS = $(shell uname -s)
PREFIX ?= '/usr/local'
SDIST_DIR ?= 'dist'
# This doesn't evaluate until it's called. The -D argument is the
# directory of the target file ($@), kinda like `dirname`.
MANPAGES ?= $(patsubst %.rst.in,%,$(wildcard ./docs/man/man1/ansible*.1.rst.in))
ifneq ($(shell which rst2man 2>/dev/null),)
ASCII2MAN = rst2man $< $@
else ifneq ($(shell which rst2man.py 2>/dev/null),)
ASCII2MAN = rst2man.py $< $@
else
ASCII2MAN = @echo "ERROR: rst2man from docutils command is not installed but is required to build $(MANPAGES)" && exit 1
endif
PYTHON ?= python
GENERATE_CLI = hacking/build-ansible.py generate-man
# fetch version from project release.py as single source-of-truth
VERSION := $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --raw || echo error)
ifeq ($(findstring error,$(VERSION)), error)
$(error "version_helper failed")
endif
# ansible-test parameters
ANSIBLE_TEST ?= bin/ansible-test
TEST_FLAGS ?=
# ansible-test units parameters (make test / make test-py3)
PYTHON_VERSION ?= $(shell python2 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
PYTHON3_VERSION ?= $(shell python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
# ansible-test integration parameters (make integration)
IMAGE ?= centos7
TARGET ?=
########################################################
.PHONY: all
all: clean python
.PHONY: tests
tests:
$(ANSIBLE_TEST) units -v --python $(PYTHON_VERSION) $(TEST_FLAGS)
.PHONY: tests-py3
tests-py3:
$(ANSIBLE_TEST) units -v --python $(PYTHON3_VERSION) $(TEST_FLAGS)
.PHONY: integration
integration:
$(ANSIBLE_TEST) integration -v --docker $(IMAGE) $(TARGET) $(TEST_FLAGS)
# Regenerate %.1.rst if %.1.rst.in has been modified more
# recently than %.1.rst.
%.1.rst: %.1.rst.in
sed "s/%VERSION%/$(VERSION)/" $< > $@
rm $<
# Regenerate %.1 if %.1.rst or release.py has been modified more
# recently than %.1. (Implicitly runs the %.1.rst recipe)
%.1: %.1.rst lib/ansible/release.py
$(ASCII2MAN)
.PHONY: clean
clean:
@echo "Cleaning up distutils stuff"
rm -rf build
rm -rf dist
rm -rf lib/ansible*.egg-info/
@echo "Cleaning up byte compiled python stuff"
find . -type f -regex ".*\.py[co]$$" -delete
find . -type d -name "__pycache__" -delete
@echo "Cleaning up editor backup files"
find . -type f -not -path ./test/units/inventory_test_data/group_vars/noparse/all.yml~ \( -name "*~" -or -name "#*" \) -delete
find . -type f \( -name "*.swp" \) -delete
@echo "Cleaning up manpage stuff"
find ./docs/man -type f -name "*.xml" -delete
find ./docs/man -type f -name "*.rst" -delete
find ./docs/man/man3 -type f -name "*.3" -delete
rm -f ./docs/man/man1/*
@echo "Cleaning up output from test runs"
rm -rf test/test_data
rm -rf logs/
rm -rf .cache/
rm -f test/units/.coverage*
rm -rf test/results/*/*
find test/ -type f -name '*.retry' -delete
@echo "Cleaning up symlink cache"
rm -f SYMLINK_CACHE.json
rm -rf docs/json
rm -rf docs/js
@echo "Cleaning up docsite"
$(MAKE) -C docs/docsite clean
.PHONY: python
python:
$(PYTHON) setup.py build
.PHONY: install
install:
$(PYTHON) setup.py install
install_manpages:
gzip -9 $(wildcard ./docs/man/man1/ansible*.1)
cp $(wildcard ./docs/man/man1/ansible*.1.gz) $(PREFIX)/man/man1/
.PHONY: sdist_check
sdist_check:
$(PYTHON) -c 'import setuptools, sys; sys.exit(int(not (tuple(map(int, setuptools.__version__.split("."))) > (39, 2, 0))))'
$(PYTHON) packaging/sdist/check-link-behavior.py
.PHONY: sdist
sdist: sdist_check clean docs
_ANSIBLE_SDIST_FROM_MAKEFILE=1 $(PYTHON) setup.py sdist --dist-dir=$(SDIST_DIR)
# Official releases generate the changelog as the last commit before the release.
# Snapshots shouldn't result in new checkins so the changelog is generated as
# part of creating the tarball.
.PHONY: snapshot
snapshot: sdist_check clean docs changelog
_ANSIBLE_SDIST_FROM_MAKEFILE=1 $(PYTHON) setup.py sdist --dist-dir=$(SDIST_DIR)
.PHONY: sdist_upload
sdist_upload: clean docs
$(PYTHON) setup.py sdist upload 2>&1 |tee upload.log
.PHONY: changelog
changelog:
PYTHONPATH=./lib antsibull-changelog release -vv --use-ansible-doc && PYTHONPATH=./lib antsibull-changelog generate -vv --use-ansible-doc
.PHONY: generate_rst
generate_rst: lib/ansible/cli/*.py
mkdir -p ./docs/man/man1/ ; \
$(PYTHON) $(GENERATE_CLI) --template-file=docs/templates/man.j2 --output-dir=docs/man/man1/ --output-format man lib/ansible/cli/*.py
docs: generate_rst
$(MAKE) $(MANPAGES)
version:
@echo $(VERSION)

89
README.md Normal file
View File

@ -0,0 +1,89 @@
[![PyPI version](https://img.shields.io/pypi/v/ansible-core.svg)](https://pypi.org/project/ansible-core)
[![Docs badge](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://docs.ansible.com/ansible/latest/)
[![Chat badge](https://img.shields.io/badge/chat-IRC-brightgreen.svg)](https://docs.ansible.com/ansible/latest/community/communication.html)
[![Build Status](https://dev.azure.com/ansible/ansible/_apis/build/status/CI?branchName=devel)](https://dev.azure.com/ansible/ansible/_build/latest?definitionId=20&branchName=devel)
[![Ansible Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg)](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html)
[![Ansible mailing lists](https://img.shields.io/badge/mailing%20lists-Ansible-orange.svg)](https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information)
[![Repository License](https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg)](COPYING)
[![Ansible CII Best Practices certification](https://bestpractices.coreinfrastructure.org/projects/2372/badge)](https://bestpractices.coreinfrastructure.org/projects/2372)
# Ansible
Ansible is a radically simple IT automation system. It handles
configuration management, application deployment, cloud provisioning,
ad-hoc task execution, network automation, and multi-node orchestration. Ansible makes complex
changes like zero-downtime rolling updates with load balancers easy. More information on the Ansible [website](https://ansible.com/).
## Design Principles
* Have an extremely simple setup process with a minimal learning curve.
* Manage machines quickly and in parallel.
* Avoid custom-agents and additional open ports, be agentless by
leveraging the existing SSH daemon.
* Describe infrastructure in a language that is both machine and human
friendly.
* Focus on security and easy auditability/review/rewriting of content.
* Manage new remote machines instantly, without bootstrapping any
software.
* Allow module development in any dynamic language, not just Python.
* Be usable as non-root.
* Be the easiest IT automation system to use, ever.
## Use Ansible
You can install a released version of Ansible with `pip` or a package manager. See our
[installation guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) for details on installing Ansible
on a variety of platforms.
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
in the Ansible community if you want to run the `devel` branch.
## Get Involved
* Read [Community Information](https://docs.ansible.com/ansible/latest/community) for all
kinds of ways to contribute to and interact with the project,
including mailing list information and how to submit bug reports and
code to Ansible.
* Join a [Working Group](https://github.com/ansible/community/wiki),
an organized community devoted to a specific technology domain or platform.
* Submit a proposed code update through a pull request to the `devel` branch.
* Talk to us before making larger changes
to avoid duplicate efforts. This not only helps everyone
know what is going on, but it also helps save time and effort if we decide
some changes are needed.
* For a list of email lists, IRC channels and Working Groups, see the
[Communication page](https://docs.ansible.com/ansible/latest/community/communication.html)
## Coding Guidelines
We document our Coding Guidelines in the [Developer Guide](https://docs.ansible.com/ansible/devel/dev_guide/). We particularly suggest you review:
* [Contributing your module to Ansible](https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_checklist.html)
* [Conventions, tips, and pitfalls](https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_best_practices.html)
## Branch Info
* The `devel` branch corresponds to the release actively under development.
* The `stable-2.X` branches correspond to stable releases.
* Create a branch based on `devel` and set up a [dev environment](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#common-environment-setup) if you want to open a PR.
* See the [Ansible release and maintenance](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html) page for information about active branches.
## Roadmap
Based on team and community feedback, an initial roadmap will be published for a major or minor version (ex: 2.7, 2.8).
The [Ansible Roadmap page](https://docs.ansible.com/ansible/devel/roadmap/) details what is planned and how to influence the roadmap.
## Authors
Ansible was created by [Michael DeHaan](https://github.com/mpdehaan)
and has contributions from over 5000 users (and growing). Thanks everyone!
[Ansible](https://www.ansible.com) is sponsored by [Red Hat, Inc.](https://www.redhat.com)
## License
GNU General Public License v3.0 or later
See [COPYING](COPYING) to see the full text.

View File

@ -1,115 +0,0 @@
|PyPI version| |Docs badge| |Chat badge| |Build Status| |Code Of Conduct| |Mailing Lists| |License| |CII Best Practices|
*******
Ansible
*******
Ansible is a radically simple IT automation system. It handles
configuration management, application deployment, cloud provisioning,
ad-hoc task execution, network automation, and multi-node orchestration. Ansible makes complex
changes like zero-downtime rolling updates with load balancers easy. More information on the Ansible `website <https://ansible.com/>`_.
Design Principles
=================
* Have an extremely simple setup process with a minimal learning curve.
* Manage machines quickly and in parallel.
* Avoid custom-agents and additional open ports, be agentless by
leveraging the existing SSH daemon.
* Describe infrastructure in a language that is both machine and human
friendly.
* Focus on security and easy auditability/review/rewriting of content.
* Manage new remote machines instantly, without bootstrapping any
software.
* Allow module development in any dynamic language, not just Python.
* Be usable as non-root.
* Be the easiest IT automation system to use, ever.
Use Ansible
===========
You can install a released version of Ansible with ``pip`` or a package manager. See our
`installation guide <https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html>`_ for details on installing Ansible
on a variety of platforms.
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
in the Ansible community if you want to run the ``devel`` branch.
Get Involved
============
* Read `Community
Information <https://docs.ansible.com/ansible/latest/community>`_ for all
kinds of ways to contribute to and interact with the project,
including mailing list information and how to submit bug reports and
code to Ansible.
* Join a `Working Group
<https://github.com/ansible/community/wiki>`_, an organized community devoted to a specific technology domain or platform.
* Submit a proposed code update through a pull request to the ``devel`` branch.
* Talk to us before making larger changes
to avoid duplicate efforts. This not only helps everyone
know what is going on, but it also helps save time and effort if we decide
some changes are needed.
* For a list of email lists, IRC channels and Working Groups, see the
`Communication page <https://docs.ansible.com/ansible/latest/community/communication.html>`_
Coding Guidelines
=================
We document our Coding Guidelines in the `Developer Guide <https://docs.ansible.com/ansible/devel/dev_guide/>`_. We particularly suggest you review:
* `Contributing your module to Ansible <https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_checklist.html>`_
* `Conventions, tips, and pitfalls <https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_best_practices.html>`_
Branch Info
===========
* The ``devel`` branch corresponds to the release actively under development.
* The ``stable-2.X`` branches correspond to stable releases.
* Create a branch based on ``devel`` and set up a `dev environment <https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#common-environment-setup>`_ if you want to open a PR.
* See the `Ansible release and maintenance <https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html>`_ page for information about active branches.
Roadmap
=======
Based on team and community feedback, an initial roadmap will be published for a major or minor version (ex: 2.7, 2.8).
The `Ansible Roadmap page <https://docs.ansible.com/ansible/devel/roadmap/>`_ details what is planned and how to influence the roadmap.
Authors
=======
Ansible was created by `Michael DeHaan <https://github.com/mpdehaan>`_
and has contributions from over 5000 users (and growing). Thanks everyone!
`Ansible <https://www.ansible.com>`_ is sponsored by `Red Hat, Inc.
<https://www.redhat.com>`_
License
=======
GNU General Public License v3.0 or later
See `COPYING <COPYING>`_ to see the full text.
.. |PyPI version| image:: https://img.shields.io/pypi/v/ansible-core.svg
:target: https://pypi.org/project/ansible-core
.. |Docs badge| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
:target: https://docs.ansible.com/ansible/latest/
.. |Build Status| image:: https://dev.azure.com/ansible/ansible/_apis/build/status/CI?branchName=devel
:target: https://dev.azure.com/ansible/ansible/_build/latest?definitionId=20&branchName=devel
.. |Chat badge| image:: https://img.shields.io/badge/chat-IRC-brightgreen.svg
:target: https://docs.ansible.com/ansible/latest/community/communication.html
.. |Code Of Conduct| image:: https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg
:target: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html
:alt: Ansible Code of Conduct
.. |Mailing Lists| image:: https://img.shields.io/badge/mailing%20lists-Ansible-orange.svg
:target: https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information
:alt: Ansible mailing lists
.. |License| image:: https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg
:target: COPYING
:alt: Repository License
.. |CII Best Practices| image:: https://bestpractices.coreinfrastructure.org/projects/2372/badge
:target: https://bestpractices.coreinfrastructure.org/projects/2372
:alt: Ansible CII Best Practices certification

View File

@ -0,0 +1,813 @@
=========================================================
ansible-core 2.13 "Nobody's Fault but Mine" Release Notes
=========================================================
.. contents:: Topics
v2.13.13
========
Release Summary
---------------
| Release Date: 2023-10-09
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__
Security Fixes
--------------
- ansible-galaxy - Prevent roles from using symlinks to overwrite files outside of the installation directory (CVE-2023-5115)
Bugfixes
--------
- ansible-galaxy info - fix reporting no role found when lookup_role_by_name returns None.
v2.13.12
========
Release Summary
---------------
| Release Date: 2023-09-11
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__
Minor Changes
-------------
- Removed ``exclude`` and ``recursive-exclude`` commands for generated files from the ``MANIFEST.in`` file. These excludes were unnecessary since releases are expected to be built with a clean worktree.
- Removed ``exclude`` commands for sanity test files from the ``MANIFEST.in`` file. These tests were previously excluded because they did not pass when run from an sdist. However, sanity tests are not expected to pass from an sdist, so excluding some (but not all) of the failing tests makes little sense.
- Removed redundant ``include`` commands from the ``MANIFEST.in`` file. These includes either duplicated default behavior or another command.
- The ``ansible-core`` sdist no longer contains pre-generated man pages. Instead, a ``packaging/cli-doc/build.py`` script is included in the sdist. This script can generate man pages and standalone RST documentation for ``ansible-core`` CLI programs.
- The ``docs`` and ``examples`` directories are no longer included in the ``ansible-core`` sdist. These directories have been moved to the https://github.com/ansible/ansible-documentation repository.
- The minimum required ``setuptools`` version is now 45.2.0, as it is the oldest version to support Python 3.10.
- Use ``include`` where ``recursive-include`` is unnecessary in the ``MANIFEST.in`` file.
- Use ``package_data`` instead of ``include_package_data`` for ``setup.cfg`` to avoid ``setuptools`` warnings.
- ansible-test - Update the logic used to detect when ``ansible-test`` is running from source.
- ansible-test — Replaced `freebsd/12.3` remote with `freebsd/12.4`. The former is no longer functional.
- ansible-test — Replaced `freebsd/13.0` remote with `freebsd/13.1`. The former is no longer functional.
Bugfixes
--------
- Exclude internal options from man pages and docs.
- Fix ``ansible-config init`` man page option indentation.
- The ``ansible-config init`` command now has a documentation description.
- The ``ansible-galaxy collection download`` command now has a documentation description.
- The ``ansible-galaxy collection install`` command documentation is now visible (previously hidden by a decorator).
- The ``ansible-galaxy collection verify`` command now has a documentation description.
- The ``ansible-galaxy role install`` command documentation is now visible (previously hidden by a decorator).
- The ``ansible-inventory`` command command now has a documentation description (previously used as the epilog).
- Update module_utils.urls unit test to work with cryptography >= 41.0.0.
- When generating man pages, use ``func`` to find the command function instead of looking it up by the command name.
- ansible-galaxy - Enabled the ``data`` tarfile filter during role installation for Python versions that support it. A probing mechanism is used to avoid Python versions with a broken implementation.
- ansible-test - Always use ansible-test managed entry points for ansible-core CLI tools when not running from source. This fixes issues where CLI entry points created during install are not compatible with ansible-test.
- ansible-test - Pre-build a PyYAML wheel before installing requirements to avoid a potential Cython build failure.
- man page build - Sub commands of ``ansible-galaxy role`` and ``ansible-galaxy collection`` are now documented.
- tarfile - handle data filter deprecation warning message for extract and extractall (https://github.com/ansible/ansible/issues/80832).
v2.13.11
========
Release Summary
---------------
| Release Date: 2023-07-18
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__
Minor Changes
-------------
- Removed ``straight.plugin`` from the build and packaging requirements.
Bugfixes
--------
- ansible-test - Fix a traceback that occurs when attempting to test Ansible source using a different ansible-test. A clear error message is now given when this scenario occurs.
- 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).
- man page build - Remove the dependency on the ``docs`` directory for building man pages.
v2.13.10
========
Release Summary
---------------
| Release Date: 2023-05-22
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__
Minor Changes
-------------
- ansible-test - Allow float values for the ``--timeout`` option to the ``env`` command. This simplifies testing.
- ansible-test - Refactored ``env`` command logic and timeout handling.
- ansible-test - Use ``datetime.datetime.now`` with ``tz`` specified instead of ``datetime.datetime.utcnow``.
Bugfixes
--------
- ansible-galaxy - fix installing signed collections (https://github.com/ansible/ansible/issues/80648).
- ansible-galaxy collection verify - fix verifying signed collections when the keyring is not configured.
- ansible-test - Fix handling of timeouts exceeding one day.
- ansible-test - Fix various cases where the test timeout could expire without terminating the tests.
- ansible-test - When bootstrapping remote FreeBSD instances, use the OS packaged ``setuptools`` instead of installing the latest version from PyPI.
- pep517 build backend - Copy symlinks when copying the source tree. This avoids tracebacks in various scenarios, such as when a venv is present in the source tree.
v2.13.9
=======
Release Summary
---------------
| Release Date: 2023-04-24
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__
Minor Changes
-------------
- ansible-test - Moved git handling out of the validate-modules sanity test and into ansible-test.
- ansible-test - Removed the ``--keep-git`` sanity test option, which was limited to testing ansible-core itself.
- ansible-test - Updated the Azure Pipelines CI plugin to work with newer versions of git.
Breaking Changes / Porting Guide
--------------------------------
- ansible-test - Integration tests which depend on specific file permissions when running in an ansible-test managed host environment may require changes. Tests that require permissions other than ``755`` or ``644`` may need to be updated to set the necessary permissions as part of the test run.
Bugfixes
--------
- Fix ``MANIFEST.in`` to exclude unwanted files in the ``packaging/`` directory.
- Fix ``MANIFEST.in`` to include ``*.md`` files in the ``test/support/`` directory.
- Windows - Display a warning if the module failed to cleanup any temporary files rather than failing the task. The warning contains a brief description of what failed to be deleted.
- Windows - Ensure the module temp directory contains more unique values to avoid conflicts with concurrent runs - https://github.com/ansible/ansible/issues/80294
- Windows - Improve temporary file cleanup used by modules. Will use a more reliable delete operation on Windows Server 2016 and newer to delete files that might still be open by other software like Anti Virus scanners. There are still scenarios where a file or directory cannot be deleted but the new method should work in more scenarios.
- ansible-doc - stop generating wrong module URLs for module see-alsos. The URLs for modules in ansible.builtin do now work, and URLs for modules outside ansible.builtin are no longer added (https://github.com/ansible/ansible/pull/80280).
- ansible-galaxy - Improve retries for collection installs, to properly retry, and extend retry logic to common URL related connection errors (https://github.com/ansible/ansible/issues/80170 https://github.com/ansible/ansible/issues/80174)
- ansible-galaxy - reduce API calls to servers by fetching signatures only for final candidates.
- ansible-test - Add support for ``argcomplete`` version 3.
- ansible-test - Always indicate the Python version being used before installing requirements. Resolves issue https://github.com/ansible/ansible/issues/72855
- ansible-test - Exclude ansible-core vendored Python packages from ansible-test payloads.
- ansible-test - Integration test target prefixes defined in a ``tests/integration/target-prefixes.{group}`` file can now contain an underscore (``_``) character. Resolves issue https://github.com/ansible/ansible/issues/79225
- ansible-test - Removed pointless comparison in diff evaluation logic.
- ansible-test - Set ``PYLINTHOME`` for the ``pylint`` sanity test to prevent failures due to ``pylint`` checking for the existence of an obsolete home directory.
- ansible-test - Support loading of vendored Python packages from ansible-core.
- ansible-test - Use consistent file permissions when delegating tests to a container or remote host. Files with any execute bit set will use permissions ``755``. All other files will use permissions ``644``. (Resolves issue https://github.com/ansible/ansible/issues/75079)
- password lookup now correctly reads stored ident fields.
- pep517 build backend - Use the documented ``import_module`` import from ``importlib``.
v2.13.8
=======
Release Summary
---------------
| Release Date: 2023-02-27
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Major Changes
-------------
- ansible-test - Docker Desktop on WSL2 is now supported (additional configuration required).
- 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 - 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 - Podman on WSL2 is now supported.
- 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 - 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 - 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 - Add support for provisioning Alpine 3.16 remote instances.
- ansible-test - Add support for provisioning Fedora 36 remote instances.
- ansible-test - Add support for provisioning Ubuntu 20.04 remote instances.
- ansible-test - Add support for provisioning remotes which require ``doas`` for become.
- ansible-test - Additional log details are shown when containers fail to start or SSH connections to containers fail.
- ansible-test - Alpine remotes now use ``sudo`` for tests, using ``doas`` only for bootstrapping.
- ansible-test - Become support for remote instance provisioning is no longer tied to a fixed list of platforms.
- ansible-test - Connection failures to remote provisioned hosts now show failure details as a warning.
- ansible-test - Containers included with ansible-test no longer disable seccomp by default.
- 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 - FreeBSD remotes now use ``sudo`` for tests, using ``su`` only for bootstrapping.
- 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 - More details are provided about an instance when provisioning fails.
- 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 - Remote Alpine instances now have the ``acl`` package installed.
- ansible-test - Remote Fedora instances now have the ``acl`` package installed.
- ansible-test - Remote FreeBSD instances now have ACLs enabled on the root filesystem.
- ansible-test - Remote Ubuntu instances now have the ``acl`` package installed.
- 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.
- ansible-test - Specify the configuration file location required by test plugins when the config file is not found. This resolves issue: https://github.com/ansible/ansible/issues/79411
- ansible-test - The ``ansible-test env`` command now detects and reports the container ID if running in a container.
- 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 - Use ``stop --time 0`` followed by ``rm`` to remove ephemeral containers instead of ``rm -f``. This speeds up teardown of ephemeral containers.
- ansible-test - Warnings are now shown when using containers that were built with VOLUME instructions.
- 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 - 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 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).
Bugfixes
--------
- Ansible.Basic.cs - Ignore compiler warning (reported as an error) when running under PowerShell 7.3.x.
- TaskExecutor - don't ignore templated _raw_params that k=v parser failed to parse (https://github.com/ansible/ansible/issues/79862)
- ansible-test - Always remove containers after failing to create/run them. This avoids leaving behind created containers when using podman.
- ansible-test - Avoid using ``exec`` after container startup when possible. This improves container startup performance and avoids intermittent startup issues with some old containers.
- 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 - Fix bootstrapping of Python 3.9 on Ubuntu 20.04 remotes.
- ansible-test - Fix validate-modules error when retrieving PowerShell argspec when retrieved inside a Cmdlet
- ansible-test - Handle server errors when executing the ``docker info`` command.
- ansible-test - Multiple containers now work under Podman without specifying the ``--docker-network`` option.
- ansible-test - Pass the ``XDG_RUNTIME_DIR`` environment variable through to container commands.
- ansible-test - Perform PyPI proxy configuration after instances are ready and bootstrapping has been completed. Only target instances are affected, as controller instances were already handled this way. This avoids proxy configuration errors when target instances are not yet ready for use.
- ansible-test - Prevent concurrent / repeat inspections of the same container image.
- ansible-test - Prevent concurrent / repeat pulls of the same container image.
- ansible-test - Prevent concurrent execution of cached methods.
- ansible-test - Show the exception type when reporting errors during instance provisioning.
- ansible-test - Support Podman 4.4.0+ by adding the ``SYS_CHROOT`` capability when running containers.
- ansible-test - Temporary executables are now verified as executable after creation. Without this check, path injected scripts may not be found, typically on systems with ``/tmp`` mounted using the "noexec" option. This can manifest as a missing Python interpreter, or use of the wrong Python interpreter, as well as other error conditions.
- 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.
- ansible-test - fix warning message about failing to run an image to include the image name
- file - touch action in check mode was always returning ok. Fix now evaluates the different conditions and returns the appropriate changed status. (https://github.com/ansible/ansible/issues/79360)
Known Issues
------------
- ansible-test - Additional configuration may be required for certain container host and container combinations. Further details are available in the testing documentation.
- 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.
- 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 - Using Docker on systems with SELinux may require setting SELinux to permissive mode. Podman should work with SELinux in enforcing mode.
v2.13.7
=======
Release Summary
---------------
| Release Date: 2022-12-05
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Minor Changes
-------------
- ansible-test - Improve consistency of executed ``pylint`` commands by making the plugins ordered.
Bugfixes
--------
- file lookup now plays nice with generic lookup ``errors`` option.
v2.13.6
=======
Release Summary
---------------
| Release Date: 2022-11-07
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Minor Changes
-------------
- ansible-test - Improve consistency of version specific documentation links.
Bugfixes
--------
- BSD network facts - Do not assume column indexes, look for ``netmask`` and ``broadcast`` for determining the correct columns when parsing ``inet`` line (https://github.com/ansible/ansible/issues/79117)
- ansible-galaxy - make initial call to Galaxy server on-demand only when installing, getting info about, and listing roles.
- ansible-test - Add ``wheel < 0.38.0`` constraint for Python 3.6 and earlier.
- ansible-test - Fix broken documentation link for ``aws`` test plugin error messages.
- copy module will no longer move 'non files' set as src when remote_src=true.
- file lookup now handles missing files more gracefully.
- service_facts - Use python re to parse service output instead of grep (https://github.com/ansible/ansible/issues/78541)
- updated error messages to include 'acl' and not just mode changes when failing to set required permissions on remote.
v2.13.5
=======
Release Summary
---------------
| Release Date: 2022-10-10
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Bugfixes
--------
- ``ansible-galaxy`` - remove extra server api call during dependency resolution for requirements and dependencies that are already satisfied (https://github.com/ansible/ansible/issues/77443).
- ansible-test - Allow disabled, unsupported, unstable and destructive integration test targets to be selected using their respective prefixes.
- ansible-test - 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).
- apt - Fix module failure when a package is not installed and only_upgrade=True. Skip that package and check the remaining requested packages for upgrades. (https://github.com/ansible/ansible/issues/78762)
- apt module should not traceback on invalid type given as package. issue 78663.
- known_hosts - do not return changed status when a non-existing key is removed (https://github.com/ansible/ansible/issues/78598)
- 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)
- plugin loader, fix detection for existing configuration before initializing for a plugin
v2.13.4
=======
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
- ansible-galaxy - Fix detection of ``--role-file`` in arguments for implicit role invocation (https://github.com/ansible/ansible/issues/78204)
- ansible-galaxy - Fix exit codes for role search and delete (https://github.com/ansible/ansible/issues/78516)
- ansible-test - Fix change detection for ansible-test's own integration tests.
- ansible-test - ansible-doc sanity test - Correctly determine the fully-qualified collection name for plugins in subdirectories, resolving https://github.com/ansible/ansible/issues/78490.
- apt - don't actually update the cache in check mode with update_cache=true.
- apt - don't mark existing packages as manually installed in check mode (https://github.com/ansible/ansible/issues/66413).
- apt - fix package selection to include /etc/apt/preferences(.d) (https://github.com/ansible/ansible/issues/77969)
- urls - Guard imports of ``urllib3`` by catching ``Exception`` instead of ``ImportError`` to prevent exceptions in the import process of optional dependencies from preventing use of ``urls.py`` (https://github.com/ansible/ansible/issues/78648)
- wait_for - Read file and perform comparisons using bytes to avoid decode errors (https://github.com/ansible/ansible/issues/78214)
v2.13.3
=======
Release Summary
---------------
| Release Date: 2022-08-15
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Bugfixes
--------
- Avoid 'unreachable' error when chmod on AIX has 255 as return code.
- Fix PluginLoader to mimic Python import machinery by adding module to sys.modules before exec
- Fix dnf module documentation to indicate that comparison operators for package version require spaces around them (https://github.com/ansible/ansible/issues/78295)
- ansible-connection - decrypt vaulted parameters before sending over the socket, as vault secrets are not available on the other side.
- ansible-galaxy - Fix reinitializing the whole collection directory with ``ansible-galaxy collection init ns.coll --force``. Now directories and files that are not included in the collection skeleton will be removed.
- ansible-galaxy - do not require mandatory keys in the ``galaxy.yml`` of source collections when listing them (https://github.com/ansible/ansible/issues/70180).
- ansible-galaxy - fix listing collections that contains metadata but the namespace or name are not strings.
- ansible-galaxy - fix setting the cache for paginated responses from Galaxy NG/AH (https://github.com/ansible/ansible/issues/77911).
- ansible-test - Delegation for commands which generate output for programmatic consumption no longer redirect all output to stdout. The affected commands and options are ``shell``, ``sanity --lint``, ``sanity --list-tests``, ``integration --list-targets``, ``coverage analyze``
- ansible-test - Delegation now properly handles arguments given after ``--`` on the command line.
- ansible-test - Test configuration for collections is now parsed only once, prior to delegation. Fixes issue: https://github.com/ansible/ansible/issues/78334
- ansible-test - The ``shell`` command no longer redirects all output to stdout when running a provided command. Any command output written to stderr will be mixed with the stderr output from ansible-test.
- ansible-test - The ``shell`` command no longer requests a TTY when using delegation unless an interactive shell is being used. An interactive shell is the default behavior when no command is given to pass to the shell.
- dnf - fix output parsing on systems with ``LANGUAGE`` set to a language other than English (https://github.com/ansible/ansible/issues/78193)
- if a config setting prevents running ansible it should at least show it's "origin".
- prevent type annotation shim failures from causing runtime failures (https://github.com/ansible/ansible/pull/77860)
- template module/lookup - fix ``convert_data`` option that was effectively always set to True for Jinja macros (https://github.com/ansible/ansible/issues/78141)
- uri - properly use uri parameter use_proxy (https://github.com/ansible/ansible/issues/58632)
- yum - fix traceback when ``releasever`` is specified with ``latest`` (https://github.com/ansible/ansible/issues/78058)
v2.13.2
=======
Release Summary
---------------
| Release Date: 2022-07-18
| `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
--------
- Move undefined check from concat to finalize (https://github.com/ansible/ansible/issues/78156)
- ansible-doc - no longer list module and plugin aliases that are created with symlinks (https://github.com/ansible/ansible/pull/78137).
- ansible-doc - when listing modules in collections, proceed recursively. This fixes module listing for community.general 5.x.y and community.network 4.x.y (https://github.com/ansible/ansible/pull/78137).
- ansible-doc will not add 'website for' in ":ref:" substitutions as it made them confusing.
- file backed cache plugins now handle concurrent access by making atomic updates to the files.
- password lookup does not ignore k=v arguments anymore.
- user - Fix error "Permission denied" in user module while generating SSH keys (https://github.com/ansible/ansible/issues/78017).
v2.13.1
=======
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-galaxy - Support resolvelib versions 0.6.x, 0.7.x, and 0.8.x. The full range of supported versions is now >= 0.5.3, < 0.9.0.
- ansible-test - Add RHEL 9.0 remote support.
- ansible-test - Add support for Ubuntu VMs using the ``--remote`` option.
- ansible-test - Add support for exporting inventory with ``ansible-test shell --export {path}``.
- ansible-test - Add support for multi-arch remotes.
- ansible-test - Add support for running non-interactive commands with ``ansible-test shell``.
- ansible-test - Avoid using the ``mock_use_standalone_module`` setting for unit tests running on Python 3.8 or later.
- ansible-test - Blocking mode is now enforced for stdin, stdout and stderr. If any of these are non-blocking then ansible-test will exit during startup with an error.
- ansible-test - Improve consistency of output messages by using stdout or stderr for most output, but not both.
- ansible-test - The ``shell`` command can be used outside a collection if no controller delegation is required.
Bugfixes
--------
- Add PyYAML >= 5.1 as a dependency of ansible-core to be compatible with Python 3.8+.
- ansible-config dump - Only display plugin type headers when plugin options are changed if --only-changed is specified.
- ansible-galaxy - handle unsupported versions of resolvelib gracefully.
- ansible-test - Fix internal validation of remote completion configuration.
- ansible-test - Prevent ``--target-`` prefixed options for the ``shell`` command from being combined with legacy environment options.
- ansible-test - Sanity test output with the ``--lint`` option is no longer mixed in with bootstrapping output.
- ansible-test - Subprocesses are now isolated from the stdin, stdout and stderr of ansible-test. This avoids issues with subprocesses tampering with the file descriptors, such as SSH making them non-blocking. As a result of this change, subprocess output from unit and integration tests on stderr now go to stdout.
- ansible-test - Subprocesses no longer have access to the TTY ansible-test is connected to, if any. This maintains consistent behavior between local testing and CI systems, which typically do not provide a TTY. Tests which require a TTY should use pexpect or another mechanism to create a PTY.
- apt module now correctly handles virtual packages.
- lookup plugin - catch KeyError when lookup returns dictionary (https://github.com/ansible/ansible/pull/77789).
- 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).
- 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).
- psrp connection now handles default to inventory_hostname correctly.
- winrm connection now handles default to inventory_hostname correctly.
v2.13.0
=======
Release Summary
---------------
| Release Date: 2022-05-16
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Major Changes
-------------
- Jinja2 Controller Requirement - Jinja2 3.0.0 or newer is required for the control node (the machine that runs Ansible) (https://github.com/ansible/ansible/pull/75881)
- Templating - remove ``safe_eval`` in favor of using ``NativeEnvironment`` but utilizing ``literal_eval`` only in cases when ``safe_eval`` was used (https://github.com/ansible/ansible/pull/75587)
Minor Changes
-------------
- Action Plugins - Add helper method for argument spec validation, and extend to pause and async_wrapper
- Added AIX root CA certs folders - enhance the TLS support in ``uri`` task on AIX
- Added ``module_utils.compat.typing`` to facilitate type-hinting on all supported Python versions.
- Ansible.Basic - small changes to allow use in PowerShell modules running on non-Windows platforms (https://github.com/ansible/ansible/pull/76924).
- AnsibleModule.run_command() now has a toggle to allow caller to decide to handle exceptions from executing the command itself
- Attach concat function to an environment class (https://github.com/ansible/ansible/pull/76282)
- Clarify in a comment that unrolling an iterator in ``Templar._finalize`` is actually necessary. Also switch to using the ``_unroll_iterator`` decorator directly to deduplicate code in ``Templar._finalize``. (https://github.com/ansible/ansible/pull/76436)
- Installation - modernize our python installation, to reduce dynamic code in setup.py, and migrate what is feasible to setup.cfg. This will enable shipping wheels in the future.
- PlayIterator - introduce public methods to access ``PlayIterator._host_states`` (https://github.com/ansible/ansible/pull/74416)
- PlayIterator - use enums for Iterating and Failed states (https://github.com/ansible/ansible/pull/74511)
- Reduce number of iterations through PlayIterator (https://github.com/ansible/ansible/pull/74175)
- Remove more Python 2.x compatibility code from controller (https://github.com/ansible/ansible/pull/77320).
- Start of moving away from using Six, Python 2 and 3 compatibility library (https://github.com/ansible/ansible/pull/75863)
- 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-galaxy collection [install|verify]`` - allow user-provided signature sources in addition to those from the Galaxy server. Each collection entry in a requirements file can specify a ``signatures`` key followed by a list of sources. Collection name(s) provided on the CLI can specify additional signature sources by using the ``--signatures`` CLI option. Signature sources should be URIs that can be opened with ``urllib.request.urlopen()``, such as "https://example.com/path/to/detached_signature.asc" or "file:///path/to/detached_signature.asc". The ``--keyring`` option must be specified if signature sources are provided.
- ``ansible-galaxy collection [install|verify]`` - use gpg to verify the authenticity of the signed ``MANIFEST.json`` with ASCII armored detached signatures provided by the Galaxy server. The keyring (which is not managed by ``ansible-galaxy``) must be provided with the ``--keyring`` option to use signature verification. If no ``--keyring`` is specified and the collection to ``install|verify`` has associated detached signatures on the Galaxy server, a warning is provided.
- ``ansible-galaxy collection install`` - Add a global configuration to modify the required number of signatures that must verify the authenticity of the collection. By default, the number of required successful signatures is 1. Set this option to ``all`` to require all signatures verify the collection. To ensure signature verification fails if there are no valid signatures, prepend the value with '+', such as ``+all`` or ``+1``.
- ``ansible-galaxy collection install`` - Add a global ignore list for gpg signature errors. This can be used to ignore certain signatures when the number of required successful signatures is all. When the required number of successful signatures is a positive integer, the only effect this has is to display fewer errors to the user on failure (success is determined by having the minimum number of successful signatures, in which case all errors are disregarded).
- ``ansible-galaxy collection install`` - Add a global toggle to turn off GPG signature verification.
- ``ansible-galaxy collection install`` - Store Galaxy server metadata alongside installed collections for provenance. Signatures obtained from the Galaxy server can be used for offline verification with ``ansible-galaxy collection verify --offline``.
- ansible-console - Provide a way to customize the stdout callback
- ansible-core modules - Remove unused Python shebangs from built-in modules.
- ansible-doc metadata dump - add option ``--no-fail-on-errors`` which allows to not fail the ansible-doc invocation when errors happen during docs parsing or processing. Instead they are reported in the JSON result in an ``error`` key for the affected plugins (https://github.com/ansible/ansible/pull/77035).
- ansible-galaxy - the option to skip certificate verification now also applies when cloning via SCM (git/hg) (https://github.com/ansible/ansible/issues/41077)
- ansible-test - Accept new-style Python modules without a shebang.
- ansible-test - Add ``--version`` support to show the ansible-core version.
- ansible-test - Add support for ``rhel/8.5`` remote instances.
- ansible-test - Add support for remote testing of FreeBSD 12.3.
- ansible-test - Add support for running container tests with ``podman remote`` (https://github.com/ansible/ansible/pull/75753)
- ansible-test - Added the ``fedora35`` test container.
- ansible-test - Change the maximum number of open files in a test container from the default to ``10240``.
- ansible-test - Declare public dependencies of ansible-core and use to limit unguarded imports in plugins.
- ansible-test - Importing ``distutils`` now results in an error.
- ansible-test - Installation of ``cryptography`` is no longer version constrained when ``openssl`` 1.1.0 or later is installed.
- ansible-test - Miscellaneous code cleanup and type hint fixes.
- ansible-test - PowerShell in the ``base`` and ``default`` containers has been upgraded to version 7.1.4.
- ansible-test - Remove RHEL 8.4 remote (``rhel/8.4``) support.
- ansible-test - Remove ``idna`` constraint.
- ansible-test - Remove obsolete ``MAXFD`` display.
- ansible-test - Remove obsolete constraints for Python 2.6.
- ansible-test - Remove support for FreeBSD 12.2 remote provisioning.
- ansible-test - Remove support for macOS 11.1 remote provisioning.
- ansible-test - Remove support for provisioning remote AIX instances.
- ansible-test - Remove the ``centos8`` test container since CentOS 8 will reach end-of-life soon.
- ansible-test - Remove the ``fedora33`` test container since Fedora 33 will reach end-of-life soon.
- ansible-test - Remove unused Python 2.x compatibility code.
- ansible-test - Removed support for Sherlock from the Azure provisioning plugin.
- ansible-test - Removed used ``MarkupSafe`` constraint for Python 3.5 and earlier.
- ansible-test - Requirements for the plugin import test are now frozen.
- ansible-test - Shellcheck in the ``base`` and ``default`` containers has been upgraded to version 0.7.0.
- ansible-test - Stop early with an error if the current working directory contains an invalid collection namespace or name.
- ansible-test - The ``--help`` option is now available when an unsupported cwd is in use.
- ansible-test - The ``--help`` output now shows the same instructions about cwd as would be shown in error messages if the cwd is unsupported.
- 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 explanation about cwd usage has been improved to explain more clearly what is required.
- 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 ``base`` container to version 2.1.0.
- ansible-test - Update ``base`` container to version 2.2.0.
- ansible-test - Update ``default`` containers to version 5.2.0.
- ansible-test - Update ``default`` containers to version 5.4.0.
- ansible-test - Update ``default`` containers to version 5.5.0.
- ansible-test - Update ``default`` containers to version 5.6.2.
- ansible-test - Update ``default`` containers to version 5.7.0.
- ansible-test - Update ``default`` containers to version 5.8.0.
- ansible-test - Update ``default`` containers to version 5.9.0.
- ansible-test - Update ``pip`` used to bootstrap remote FreeBSD instances from version 20.3.4 to 21.3.1.
- ansible-test - Update sanity test requirements.
- ansible-test - Update the NIOS test plugin container to version 1.4.0.
- 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 ``base`` and ``default`` containers from Python 3.10.0rc2 to 3.10.0.
- ansible-test - Update the ``base`` and ``default`` containers from a Ubuntu 18.04 to Ubuntu 20.04 base image.
- ansible-test - Update the ``default`` containers to version 5.1.0.
- 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.
- ansible-test - Use Python 3.10 as the default Python version for the ``base`` and ``default`` containers.
- ansible-test - add macOS 12.0 as a remote target (https://github.com/ansible/ansible/pull/76328)
- ansible-test - handle JSON decode error gracefully in podman environment.
- ansible-test pslint - Added the `AvoidLongLines <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/AvoidLongLines.md>`_ rule set to a length of 160.
- ansible-test pslint - Added the `PlaceCloseBrace <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/PlaceCloseBrace.md>`_ rule set to enforce close braces on a newline.
- ansible-test pslint - Added the `PlaceOpenBrace <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/PlaceOpenBrace.md>`_ rule set to enforce open braces on the same line and a subsequent newline.
- ansible-test pslint - Added the `UseConsistentIndentation <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/UseConsistentIndentation.md>`_ rule to enforce indentation is done with 4 spaces.
- ansible-test pslint - Added the `UseConsistentWhitespace <https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/UseConsistentWhitespace.md>`_ rule to enforce whitespace consistency in PowerShell.
- ansible-test pslint - Updated ``PowerShellScriptAnalyzer`` to 1.20.0
- ansible-test sanity validate-modules - the validate-modules sanity test now also checks the documentation of documentable plugin types (https://github.com/ansible/ansible/pull/71734).
- ansible-test validate-modules sanity test - add more schema checks to improve quality of plugin documentation (https://github.com/ansible/ansible/pull/77268).
- ansible-test validate_modules - allow ``choices`` for return values (https://github.com/ansible/ansible/pull/76009).
- apt - Add support for using ">=" in package version number matching.
- apt - Adds APT option ``--allow-change-held-packages`` as module parameter ``allow_change_held_packages`` to allow APT up- or downgrading a package which is on APTs hold list (https://github.com/ansible/ansible/issues/65325)
- auto inventory plugin will now give plugin loading information on verbose output
- callbacks - Add result serialization format options to ``_dump_results`` allowing plugins such as the ``default`` callback to emit ``YAML`` serialized task results in addition to ``JSON``
- dnf - add more specific error message for GPG validation (https://github.com/ansible/ansible/issues/76192)
- env lookup, add default option
- facts - report prefix length for IPv4 addresses in Linux network facts.
- get_parsable_locale now logs result when in debug mode.
- git - display the destination directory path in error msg when local_mods detects local modifications conflict so that users see the exact location
- iptables - add the ``chain_management`` parameter that controls iptables chain creation and deletion
- jinja2_native - keep same behavior on Python 3.10.
- junit callback - Add support for replacing the directory portion of out-of-tree relative task paths with a placeholder.
- k8s - scenario guides for kubernetes migrated to ``kubernetes.core`` collection.
- module_utils.distro - Add missing ``typing`` import from original code.
- package_facts - add pkg_info support for OpenBSD and NetBSD (https://github.com/ansible/ansible/pull/76580)
- services_facts - Add support for openrc (https://github.com/ansible/ansible/pull/76373).
- setting DEFAULT_FACT_PATH is being deprecated in favor of the generic module_defaults keyword
- uri - Avoid reading the response body when not needed
- uri - Eliminate multiple requests to determine the final URL for file naming with ``dest``
- validate-modules - do some basic validation on the ``M(...)``, ``U(...)``, ``L(..., ...)`` and ``R(..., ...)`` documentation markups (https://github.com/ansible/ansible/pull/76262).
- vmware - migrated vmware scenario guides to `community.vmware` repo.
- yum, dnf - add sslverify option to temporarily disable certificate validation for a repository
Breaking Changes / Porting Guide
--------------------------------
- Module Python Dependency - Drop support for Python 2.6 in module execution.
- Templating - it is no longer allowed to perform arithmetic and concatenation operations outside of the jinja template (https://github.com/ansible/ansible/pull/75587)
- The ``finalize`` method is no longer exposed in the globals for use in templating.
Deprecated Features
-------------------
- ansible-core - Remove support for Python 2.6.
- ansible-test - Remove support for Python 2.6.
- ssh connection plugin option scp_if_ssh in favor of ssh_transfer_method.
Removed Features (previously deprecated)
----------------------------------------
- Remove deprecated ``Templar.set_available_variables()`` method (https://github.com/ansible/ansible/issues/75828)
- cli - remove deprecated ability to set verbosity before the sub-command (https://github.com/ansible/ansible/issues/75823)
- copy - remove deprecated ``thirsty`` alias (https://github.com/ansible/ansible/issues/75824)
- psrp - Removed fallback on ``put_file`` with older ``pypsrp`` versions. Users must have at least ``pypsrp>=0.4.0``.
- url_argument_spec - remove deprecated ``thirsty`` alias for ``get_url`` and ``uri`` modules (https://github.com/ansible/ansible/issues/75825, https://github.com/ansible/ansible/issues/75826)
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)
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.
- Ansible.ModuleUtils.LinkUtil - Ignore the ``LIB`` environment variable when loading the ``LinkUtil`` code
- Ansible.ModuleUtils.SID - Use user principal name as is for lookup in the ``Convert-ToSID`` function - https://github.com/ansible/ansible/issues/77316
- Detect package manager for Amazon Linux 2022 (AL2022) as dnf
- Ensure the correct ``environment_class`` is set on ``AnsibleJ2Template``
- 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)
- Fix collection filter/test plugin redirects (https://github.com/ansible/ansible/issues/77192).
- Fix executing includes in the always section in the free strategy (https://github.com/ansible/ansible/issues/75642)
- Fix for when templating empty template file resulted in file with string 'None' (https://github.com/ansible/ansible/issues/76610)
- Fix help message for the 'ansible-galaxy collection verify' positional argument. The positional argument must be a collection name (https://github.com/ansible/ansible/issues/76087).
- Fix module logging issue when using custom module on WSL2 (https://github.com/ansible/ansible/issues/76320)
- Fix task debugger to work with ``run_once`` using ``linear`` strategy (https://github.com/ansible/ansible/issues/76049)
- Fix traceback when installing a collection from a git repository and git is not installed (https://github.com/ansible/ansible/issues/77479).
- Interpreter Discovery - Fallback to OS family if the distro is not found in ``INTERPRETER_PYTHON_DISTRO_MAP`` (https://github.com/ansible/ansible/issues/75560)
- Interpreter discovery - Add ``RHEL`` to ``OS_FAMILY_MAP`` for correct family fallback for interpreter discovery (https://github.com/ansible/ansible/issues/77368)
- Make include_role/include_tasks work with any_errors_fatal (https://github.com/ansible/ansible/issues/50897)
- Parser errors from within includes should not be rescueable (https://github.com/ansible/ansible/issues/73657)
- Prevent losing unsafe on results returned from lookups (https://github.com/ansible/ansible/issues/77535)
- 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
- Trigger an undefined error when an undefined variable is detected within a dictionary and/or list (https://github.com/ansible/ansible/pull/75587)
- _run_loop - Add the task name to the warning (https://github.com/ansible/ansible/issues/76011)
- ``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)
- add_host/group_by: fix using changed_when in a loop (https://github.com/ansible/ansible/issues/71627)
- ansible - Exclude Python 2.6 from Python interpreter discovery.
- ansible-config avoid showing _terms and _input when --only-changed.
- ansible-doc - Fix ansible-doc -l ansible.builtin / ansible.legacy not returning anything
- ansible-doc - ignore plugin deprecation warnings (https://github.com/ansible/ansible/issues/75671)
- ansible-galaxy - Add galaxy_collection_skeleton/galaxy_collection_skeleton_ignore configuration options
- ansible-galaxy - Fix using the '--ignore-certs' option when there is no server-specific configuration for the Galaxy server.
- ansible-galaxy - installing/downloading collections with invalid versions in git repositories and directories now gives a formatted error message (https://github.com/ansible/ansible/issues/76425, https://github.com/ansible/ansible/issues/75404).
- ansible-galaxy - when installing a role properly raise an error when inaccessible path is specified multiple times in roles_path (e.g. via environment variable and command line option) (https://github.com/ansible/ansible/issues/76316)
- ansible-galaxy collection build - Ignore any existing ``MANIFEST.json`` and ``FILES.json`` in the root directory when building a collection.
- ansible-galaxy collection verify - display files/directories not included in the FILES.json as modified content.
- ansible-galaxy publish - Fix warning and error detection in import messages to properly display them in Ansible
- ansible-pull handle case where hostname and nodename are empty
- ansible-test - Add default entry for Windows remotes to be used with unknown versions.
- 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 - Automatic target requirements installation is now based on the target environment instead of the controller environment.
- 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 - Don't fail if network cannot be disconnected (https://github.com/ansible/ansible/pull/77472)
- ansible-test - Fix Python real prefix detection when running in a ``venv`` virtual environment.
- ansible-test - Fix ``windows-integration`` and ``network-integration`` when used with the ``--docker`` option and user-provided inventory.
- ansible-test - Fix installation and usage of ``pyyaml`` requirement for the ``import`` sanity test for collections.
- ansible-test - Fix path to inventory file for ``windows-integration`` and ``network-integration`` commands for collections.
- ansible-test - Fix plugin loading.
- 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 - Fix the ``import`` sanity test to work properly when Ansible's built-in vendoring support is in use.
- 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 - Fix traceback in ``import`` sanity test on Python 2.7 when ``pip`` is not available.
- 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 - Fix traceback when using the ``--all`` option with PowerShell code coverage.
- ansible-test - Fix type hints.
- ansible-test - Import ``yaml.cyaml.CParser`` instead of ``_yaml.CParser`` in the ``yamllint`` sanity test.
- ansible-test - Limit ``paramiko`` installation to versions before 2.9.0. This is required to maintain support for systems which do not support RSA SHA-2 algorithms.
- ansible-test - Pylint Deprecated Plugin - Use correct message symbols when date or version is not a float or str (https://github.com/ansible/ansible/issues/77085)
- ansible-test - Relocate constants to eliminate symlink.
- 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.
- ansible-test - Set the ``pytest`` option ``--rootdir`` instead of letting it be auto-detected.
- ansible-test - Show an error message instead of a traceback when running outside of a supported directory.
- ansible-test - Target integration test requirements are now correctly installed for target environments running on the controller.
- ansible-test - The ``import`` sanity test no longer reports errors about ``packaging`` being missing when testing collections.
- ansible-test - Update distribution test containers to version 3.1.0.
- 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.
- 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 - Use the correct variable to reference the client's SSH key when generating inventory.
- ansible-test - Use the legacy collection loader for ``import`` sanity tests on target-only Python versions.
- 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.
- ansible-test - fix a typo in validate-modules.
- ansible-test - fixed support container failures (eg http-test-container) under podman
- 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).
- ansible-test pslint - Fix error when encountering validation results that are highly nested - https://github.com/ansible/ansible/issues/74151
- ansible-vault encrypt_string - fix ``--output`` option to correctly write encrypted string into given file (https://github.com/ansible/ansible/issues/75101)
- ansible.builtin.file modification_time supports check_mode
- ansible_facts.devices - Fix parsing of device serial number detected via sg_inq for rhel8 (https://github.com/ansible/ansible/issues/75420)
- apt - fails to deploy deb file to old debian systems using python-apt < 0.8.9 (https://github.com/ansible/ansible/issues/47277)
- arg_spec - Fix incorrect ``no_log`` warning when a parameter alias is used (https://github.com/ansible/ansible/pull/77576)
- async - Improve performance of sending async callback events by never sending the full task through the queue (https://github.com/ansible/ansible/issues/76729)
- catch the case that cowsay is broken which would lead to missing output
- cleaning facts will now only warn about the variable name and not post the content, which can be undesireable to disclose
- collection_loader - Implement 'find_spec' and 'exec_module' to override deprecated importlib methods 'find_module' and 'load_module' when applicable (https://github.com/ansible/ansible/issues/74660).
- correctly inherit vars from parent in block (https://github.com/ansible/ansible/issues/75286).
- 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)
- distribution - add EuroLinux to fact gathering (https://github.com/ansible/ansible/pull/76624).
- distribution - detect tencentos and gather correct facts on the distro.
- dnf - ensure releasever is passed into libdnf as string (https://github.com/ansible/ansible/issues/77010)
- extend timeout for ansible-galaxy when communicating with the galaxy server api, and apply it to all interactions with the api
- facts - add support for deepin distro information detection (https://github.com/ansible/ansible/issues/77286).
- first_found - fix to allow for spaces in file names (https://github.com/ansible/ansible/issues/77136)
- gather_facts - Fact gathering now continues even if it fails to read a file
- gather_facts action now handles the move of base connection plugin types into collections to add/prevent subset argument correctly
- gather_facts/setup will not fail anymore if capsh is present but not executable
- git module fix docs and proper use of ssh wrapper script and GIT_SSH_COMMAND depending on version.
- git module is more consistent and clearer about which ssh options are added to git calls.
- git module no longer uses wrapper script for ssh options.
- hacking - fix incorrect usage of deprecated fish-shell redirection operators that failed to honor ``--quiet`` flag when sourced (https://github.com/ansible/ansible/pull/77180).
- hostname - Do not require SystemdStrategy subclasses for every distro (https://github.com/ansible/ansible/issues/76792)
- hostname - Fix Debian strategy KeyError, use `SystemdStrategy` (https://github.com/ansible/ansible/issues/76124)
- hostname - Update the systemd strategy in the ``hostname`` module to not interfere with NetworkManager (https://github.com/ansible/ansible/issues/76958)
- hostname - add hostname support for openEuler distro (https://github.com/ansible/ansible/pull/76619).
- 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).
- include_vars, properly initialize variable as there is corner case in which it can end up referenced and not defined
- inventory - parameterize ``disable_lookups`` in ``Constructable`` (https://github.com/ansible/ansible/issues/76769).
- inventory manager now respects --flush-cache
- junit callback - Fix traceback during automatic fact gathering when using relative paths.
- junit callback - Fix unicode error when handling non-ASCII task paths.
- module_utils.common.yaml - The ``SafeLoader``, ``SafeDumper`` and ``Parser`` classes now fallback to ``object`` when ``yaml`` is not available. This fixes tracebacks when inheriting from these classes without requiring a ``HAS_YAML`` guard around class definitions.
- parameters - handle blank values when argument is a list (https://github.com/ansible/ansible/issues/77108).
- play_context now compensates for when a conneciton sets the default to inventory_hostname but skips adding it to the vars.
- playbook/strategy have more informative 'attribute' based errors for playbook objects and handlers.
- python modules (new type) will now again prefer the specific python stated in the module's shebang instead of hardcoding to /usr/bin/python.
- replace - Always return ``rc`` to ensure return values are consistent - https://github.com/ansible/ansible/pull/71963
- script - skip in check mode if the plugin cannot determine if a change will occur (i.e. neither `creates` or `removes` are provided).
- service - Fixed handling of sleep arguments during service restarts on AIX. (https://github.com/ansible/ansible/issues/76877)
- service - Fixed service restarts with arguments on AIX. (https://github.com/ansible/ansible/issues/76840)
- service_facts module will now give more meaningful warnings when it fails to gather data.
- 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).
- shell/command - only return changed as True if the task has not been skipped.
- shell/command - only skip in check mode if the options `creates` and `removes` are both None.
- 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.
- ssh connection now uses more correct host source as play_context can ignore loop/delegation variations.
- sudo become plugin, fix handling of non interactive flags, previous substitution was too naive
- systemd - check if service is alias so it gets enabled (https://github.com/ansible/ansible/issues/75538).
- systemd - check if service is indirect so it gets enabled (https://github.com/ansible/ansible/issues/76453).
- 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)
- to_json/to_nice_json filters defaults back to unvaulting/no unsafe packing.
- unarchive - Fix zip archive file listing that caused issues with content postprocessing (https://github.com/ansible/ansible/issues/76067).
- unarchive - Make extraction work when the LANGUAGE environment variable is set to a non-English locale.
- unarchive - apply ``owner`` and ``group`` permissions to top folder (https://github.com/ansible/ansible/issues/35426)
- unarchive - include the original error when a handler cannot manage the archive (https://github.com/ansible/ansible/issues/28977).
- unarchive - the ``io_buffer_size`` option added in 2.12 was not accepted by the module (https://github.com/ansible/ansible/pull/77271).
- urls - Allow ``ca_path`` to point to a bundle containing multiple PEM certs (https://github.com/ansible/ansible/issues/75015)
- urls/uri - Address case where ``HTTPError`` isn't fully initialized due to the error, and is missing certain methods and attributes (https://github.com/ansible/ansible/issues/76386)
- user - allow ``password_expiry_min`` and ``password_expiry_min`` to be set to ``0`` (https://github.com/ansible/ansible/issues/75017)
- user - allow password min and max to be set at the same time (https://github.com/ansible/ansible/issues/75017)
- user - update logic to check if user exists or not in MacOS.
- validate_argument_spec - Skip suboption validation if the top level option is an invalid type (https://github.com/ansible/ansible/issues/75612).
- variablemanager, more efficient read of vars files
- vault - Warn instead of fail for missing vault IDs if at least one valid vault secret is found.
- winrm - Ensure ``kinit`` is run with the same ``PATH`` env var as the Ansible process
- yum - prevent storing unnecessary cache data by running `yum makecache fast` (https://github.com/ansible/ansible/issues/76336)
Known Issues
------------
- get_url - document ``check_mode`` correctly with unreliable changed status (https://github.com/ansible/ansible/issues/65687).

View File

@ -1,6 +0,0 @@
Placeholder changelog
=====================
This file is a placeholder; a version-specific ``CHANGELOG-vX.Y.rst`` will be generated during releases from fragments
under changelogs/fragments. On release branches once a release has been created, consult the branch's version-specific
file for changes that have occurred in that branch.

8
changelogs/README.md Normal file
View File

@ -0,0 +1,8 @@
Changelogs
==========
As part of the release process a version-specific `CHANGELOG-vX.Y.rst` will be generated from fragments in
the `fragments` directory.
On release branches once a release has been created, consult the branch's version-specific file for changes that have
occurred in that branch. The `devel` branch does not have a generated changelog, only changelog fragments.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-05-22
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-05-15
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-07-18
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-07-10
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-09-11
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-09-05
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-10-09
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-10-03
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-04-24
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-04-17
| `Porting Guide <https://docs.ansible.com/ansible-core/2.13/porting_guides/porting_guide_core_2.13.html>`__

View File

@ -0,0 +1,2 @@
bugfixes:
- uri - properly use uri parameter use_proxy (https://github.com/ansible/ansible/issues/58632)

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy - do not require mandatory keys in the ``galaxy.yml`` of source collections when listing them (https://github.com/ansible/ansible/issues/70180).

View File

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

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy - fix listing collections that contains metadata but the namespace or name are not strings.

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:
- "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,5 @@
bugfixes:
- >-
``ansible-galaxy`` - remove extra server api call during dependency resolution
for requirements and dependencies that are already satisfied
(https://github.com/ansible/ansible/issues/77443).

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 - handle unsupported versions of resolvelib gracefully.

View File

@ -0,0 +1,3 @@
minor_changes:
- ansible-galaxy - Support resolvelib versions 0.6.x, 0.7.x, and 0.8.x.
The full range of supported versions is now >= 0.5.3, < 0.9.0.

View File

@ -0,0 +1,2 @@
bugfixes:
- lookup plugin - catch KeyError when lookup returns dictionary (https://github.com/ansible/ansible/pull/77789).

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-config dump - Only display plugin type headers when plugin options are changed if --only-changed is specified.

View File

@ -0,0 +1,2 @@
bugfixes:
- Add PyYAML >= 5.1 as a dependency of ansible-core to be compatible with Python 3.8+.

View File

@ -0,0 +1,2 @@
bugfixes:
- apt - fix package selection to include /etc/apt/preferences(.d) (https://github.com/ansible/ansible/issues/77969)

View File

@ -0,0 +1,2 @@
bugfixes:
- "yum - fix traceback when ``releasever`` is specified with ``latest`` (https://github.com/ansible/ansible/issues/78058)"

View File

@ -0,0 +1,3 @@
bugfixes:
- "ansible-doc - when listing modules in collections, proceed recursively. This fixes module listing for community.general 5.x.y and community.network 4.x.y (https://github.com/ansible/ansible/pull/78137)."
- "ansible-doc - no longer list module and plugin aliases that are created with symlinks (https://github.com/ansible/ansible/pull/78137)."

View File

@ -0,0 +1,2 @@
bugfixes:
- template module/lookup - fix ``convert_data`` option that was effectively always set to True for Jinja macros (https://github.com/ansible/ansible/issues/78141)

View File

@ -0,0 +1,2 @@
bugfixes:
- Move undefined check from concat to finalize (https://github.com/ansible/ansible/issues/78156)

View File

@ -0,0 +1,3 @@
bugfixes:
- ansible-galaxy - Fix detection of ``--role-file`` in arguments for implicit role invocation
(https://github.com/ansible/ansible/issues/78204)

View File

@ -0,0 +1,3 @@
bugfixes:
- wait_for - Read file and perform comparisons using bytes to avoid decode errors
(https://github.com/ansible/ansible/issues/78214)

View File

@ -0,0 +1,2 @@
bugfixes:
- Fix dnf module documentation to indicate that comparison operators for package version require spaces around them (https://github.com/ansible/ansible/issues/78295)

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:
- apt - don't actually update the cache in check mode with update_cache=true.
- apt - don't mark existing packages as manually installed in check mode (https://github.com/ansible/ansible/issues/66413).

View File

@ -0,0 +1,3 @@
bugfixes:
- ansible-galaxy - Fix exit codes for role search and delete
(https://github.com/ansible/ansible/issues/78516)

View File

@ -0,0 +1,3 @@
bugfixes:
- service_facts - Use python re to parse service output instead of grep
(https://github.com/ansible/ansible/issues/78541)

View File

@ -0,0 +1,5 @@
bugfixes:
- urls - Guard imports of ``urllib3`` by catching ``Exception`` instead of
``ImportError`` to prevent exceptions in the import process of optional
dependencies from preventing use of ``urls.py``
(https://github.com/ansible/ansible/issues/78648)

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,4 @@
bugfixes:
- >-
apt - Fix module failure when a package is not installed and only_upgrade=True.
Skip that package and check the remaining requested packages for upgrades. (https://github.com/ansible/ansible/issues/78762)

View File

@ -0,0 +1,3 @@
bugfixes:
- known_hosts - do not return changed status when a non-existing key is removed (https://github.com/ansible/ansible/issues/78598)

View File

@ -0,0 +1,4 @@
bugfixes:
- BSD network facts - Do not assume column indexes, look for ``netmask`` and
``broadcast`` for determining the correct columns when parsing ``inet`` line
(https://github.com/ansible/ansible/issues/79117)

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,3 @@
bugfixes:
- file - touch action in check mode was always returning ok. Fix now evaluates the different conditions and
returns the appropriate changed status. (https://github.com/ansible/ansible/issues/79360)

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:
- TaskExecutor - don't ignore templated _raw_params that k=v parser failed to parse (https://github.com/ansible/ansible/issues/79862)

View File

@ -0,0 +1,2 @@
bugfixes:
- "ansible-doc - stop generating wrong module URLs for module see-alsos. The URLs for modules in ansible.builtin do now work, and URLs for modules outside ansible.builtin are no longer added (https://github.com/ansible/ansible/pull/80280)."

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy - reduce API calls to servers by fetching signatures only for final candidates.

View File

@ -0,0 +1,3 @@
bugfixes:
- ansible-galaxy - fix installing signed collections (https://github.com/ansible/ansible/issues/80648).
- ansible-galaxy collection verify - fix verifying signed collections when the keyring is not configured.

View File

@ -0,0 +1,8 @@
bugfixes:
- The ``ansible-config init`` command now has a documentation description.
- The ``ansible-galaxy collection download`` command now has a documentation description.
- The ``ansible-galaxy collection verify`` command now has a documentation description.
- The ``ansible-inventory`` command command now has a documentation description (previously used as the epilog).
- The ``ansible-galaxy collection install`` command documentation is now visible (previously hidden by a decorator).
- The ``ansible-galaxy role install`` command documentation is now visible (previously hidden by a decorator).
- Fix ``ansible-config init`` man page option indentation.

View File

@ -0,0 +1,2 @@
bugfixes:
- Avoid 'unreachable' error when chmod on AIX has 255 as return code.

View File

@ -0,0 +1,2 @@
bugfixes:
- Windows - Ensure the module temp directory contains more unique values to avoid conflicts with concurrent runs - https://github.com/ansible/ansible/issues/80294

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 @@
bugfixes:
- ansible-galaxy - Fix reinitializing the whole collection directory with ``ansible-galaxy collection init ns.coll --force``.
Now directories and files that are not included in the collection skeleton will be removed.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy - make initial call to Galaxy server on-demand only when installing, getting info about, and listing roles.

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,3 @@
bugfixes:
- ansible-test - ansible-doc sanity test - Correctly determine the fully-qualified collection name for plugins in
subdirectories, resolving https://github.com/ansible/ansible/issues/78490.

View File

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

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