Compare commits

...

209 Commits

Author SHA1 Message Date
78381daaa5 New release v2.15.10rc1 (#82838) 2024-03-18 12:29:10 -05:00
9b07e69822 Re-enable psrp tests that were disabled (#82785) (#82787)
(cherry picked from commit bb030db546)
2024-03-13 15:53:05 -05:00
8190a2ad7a Avoid winrm hang on stdin write failure (#82766) (#82781)
If the connection plugin fails to write the data to run to stdin we will
only attempt to get the output with one operation attempt. If this times
out we will consider the command to have failed and raise an exception
instead of forever attempting to get the output.

(cherry picked from commit 942424e10b)
2024-03-13 15:52:56 -05:00
407544f283 Prevent failures due to unsafe plugin name (#82759) (#82790)
(cherry picked from commit 56f31126ad)
2024-03-13 15:51:48 -05:00
5844f4305e [stable-2.15] Install crun from Alpine 3.19 for known musl compatibility (#82812). (#82815)
(cherry picked from commit 86f48a526a)
2024-03-13 19:01:59 +00:00
1eb9b30dce [stable-2.15] ansible-test - Add work-around for pytest>=8 errors (#82723) (#82728)
* ansible-test - Add work-around for pytest>=8 errors
* Update changelogs/fragments/ansible-test-pytest-8.yml

(cherry picked from commit a1edb61ce7)
2024-03-04 09:09:09 -08:00
d3f1bf138a [stable-2.15] Disable ansible-test podman container tests on Ubuntu 22.04 (#82748) (#82753)
(cherry picked from commit 9a8be1e)
2024-02-27 11:38:42 -06:00
fecd89786c Fix issues with ansible-playbook-callbacks test (#82407) (#82631)
The timing of the async tasks was a little unpredictable, meaning that
sometimes we would get an unexpected number of v2_runner_on_async_poll
callbacks, and fail the test. This change fixes the issue by increasing
the poll interval to 2 seconds and the sleep duration to 3 seconds, such
that on a reasonably responsive system we will poll twice per task, with
the sleep ending in the middle of the two polls.

The include_me.yml file does not exist in this integration test. It has
been added.

The remote_tmp_dir.path expression is invalid - the setup_remote_tmp_dir
role uses set_fact to set remote_tmp_dir to remote_tmp_dir.path.

The integration tests run with ANSIBLE_HOST_PATTERN_MISMATCH=error,
meaning that the final play was never reached. Set
ANSIBLE_HOST_PATTERN_MISMATCH=warning to continue past the play and
trigger the v2_playbook_on_no_hosts_matched callback.

(cherry picked from commit 4a2de764ec)
2024-02-14 15:11:19 -06:00
fbbb8fc905 Update Ansible release version to v2.15.9.post0. (#82621) 2024-01-29 21:26:45 +00:00
080b5103be New release v2.15.9 (#82618) 2024-01-29 14:39:55 -06:00
dc3dd29401 Update Ansible release version to v2.15.9rc1.post0. (#82590) 2024-01-22 19:54:31 +00:00
7e6527a78f New release v2.15.9rc1 (#82586) 2024-01-22 13:00:25 -06:00
686fe806f8 Support action_plugin in plugin_routing_schema (#82562) (#82582)
now validation schema matches reality

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit b01f1f207c)
2024-01-22 09:59:36 -06:00
09879cbe14 Better errors for delegate_to (#82319) (#82341)
Handle empty result of templating
  Also skip work when we omit

(cherry picked from commit 6ebefaceb6)
2024-01-19 14:52:11 -08:00
74869eb052 ansible-config dedupe ini plugin entries (#82498)
added test for ini file integrity, also ensuring no dupes

(cherry picked from commit 6c2895fd88)
2024-01-19 14:17:36 -08:00
55f0080358 Fix broken docs RST reference. (#82286) (#82298)
(cherry picked from commit 479949aad2)
2024-01-18 17:48:30 -06:00
30fa4adcdf [ansible-galaxy] Remove role name conversion when the repo startswith 'ansible-role' (#82508) (#82533)
* Remove role name conversion based on whether the repo name starts with
ansible-role

This was added in 2.3 to match the Galaxy ui behavior of truncating the
'ansible-role-' prefix automatically, but the new backend requires an
alternate name to be provided or defined in the ``galaxy_info``
metadata.

Roles that were imported using the ansible-role-$name convention will
need to use ``--role-name`` or add ``role_name`` to the ``galaxy_info``
dictionary in ``meta/main.yml``.

changelog

* Update changelogs/fragments/fix-default-ansible-galaxy-role-import-name.yml

* Update changelogs/fragments/fix-default-ansible-galaxy-role-import-name.yml

Co-authored-by: flowerysong <junk+github@flowerysong.com>

---------

Co-authored-by: flowerysong <junk+github@flowerysong.com>
(cherry picked from commit d7be3824fe)
2024-01-18 17:42:12 -06:00
78db3a3de6 [stable-2.15] Ensure ANSIBLE_NO_LOG is respected (CVE-2024-0690) (#82565) (#82567)
(cherry picked from commit 6935c8e)
2024-01-18 17:41:46 -06:00
2477059be2 Targeted fix for installing roles with symlinks containing '..' (#82165) (#82324)
Set the tarfile attribute to a normalized value from unfrackpath instead
of validating path parts and omiting potentially invald parts

Allow tarfile paths/links containing '..', '$', '~' as long as the
normalized realpath is in the tarfile's role directory

(cherry picked from commit 3a42a00368)
2024-01-18 17:24:15 -06:00
0db4bb36ba Enable directly using AnsibleUnsafeText with Python pathlib (#82510) (#82563)
* Enable directly using `AnsibleUnsafeText` with Python `pathlib`. Fixes #82414.
(cherry picked from commit c6a652c081)
2024-01-18 14:31:30 -06:00
11e50715a3 [backport-2.15] CI: remove FreeBSD 12.4 from test matrix (#81315)
Fixes: #80417

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 11e261b54f)
2024-01-05 10:12:07 -08:00
b7a93e586c Update Ansible release version to v2.15.8.post0. (#82403) 2023-12-11 22:05:41 +00:00
ba1854271b New release v2.15.8 (#82400) 2023-12-11 14:48:45 -06:00
b19cfb19c2 [stable-2.15] Additional Unsafe fixes (#82376) (#82380)
* Allow older pickle protocols to pickle unsafe classes. Fixes #82356

* Address issues when iterating or getting single index from AnsibleUnsafeBytes. Fixes #82375

* clog frag
(cherry picked from commit afe3fc1)
2023-12-11 13:50:25 -06:00
a79e410c51 [backport-2.15] Replace FreeBSD 13.1 with 13.2 in CI and ansible-test (#82397)
* [backport-2.15] Add FreeBSD 13.2 to ansible-test (#80698)

(cherry picked from commit d12aa7f69c)

* [backport-2.15] remove Freebsd 13.1 from test matrix (#81058)

* remove Freebsd 13.1 from test matrix

fixes #80416

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

* Revert to the original Python versions for the branch

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

---------

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Matt Martz <matt@sivel.net>
2023-12-11 12:45:24 -06:00
0474d3da62 [backport][stable-2.15] 🧪 Replace GitHub SVN integration test with local TLS (#82369)
* [backport][stable-2.15] 🧪 Replace GitHub SVN integration test with local TLS

PR #82334

* Run svn integration test locally with TLS

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

Resolves #82207

* Replace GitHub SVN HTTPS URL w/ localhost over TLS

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

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

(cherry picked from commit dd0138ba21)

* Implement compat w/ opensuse15, centos7 & rhel7/8
2023-12-06 16:18:26 -06:00
320a39dc0f Update Ansible release version to v2.15.7.post0. (#82350) 2023-12-04 23:03:29 +00:00
e5fd1dae57 New release v2.15.7 (#82347) 2023-12-04 15:46:37 -06:00
4fc275aa1b Fix various issues in unsafe_proxy (#82326) (#82331)
- Use str/bytes directly instead of text_type/binary_type
- Fix AnsibleUnsafeBytes.__str__ implementation
- Fix AnsibleUnsafeBytes.__format__ return type
- Remove invalid methods from AnsibleUnsafeBytes (casefold, format, format_map)
- Use `chars` instead of `bytes` to match stdlib naming
- Remove commented out code

(cherry picked from commit 59aa0145d2)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-12-04 13:39:39 -06:00
3561008c7e [stable-2.15] Install upgraded crun from edge (#81833). (#82343)
(cherry picked from commit e78cc1e602)
2023-12-04 09:53:43 -08:00
24a8d040eb Update Ansible release version to v2.15.7rc1.post0. (#82305) 2023-11-27 22:08:17 +00:00
a1d85b9554 New release v2.15.7rc1 (#82302) 2023-11-27 15:24:47 -06:00
fea130480d Ensure that unsafe is more difficult to lose [stable-2.15] (#82294)
* Ensure that unsafe is more difficult to lose

* Add Task.untemplated_args, and switch assert over to use it
* Don't use re in first_found, switch to using native string methods
* If nested templating results in unsafe, just error, don't continue

(cherry picked from commit 586f1924512b01305f896d9ae4732773023013a3)

* ci_complete
2023-11-27 10:27:24 -08:00
03330f1431 flush_handlers: handle a failure in a nested block with force_handlers (#81572) (#82198)
Fixes #81532

ci_complete

(cherry picked from commit a8b6ef7e7c)
2023-11-27 10:28:56 -06:00
bade98dc8f add pep668 note to pip module docs (#82096) (#82099)
(cherry picked from commit 3ea5304a57)
2023-11-27 08:55:29 -06:00
7c31e6b1c0 [stable-2.15] Check if skeleton is /dev/null while creating home folder (#75948) (#82103)
* Check if skeleton is /dev/null while creating home folder

* Add test for linux



(cherry picked from commit 25b3d3a)

Co-authored-by: Holger Dörner <42909210+HolgerDoerner@users.noreply.github.com>
2023-11-27 08:55:17 -06:00
a62ba401be Remove duplicate winrm test (#82124) (#82126)
(cherry picked from commit f8a9fd4758)
2023-11-27 08:54:46 -06:00
412c6bc4f6 [bp-2.15] Fix the strategy plugin description in keywords (#82132)
Fixes: https://github.com/ansible/ansible-documentation/issues/762

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 8ecc1d485b)
2023-11-27 08:54:28 -06:00
fdbdc2ae35 restore role param precedence (#82106) (#82139)
* add test for setfact/param override

(cherry picked from commit 20a54eb236)
2023-11-27 08:54:09 -06:00
5623783bcf ansible-pull: expand destinantion directoy to avoid purgin in / (#82030) (#82222)
* expand destinantion directoy to avoid purgin in /

  bad things could happen and help alone is not enough

(cherry picked from commit 8825e60add)
2023-11-27 08:53:51 -06:00
23cd32e31e wait_for, fallback to read for non mmapable files (#82064) (#82234)
* wait_for, fallback to read for non mmapable files (#82064)

(cherry picked from commit 8b102dca4a)
2023-11-27 08:53:30 -06:00
5b5c26c644 no_log avoid masking booleans (#82217) (#82236)
* no_log avoid masking booleans (#82217)

(cherry picked from commit 6e448edc63)
2023-11-27 08:53:04 -06:00
6d746023a1 Update Ansible release version to v2.15.6.post0. (#82143) 2023-11-06 18:42:01 +00:00
36675bbe9f New release v2.15.6 (#82140) 2023-11-06 11:56:48 -06:00
e141a9092a Update Ansible release version to v2.15.6rc1.post0. (#82093) 2023-10-30 20:45:31 +00:00
357ba68b76 New release v2.15.6rc1 (#82092) 2023-10-30 15:04:29 -05:00
0ef9984918 Restore import_role variable exporting behavior (#81840) (#81873)
* Import role public (#81772)

revert to previous behavior to push vars to play at compile time
add `public` parameter to allow per import control of exporting (vs just the global config)

Co-authored-by: tchernomax <maxime.deroucy@gmail.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit ab6a544e86)

* adapted to prev version

 - removed new functionality
 - restored global config functioning overriding specific public option

* remove typoe

* quote it

(cherry picked from commit 9a4bc7e7b3)
2023-10-26 15:12:03 -05:00
83c20fed99 switch available_hosts to frozenset from list in ansible-inventory (#81870) (#81876)
* major speedup large inventories, since it's consulted iteratively

(cherry picked from commit c1343cc304)
2023-10-26 15:11:34 -05:00
498cc00b4e Add test coverage for winrm (#81910) - 2.15 (#81913)
* Add test coverage for winrm (#81910)

(cherry picked from commit 282908c57e)

* Add more winrm coverage (#81923)

(cherry picked from commit 976067c15f)
2023-10-26 15:11:17 -05:00
3e2ce2d073 [stable-2.15] run_once: unnotify hosts on handlers that are not run (#81667) (#81919)
Fixes #81666
(cherry picked from commit 2d5861c)
2023-10-26 15:10:58 -05:00
a05d254ca2 [stable-2.15] Properly template tags in parent blocks (#81624) (#81922)
When templating tags (which happens outside of standard `post_validate`) we
need to template each object in the inheritance chain and set the templated
values on those objects individually. That way when `task.tags` is called the
`extend` functionality properly picks up the templated values of all
parents into one flatten list.

Fixes #81053
(cherry picked from commit 9b3ed5e)
2023-10-26 15:10:39 -05:00
1eb437e50d ansible-galaxy - fix traceback error for invalid req file (#81917) (#81925)
Provide a better error message when encountering a YAML requirements file that is not a dictionary or list.

Fixes: #81901
(cherry picked from commit 8a5ccc9d63)
2023-10-26 15:10:23 -05:00
8896db97ed Fix Jinja plugin deduplication (#82002) (#82054)
for j2 plugins dedupe on path and  not basename
for j2 this is a container file , for other plugins file name == plugin name

(cherry picked from commit b4566c18b3)
2023-10-26 15:09:58 -05:00
0c98b2256c [stable-2.15] 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:04 -07:00
9aeced838f [stable-2.15] 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:06 -07:00
40b9ed35ce ansible-test - Use Azure for Windows 2012/2012-R2 (#81971) 2023-10-13 16:26:30 -07:00
427248cbc9 Update Ansible release version to v2.15.5.post0. (#81936) 2023-10-09 16:33:13 +00:00
f1aab39d79 New release v2.15.5 (#81933) 2023-10-09 10:51:22 -05:00
92447debff win_fetch - improve test time by not scanning Win dir (#81884) (#81887)
(cherry picked from commit dfc62589f6)
2023-10-04 10:24:40 -07:00
faa96a23c3 Update Ansible release version to v2.15.5rc1.post0. (#81869) 2023-10-03 22:12:41 +00:00
0ddfdbde4e New release v2.15.5rc1 (#81863) 2023-10-03 16:19:53 -04:00
ccb00b74fe [backport][stable-2.15] Always allow "no-other-choice" pre-release dependencies when resolving collection dependency tree (#81747)
* Always allow "no-other-choice" pre-release dependencies when resolving collection dependency tree

PR #81606.

Prior to this patch, when `--pre` CLI flag was not passed, the
dependency resolver would treat concrete collection dependency
candidates (Git repositories, subdirs, tarball URLs, or local dirs or
files etc) as not meeting the requirements.

This patch makes it so pre-releases in any concrete artifact
references, and the ones being specifically pinned dependencies or
user requests, met anywhere in the dependency tree, are allowed
unconditionally.

This is achieved by moving the pre-release check from
`is_satisfied_by()` to the `find_matches()` hook, following the
Pip's example.

As a bonus, this change also fixes the situation when a collection
pre-releases weren't considered if it didn't have any stable releases.
This now works even if `--pre` wasn't requested explicitly.

Finally, this patch partially reverts commit
6f4b4c345b, except for the tests. And it
also improves the `--pre` hint warning to explain that it mostly
affects Galaxy/Automation Hub-hosted collection releases.

Ref #73416
Ref #79112
Fixes #79168
Fixes #80048
Resolves #81605

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

* Shorten the collection namespace and name @ tests

This is needed on the 2.15 branch which uses older galaxy containers
that have restricted FQCN size.
2023-10-03 11:29:59 -04:00
f71190068b [stable-2.15] Add compat function for parsing Content-Disposition header (#81807) (#81828)
* py2 compat for get_param

* Add tests, and handle ValueError

* Add clog frag
(cherry picked from commit 831dc6e)
2023-10-02 20:58:35 +00:00
3a8b1ef86d ansible-galaxy fix scm dependency error (#81599) (#81798)
* ansible-galaxy fix scm dependency error

  also changed usage of 'virtual colleciton' to actual type
  avoid error by filtering out virtual collections that dont have
expected properties

simplified as per webknjaz

* Update lib/ansible/galaxy/collection/__init__.py
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

(cherry picked from commit 2aef0406d4)
2023-10-02 15:54:49 -04:00
244c48c78e Fix reporting role as not found when remote_data is None (#81829) (#81837)
(cherry picked from commit 7fab552563)
2023-10-02 15:51:31 -04:00
7ed557c4f7 Fix stealth exceptions and blocking select() in daemonize() (#81064) - 2.15 (#81581)
* Fix stealth exceptions and blocking select() in daemonize() (#81064)

* Fix stealth exceptions and blocking select() in daemonize()

* Add changelog entry

(cherry picked from commit 894c339df8)

* Daemonize follow-up fixes (#81584)

* Ensure binary data transmission in daemonize

* Add changelog fragment

(cherry picked from commit 91f94fb59d)
2023-10-02 09:30:44 -04:00
83c0118c34 winrm - make command input more resiliant (#81538) (#81793)
* winrm - make command input more resiliant

* Expand warning message

(cherry picked from commit f22231de20)
2023-09-27 09:12:03 -05:00
2a29739ee6 Allow for searching handler subdir for included task via include_role (#81733) (#81758)
Fixes #81722

(cherry picked from commit 1e7f7875c6)
2023-09-27 09:11:51 -05:00
8f621fd6cd Only mark a role as complete once a task in it executes for the target host (#81565) (#81668)
* If all tasks in the role are skipped or unreachable, the role is not marked as complete for the host.

* Only mark the role as complete if a task in the role succeeds or fails for the host.

(cherry picked from commit 8034651cd2)
2023-09-27 09:11:39 -05:00
5888674946 fix various Jinja plugin caching issues (#79781) (#81643)
* fix various Jinja plugin caching issues

* consolidate the wrapper plugin cache
* remove redundant cache in J2 filter/test interceptor

* intra-template loader bypass

* fix early exits swallowing some exception detail

* misc comment cleanup

(cherry picked from commit dd79c49a4d)
2023-09-27 09:11:28 -05:00
1e930684bc [stable-2.15] Prevent roles from using symlinks to overwrite files outside of the installation directory (#81780) (#81785)
* Sanitize linkname during role installs

* Add tests

* add clog frag.
(cherry picked from commit ddf0311c63)
2023-09-27 08:44:11 -05:00
f87ed972e8 Update Ansible release version to v2.15.4.post0. (#81684) 2023-09-12 08:33:54 -05:00
5dd895cb06 New release v2.15.4 (#81681) 2023-09-11 17:11:17 -05:00
5138a8bb44 Update Ansible release version to v2.15.4rc1.post0. (#81640) 2023-09-05 16:37:43 -05:00
9b01316882 New release v2.15.4rc1 (#81635) 2023-09-05 14:59:30 -05:00
6bae9486b1 [stable-2.15] tarfile: Handle deprecation warning for extract and extractall (#81545) (#81632)
* 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



(cherry picked from commit 1cc5efa)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-05 12:42:09 -05:00
ac8188febd first_found fix no terms option (#76550) (#81451)
For backport without the fix for multiple items clobbering previous settings

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2023-08-31 14:58:45 -05:00
caf8cdbe91 include_role: expose vars from parent roles to role's handlers (#81524) (#81548)
Fixes #80459

(cherry picked from commit 98f1627817)
2023-08-31 14:05:25 -05:00
ebe6c7e1c3 filters vault/unvault fix vault_id parameter usage (#81422) (#81448)
* vault/unvault filters, fixed id field to match documented.

fixes #81420

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f3a15a4a95)
2023-08-31 14:03:58 -05:00
daa2d9b8fd PowerShell - remove uneeded dotnet code for future compatibility (#81472) (#81577)
(cherry picked from commit f3976117fb)
2023-08-30 13:52:50 -05:00
7771f78f8c Fix pause CPU consumption (#81519) (#81562)
* Sleep for the DEFAULT_INTERNAL_POLL_INTERVAL between polling for user input

Fixes #81516

(cherry picked from commit 194f829b0f)
2023-08-30 13:52:35 -05:00
febd0f3a69 Last handler with same name wins for listen too (#81358) (#81525)
Fixes #49371
Fixes #81013

(cherry picked from commit 0cba3b7504)
2023-08-30 13:51:57 -05:00
733f6542de [stable-2.15] Revert logic to use Popen.communicate (#80874) (#81517)
* [stable-2.15] Revert logic to use Popen.communicate (#80874)

* Back out use of communicate, add better comments, add bufsize, and align with subprocess._communicate

* tests

* re-order logic slightly

* more comments

* loopty loop

* yet another comment

* Revert "yet another comment"

This reverts commit 96cd8ada5fa0441b92f2298bdaa6cb40594847d2.

* Revert "loopty loop"

This reverts commit 96ea066f6a7d18902c04a14f18dd79b38e56f5e7.

* ci_complete

* Copy in comment too

* Wording updates

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

* Back out bufsize

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>.
(cherry picked from commit 553f51e728)

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

* Address merge conflict issues
2023-08-30 13:51:39 -05:00
697af6ba33 [stable-2.15] ansible-test - Always use managed entry points (#81537) (#81539)
(cherry picked from commit 390e508d27)
2023-08-22 12:27:37 -07:00
e96da33c08 [stable-2.15] Remove obsolete text from release.py PR template (#81526) (#81527)
(cherry picked from commit 9afaf2216b)
2023-08-16 11:19:20 -07:00
618aa954af [stable-2.15] Fix f-string whitespace in release script (#81477) (#81478)
(cherry picked from commit 85d3305889)
2023-08-14 13:35:24 -07:00
bdd9e8f1aa [stable-2.15] Clean up release script (#81488) (#81489)
* 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:34:56 -07:00
db2ed518ec Update Ansible release version to v2.15.3.post0. (#81509) 2023-08-14 13:33:35 -07:00
4362220ee7 New release v2.15.3 (#81506) 2023-08-14 11:18:23 -07:00
82ff8b5a7b Update Ansible release version to v2.15.3rc1.post0. (#81462) 2023-08-07 16:34:00 -05:00
b54e3f91d6 New release v2.15.3rc1 (#81459) 2023-08-07 15:09:20 -05:00
20cd618bc8 password_hash - fix bcrypt algorithm when passlib is not installed (#81385) (#81425)
(cherry picked from commit f5431321a2)
2023-08-03 17:44:42 -05:00
68709ecda2 fix networking path (#81295) (#81353)
* now uses class property instead of only relying on network_os variable

---------

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
(cherry picked from commit 6db006a5fa)
2023-08-03 17:44:20 -05:00
85a3eb272a [2.15] Consider all configured collection paths when installing collections (#81324)
* Consider all configured collection paths when installing collections (#81243)

* Only install collections which can't be satisfied by a collection in any of the configured paths.

* Improve warning for unexpected collection install path

Fix warning when path is configured, but is a pip-managed path

Normalize the path before validating to fix warning consistency

(cherry picked from commit efbc00b6e4)

* Update warning patch for version 2.15 due to non-existence of the config GALAXY_COLLECTIONS_PATH_WARNING
2023-08-03 17:43:56 -05:00
8a4a1279df urls - remove deprecated client key calls (#80751) (#81257)
(cherry picked from commit 0df794e5a4)
2023-08-03 17:43:46 -05:00
7d561e6e4e [stable-2.15] Overhaul package-data sanity test (#81427) (#81439)
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 17:27:32 -05:00
4f16d2d9a7 [stable-2.15] ansible-test - Update source layout detection (#81418) (#81434)
(cherry picked from commit c525514994)
2023-08-03 17:27:16 -05:00
b3a4b4a9b1 fixed become page link in PE error message (#81391) (#81393)
(cherry picked from commit 0b9d83ccdb)
2023-08-03 17:27:00 -05:00
c5c8909b85 The split filter was added in ansible-core 2.11. (#81275) (#81291)
(cherry picked from commit b771e59793)
2023-08-03 17:26:46 -05:00
2c847af5a5 Module docs fixes. (#81213) (#81236)
(cherry picked from commit dce51f4ff4)
2023-08-03 17:26:14 -05:00
f64067c62b [stable-2.15] Update update-sanity-requirements.py script (#81424) (#81431)
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:10 -07:00
af59d80a8a [stable-2.15] Revert "define code owners to support branch-protection rules on docs (#81041)" (#81228) (#81428)
This reverts commit 9117762358.
(cherry picked from commit 7c6564ad0e)
2023-08-03 13:06:23 -07:00
5265794b32 [stable-2.15] Clean up MANIFEST.in (#81414)
* 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:30:33 -07:00
3038fee209 [stable-2.15] Add changelog fragment for docs/examples removal (#81410) (#81411)
(cherry picked from commit 0c03a6bcf6)
2023-08-02 12:59:59 -07:00
7e63a85dd6 Remove BOTMETA.yml and sanity tests for it (#81198) (#81263)
(cherry picked from commit 39ef570e16)
2023-08-02 12:31:14 -07:00
21243c5d05 [stable-2.15] Fix os.walk issues in package-data sanity test (#80703). (#81403)
(cherry picked from commit eea7137449)
2023-08-02 08:02:25 -07:00
5d57a8e363 [stable-2.15] Omit pre-built man pages from sdist (#81395) (#81397)
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-01 14:04:42 -07:00
b63bf6f840 [stable-2.15] Include subcommands in generated man pages (#81378) (#81382)
Sub commands of `ansible-galaxy role` and `ansible-galaxy collection` are now documented.
(cherry picked from commit 081c60b9d3)
2023-07-31 15:48:29 -07:00
bf09a9e2e0 [stable-2.15] Fix misrendered sections in manpage generation (#81379)
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:15 -07:00
89ec76033c [stable-2.15] Fix missing command descriptions in manpages/docs (#81366). (#81370)
(cherry picked from commit 32b388b4ca)
2023-07-28 19:26:08 -07:00
559f0f9a4e [stable-2.15] Fix command doc lookup in man page generation (#81365) (#81369)
(cherry picked from commit f9d674fcfd)
2023-07-28 18:07:57 -07:00
1388880149 [stable-2.15] Exclude internal options from man pages and docs (#81360) (#81361)
(cherry picked from commit fead654671)
2023-07-28 15:25:52 -07:00
63b6dd2454 [stable-2.15] ansible-test: cloudstack: bump test container version (#81319) (#81322)
(cherry picked from commit 99eeaf7da8)

Co-authored-by: René Moser <mail@renemoser.net>
2023-07-20 14:52:47 -07:00
af1fd68cc0 [stable-2.15] ansible-test - update module_utils/urls.py unit test to support cryptography >= 41.0.0 (#81296) (#81316)
(cherry picked from commit d20a0c02cc)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2023-07-20 12:26:37 -07:00
5421a1304c [stable-2.15] Remove docs and examples directories (#81011) (#81232)
* 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)
2023-07-18 20:15:27 -07:00
4684debab5 [stable-2.15] Add missing skip entries for selinux module_util (#81305) (#81307)
(cherry picked from commit 18cbfc688b)
2023-07-18 19:02:56 -07:00
70dc6d6866 [stable-2.15] Convert non-docs *.rst files to *.md (#81217) (#81222)
* [stable-2.15] 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 19:02:29 -07:00
04e4280437 [stable-2.15] ansible-test - Fix sanity traceback with -e opt (#81271) (#81272)
Also remove redundant warning about missing programs.

Includes integration tests to verify `-e` does not traceback.
(cherry picked from commit 3f7bf0bcd4)
2023-07-18 19:01:57 -07:00
add8a968e8 [stable-2.15] ansible-test - Pre-build PyYAML wheels (#81300) (#81306)
This works around Cython failures when attempting to install PyYAML >= 5.4 <= 6.0..
(cherry picked from commit e964078a83)
2023-07-18 19:01:25 -07:00
c779af621e [stable-2.15] Disable cron integration test on Alpine (#81301) (#81302)
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:08 -07:00
bf38eb57a3 Update Ansible release version to v2.15.2.post0. (#81286) 2023-07-17 20:26:43 -07:00
3c8a3fa0af New release v2.15.2 (#81283) 2023-07-17 19:07:12 -07:00
a9c656f8f3 Replace reboot_command integration test with unit tests (#78956) (#81266)
Co-authored-by: Matt Clay <matt@mystile.com>

(cherry picked from commit b6ebb9d41a)
2023-07-14 14:27:46 -07:00
2b2510b653 [stable-2.15] Use *.md instead of *.rst for test READMEs (#81009) (#81229)
(cherry picked from commit 6ac0ea3567)
2023-07-11 17:13:15 -07:00
3cf87a9702 [stable-2.15] Reorganize CI sanity test matrix (#81004) (#81225)
(cherry picked from commit ff359fa8e1)
2023-07-11 16:28:22 -07:00
9c348b71ac Update Ansible release version to v2.15.2rc1.post0. (#81209) 2023-07-10 19:39:43 +00:00
a87aefeda4 New release v2.15.2rc1 (#81204) 2023-07-10 20:52:05 +02:00
0cd0788eac Properly disable modularity tests for dnf5 only (#81195) (#81196)
(cherry picked from commit eb19692f48)
2023-07-10 17:24:38 +02:00
7b97a0232a Re-introduce RHEL 9 modularity testing in CI (#81160) (#81192)
(cherry picked from commit 7b2647f3b2)
2023-07-10 17:24:15 +02:00
83c9bd8d25 dnf5: utilize automatic gpg check via transaction.run() (#81144) (#81200)
https://github.com/rpm-software-management/dnf5/pull/607
(cherry picked from commit c3af71a2c8)
2023-07-10 17:22:09 +02:00
94a6f6e0de Register handlers immediately if currently iterating handlers (#80898) (#81059)
This fixes the issue where handlers notifying other handlers are
not properly run because the notification is not registered unless
another flush_handlers occurs. Instead, if the current host state
is iterating handlers we immediately register the handler to be
run so the notification is not lost.

Fixes #80880

(cherry picked from commit 660f1726c8)

Co-authored-by: James Cammarata <jimi@sngx.net>
2023-07-05 11:25:09 +02:00
130fdcd50e [stable-2.15] Don't mutate templar.environment, only overlay on local myenv (#81005). (#81054)
(cherry picked from commit 73e04ef2d6)
2023-07-05 11:24:51 +02:00
7a61d9fb11 dnf5 - enable env groups testing in CI (#81032) (#81056)
Implemented in https://github.com/rpm-software-management/dnf5/pull/585

(cherry picked from commit f13e35cbf9)
2023-07-05 11:16:00 +02:00
9f2b37ad39 Make sure that values that should be strings are actually strings. (#81029) (#81057)
(cherry picked from commit 440b5fd040)
2023-07-05 11:15:32 +02:00
2c5856d7bc [stable-2.15] Resolve issues on python pre-3.10.6 with collection dirs longer than 100 characters (#81061) (#81072)
(cherry picked from commit 56b67cc)
2023-07-05 11:14:13 +02:00
2f7465969e ansible-test - Add Fedora 38 remote (#81157)
Also record a known issue for Fedora 37 remotes.
2023-06-29 13:38:17 -07:00
e5d4cb89f8 dnf5: enable now implemented cacheonly functionality (#81141) (#81145)
Note that this also fixes a traceback caused by backwards incompatible
change in dnf5 where cacheonly was changed from bool to string:
https://github.com/rpm-software-management/dnf5/pull/665/files#diff-ab65249ff7fccadfb2864b6826f6559f7f16fad43fd3bf2da0b4fe8db790d59aR179

(cherry picked from commit 0cc50e0673)
2023-06-28 12:24:30 -07:00
0766ad33eb Core backportapalooza 06 22 (#81111)
* Fix typo in comment filter option (#80672)

(cherry picked from commit 40fd86c618)

* Documentation tweaks for apt repo key management. Fixes #78063 (#80872)

(cherry picked from commit 0775e991d5)

* Update split.yml (#80915)

typo in description

(cherry picked from commit 6011b7c4c1)

* Correct syntax error in the example (#80976)

* Update success.yml
* Update reachable.yml
* Update unreachable.yml

(cherry picked from commit d210260afc)

* Update manager.py (#80926)

(cherry picked from commit e91bf2248f)

* Added link to argument_spec (#80967)

(cherry picked from commit 9e14a85fe3)

* modules/find: param contains: Describe matching behavior (#80744)

(cherry picked from commit a473bb798d)

* Update example in apt_key module (#81017)

* Verify checksum of downloaded key

Fixes: #79892

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

* Fix typo in to_yaml filter examples (#81094)

(cherry picked from commit 1f9836fe9a)

---------

Co-authored-by: Chris van Meer <chris@van-meer.net>
Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: F-Baker <35278989+F-Baker@users.noreply.github.com>
Co-authored-by: Vlad Glagolev <vaygr@users.noreply.github.com>
Co-authored-by: David-Ademola <131247654+David-Ademola@users.noreply.github.com>
Co-authored-by: tachyontec <92679798+tachyontec@users.noreply.github.com>
Co-authored-by: Felix Stupp <me+github/security-7XJy2od8@banananet.work>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Giovanni Toraldo <me@gionn.net>
2023-06-23 13:11:44 -07:00
30f3fc2335 [stable-2.15] ansible-test - Avoid using atexit module (#81096) (#81097)
(cherry picked from commit c3926268e2)
2023-06-22 10:13:56 -07:00
e860820982 Update Ansible release version to v2.15.1.post0. (#81091) 2023-06-20 12:00:56 -05:00
3d9a1cfdc6 New release v2.15.1 (#81088) 2023-06-20 11:06:39 -05:00
d4c10eea8e [stable-2.15] define code owners to support branch-protection rules on docs (#81041) (#81043)
* 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:23 -07:00
d3e26c5fb4 Update Ansible release version to v2.15.1rc1.post0. (#81039) 2023-06-12 13:38:20 -05:00
de8eb87110 New release v2.15.1rc1 (#81036) 2023-06-12 12:43:54 -05:00
37473cd99b Bump azure-pipelines-test-container to v4.0.1 @ CI (#80937)
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:25:25 -07:00
25880be91b [stable-2.15] Remove hacking dir dependency from build backend (#81025)
* Copy man generation files into build backend

* Use copied files in build backend
2023-06-09 17:36:59 -07:00
85065d6b7d [stable-2.15] Remove docs dir dependency from man page build (#81003). (#81022)
(cherry picked from commit b3f1290bcd)
2023-06-09 17:15:19 -07:00
4536ef6303 [stable-2.15] Fix TypeError when installing subdir collections. Fixes #80943 (#80949) (#80950)
(cherry picked from commit 0982d5f)
2023-06-07 09:16:38 -05:00
6bddb3d3c1 [bp/2.15] deb822_repository: use http-agent with open_url (#80894)
* Use http-agent in open_url API while getting
  cloudflare content

Fixes: #80809

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-06-07 09:16:27 -05:00
8fe49b6b35 [stable-2.15] URI Module find json sub type (#80745) (#80891)
* uri: fixed search for json types to include strings in the format xxx/yyy+json
(cherry picked from commit 0c7361d9ac)

Co-authored-by: Brent Barbachem <barbacbd@dukes.jmu.edu>
2023-06-07 09:16:11 -05:00
01000c622f Account for overlays when interacting with Jinja envs (#80705) (#80718)
Instead of using Templar.environment in Templar.do_template for
accessing/mutating the environment, myenv local variable should be used
because it is the environment used for actual templating. It can either
point to Templar.environment or newly created environment overlay.

Fixes #80605

(cherry picked from commit 8cd95a8e66)
2023-06-07 09:15:42 -05:00
cc0eaad410 Docs: Update changelog for Ansible 8 (#80886) (#80945) 2023-06-01 12:46:41 -05:00
8e0f02da82 add mission survey to docs banner (#80931) (#80942)
Co-authored-by: Don Naro <dnaro@redhat.com>
(cherry picked from commit 79677c16f1)
2023-05-31 15:58:17 -05:00
8b4bfcff3b set latest version to Ansible 8 (#80930) 2023-05-30 14:32:26 -05:00
d3fda5a6fb set latest version to 8 (#80892) (#80929)
(cherry picked from commit 9fb03093b3)
2023-05-30 14:32:14 -05:00
3bc453469a Add Ansible community 8.0.0 porting guide (#80927) (#80928)
(cherry picked from commit 124f33b230)

Co-authored-by: Christian Adams <chadams@redhat.com>
2023-05-30 14:32:03 -05:00
88042f98d6 [stable-2.15] ansible-test - local change detection without --fork-point (#79734) (#80899)
(cherry picked from commit a5bb4c7dee)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-05-26 15:56:39 -07:00
94b97c9c0b [stable-2.15] Update dnf5 module to handle API change for setting the download directory. Fixes #80887 (#80888) (#80889)
(cherry picked from commit 09387ea)
2023-05-25 12:25:33 -05:00
6b1ba183eb [stable-2.15] ansible-test - Fix traceback when mixing sources (#80801) (#80827)
* ansible-test - Fix traceback when mixing sources

* ansible-test - Refactor layout error handling

(cherry picked from commit b16041f1a9)
2023-05-18 11:05:39 -07:00
96127a15f3 [stable-2.15] Use subset checks for some collection loader tests (#80812) (#80814)
(cherry picked from commit 2ba24957dd)
2023-05-16 17:43:40 -07:00
3b8d2cbd01 set version to 2.15 (#80793) 2023-05-16 11:29:29 -07:00
960f5ddee0 update version switcher for 2.15 (#80790)
Co-authored-by: Sandra McCann <samccann@redhat.com>
2023-05-16 11:29:11 -07:00
6bce05fd4d [stable-2.15] ansible-test - Fix handling of long timeouts (#80769) (#80772)
(cherry picked from commit aacab0633a)
2023-05-15 13:54:25 -07:00
398841ba0d [stable-2.15] ansible-test - Fix timeout handling (#80764) (#80765)
(cherry picked from commit 4c6aa70662)
2023-05-15 13:54:17 -07:00
86efb07b59 [stable-2.15] ansible-test - Avoid use of deprecated utcnow (#80750) (#80757)
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-15 13:53:57 -07:00
0b1b2c238a [stable-2.15] pep517 backend - Copy symlinks when copying source (#80690) (#80700)
(cherry picked from commit 54576cd794)
2023-05-15 13:53:42 -07:00
d58b2c9a4c Update Ansible release version to v2.15.0.post0. (#80804) 2023-05-15 15:49:18 -05:00
748096552f New release v2.15.0 (#80799) 2023-05-15 12:39:35 -05:00
4d4a11490e Update Ansible release version to v2.15.0rc2.post0. (#80687) 2023-05-01 16:12:26 -07:00
5b1efaac29 New release v2.15.0rc2 (#80686) 2023-05-01 15:34:26 -07:00
e88a1a426f ansible-test - Update default containers (#80685) 2023-05-01 12:43:44 -07:00
6f4d3a7944 Backport setuptools fixes (#80684)
* 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)

* 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)
2023-05-01 11:03:10 -07:00
c1e8177808 [stable-2.15] Release tool improvements (#80641) (#80679)
* Provide reproducible sdist builds.
* Use reproducible wheel builds.
* Add PyPI artifact checks.

(cherry picked from commit d37678c5ff)
2023-05-01 09:41:02 -07:00
6dd566b9bb [ansible-galaxy] Fix installing signed collections (#80661) (#80665)
* 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-04-27 15:58:52 -05:00
ca323b9f92 Update Ansible release version to v2.15.0rc1.post0. (#80640) 2023-04-25 18:04:56 -05:00
96c1a9346c New release v2.15.0rc1 (#80639) 2023-04-25 17:29:44 -05:00
67c6f75c9d ansible-test - Update the default containers (#80636) 2023-04-25 14:54:07 -07:00
3e846be696 [stable-2.15] ansible-test - Update pylint to 2.17.3 (#80632) (#80634)
(cherry picked from commit 372fc99686)
2023-04-25 13:22:10 -07:00
78eecfb9dc dnf5: use new API to check package signatures (#80609) (#80622)
(cherry picked from commit 36df60e226)
2023-04-25 09:11:32 -05:00
53fd504935 [stable-2.15] ansible-test - Use FreeBSD packaged setuptools (#80615) (#80616)
This will avoid issues during bootstrapping caused by breaking changes in setuptools.

(cherry picked from commit abc58c026b)
2023-04-24 13:44:10 -07:00
c6fc345fb0 Fix calling v2_playbook_on_notify callback (#80585) (#80612)
Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 989a7d6951)
2023-04-24 10:49:23 -05:00
79751ed970 Use target of /usr/bin/dnf for dnf version detection (#80550) (#80593)
Fixes #80376

(cherry picked from commit 748f534312)
2023-04-24 10:04:27 -05:00
b264386f3f Backportapalooza 04 21 (#80600)
* Fix typo in playbooks_keywords.rst.j2 (#80461)

(cherry picked from commit 2ed4396558)

* Correct bypass_host_loop attribute for group_by (#80380)

This action originally bypassed the host loop, but it does not
currently.

(cherry picked from commit fc5c0aadc9)

* Add Ansible community 8.0.0a1 porting guide (#80498)

(cherry picked from commit 362c949622)

* Adds Ansible 8 Porting Guide to Index Page (#80511)

(cherry picked from commit d081ed3616)

* documents approaches to octal modes better (#80112)

(cherry picked from commit 032881e4f1)

* Update password.py documentation (#80297)

* Update password.py documentation with new semantic markup

(cherry picked from commit bf4e0166a5)

* Add OpenSUSE to the distro's installation guide (#80308)

* Add OpenSUSE to the distro's installation guide

Similar to the rest of the distros, OpenSUSE distributes ansible and it was
missing.

Signed-off-by: ybonatakis <ybonatakis@suse.com>
(cherry picked from commit af6d75e313)

* Document how to run all tasks, even the ones with the never tag (#80315)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
(cherry picked from commit ec403db1c7)

* 📝 Document macOS user deletion over SSH (#80358)

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Don Naro <dnaro@redhat.com>
(cherry picked from commit 88a380c8f0)

* Update playbooks_templating.rst (#80375)

(cherry picked from commit a6e0012b8a)

* Documentation changes for #80367 and #80270 (#80391)

(cherry picked from commit 0460f78081)

* [Docs] communication.rst: Add a hint about adding Matrix shields to READMEs (#80392)

(cherry picked from commit db8f1756bc)

* installation_distros: update Fedora section (#80453)

(cherry picked from commit 4e9d21ec32)

* Fix PolicyRcD.__exit__ docstring (#80528)

(cherry picked from commit 64fb64643d)

* Update validate_argument_spec.py (#80547)

##### SUMMARY
Fix example with file lookup, filter 'from_yaml' is required.

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

(cherry picked from commit 8d685b89f2)

* redirect old vmware guide (#80553)

(cherry picked from commit c1d8130df5)

* Update tools and programs page as per community feedback (#80493)

(cherry picked from commit 44794e3ebc)

* uri  module, fix example (#80554)

(cherry picked from commit 449c628f3d)

* apt key and repository example security patch (#80381)

(cherry picked from commit ed9cd39d0f)

* note in systemd that systemctl can change behaviour due to diff order… (#80570)

(cherry picked from commit 9ca863501c)

* Vars Plugin Documentation Improvement (#80470)

(cherry picked from commit 791510ccba)

* Add note guidelines for additional distributions (#80389)

(cherry picked from commit 68e270d4cc)

---------

Co-authored-by: Christinanik251 <93385939+Christinanik251@users.noreply.github.com>
Co-authored-by: flowerysong <paul.arthur@flowerysong.com>
Co-authored-by: Anwesha Das <anwesha@das.community>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-authored-by: aaronk1 <aaronk1@users.noreply.github.com>
Co-authored-by: Yiannis <jbonatakis@gmail.com>
Co-authored-by: Daniel-at-github <Daniel-at-github@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
Co-authored-by: dzvision <5590839+dzvision@users.noreply.github.com>
Co-authored-by: WeiXinFam-Insta <86450936+WeiXinFam-Insta@users.noreply.github.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Maxwell G <maxwell@gtmx.me>
Co-authored-by: Rodrigo Candido Gryzinski <contact@rogryza.me>
Co-authored-by: 7840vz <122374011+7840vz@users.noreply.github.com>
Co-authored-by: JaroslavKlech <klechh@gmail.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: hexagon6 <hexagon6@fet.li>
Co-authored-by: Tim Way <1091435+timway@users.noreply.github.com>
Co-authored-by: Sarah Lau-Kilo <slaukilo@gmail.com>
2023-04-24 10:01:19 -05:00
2f57c2d9bc fix become yes/no to true/false (#80515) (#80601)
(cherry picked from commit f05abd4540)

Co-authored-by: Akira Yokochi <akira6592@gmail.com>
2023-04-24 10:00:42 -05:00
ddf298097c [stable-2.15] tests: replace a mock import with unittest.mock (#80589) (#80603)
(cherry picked from commit f4615d69ad)

Co-authored-by: Maxwell G <maxwell@gtmx.me>
2023-04-21 13:00:21 -07:00
82b47c8d5c ansible-test - Update the default containers (#80560) 2023-04-18 17:16:17 -07:00
c49dd110ee [stable-2.15] ansible-test - Update pylint to 2.17.2 (#80555) (#80557)
(cherry picked from commit ba47dd9ef4)
2023-04-18 15:50:08 -07:00
4de262300b ansible-galaxy - fix installing dir sources with a trailing path separator (#79110) (#80540)
* strip trailing path separator from type=dir sources

(cherry picked from commit 964e678a7f)
2023-04-18 12:02:13 -05:00
2c35d46298 argspec - fix validating type for required options that are None (#79677) (#80542)
* Only bypass type validation for null parameters if the default is None. A default is mutually exclusive with required.

* Prevent coercing None to str type. Fail the type check instead.

(cherry picked from commit 694c11d5bd)
2023-04-18 12:02:01 -05:00
f90c7f1a7d [stable-2.15] Implement checks, and backwards compat change, to move forward with UTF-8 only (#80370) (#80545)
(cherry picked from commit 0ee7cfb)
2023-04-18 12:01:47 -05:00
12083db2c5 Update Ansible release version to v2.15.0b3.post0. (#80541) 2023-04-17 16:46:48 -05:00
1c16d871d6 New release v2.15.0b3 (#80537) 2023-04-17 14:14:02 -05:00
86bcfec830 Validate task attributes with first finalized attrs after loop (#80476) (#80517)
* Validate task attributes `run_once` and `action` with finalized attrs after individual loop results

* Validate task attribute `ignore_unreachable` using individual loop results

Once there's a way to post validate only certain fields, we can use self._task.post_validate() instead

This replaces the fix introduced in https://github.com/ansible/ansible/pull/80051.

(cherry picked from commit bd6feeb6e7)
2023-04-17 09:23:23 -05:00
f7d2c41fa2 [stable-2.15] --syntax-check is only applicable to ansible-playbook. Fixes #80506 (#80507) (#80509)
(cherry picked from commit f3774ae)
2023-04-12 15:02:47 -05:00
7ce3270f72 [stable-2.15] pep517 backend - Use correct import_module import (#80480) (#80501)
(cherry picked from commit e87802cf2c)
2023-04-12 10:25:52 -07:00
c0b452c73c Last handler defined runs, fix for roles (#79558) (#80495)
Fixes #73643
* clear_notification method and simplify ifs
* Deduplicate code
* Limit number of Templar creations
* Fix sanity
* Preserve handler callbacks order as they were notified

(cherry picked from commit 09dd80b4ec)
2023-04-12 09:50:28 -05:00
39efd7a151 Fix pull request URL in changelog. (#80465) 2023-04-12 09:11:17 -05:00
352127ec2b [stable-2.15] ansible-test - Add support for argcomplete 3 (#80482) (#80484)
(cherry picked from commit 0371ea08d6)
2023-04-11 13:31:29 -07:00
3e4b59dcef Update Ansible release version to v2.15.0b2.post0. (#80469) 2023-04-10 16:49:50 -05:00
f27a4a4f5c New release v2.15.0b2 (#80467) 2023-04-10 16:01:01 -05:00
3a378ba61b ansible-test - Update default containers (#80466) 2023-04-10 13:25:41 -07:00
c7603bbb72 [stable-2.15] Replace validate-modules's semantic markup parser with antsibull-docs-parser (#80406) (#80432)
(cherry picked from commit 92c694372b)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-07 10:04:32 -07:00
8f0ddcba2c dnf5: fix module/pkg names in the failed respawn msg (#80402) (#80434)
(cherry picked from commit 12ce7d2e4e)
2023-04-06 13:19:40 -05:00
856e0312ff dnf5: use the logs API to determine transaction problems (#80401) (#80433)
(cherry picked from commit 8d5c250234)
2023-04-06 13:19:27 -05:00
13cdec1f46 [stable-2.15] Extend ansible-doc test with more classic markup. (#80407) (#80431)
(cherry picked from commit 96f7fd5539)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-06 09:58:49 -07:00
66ef54e83f [stable-2.15] Only use the selectors code path when we are prompt matching (#79931) (#80400)
(cherry picked from commit 6d1e355)
2023-04-05 11:06:28 -05:00
4fcf731ced Fetch signatures from galaxy after the dependency resolver runs (#80334) (#80397)
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-05 11:06:13 -05:00
ca08c27c94 Update Ansible release version to v2.15.0b1.post0. (#80396) 2023-04-04 13:29:32 -05:00
5a262ab510 New release v2.15.0b1 (#80395) 2023-04-04 12:41:20 -05:00
1169 changed files with 7808 additions and 129041 deletions

View File

@ -31,7 +31,7 @@ variables:
- name: fetchDepth
value: 500
- name: defaultContainer
value: quay.io/ansible/azure-pipelines-test-container:3.0.0
value: quay.io/ansible/azure-pipelines-test-container:4.0.1
pool: Standard
@ -46,9 +46,6 @@ stages:
targets:
- test: 1
- test: 2
- test: 3
- test: 4
- test: 5
- stage: Units
dependsOn: []
jobs:
@ -94,10 +91,8 @@ stages:
test: rhel/8.7@3.9
- name: RHEL 9.1
test: rhel/9.1
- name: FreeBSD 12.4
test: freebsd/12.4
- name: FreeBSD 13.1
test: freebsd/13.1
- name: FreeBSD 13.2
test: freebsd/13.2
groups:
- 1
- 2
@ -110,8 +105,8 @@ stages:
test: rhel/8.7
- name: RHEL 9.1
test: rhel/9.1
- name: FreeBSD 13.1
test: freebsd/13.1
- name: FreeBSD 13.2
test: freebsd/13.2
groups:
- 3
- 4
@ -121,8 +116,8 @@ stages:
targets:
- name: Alpine 3.17
test: alpine/3.17
- name: Fedora 37
test: fedora/37
- name: Fedora 38
test: fedora/38
- name: RHEL 8.7
test: rhel/8.7
- name: RHEL 9.1

View File

@ -7,12 +7,32 @@ 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) options=(--skip-test pylint --skip-test ansible-doc --skip-test docs-build --skip-test package-data --skip-test changelog --skip-test validate-modules) ;;
2) options=( --test ansible-doc --test docs-build --test package-data --test changelog) ;;
3) options=(--test pylint --exclude test/units/ --exclude lib/ansible/module_utils/) ;;
4) options=(--test pylint test/units/ lib/ansible/module_utils/) ;;
5) options=( --test validate-modules) ;;
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

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

View File

@ -1,51 +1,11 @@
include README.rst
include COPYING
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/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 lib/ansible/modules *.yml
recursive-include lib/ansible/plugins/test *.yml
recursive-include lib/ansible/plugins/filter *.yml
recursive-include licenses *.txt
recursive-include packaging *.py
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 *.md
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 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/integration *
recursive-include test/sanity *.in *.json *.py *.txt
recursive-include test/support *.py *.ps1 *.psm1 *.cs *.md
recursive-include test/units *

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,648 @@
================================================
ansible-core 2.15 "Ten Years Gone" Release Notes
================================================
.. contents:: Topics
v2.15.10rc1
===========
Release Summary
---------------
| Release Date: 2024-03-18
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.html>`__
Minor Changes
-------------
- ansible-test - Add a work-around for permission denied errors when using ``pytest >= 8`` on multi-user systems with an installed version of ``ansible-test``.
Bugfixes
--------
- Fix an issue when setting a plugin name from an unsafe source resulted in ``ValueError: unmarshallable object`` (https://github.com/ansible/ansible/issues/82708)
- winrm - does not hang when attempting to get process output when stdin write failed
v2.15.9
=======
Release Summary
---------------
| Release Date: 2024-01-29
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.html>`__
Minor Changes
-------------
- ansible-test - Removed `freebsd/12.4` remote.
Security Fixes
--------------
- ANSIBLE_NO_LOG - Address issue where ANSIBLE_NO_LOG was ignored (CVE-2024-0690)
Bugfixes
--------
- ``ansible-galaxy role import`` - fix using the ``role_name`` in a standalone role's ``galaxy_info`` metadata by disabling automatic removal of the ``ansible-role-`` prefix. This matches the behavior of the Galaxy UI which also no longer implicitly removes the ``ansible-role-`` prefix. Use the ``--role-name`` option or add a ``role_name`` to the ``galaxy_info`` dictionary in the role's ``meta/main.yml`` to use an alternate role name.
- ``ansible-test sanity --test runtime-metadata`` - add ``action_plugin`` as a valid field for modules in the schema (https://github.com/ansible/ansible/pull/82562).
- ansible-config init will now dedupe ini entries from plugins.
- ansible-galaxy role install - normalize tarfile paths and symlinks using ``ansible.utils.path.unfrackpath`` and consider them valid as long as the realpath is in the tarfile's role directory (https://github.com/ansible/ansible/issues/81965).
- delegate_to when set to an empty or undefined variable will now give a proper error.
- unsafe data - Enable directly using ``AnsibleUnsafeText`` with Python ``pathlib`` (https://github.com/ansible/ansible/issues/82414)
v2.15.8
=======
Release Summary
---------------
| Release Date: 2023-12-11
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.html>`__
Minor Changes
-------------
- ansible-test - Add FreeBSD 13.2 remote.
- ansible-test - Removed `freebsd/13.1` remote.
Bugfixes
--------
- unsafe data - Address an incompatibility when iterating or getting a single index from ``AnsibleUnsafeBytes``
- unsafe data - Address an incompatibility with ``AnsibleUnsafeText`` and ``AnsibleUnsafeBytes`` when pickling with ``protocol=0``
v2.15.7
=======
Release Summary
---------------
| Release Date: 2023-12-04
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.html>`__
Breaking Changes / Porting Guide
--------------------------------
- assert - Nested templating may result in an inability for the conditional to be evaluated. See the porting guide for more information.
Security Fixes
--------------
- templating - Address issues where internal templating can cause unsafe variables to lose their unsafe designation (CVE-2023-5764)
Bugfixes
--------
- ansible-pull now will expand relative paths for the ``-d|--directory`` option is now expanded before use.
- flush_handlers - properly handle a handler failure in a nested block when ``force_handlers`` is set (http://github.com/ansible/ansible/issues/81532)
- module no_log will no longer affect top level booleans, for example ``no_log_module_parameter='a'`` will no longer hide ``changed=False`` as a 'no log value' (matches 'a').
- modules/user.py - Add check for valid directory when creating new user homedir (allows /dev/null as skeleton) (https://github.com/ansible/ansible/issues/75063)
- role params now have higher precedence than host facts again, matching documentation, this had unintentionally changed in 2.15.
- wait_for should not handle 'non mmapable files' again.
v2.15.6
=======
Release Summary
---------------
| Release Date: 2023-11-06
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.html>`__
Minor Changes
-------------
- ansible-test - Windows 2012 and 2012-R2 instances are now requested from Azure instead of AWS.
Bugfixes
--------
- Fix ``run_once`` being incorrectly interpreted on handlers (https://github.com/ansible/ansible/issues/81666)
- Plugin loader does not dedupe nor cache filter/test plugins by file basename, but full path name.
- Properly template tags in parent blocks (https://github.com/ansible/ansible/issues/81053)
- Restoring the ability of filters/tests can have same file base name but different tests/filters defined inside.
- ``import_role`` reverts to previous behavior of exporting vars at compile time.
- ansible-galaxy - Provide a better error message when using a requirements file with an invalid format - https://github.com/ansible/ansible/issues/81901
- ansible-inventory - index available_hosts for major performance boost when dumping large inventories
- ansible-test - Fix parsing of cgroup entries which contain a ``:`` in the path (https://github.com/ansible/ansible/issues/81977).
v2.15.5
=======
Release Summary
---------------
| Release Date: 2023-10-09
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.html>`__
Minor Changes
-------------
- ansible-galaxy dependency resolution messages have changed the unexplained 'virtual' collection for the specific type ('scm', 'dir', etc) that is more user friendly
Security Fixes
--------------
- ansible-galaxy - Prevent roles from using symlinks to overwrite files outside of the installation directory (CVE-2023-5115)
Bugfixes
--------
- Allow for searching handler subdir for included task via include_role (https://github.com/ansible/ansible/issues/81722)
- PluginLoader - fix Jinja plugin performance issues (https://github.com/ansible/ansible/issues/79652)
- ``ansible.module_utils.service`` - ensure binary data transmission in ``daemonize()``
- ``ansible.module_utils.service`` - fix inter-process communication in ``daemonize()``
- ansible-galaxy - started allowing the use of pre-releases for collections that do not have any stable versions published. (https://github.com/ansible/ansible/pull/81606)
- ansible-galaxy - started allowing the use of pre-releases for dependencies on any level of the dependency tree that specifically demand exact pre-release versions of collections and not version ranges. (https://github.com/ansible/ansible/pull/81606)
- ansible-galaxy error on dependency resolution will not error itself due to 'virtual' collections not having a name/namespace.
- ansible-galaxy info - fix reporting no role found when lookup_role_by_name returns None.
- role deduplication - don't deduplicate before a role has had a task run for that particular host (https://github.com/ansible/ansible/issues/81486).
- uri/urls - Add compat function to handle the ability to parse the filename from a Content-Disposition header (https://github.com/ansible/ansible/issues/81806)
- winrm - Better handle send input failures when communicating with hosts under load
v2.15.4
=======
Release Summary
---------------
| Release Date: 2023-09-11
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.html>`__
Deprecated Features
-------------------
- vault and unfault filters - the undocumented ``vaultid`` parameter is deprecated and will be removed in ansible-core 2.20. Use ``vault_id`` instead.
Bugfixes
--------
- PowerShell - Remove some code which is no longer valid for dotnet 5+
- Prompting - add a short sleep between polling for user input to reduce CPU consumption (https://github.com/ansible/ansible/issues/81516).
- 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.
- first found lookup has been updated to use the normalized argument parsing (pythonic) matching the documented examples.
- handlers - the ``listen`` keyword can affect only one handler with the same name, the last one defined as it is a case with the ``notify`` keyword (https://github.com/ansible/ansible/issues/81013)
- include_role - expose variables from parent roles to role's handlers (https://github.com/ansible/ansible/issues/80459)
- tarfile - handle data filter deprecation warning message for extract and extractall (https://github.com/ansible/ansible/issues/80832).
- vault and unvault filters now properly take ``vault_id`` parameter.
v2.15.3
=======
Release Summary
---------------
| Release Date: 2023-08-14
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.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.
- Use ``include`` where ``recursive-include`` is unnecessary in the ``MANIFEST.in`` file.
- ansible-test - Update the logic used to detect when ``ansible-test`` is running from source.
- ansible-test - Updated the CloudStack test container to version 1.6.1.
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`` now considers all collection paths when identifying which collection requirements are already installed. Use the ``COLLECTIONS_PATHS`` and ``COLLECTIONS_SCAN_SYS_PATHS`` config options to modify these. Previously only the install path was considered when resolving the candidates. The install path will remain the only one potentially modified. (https://github.com/ansible/ansible/issues/79767, https://github.com/ansible/ansible/issues/81163)
- ansible-test - Fix several possible tracebacks when using the ``-e`` option with sanity tests.
- ansible-test - Pre-build a PyYAML wheel before installing requirements to avoid a potential Cython build failure.
- ansible-test - Remove redundant warning about missing programs before attempting to execute them.
- core will now also look at the connection plugin to force 'local' interpreter for networking path compatibility as just ansible_network_os could be misleading.
- man page build - Sub commands of ``ansible-galaxy role`` and ``ansible-galaxy collection`` are now documented.
- password_hash - fix salt format for ``crypt`` (only used if ``passlib`` is not installed) for the ``bcrypt`` algorithm.
- urls.py - fixed cert_file and key_file parameters when running on Python 3.12 - https://github.com/ansible/ansible/issues/80490
v2.15.2
=======
Release Summary
---------------
| Release Date: 2023-07-18
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.html>`__
Minor Changes
-------------
- Utilize gpg check provided internally by the ``transaction.run`` method as oppose to calling it manually.
- ansible-test - Add Fedora 38 remote.
- ansible-test - Use a context manager to perform cleanup at exit instead of using the built-in ``atexit`` module.
- dnf5 - enable environment groups installation testing in CI as its support was added.
- dnf5 - enable now implemented ``cacheonly`` functionality
Bugfixes
--------
- From issue https://github.com/ansible/ansible/issues/80880, when notifying a handler from another handler, handler notifications must be registered immediately as the flush_handler call is not recursive.
- ansible-galaxy - Fix issue installing collections containing directories with more than 100 characters on python versions before 3.10.6
- paramiko_ssh, psrp, and ssh connection plugins - ensure that all values for options that should be strings are actually converted to strings (https://github.com/ansible/ansible/pull/81029).
- templating - In the template action and lookup, use local jinja2 environment overlay overrides instead of mutating the templars environment
Known Issues
------------
- ansible-test - The Fedora 37 remote is known to occasionally hang during boot. It is no longer routinely tested as a result. If possible, use the Fedora 38 remote instead.
v2.15.1
=======
Release Summary
---------------
| Release Date: 2023-06-20
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.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
--------
- Properly disable ``jinja2_native`` in the template module when jinja2 override is used in the template (https://github.com/ansible/ansible/issues/80605)
- ansible-galaxy - Fix variable type error when installing subdir collections (https://github.com/ansible/ansible/issues/80943)
- 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 - Fix handling of timeouts exceeding one day.
- ansible-test - Fix various cases where the test timeout could expire without terminating the tests.
- 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).
- deb822_repository - use http-agent for receiving content (https://github.com/ansible/ansible/issues/80809).
- dnf5 - Update dnf5 module to handle API change for setting the download directory (https://github.com/ansible/ansible/issues/80887)
- man page build - Remove the dependency on the ``docs`` directory for building man pages.
- 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.
- uri - fix search for JSON type to include complex strings containing '+'
v2.15.0
=======
Release Summary
---------------
| Release Date: 2023-05-15
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.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
-------------
- Add support for custom salt for vault encoding to make it deterministic (https://github.com/ansible/ansible/issues/35480).
- Added the conditional that was False if ``when`` caused a task to skip under ``false_condition``.
- Allow force deletion of a group even when it is the primary group of a user. (https://github.com/ansible/ansible/issues/77849)
- Ansible.ModuleUtils.AddType - Add support for compiling ``unsafe`` code with the ``//AllowUnsafe`` directive
- Cache field attributes list on the playbook classes
- Cleaned up unused imports in core.
- Get user input for ``pause`` and ``paramiko_ssh`` from the strategy rather than access ``sys.stdin`` in the WorkerProcess.
- Introduce ``Delegatable`` and ``Notifiable`` mixin classes for playbook objects
- Make using blocks as handlers a parser error (https://github.com/ansible/ansible/issues/79968)
- Playbook objects - Replace deprecated stacked ``@classmethod`` and ``@property``
- Raise an error when an incorrect ``isa`` type is passed to ``FieldAttribute``.
- Remove fallback code for when ``defined``/``undefined`` tests were used on objects containing nested undefined variables; due to changes in lazy evalution of Jinja2 expressions it is no longer needed.
- Remove unused Python stdlib imports from module_utils which were not present for backwards compatibility in: common.file, compat.selectors, facts.network.iscsi, facts.network.nvme, yumdnf
- Remove unused internal imports from module_utils which were not present for backwards compatibility in: common.file, common.parameters, facts.system.caps, yumdnf
- Removed ``straight.plugin`` from the build and packaging requirements.
- Removed unused imports from the following action plugins: async_status, command, pause, set_stats, uri, validate_argument_spec
- Removed unused imports from the following lookup plugins: fileglob, template
- Removed unused imports from the following modules: apt, dnf, expect, pip, slurp, user, yum
- Removed unused imports from the following set of test plugins: files
- Removed unused imports from the following strategy plugins: debug
- Removed unused imports from the following vars plugins: host_group_vars
- The minimum required ``setuptools`` version is now 45.2.0, as it is the oldest version to support Python 3.10.
- Use ``ansible.module_utils.six.moves.collections_abc`` instead of ``ansible.module_utils.common._collections_compat`` in modules and module_utils.
- Use ``collections.abc`` instead of ``ansible.module_utils.common._collections_compat`` in controller code.
- Use ``package_data`` instead of ``include_package_data`` for ``setup.cfg`` to avoid ``setuptools`` warnings.
- ``AnsibleJ2Vars`` class that acts as a storage for all variables for templating purposes now uses ``collections.ChainMap`` internally.
- add parameter ``numeric`` to the iptables module to disable dns lookups when running list -action internally (https://github.com/ansible/ansible/issues/78793).
- allow user to set ansible specific env vars for selecting pager and editor, but still fall back to commonly used defaults.
- ansible-doc - support role extension for semantic markup spec so that ``O()`` and ``RV()`` referring to role entrypoints are rendered more readable (https://github.com/ansible/ansible/pull/80305).
- ansible-doc - support semantic markup in text output (https://github.com/ansible/ansible/pull/80242).
- ansible-doc text output - support ``seealso`` plugin record that was added for filter and test plugin documentation (https://github.com/ansible/ansible/pull/80212).
- ansible-galaxy - Add ability to specify collection versions on the CLI without the need for a colon. Such as ``namespace.name==1.2.3`` vs ``namespace.name:1.2.3``.
- ansible-galaxy - Use Python's native ``raise ... from`` instead of ``six.raise_from``.
- ansible-galaxy - support ``resolvelib >= 0.5.3, < 0.10.0``.
- ansible-galaxy - support ``resolvelib >= 0.5.3, < 1.1.0``.
- ansible-inventory now supports the limit command line options.
- 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 Alpine 3.17 remote.
- ansible-test - Add Fedora 37 container.
- ansible-test - Add Fedora 37 remote.
- ansible-test - Add FreeBSD 12.4 remote.
- ansible-test - Add RHEL 8.7 remote.
- ansible-test - Add RHEL 9.1 remote.
- ansible-test - Add macOS 13.2 remote.
- ansible-test - Additional log details are shown when containers fail to start or SSH connections to containers fail.
- 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 - Disabled the ``ansible-format-automatic-specification`` rule from the ``pylint`` sanity test, now that Python 2.6 is no longer supported.
- ansible-test - Enable the ``trailing-comma-tuple`` rule in the ``pylint`` sanity test.
- ansible-test - Enable the ``unused-import`` rule for the ``pylint`` sanity test for collections.
- 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 - Improve consistency of executed ``pylint`` commands by making the plugins ordered.
- ansible-test - Improve consistency of version specific documentation links.
- 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 - Minor cleanup and package updates in distro containers.
- ansible-test - More details are provided about an instance when provisioning fails.
- ansible-test - Moved git handling out of the validate-modules sanity test and into ansible-test.
- 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 - Removed test containers: fedora36
- ansible-test - Removed test remotes: alpine/3.16, fedora/36, freebsd/12.3, rhel/8.6, rhel/9.0, macos/12.0
- ansible-test - Removed the ``--keep-git`` sanity test option, which was limited to testing ansible-core itself.
- 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 - The ``pep8`` sanity test rule ``E203`` is now disabled since it is not PEP 8 compliant. This provides compatibility with output generated by the ``black`` code formatter.
- ansible-test - The ``validate-modules`` sanity test no longer limits the ``__future__`` imports that can be used. Other sanity tests that check ``__future__`` imports remain unchanged. As a result, the error code ``illegal-future-imports`` is no longer used.
- 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 - Update Alpine 3 container to 3.17.
- ansible-test - Update Python requirements used for sanity tests.
- ansible-test - Update ``base`` and ``default`` containers to include Python 3.11.0.
- ansible-test - Update ``default`` containers to include new ``docs-build`` sanity test requirements.
- ansible-test - Update error handling code to use Python 3.x constructs, avoiding direct use of ``errno``.
- ansible-test - Update test container to ``7.4.0`` which includes the new PSScriptAnalyzer versions
- ansible-test - Update the CloudStack test plugin to use a newer test container with CloudStack 4.18.0.
- ansible-test - Update the NIOS test plugin to use a newer multi-arch test container.
- ansible-test - Update the ``ansible-bad-import-from`` rule in the ``pylint`` sanity test to recommend ``ansible.module_utils.six.moves.collections_abc`` instead of ``ansible.module_utils.common._collections_compat``.
- ansible-test - Update the ``base`` and ``default`` test containers with the latest requirements.
- ansible-test - Update the ``default`` containers to include the ``package-data`` requirements update.
- ansible-test - Update the ``default`` containers to include the ``pylint`` requirements update.
- ansible-test - Updated the Azure Pipelines CI plugin to work with newer versions of git.
- 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).
- ansible-test pslint - Upgrade PSScriptAnalyzer to ``1.21.0`` which enables the ``AvoidMultipleTypeAttributes``, ``AvoidSemicolonsAsLineTerminators``, and ``AvoidUsingBrokenHashAlgorithms`` rules
- ansible-test runtime-metadata sanity test - ensure that ``redirect`` entries in ``meta/runtime.yml`` contain collection names, except for ``module_utils`` plugin redirects and ``import_redirect`` redirects (https://github.com/ansible/ansible/pull/78802).
- ansible-test sanity --test ansible-doc - now also lists documentation for test and filter plugins that are documented (https://github.com/ansible/ansible/pull/77737).
- ansible-test validate-modules - Added support for validating module documentation stored in a sidecar file alongside the module (``{module}.yml`` or ``{module}.yaml``). Previously these files were ignored and documentation had to be placed in ``{module}.py``.
- ansible-test validate-modules - no longer treat falsy non-``False`` values for defaults as ``None`` (https://github.com/ansible/ansible/pull/79267).
- apt - add allow-change-held-packages option to apt remove (https://github.com/ansible/ansible/issues/78131)
- apt_repository - adds ``sources_added`` and ``sources_removed`` to the return of the module (https://github.com/ansible/ansible/issues/79306).
- apt_repository will use the trust repo directories in order of preference (more appropriate to less) as they exist on the target.
- collections - Add additional ignores for commonly rejected file extensions
- collections - Add additional includes for REUSE license files (https://github.com/ansible/ansible/issues/79368)
- deb822_repository - Add new module for managing DEB822 formatted apt repositories
- debug - Perform argspec valdiation in debug action plugin (https://github.com/ansible/ansible/issues/79862)
- dnf5 - Add new module for managing packages and other artifacts via the next version of DNF (https://github.com/ansible/ansible/issues/78898)
- galaxy - include ``license_file`` in the default manifest directives (https://github.com/ansible/ansible/pull-request/79420)
- optimized var loading by caching results as there is no variance in input during run.
- pycompat24 module_utils - Remove support for Python 2.5 and earlier.
- sanity tests - updates the collection-deprecated-version tests to ignore the ``prerelease`` component of the collection version ().
- strftime filter, additional docs and links to source of truth.
- updated the vendored distro library to upstream version (https://github.com/ansible/ansible/pull/79227)
- validate-modules sanity test - add support for semantic markup (https://github.com/ansible/ansible/pull/80243).
- validate-modules sanity test - if the ``check_mode`` attribute is present, check that it coincides with the ``support_check_mode`` parameter of ``AnsibleModule`` (https://github.com/ansible/ansible/pull/80090).
- validate-modules sanity test - remove support for the never implemented ``forced_action_plugin`` attribute (https://github.com/ansible/ansible/pull/79317).
- validate-modules sanity test - support the ``plugin`` see-also part of the semantic markup specification (https://github.com/ansible/ansible/pull/80244).
Breaking Changes / Porting Guide
--------------------------------
- ansible-doc - no longer treat plugins in collections whose name starts with ``_`` as deprecated (https://github.com/ansible/ansible/pull/79362).
- 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.
- ansible-test - The ``vcenter`` test plugin now defaults to using a user-provided static configuration instead of the ``govcsim`` simulator for collections. Set the ``ANSIBLE_VCSIM_CONTAINER`` environment variable to ``govcsim`` to use the simulator. Keep in mind that the simulator is deprecated and will be removed in a future release.
- ansible-test sanity - previously plugins and modules in collections whose name started with ``_`` were treated as deprecated, even when they were not marked as deprecated in ``meta/runtime.yml``. This is no longer the case (https://github.com/ansible/ansible/pull/79362).
- ansible-test validate-modules - Removed the ``missing-python-doc`` error code in validate modules, ``missing-documentation`` is used instead for missing PowerShell module documentation.
Deprecated Features
-------------------
- The ``ConnectionBase()._new_stdin`` attribute is deprecated, use ``display.prompt_until(msg)`` instead.
- ansible-test - The ``foreman`` test plugin is now deprecated. It will be removed in a future release.
- ansible-test - The ``govcsim`` simulator in the ``vcenter`` test plugin is now deprecated. It will be removed in a future release. Users should switch to providing their own test environment through a static configuration file.
- password_hash - deprecate using passlib.hash.hashtype if hashtype isn't in the list of documented choices.
- vars - Specifying a list of dictionaries for ``vars:`` is deprecated in favor of specifying a dictionary.
Removed Features (previously deprecated)
----------------------------------------
- Remove deprecated ``ANSIBLE_CALLBACK_WHITELIST`` configuration environment variable, use ``ANSIBLE_CALLBACKS_ENABLED`` instead. (https://github.com/ansible/ansible/issues/78821)
- Remove deprecated ``ANSIBLE_COW_WHITELIST`` configuration environment variable, use ``ANSIBLE_COW_ACCEPTLIST`` instead. (https://github.com/ansible/ansible/issues/78819)
- Remove deprecated ``callback_whitelist`` configuration option, use ``callbacks_enabled`` instead. (https://github.com/ansible/ansible/issues/78822)
- Remove deprecated ``cow_whitelist`` configuration option, use ``cowsay_enabled_stencils`` instead. (https://github.com/ansible/ansible/issues/78820)
Bugfixes
--------
- Ansible.Basic.cs - Ignore compiler warning (reported as an error) when running under PowerShell 7.3.x.
- AnsibleModule.run_command - Only use selectors when needed, and rely on Python stdlib subprocess for the simple task of collecting stdout/stderr when prompt matching is not required.
- 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)
- Correctly count rescued tasks in play recap (https://github.com/ansible/ansible/issues/79711)
- Display - Defensively configure writing to stdout and stderr with a custom encoding error handler that will replace invalid characters while providing a deprecation warning that non-utf8 text will result in an error in a future version.
- Do not crash when templating an expression with a test or filter that is not a valid Ansible filter name (https://github.com/ansible/ansible/issues/78912, https://github.com/ansible/ansible/pull/78913).
- Fix ``MANIFEST.in`` to exclude unwanted files in the ``packaging/`` directory.
- Fix ``MANIFEST.in`` to include ``*.md`` files in the ``test/support/`` directory.
- Fix a traceback occuring when a task is named ``meta`` (https://github.com/ansible/ansible/issues/79459)
- Fix an issue where the value of ``become`` was ignored when used on a role used as a dependency in ``main/meta.yml`` (https://github.com/ansible/ansible/issues/79777)
- Fix bug in `vars` applied to roles, they were being incorrectly exported among others while only vars/main.yml was meant to be. Also adjusted the precedence to act the same as inline params.
- Fix conditionally notifying ``include_tasks` handlers when ``force_handlers`` is used (https://github.com/ansible/ansible/issues/79776)
- Fix post-validating looped task fields so the strategy uses the correct values after task execution.
- Fix reusing a connection in a task loop that uses a redirected or aliased name - https://github.com/ansible/ansible/issues/78425
- Fix setting become activation in a task loop - https://github.com/ansible/ansible/issues/78425
- Fix traceback when using the ``template`` module and running with ``ANSIBLE_DEBUG=1`` (https://github.com/ansible/ansible/issues/79763)
- Fix using ``GALAXY_IGNORE_CERTS`` in conjunction with collections in requirements files which specify a specific ``source`` that isn't in the configured servers.
- Fix using ``GALAXY_IGNORE_CERTS`` when downloading tarballs from Galaxy servers (https://github.com/ansible/ansible/issues/79557).
- Fixes leftover _valid_attrs usage.
- Fixes the password lookup to not rewrite files if they are not changed when using the "encrypt" parameter (#79430).
- Module and role argument validation - include the valid suboption choices in the error when an invalid suboption is provided.
- Perform type check on data passed to Display.display to enforce the requirement of being given a python3 unicode string
- Prevent running same handler multiple times when included via ``include_role`` (https://github.com/ansible/ansible/issues/73643)
- TaskExecutor - don't ignore templated _raw_params that k=v parser failed to parse (https://github.com/ansible/ansible/issues/79862)
- 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-galaxy search rolename`` - give a warning instead of non-zero return code when search results are empty. This is similar to the behavior when listing roles, which gives a warning if a role cannot be found and exits with a return code of ``0``.
- ``ansible_eval_concat`` - avoid redundant unsafe wrapping of templated strings converted to Python types
- ``pkg_mgr`` - fix the default dnf version detection
- ansible-config limit shorthand format to assigned values
- 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-doc now will correctly display short descriptions on listing filters/tests no matter the directory sorting.
- 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 - fix installing collections from directories that have a trailing path separator (https://github.com/ansible/ansible/issues/77803).
- ansible-galaxy - fix installing collections in git repositories/directories which contain a MANIFEST.json file (https://github.com/ansible/ansible/issues/79796).
- ansible-galaxy - fix installing signed collections (https://github.com/ansible/ansible/issues/80648).
- ansible-galaxy - make initial call to Galaxy server on-demand only when installing, getting info about, and listing roles.
- ansible-galaxy - reduce API calls to servers by fetching signatures only for final candidates.
- ansible-galaxy collection install - respect symlinks when installing from source or local repository (https://github.com/ansible/ansible/issues/78442)
- ansible-galaxy collection verify - fix verifying signed collections when the keyring is not configured.
- ansible-galaxy collection/role init - preserve symlinks (https://github.com/ansible/ansible/issues/39334).
- ansible-galaxy role info - fix unhandled AttributeError by catching the correct exception.
- ansible-inventory will no longer duplicate host entries if they were part of a group's childrens tree.
- ansible-inventory will not explicitly sort groups/hosts anymore, giving a chance (depending on output format) to match the order in the input sources.
- ansible-playbook -K breaks when passwords have quotes (https://github.com/ansible/ansible/issues/79836).
- ansible-test - Add ``wheel < 0.38.0`` constraint for Python 3.6 and earlier.
- ansible-test - Add support for ``argcomplete`` version 3.
- ansible-test - Add support for ``pytest`` assertion rewriting when running unit tests on Python 3.5 and later. Resolves issue https://github.com/ansible/ansible/issues/68032
- ansible-test - Added a work-around for a traceback under Python 3.11 when completing certain command line options.
- 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).
- ansible-test - Always indicate the Python version being used before installing requirements. Resolves issue https://github.com/ansible/ansible/issues/72855
- 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 - Exclude ansible-core vendored Python packages from ansible-test payloads.
- ansible-test - Fix broken documentation link for ``aws`` test plugin error messages.
- 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 - 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 - 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 - 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 - 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 - Support loading of vendored Python packages from ansible-core.
- ansible-test - The ``validate-modules`` sanity test now properly enforces documentation before imports for plugins. Previously this was only enforced for modules due to a coding error.
- ansible-test - Update ``pylint`` to 2.17.2 to resolve several possible false positives.
- ansible-test - Update ``pylint`` to 2.17.3 to resolve several possible false positives.
- ansible-test - Update the ``pylint`` sanity test requirements to resolve crashes on Python 3.11. (https://github.com/ansible/ansible/issues/78882)
- ansible-test - Update the ``pylint`` sanity test to use version 2.15.4.
- ansible-test - Update the ``pylint`` sanity test to use version 2.15.5.
- 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)
- ansible-test - When bootstrapping remote FreeBSD instances, use the OS packaged ``setuptools`` instead of installing the latest version from PyPI.
- ansible-test - fix warning message about failing to run an image to include the image name
- ansible-test runtime-metadata sanity test - do not crash on YAML parsing errors without a context mark (https://github.com/ansible/ansible/pull/78802).
- ansible-test sanity - correctly report invalid YAML in validate-modules (https://github.com/ansible/ansible/issues/75837).
- ansible-vault encrypt_string - started appending a line feed at the end of the encrypted string output. Missing newline character caused problems identifying where the string ends in some shells (like bash) or accidentally copying an extra trailing terminator symbol (e.g., zsh prints out a ``%`` sign to signal where the original output stops) (https://github.com/ansible/ansible/issues/78932).
- ansible_facts.hardware - Define all processor facts on s390x (https://github.com/ansible/ansible/issues/19755)
- apt - set locale to fix updating the cache (https://github.com/ansible/ansible/issues/79523).
- apt module should not traceback on invalid type given as package. issue 78663.
- apt_repository will no longer fail to detect key when unrelated errors/warnings are issued by apt-key.
- argument spec validation - again report deprecated parameters for Python-based modules. This was accidentally removed in ansible-core 2.11 when argument spec validation was refactored (https://github.com/ansible/ansible/issues/79680, https://github.com/ansible/ansible/pull/79681).
- argument spec validation - ensure that deprecated aliases in suboptions are also reported (https://github.com/ansible/ansible/pull/79740).
- argument spec validation - fix warning message when two aliases of the same option are used for suboptions to also mention the option's name they are in (https://github.com/ansible/ansible/pull/79740).
- basic.py module_utils - Perform Python version check much earlier to ensure it runs before other errors occur.
- connection local now avoids traceback on invalid user being used to execuet ansible (valid in host, but not in container).
- copy - fix creating the dest directory in check mode with remote_src=True (https://github.com/ansible/ansible/issues/78611).
- copy - fix reporting changes to file attributes in check mode with remote_src=True (https://github.com/ansible/ansible/issues/77957).
- copy module will no longer move 'non files' set as src when remote_src=true.
- copy remote_src=true - fix copying subdirs recursively when the dest exists and the src and dest have multiple common subdirectories in a common directory (https://github.com/ansible/ansible/issues/74536).
- copy remote_src=true - fix reporting changed for copying empty directories.
- display - reduce risk of post-fork output deadlocks (https://github.com/ansible/ansible/pull/79522)
- dnf5 - Use ``transaction.check_gpg_signatures`` API call to check package signatures AND possibly to recover from when keys are missing.
- dnf5 - fix module and package names in the message following failed module respawn attempt
- dnf5 - use the logs API to determine transaction problems
- 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)
- file lookup now handles missing files more gracefully.
- file lookup now plays nice with generic lookup ``errors`` option.
- get_url - Ensure we are passing ciphers to all url_get calls (https://github.com/ansible/ansible/issues/79717)
- get_url module - Added a documentation reference to ``hashlib`` regarding algorithms, as well as a note about ``md5`` support on systems running in FIPS compliant mode.
- get_url module - Removed out-of-date documentation stating that ``hashlib`` is a third-party library.
- handlers - fix ``v2_playbook_on_notify`` callback not being called when notifying handlers
- handlers - fix an issue where the ``flush_handlers`` meta task could not be used with FQCN: ``ansible.builtin.meta`` (https://github.com/ansible/ansible/issues/79023)
- include_role - Inherit from role parents beyond a depth of 3 (https://github.com/ansible/ansible/issues/47023).
- jinja2_native - fix intermittent 'could not find job' failures when a value of ``ansible_job_id`` from a result of an async task was inadvertently changed during execution; to prevent this a format of ``ansible_job_id`` was changed.
- jinja2_native: preserve quotes in strings (https://github.com/ansible/ansible/issues/79083)
- keyword inheritance - Ensure that we do not squash keywords in validate (https://github.com/ansible/ansible/issues/79021)
- known_hosts - do not return changed status when a non-existing key is removed (https://github.com/ansible/ansible/issues/78598)
- list-tags now shows the 'never' tag, which was being excluded by default. To list all tasks you still need to add `--list-tasks --tags never,all`.
- loops/delegate_to - Do not double calculate the values of loops and ``delegate_to`` (https://github.com/ansible/ansible/issues/80038)
- module responses - Ensure that module responses are utf-8 adhereing to JSON RFC and expectations of the core code.
- module/role argument spec - validate the type for options that are None when the option is required or has a non-None default (https://github.com/ansible/ansible/issues/79656).
- module_utils/basic.py - Fix detection of available hashing algorithms on Python 3.x. All supported algorithms are now available instead of being limited to a hard-coded list. This affects modules such as ``get_url`` which accept an arbitrary checksum algorithm.
- normal action plugin - remove obsolete ``if`` (https://github.com/ansible/ansible/pull/79690).
- omit on keywords was resetting to default value, ignoring inheritance.
- paramiko - Add a new option to allow paramiko >= 2.9 to easily work with all devices now that rsa-sha2 support was added to paramiko, which prevented communication with numerous platforms. (https://github.com/ansible/ansible/issues/76737)
- 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)
- paramiko connection was still using outdated playcontext, this should bring it up to date to use the 'correct' data for each task/loop.
- password lookup now correctly reads stored ident fields.
- password_hash - handle errors using unknown passlib hashtypes more gracefully (https://github.com/ansible/ansible/issues/45392).
- pep517 build backend - Use the documented ``import_module`` import from ``importlib``.
- plugin loader, fix detection for existing configuration before initializing for a plugin
- role deduplication - Always create new role object, regardless of deduplication. Deduplication will only affect whether a duplicate call to a role will execute, as opposed to re-using the same object. (https://github.com/ansible/ansible/pull/78661)
- roles - Fix templating ``public``, ``allow_duplicates`` and ``rolespec_validate`` (https://github.com/ansible/ansible/issues/80304).
- service_facts - Use python re to parse service output instead of grep (https://github.com/ansible/ansible/issues/78541)
- strategy plugins now correctly identify bad registered variables, even on skip.
- strategy plugins: get the correctly templated and validated run_once value on strategy linear (https://github.com/ansible/ansible/issues/78492)
- syntax check - Limit ``--syntax-check`` to ``ansible-playbook`` only, as that is the only CLI affected by this argument (https://github.com/ansible/ansible/issues/80506)
- systemd - daemon-reload and daemon-reexec ignore errors when running in a chroot (https://github.com/ansible/ansible/pull/79643)
- templates - Fixed ``TypeError`` when a lookup plugin has an option called ``name``.
- unarchive - allow relative path for ``dest`` (https://github.com/ansible/ansible/issues/64612)
- unarchive - log errors from commands to assist in debugging (https://github.com/ansible/ansible/issues/64612)
- updated error messages to include 'acl' and not just mode changes when failing to set required permissions on remote.
- uri - improve JSON content type detection
- user - fix comparing group IDs to existing group names so groups are not always updated (https://github.com/ansible/ansible/issues/79956).
- user module - Removed ``password_expire_max`` from the return docs, as it is not returned.
- user module - Removed ``password_expire_min`` from the return docs, as it is not returned.
- validate-modules sanity test - replace semantic markup parsing and validating code with the code from `antsibull-docs-parser 0.2.0 <https://github.com/ansible-community/antsibull-docs-parser/releases/tag/0.2.0>`__ (https://github.com/ansible/ansible/pull/80406).
- vault - show filename additionally if missing secrets prevents decryption (https://github.com/ansible/ansible/issues/79723)
- winrm - Increase the read timeout to 10 seconds later than the operation timeout reducing the chances of a false read timeout
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 - Unit tests for collections do not support ``pytest`` assertion rewriting on Python 2.7.
- ansible-test - Using Docker on systems with SELinux may require setting SELinux to permissive mode. Podman should work with SELinux in enforcing mode.
- dnf5 - The DNF5 package manager currently does not provide all functionality to ensure feature parity between the existing ``dnf`` and the new ``dnf5`` module. As a result the following ``dnf5`` options are effectively a no-op: ``cacheonly``, ``enable_plugin``, ``disable_plugin`` and ``lock_timeout``.
New Plugins
-----------
Filter
~~~~~~
- commonpath - gets the common path
- normpath - Normalize a pathname
New Modules
-----------
Lib
~~~
ansible.modules
^^^^^^^^^^^^^^^
- deb822_repository - Add and remove deb822 formatted repositories
- dnf5 - Manages packages with the I(dnf5) package manager

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-15
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.html>`__

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2024-03-18
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.html>`__

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2024-01-29
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2024-01-22
| `Porting Guide <https://docs.ansible.com/ansible-core/2.15/porting_guides/porting_guide_core_2.15.html>`__

View File

@ -0,0 +1,2 @@
bugfixes:
- Prevent running same handler multiple times when included via ``include_role`` (https://github.com/ansible/ansible/issues/73643)

View File

@ -0,0 +1,3 @@
bugfixes:
- modules/user.py - Add check for valid directory when creating new user homedir (allows /dev/null as skeleton) (https://github.com/ansible/ansible/issues/75063)

View File

@ -1,6 +1,6 @@
breaking_changes:
- "ansible-doc - no longer treat plugins in collections whose name starts with ``_`` as deprecated
(https://github.com/ansible/ansible/pull/79217)."
(https://github.com/ansible/ansible/pull/79362)."
- "ansible-test sanity - previously plugins and modules in collections whose name started with ``_``
were treated as deprecated, even when they were not marked as deprecated in ``meta/runtime.yml``.
This is no longer the case (https://github.com/ansible/ansible/pull/79362)."

View File

@ -0,0 +1,2 @@
bugfixes:
- module/role argument spec - validate the type for options that are None when the option is required or has a non-None default (https://github.com/ansible/ansible/issues/79656).

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,4 @@
bugfixes:
- Display - Defensively configure writing to stdout and stderr with a custom encoding error handler that will replace invalid characters
while providing a deprecation warning that non-utf8 text will result in an error in a future version.
- module responses - Ensure that module responses are utf-8 adhereing to JSON RFC and expectations of the core code.

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,2 @@
bugfixes:
- "validate-modules sanity test - replace semantic markup parsing and validating code with the code from `antsibull-docs-parser 0.2.0 <https://github.com/ansible-community/antsibull-docs-parser/releases/tag/0.2.0>`__ (https://github.com/ansible/ansible/pull/80406)."

View File

@ -0,0 +1,2 @@
bugfixes:
- include_role - expose variables from parent roles to role's handlers (https://github.com/ansible/ansible/issues/80459)

View File

@ -0,0 +1,2 @@
bugfixes:
- Fix post-validating looped task fields so the strategy uses the correct values after task execution.

View File

@ -0,0 +1,3 @@
bugfixes:
- syntax check - Limit ``--syntax-check`` to ``ansible-playbook`` only, as that is the only CLI affected by this argument
(https://github.com/ansible/ansible/issues/80506)

View File

@ -0,0 +1,2 @@
bugfixes:
- "Properly disable ``jinja2_native`` in the template module when jinja2 override is used in the template (https://github.com/ansible/ansible/issues/80605)"

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,4 @@
bugfixes:
- "From issue https://github.com/ansible/ansible/issues/80880, when notifying a
handler from another handler, handler notifications must be registered
immediately as the flush_handler call is not recursive."

View File

@ -0,0 +1,3 @@
bugfixes:
- dnf5 - Update dnf5 module to handle API change for setting the download directory
(https://github.com/ansible/ansible/issues/80887)

View File

@ -0,0 +1,3 @@
bugfixes:
- ansible-galaxy - Fix variable type error when installing subdir collections
(https://github.com/ansible/ansible/issues/80943)

View File

@ -0,0 +1,2 @@
bugfixes:
- templating - In the template action and lookup, use local jinja2 environment overlay overrides instead of mutating the templars environment

View File

@ -0,0 +1,2 @@
bugfixes:
- handlers - the ``listen`` keyword can affect only one handler with the same name, the last one defined as it is a case with the ``notify`` keyword (https://github.com/ansible/ansible/issues/81013)

View File

@ -0,0 +1,2 @@
bugfixes:
- "paramiko_ssh, psrp, and ssh connection plugins - ensure that all values for options that should be strings are actually converted to strings (https://github.com/ansible/ansible/pull/81029)."

View File

@ -0,0 +1,2 @@
bugfixes:
- Properly template tags in parent blocks (https://github.com/ansible/ansible/issues/81053)

View File

@ -0,0 +1,2 @@
bugfixes:
- "``ansible.module_utils.service`` - fix inter-process communication in ``daemonize()``"

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Updated the CloudStack test container to version 1.6.1.

View File

@ -0,0 +1,2 @@
bugfixes:
- flush_handlers - properly handle a handler failure in a nested block when ``force_handlers`` is set (http://github.com/ansible/ansible/issues/81532)

View File

@ -0,0 +1,2 @@
bugfixes:
- "``ansible.module_utils.service`` - ensure binary data transmission in ``daemonize()``"

View File

@ -0,0 +1,16 @@
---
bugfixes:
- >-
ansible-galaxy - started allowing the use of pre-releases
for dependencies on any level of the dependency tree that
specifically demand exact pre-release versions of
collections and not version ranges.
(https://github.com/ansible/ansible/pull/81606)
- >-
ansible-galaxy - started allowing the use of pre-releases
for collections that do not have any stable versions
published.
(https://github.com/ansible/ansible/pull/81606)
...

View File

@ -0,0 +1,2 @@
bugfixes:
- Fix ``run_once`` being incorrectly interpreted on handlers (https://github.com/ansible/ansible/issues/81666)

View File

@ -0,0 +1,2 @@
bugfixes:
- Allow for searching handler subdir for included task via include_role (https://github.com/ansible/ansible/issues/81722)

View File

@ -0,0 +1,3 @@
bugfixes:
- uri/urls - Add compat function to handle the ability to parse the filename from a Content-Disposition header
(https://github.com/ansible/ansible/issues/81806)

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy - Provide a better error message when using a requirements file with an invalid format - https://github.com/ansible/ansible/issues/81901

View File

@ -0,0 +1,2 @@
bugfixes:
- "Fix an issue when setting a plugin name from an unsafe source resulted in ``ValueError: unmarshallable object`` (https://github.com/ansible/ansible/issues/82708)"

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy - fix installing collections from directories that have a trailing path separator (https://github.com/ansible/ansible/issues/77803).

View File

@ -0,0 +1,7 @@
bugfixes:
- >-
``ansible-galaxy`` now considers all collection paths when identifying which collection requirements are already installed.
Use the ``COLLECTIONS_PATHS`` and ``COLLECTIONS_SCAN_SYS_PATHS`` config options to modify these.
Previously only the install path was considered when resolving the candidates.
The install path will remain the only one potentially modified.
(https://github.com/ansible/ansible/issues/79767, https://github.com/ansible/ansible/issues/81163)

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:
- ansible-galaxy role install - normalize tarfile paths and symlinks using ``ansible.utils.path.unfrackpath`` and consider them valid as long as the realpath is in the tarfile's role directory (https://github.com/ansible/ansible/issues/81965).

View File

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

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Use a context manager to perform cleanup at exit instead of using the built-in ``atexit`` module.

View File

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

View File

@ -1,2 +1,4 @@
minor_changes:
- ansible-test - Update the ``base`` and ``default`` test containers with the latest requirements.
- ansible-test - Update the ``default`` containers to include the ``pylint`` requirements update.
- ansible-test - Update the ``default`` containers to include the ``package-data`` requirements update.

View File

@ -0,0 +1,3 @@
bugfixes:
- 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.

View File

@ -0,0 +1,3 @@
bugfixes:
- ansible-test - Fix several possible tracebacks when using the ``-e`` option with sanity tests.
- ansible-test - Remove redundant warning about missing programs before attempting to execute them.

View File

@ -0,0 +1,6 @@
minor_changes:
- ansible-test - Add Fedora 38 remote.
known_issues:
- ansible-test - The Fedora 37 remote is known to occasionally hang during boot.
It is no longer routinely tested as a result.
If possible, use the Fedora 38 remote instead.

View File

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

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Update the logic used to detect when ``ansible-test`` is running from source.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Fix handling of timeouts exceeding one day.

View File

@ -0,0 +1,2 @@
minor_changes:
- The minimum required ``setuptools`` version is now 45.2.0, as it is the oldest version to support Python 3.10.

View File

@ -0,0 +1,3 @@
bugfixes:
- ansible-test - Update ``pylint`` to 2.17.2 to resolve several possible false positives.
- ansible-test - Update ``pylint`` to 2.17.3 to resolve several possible false positives.

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Add a work-around for permission denied errors when using ``pytest >= 8`` on multi-user systems with an installed version of ``ansible-test``.

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Pre-build a PyYAML wheel before installing requirements to avoid a potential Cython build failure.

View File

@ -0,0 +1,3 @@
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.

View File

@ -0,0 +1,5 @@
bugfixes:
- ansible-test - Fix various cases where the test timeout could expire without terminating the tests.
minor_changes:
- ansible-test - Refactored ``env`` command logic and timeout handling.
- ansible-test - Allow float values for the ``--timeout`` option to the ``env`` command. This simplifies testing.

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Use ``datetime.datetime.now`` with ``tz`` specified instead of ``datetime.datetime.utcnow``.

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Windows 2012 and 2012-R2 instances are now requested from Azure instead of AWS.

View File

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Add FreeBSD 13.2 remote.

View File

@ -0,0 +1,3 @@
security_fixes:
- ansible-galaxy - Prevent roles from using symlinks to overwrite
files outside of the installation directory (CVE-2023-5115)

View File

@ -0,0 +1,6 @@
security_fixes:
- templating - Address issues where internal templating can cause unsafe
variables to lose their unsafe designation (CVE-2023-5764)
breaking_changes:
- assert - Nested templating may result in an inability for the conditional
to be evaluated. See the porting guide for more information.

View File

@ -0,0 +1,2 @@
security_fixes:
- ANSIBLE_NO_LOG - Address issue where ANSIBLE_NO_LOG was ignored (CVE-2024-0690)

View File

@ -0,0 +1,2 @@
bugfixes:
- deb822_repository - use http-agent for receiving content (https://github.com/ansible/ansible/issues/80809).

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-config init will now dedupe ini entries from plugins.

View File

@ -0,0 +1,2 @@
bugfixes:
- delegate_to when set to an empty or undefined variable will now give a proper error.

View File

@ -0,0 +1,2 @@
minor_changes:
- dnf5 - enable now implemented ``cacheonly`` functionality

View File

@ -0,0 +1,2 @@
bugfixes:
- dnf5 - fix module and package names in the message following failed module respawn attempt

View File

@ -0,0 +1,2 @@
bugfixes:
- dnf5 - Use ``transaction.check_gpg_signatures`` API call to check package signatures AND possibly to recover from when keys are missing.

View File

@ -0,0 +1,2 @@
minor_changes:
- Utilize gpg check provided internally by the ``transaction.run`` method as oppose to calling it manually.

View File

@ -0,0 +1,2 @@
bugfixes:
- dnf5 - use the logs API to determine transaction problems

View File

@ -0,0 +1,2 @@
minor_changes:
- dnf5 - enable environment groups installation testing in CI as its support was added.

View File

@ -0,0 +1,2 @@
bugfixes:
- PowerShell - Remove some code which is no longer valid for dotnet 5+

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