Compare commits

...

368 Commits

Author SHA1 Message Date
24a7dd9f2e New release v2.17.0rc2 (#83242) 2024-05-13 12:24:30 -05:00
8976724d89 setup_rpm_repo/create_repo: "Arch dependent binaries in noarch package" (#83108) (#83231)
This fixes "Arch dependent binaries in noarch package" error cause by
including files created by make_elf function in noarch packages. While the
error only manifests itself on EL 7 and 8 it is better to use files
suitable for noarch packages to prevent the error potentially
re-occuring in the future.

(cherry picked from commit 87bead3dcf)
2024-05-13 09:13:24 -05:00
a7258d9bdc Correctly treat separate paragraphs in top-level descriptions as separate paragraphs. (#83155) (#83173)
(cherry picked from commit e3d4c20f6e)
2024-05-09 17:39:04 +00:00
d9fa3b225f Add version ceiling for pypsrp (#83122) (#83164)
* Add version ceiling for pypsrp

Add a version ceiling for the pypsrp requirements. This ensures that the
future v1.0.0 release won't impact existing users who install the
library using the version range specified.

* Use constraints file

* Add changelog for this change

(cherry picked from commit 2ed6c30929)
2024-05-09 10:12:18 -07:00
7b9aa6ca0d display: fix log verbosity (#83179) (#83191)
* display, ensure we have a logger before we log

(cherry picked from commit 2816922cd6)
2024-05-09 09:55:59 -07:00
9c14a7a3e4 [stable-2.17] uri: update docs for follow_redirects (#83176)
* Updated the docs for the parameter follow_redirects

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-05-09 09:36:34 -07:00
ee3dfd2d4a ansible-doc: fix typo in output (#83205) (#83207)
(cherry picked from commit f5b945bf6a)
2024-05-09 09:22:27 -07:00
f44d26f74c [stable-2.17] Don't hardcode the dnf module, dynamically select one (#83183) (#83184)
(cherry picked from commit dc6b77b)
2024-05-02 12:59:39 -05:00
7c8941a86b Update Ansible release version to v2.17.0rc1.post0. (#83161) 2024-04-29 18:53:02 +00:00
18266a596a New release v2.17.0rc1 (#83160) 2024-04-29 13:21:04 -05:00
7768360a03 Fix installing roles containing symlinks (#82911) (#83136)
* Fix installing roles containing symlinks

Fix sanitizing tarfile symlinks relative to the link directory instead of the archive

For example:

role
├── handlers
│   └── utils.yml -> ../tasks/utils/suite.yml

The link ../tasks/utils/suite.yml will resolve to a path outside of the link's directory, but within the role

role/handlers/../tasks/utils/suite.yml

the resolved path relative to the role is tasks/utils/suite.yml, but if the symlink is set to that value, tarfile would extract it from role/handlers/tasks/utils/suite.yml

* Replace overly forgiving test case with tests for a symlink in a subdirectory of the archive and a symlink in the archive dir when these are not equivalent.

* Build test case from role files to make it easier to add test cases

Fixes #82702
Fixes #81965
Fixes #82051

(cherry picked from commit e84240db84)
2024-04-25 09:08:27 -05:00
07ad1b2641 inspect components, ansible_managed templatable (#83053) (#83130)
* inspect components, ansible_managed templatable

fixes #82322

(cherry picked from commit 124d03145c)
2024-04-24 09:22:25 -05:00
5c03b06aba [stable-2.17] Update distro version in __init__.py (#83125)
Update the bundled package distro from 1.6.0 to 1.9.0 in __init__.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 718edde465)

Co-authored-by: Hrishikesh Mishra <32640015+mishrahrishikesh@users.noreply.github.com>
2024-04-24 09:13:47 -05:00
86b1946b33 handlers: fix executing in lockstep using linear (#83030) (#83072)
Fixes #82307

(cherry picked from commit a3cdd831b3)
2024-04-17 14:08:29 -05:00
482648494e Add changelog about target Python versions support (#83071)
See #83054
2024-04-17 13:59:34 -05:00
4448404b03 [stable-2.17] Update sdist path in release tool (#83058)
The latest setuptools package uses a normalized package name for the sdist.

(cherry picked from commit 8bc0d809a6)
2024-04-16 17:23:43 +00:00
ad2a1a5fbe [bp-2.17] facts: Add a generic detection for VMware product name (#83023)
* Use startswith instead of hardcoded values in VMWare product
  detction

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-15 10:00:48 -07:00
065918698d ansible-config: ensure we get templated default (#82974) (#83008)
AKA all defaults rendered

(cherry picked from commit 46137127a2)
2024-04-15 10:00:30 -07:00
9ba5d72432 2.17: dnf5: replace removed API calls and add fallbacks (#83025)
* dnf5: replace removed API calls (#83020)

* dnf5: replace removed API calls

bfb6f32e15
96c9188f9c

* call set_group_with_name instead of setting group_with_name

c7b88428f3

---------

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

* Fallbacks for brand new APIs that don't exist in released dnf5 (#83022)

(cherry picked from commit 57750e2cf7)

---------

Co-authored-by: Matt Martz <matt@sivel.net>
2024-04-12 08:51:16 -07:00
41d3a40d4d Update Ansible release version to v2.17.0b1.post0. (#83001) 2024-04-08 18:10:01 +00:00
a429bc3e64 New release v2.17.0b1 (#83000) 2024-04-08 12:37:34 -05:00
0ec694548b Follow up to #82933 - remove platforms from templates (#82961) (#82965)
(cherry picked from commit 85d8673860)
2024-04-08 10:51:36 -05:00
fb01c69021 fetch - add error check on calculated dest (#82970) (#82991)
Add explicit error when the calculated dest path for fetch becomes a
local directory. The existing behaviour will not be checked unlike when
the path did not end with a trailing slash.

(cherry picked from commit 179bc1dabd)
2024-04-08 10:51:24 -05:00
48b93c0c2f ansible-test - Use stable-2.17 default containers 2024-04-05 14:49:20 -07:00
9e622ddb67 [stable-2.17] Unsafe persistence (#82779)
* Ensure that unsafe is more difficult to lose [stable-2.16] (#82293)

* 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

* ci_complete

(cherry picked from commit 270b39f6ff)

* Fix various issues in unsafe_proxy (#82326)

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

* Additional Unsafe fixes (#82376)

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

* [stable-2.16] Enable directly using `AnsibleUnsafeText` with Python `pathlib` (#82510)

* Enable directly using `AnsibleUnsafeText` with Python `pathlib`. Fixes #82414

(cherry picked from commit c6a652c081)

* Prevent failures due to unsafe plugin name (#82759)

(cherry picked from commit 56f31126ad)

* Address issues from merge conflicts

---------

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2024-04-02 21:25:51 +00:00
4bc6ffb2aa Eaiser package mgr overrides (#82629)
Added variable to override auto detection



Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Matt Martz <matt@sivel.net>
2024-04-02 16:38:05 -04:00
4bddbe69d5 Fix traceback inheriting from NetworkConnectionBase and add integration tests (#82954)
Co-authored-by: Jeroen van Bemmel <jvb127@gmail.com>
2024-04-02 11:19:07 -04:00
478e139195 remove nonexistent url from role templates (#82933)
* Remove obsolete v1 link for role platforms from the role templates
* Delete platforms block entirely
2024-04-02 11:15:12 -04:00
bcaae4c435 systemd_service: Update docs regarding required_* (#82917)
* Update the documentation regarding required_one_of and required_by
  in systemd_service

Fixes: #82914

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-02 11:06:40 -04:00
21a987b8b6 connection: update test coverage for SSH connection plugin (#82916)
* connection: update test coverage for SSH connection plugin

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-02 11:05:41 -04:00
9e08f78bd3 ansible-test - Update base/default containers (#82952) 2024-04-01 20:13:11 +00:00
31901d23e7 ansible-test - Remove FreeBSD 13.2 (#82951) 2024-04-01 18:14:32 +00:00
8280fbc776 ansible-test - Remove Alpine 3.18 (#82116)
Co-authored-by: Matt Clay <matt@mystile.com>
2024-04-01 17:54:51 +00:00
b3d8cdde5d fix handling allow_duplicates with the role cache (#82691)
allow_duplicates is not part of the role uniqueness, so the value on the cached role may not match the current role.

* remove the allow_duplicates check from Role.has_run() which operates on the deduplicated role
* check the current role's allow_duplicates value in the strategy

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2024-03-28 15:33:09 -04:00
8704b9fc29 centralize and complete the internal static vars (#82872)
* centralize and complete the internal static vars

These vars are internal and should not be overridden nor templated
from inventory nor hostvars.
2024-03-28 15:06:35 -04:00
e3f4fe4fb9 ansible-test - Remove macos/13.2 remote from ansible-test
Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
2024-03-27 22:45:54 +00:00
5c804cbf6f ssh docs fixes (#82902) 2024-03-26 17:07:32 -04:00
fde206499d async support check mode (#82901)
Allow async tasks to run in check mode
Add check_mode support to async_status
Add tests, also for 'hidden' async mode in gather_facts/parallel
2024-03-26 17:06:29 -04:00
b639bd1fd4 Allow "role_name : " prefix for notifying handler listen topics (#82854)
* Allow role name prefix for handler task listen topics

For example,

- name: handler name
  debug:
  listen: topic1

can be notified using `topic1`, `role : topic1` if the handler is in a
standalone or collection role, and `ns.col.role: topic1` if the role is
in a collection, the same way handler names work.

changelog

* fix changelog and tests
2024-03-26 13:29:45 -05:00
8fec1575e6 apt: handle options while installing python3-apt (#82913)
* apt: handle options while installing python3-apt

* While installing python3-apt library, honor parameter
  such as install_recommends and dpkg_options

Fixes: #40608

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

* Review changes

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

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-26 16:16:27 +01:00
Jon
a1b6e3a258 Document sort_keys option in to_nice_json() filter (#82912)
Added by https://github.com/ansible/ansible/pull/52341.
2024-03-26 16:15:28 +01:00
5f4e332e37 Fix condition for unquoting configuration strings from ini files (#82388)
* Add prefix to `origin` when configuration variables come from ini files

Fixes ansible#82387

This change was suggested by @bcoca in
https://github.com/ansible/ansible/pull/82388#discussion_r1424235728 and
https://github.com/ansible/ansible/pull/82388#discussion_r1424249732

When configuration variables come from an ini file, their `origin` is
now set to `ini: <file>`. Similarly, once supported, YAML configuration
files will have their `origin` as `yaml: <file>`.

Consequently, since unquoting configuration strings should happen if and
only if they come from an ini file, this condition boils down to testing
whether their `origin` starts with `ini:`.

* Do not add prefix to `origin` but explicitly pass `origin_ftype`

So as not to rely on a specific format of the `origin` string,
as suggested by @sivel in
https://github.com/ansible/ansible/pull/82388#issuecomment-1881714871
2024-03-26 09:12:17 -05:00
a870e7d0c6 Bump bundled distro version to 1.8.0 (#81765)
* Bump bundled distro version to 1.8.0

* Bump bundled distro version from to 1.8.0 from 1.6.0

Fixes: #81713

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

* Remove sanity entries

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

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-25 10:23:03 -05:00
d86ad77d6f Remove deprecated scp_if_ssh from SSH connection plugin (#82072)
* removed deprecated scp_if_ssh feature from SSH connection
  plugin

Fixes: #81715

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-25 14:50:37 +00:00
b8b12c4be3 Update sanity requirements (#82296)
* Update sanity requirements
* Drop Python 3.7 for mypy

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-22 17:17:52 -07:00
ca168eb367 ansible-test - Fix Alpine libexpat bootstrapping 2024-03-22 12:27:35 -07:00
ad0ec47fe9 first_found lookup; minor fixes (#82836)
Always process options no matter the combination
return a full normalized path (symlinks still not followed, should be specific option in future)
2024-03-22 13:00:46 -04:00
b4d67adfda ansible-test - Update distro containers to 7.1.0 2024-03-21 21:40:01 -07:00
a1ad7100df ansible-test - Handle externally managed Python (#82883)
Remove EXTERNALLY-MANAGED marker in ansible-test managed environments

Additional changes:

- Test the Alpine 3.19 container
- Stop testing Alpine 3.18 container and remote
- Add missing changelog entry the Alpine 3.19 container
2024-03-21 21:06:25 -07:00
73701004b0 ansible-test - Add alpine 3.19 (#82115) 2024-03-22 01:02:29 +00:00
c0821346fc Do not mangle plugin names in collections that start with an underscore. (#82574) 2024-03-21 19:40:46 -04:00
11d69e065f ansible-doc: restore role attributes (#82678)
* Restore role attributes.

* Add a deprecation warning for role argument specs containing attributes

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2024-03-21 17:06:15 -04:00
31bbc8334e Update container test cgroup handling
When the host uses cgroup v2 and does not use systemd,
skip container scenarios which are unsupported.
2024-03-21 13:19:38 -07:00
a192193c55 Limit Alpine 3.18 test hacks to that version 2024-03-21 12:05:05 -07:00
ddae41759c Add FreeBSD 13.3 and 14.0 to ansible-test (#82530)
Co-authored-by: Matt Clay <matt@mystile.com>
2024-03-21 17:50:51 +00:00
8eabeefa63 mypy: update code required to bump sanity requirements
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-21 09:54:24 -07:00
aecffcb896 pylint: update for use-yield-from
* With Pylint 3.1.0, use-yield-from check is enabled

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-21 09:37:18 -07:00
481d8bdc1e Unarchive get zipinfo on more OS/distros (#82873)
Not all implementations use -l as default for -Z on unzip
2024-03-21 08:43:08 -07:00
2b1a5dd7a0 Remove outdated constraint for paramiko setup 2024-03-20 19:09:05 -07:00
e659c23bf2 blockinfile: do not crash when filename has no path (#81638)
* Do not crash when filename has no path.

* Clean up file after test.
2024-03-20 18:39:19 -05:00
0c9f1989a7 Do not treat leading underscore in plugin names as attempted deprecation. 2024-03-20 14:01:50 -07:00
8aecd1f9b2 winrm - Handle task timeout (#82784)
When using winrm over HTTP with message encryption enabled and a task
has timed out the connection plugin will fail to cleanup the WinRM
command. This will change that exception into a warning as a timeout is
already an exception event and a failure to clean the operation should
not override the timeout error shown.
2024-03-21 05:19:52 +10:00
c9086061ca Allow check mode async task disabling check_mode (#82827)
* Allow check mode async task disabling check_mode

Allows running an async task with check_mode: False when the playbook is
being run in check mode.

* Add check_mode attribute to internal cleanup task
2024-03-20 11:34:57 -04:00
56fa630e47 apt: Install recommended packages while installing deb files (#82805)
* install recommended packages while installing deb files and
  install_recommends is set to true.

Fixes: #29726

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-19 08:52:50 -07:00
c5557ad872 fix wording in error msg (#82848) 2024-03-19 11:27:40 -04:00
25c0dc50a2 Fix up to_datetime timedelta seconds docs (#82826) 2024-03-19 11:04:11 -04:00
732df49e46 Update zip.yml (#82840)
Fix typo of mydcit instead of mydict.
2024-03-19 07:59:47 -07:00
2bb09bfd12 atomic_move - fix preserving extended acls (#82818)
* use copystat to copy as many attributes as possible before os.rename

update unit test mocks for updated method of attribute preservation

add integration test for lineinfile case

remove erroneous `- meta: end_play` from lineinfile test suite

* add keep_dest_attrs parameter to control whether src attributes are
copied initially, and for existing destinations, whether the src is
updated using the dest before being renamed

consolidate with copy unsetting extended attrs

ci_complete
2024-03-18 10:58:00 -04:00
7adc146e2f Fix traceback and allow installing roles with version None (#81849)
* Allow installing roles with version `None` from Galaxy

Co-authored-by: Matt Martz <matt@sivel.net>
2024-03-16 00:17:37 +00:00
4000656849 git: Rename option gpg_whitelist to gpg_allowlist (#82377)
Signed-off-by: Sebastian Endres <sebastian.endres@dlr.de>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-15 22:49:28 +00:00
3b823d908e Enable file cache for vaulted host_vars_files vars plugin (#81995)
Enable file cache for vaulted host_vars_files vars plugin

* fixes #81994
* Changed cache arg from bool to str to allow 'vaulted' only file cache
* removed unused used var
---------
Co-authored-by: Steffen Oschatz <so@ypsilon.net>
2024-03-15 14:50:38 -04:00
92df664806 [DOCS] README: update working groups link (#82254) 2024-03-15 16:49:33 +00:00
6439627ce4 test_apt: migrate from unittest to pytest (#82666)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-14 19:19:36 -07:00
2806758793 filter: Misc fixes in docs (#82823)
* misc fixes for the filter documentation

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-15 05:11:33 +10:00
1181436d54 docs: describe capture references (#82819)
* update docs and example for capture references

Fixes: #82797

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-15 05:03:50 +10:00
9a0a5d834e Fixes permission for cache json file from 600 to 644 (#82761)
Until ansible-core 2.12 the facts cache file created by this module, have permission set as 644 which allows the other users to read the cache, since ansible-core 2.13, we create the temporary file, but we do not set the permission after renaming the temporary file.  Adding the line to set the permission to allow other users/groups to read this file.
2024-03-14 10:24:09 -07:00
86f48a526a Install crun from Alpine 3.19 for known musl compatibility (#82812) 2024-03-13 13:31:59 -05:00
d9e798b48f debconf: allow a list for value when vtype is multiselect (#82757)
* allow user to specify a list for value when vtype is multiselect

Fixes: #81345

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-12 16:06:35 +00:00
f02081b391 Fix discrepancy in behaviour between apt-get clean and its equivalent ansible.builtin.apt: clean=True (#82800)
* added integration test for issue 82611 regarding discrepency between apt-get clean and ansible.builtin.apt: clean

* fixed new line issue

* Implementation of bug fix for 82611

Fixed discrepancy in behaviour between apt-get clean and its equivalent ansible.builtin.apt: clean=True

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>

---------

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2024-03-12 11:10:50 -04:00
936e757478 Document no until support for meta (#82795) 2024-03-12 11:02:38 -04:00
8b0f2ad9c5 remove repetitive words (#82799)
Signed-off-by: carrychair <linghuchong404@gmail.com>
2024-03-12 07:40:27 -07:00
f1ded0f417 dnf: utilize the API for the installed checks (#82725)
Fixes #71808
Fixes #76463
Fixes #81018
2024-03-08 09:43:42 +01:00
a28709f92d dnf: fix installing a package based the file it provides (#82744)
Fixes #82461
2024-03-08 08:25:44 +01:00
e0c91af45f Remove os.environ compat for py2 and deprecate ansible.utils.py3compat (#82794) 2024-03-07 17:08:22 -06:00
5d15af3a95 Split the unified PR template into few (#82734)
Ref: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository
2024-03-07 22:22:05 +00:00
6db7a3bd64 Fix handling of ansible_loop_var and ansible_index_var inside ansible.builtin.include_tasks (#82789)
* added integration test for issue 82655 regarding ansible_loop_var and ansible_index_var inside included yml

* ensure correct handling of ansible_loop_var and ansible_index_var inside ansible builtin include_tasks Co-authored-by: Matt <matt@sivel.net>

* added changelog

* fixed new line issue
2024-03-08 05:08:29 +10:00
2cf52daa03 Handle error raised when argument validation (#82783)
* Handle error raised when argument validation with elements=int
  and value is not within choices

Fixes: #82776

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-08 05:04:58 +10:00
bb030db546 Re-enable psrp tests that were disabled (#82785) 2024-03-07 12:47:43 +10:00
942424e10b Avoid winrm hang on stdin write failure (#82766)
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.
2024-03-07 08:47:04 +10:00
dd44449b6e Use of constant for 644 permission variable (#82762)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-05 16:09:58 +01:00
cdd303101e Follow fix for test_iptables (#82768)
* rename 'test_policy_table' to 'test_policy_table_flush' to remove duplicate
  test case name.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-05 12:42:08 +01:00
38006103dc Fixed typo 'must by' to 'must be' (#82769) 2024-03-04 15:31:20 -08:00
8750a1f9ac test: migrate iptables tests from unittests to pytest (#82647)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-03-01 09:01:33 -08:00
ca2de9e2a4 Improve documentation for replace module (#82756) 2024-02-29 11:01:26 -08:00
03246dc0ae galaxy: Skip verification for unwanted files (#82162)
Fixes: #81628

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-02-27 23:05:29 +00:00
4edd6ba04f Add MIRACLE LINUX as RedHat OS Family (#82722)
Co-authored-by: Taiki Fujiwara <taiki.fujiwara@miraclelinux>
2024-02-27 09:42:16 -08:00
77ab7afc3d dnf: obey the keepcache setting (#82735)
Fixes #81954
2024-02-27 15:22:56 +01:00
9a8be1e8c8 Disable ansible-test podman container tests on Ubuntu 22.04 (#82748) 2024-02-26 13:45:08 -06:00
79ea21a39f Fix error when templating an unsafe string leading to a type error in Python (#82675)
Fixes #82600
2024-02-26 15:39:07 +01:00
1b209d742e Galaxy trailing slash (#82732)
* fix: ensure path argument doesn't have a backslash

* feat: add changelog

* Update lib/ansible/cli/__init__.py

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

* Simplify logic and add tests

---------

Co-authored-by: dorkamotorka <teo.podobnik1234@gmail.com>
Co-authored-by: Teodor Janez Podobnik <48418580+dorkamotorka@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2024-02-22 04:09:24 +00:00
a1edb61ce7 ansible-test - Add work-around for pytest>=8 errors (#82723)
* ansible-test - Add work-around for pytest>=8 errors
* Update changelogs/fragments/ansible-test-pytest-8.yml

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2024-02-21 10:08:54 -08:00
386edc666e Add macOS 14.3 to CI and ansible-test
Additionally, this patch takes care of installing GPG within the
`ansible-galaxy-collection` test when running under macOS 14 and higher.

PR #82697

ci_complete
2024-02-16 21:26:16 +01:00
437457e6d9 Proxy more display methods (#81900) 2024-02-14 17:53:52 -06:00
5566a655ae Updates to interpreter discovery for 2.17 (#82420) 2024-02-14 13:16:54 -06:00
4bcc27ca99 add --extra-vars for ansible-galaxy role|collection init (#82605)
allow extra vars when templating j2 files in the skeleton, for example:

ansible-galaxy init --role-skeleton /path/to/skeleton --extra-vars @/path/to/vars_file.yml newrole

ansible-galaxy init --extra-vars "min_ansible_version=2.17.0" newrole
2024-02-14 13:50:36 -05:00
b88d43a029 uri: update use_netrc.yml (#82672)
Changed successfull to successful
2024-02-14 03:38:56 +00:00
6c21c545e1 Deprecate support for the v2 galaxy API (#82543)
Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2024-02-13 09:31:33 -06:00
d15b77b94e fix find integration test
* original test assertion was not quoted properly and was thus silently "truthy" instead of actually functioning
2024-02-12 13:57:13 -08:00
a23ea2aef2 Reword warning if the reserved keyword _ansible_ is used (#82657)
Extend the wordings in warning if the reserved keyword _ansible_
is used as a module parameter.

Fixes: #82514

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Jordan Borean <jborean93@gmail.com>
2024-02-09 04:43:46 +00:00
c8d6f7b95e ansible-test - Fix validate-modules Python handling
The ``validate-modules`` sanity test no longer attempts to process files with unrecognized extensions as Python.

Integration tests have been added to verify Python-specific checks do not apply to these files.

The `invalid-extension` and `missing-gplv3-license` checks still apply to these files. This may change in the future.
2024-02-08 08:43:08 -08:00
e78be30baa apt_repository: Update PPA URL to point to HTTPS (#82599)
Fixes: #82463

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-02-07 11:07:35 -08:00
b6a89bff6c Add missing char 's' in exists documentation (#82651) 2024-02-07 10:45:43 -08:00
11efa5c48b Reduce complexity of Request.open (#81988) 2024-02-06 10:50:19 -06:00
eb44c77968 Remove tests for ansible-runner (#82571) 2024-02-06 09:50:54 -06:00
a452c53375 import_role - allow subdirectories with _from options (#82642)
* Allow subdirectories with import_role _from options

Add tests that tasks_from is restricted to the role

Note that a task like:

- import_role:
    name: role
    tasks_from: tasks/entrypoint.yml

will now load tasks from "{{ role_path }}/tasks/tasks/entrypoint.yml"
instead of "{{ role_path }}/tasks/entrypoint.yml". This change in
behavior matches include_role.

* better test case (filename doesn't match one in tasks/)

Fixes #82584
2024-02-06 16:13:47 +01:00
da26e2a5eb iptables: added choices in match_set_flags option (#82641)
* 'src,src', 'dst,dst' added as new option choices in
  match_set_flags option

Fixes: #81281

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-02-06 16:12:54 +01:00
a10d255e0b dnf,dnf5 - add the best option and fix nobest (#82627)
best/nobest options are one of the options whose default values are set
by an OS distribution. For example in our CI, both Fedora and RHEL set
the best option to different default values. As such we should defer to
the distributions for the default value and not change it by default but
if users wish to change it they can do so explicitly.

Currently the dnf module sets the nobest option inconsistenly and not for
all cases. This patch fixes that to reflect the behavior described
above. In addition adding the best option for both dnf and dnf5 modules
since the best option is prefer to nobest in dnf while in dnf5 nobest is
completely removed in favor of best.

Fixes #82616
2024-02-01 14:05:57 -05:00
e458cbac61 Allow for arbitrary key 'context' in argument spec (#82183)
* Allow for arbitrary key 'context' in argument spec
2024-01-30 08:59:57 -06:00
7a0c321054 Remove redundant undefined error message (#81867)
Fixes: #78703

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-01-29 17:00:53 -08:00
bec27fb4c0 prettyfy ansible-doc (#75116)
* prettify ansibile-doc output

delimiters when no color
avoid triggering color mode for existing tests
all use _format to observe nocolor
more v more info
imporoved conditional display
updated version on -v
normalize role errors
expand role data, dedupe code, fix formatting on warning
fix bug with galaxy info
role list improvements:
 lists all roles (even w/o meta/argspec)
 specs now indented under role
 role only listed once
Updated tests to reflect format changes

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-01-29 10:16:53 -05:00
6d34eb88d9 Do not ignore SyntaxError from jinja2.Environment.from_string (#82607)
Jinja may generate an invalid Python source code from a template. Trying
to compile such source code into a Python code object results in
SyntaxError being thrown. An example of such a template is providing the
same keyword argument into a lookup twice, resulting in:
`SyntaxError: keyword argument repeated`.

Since `jinja2.exceptions.TemplateSyntaxError` does not cover such a
case, as it is not a Jinja parsing error, we need to catch SyntaxError
explicitly ourselves.

Fixes #82606
2024-01-29 10:33:33 +01:00
13e6d8487a fix loading vars_plugins in roles (#82273)
* Fix loading legacy vars plugins when the plugin loader cache is reset

* Remove extra cache layer by ensuring vars plugin names are cached (stateless or not) so that the plugin loader cache can double as the load order
2024-01-26 09:01:14 -05:00
8641144375 Adding note about implicit groups (#82580)
clarifying usage in conjunction with use_group_vars
2024-01-23 16:00:44 -05:00
8b2dd5fdd3 updated looups to use set_option in custom parse (#82425)
limit password params
  updated test error message catching
  make sure we reset params for each term
  ensure we only update options if we have em
2024-01-23 14:48:32 -05:00
f73d72e830 find: do not fail on PermissionError (#82282)
* Log and skip permission errors on files and directories

Fixes: #82027

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-01-23 10:55:13 -08:00
f024cf35d7 Remove the yum module, redirect it to dnf (#81895)
Fixes #81728
2024-01-23 10:23:43 -06:00
c7334ea92c Fix url encoded credentials in netloc (#82552)
Prior to this commit, it was impossible to use a module like dnf with a
URL that contains a username with an @ such as an email address
username, because:

  dnf:
    name: https://foo@example.com:bar@example.com/some.rpm

Would cause netloc parsing to fail. However, the following:

  dnf:
    name: https://foo%40example.com:bar@example.com/some.rpm

Would also fail because ansible would *not* URL-decode the credentials,
causing the following to be base64 encoded in the Authorization header:

  Zm9vJTQwZXhhbXBsZS5jb206YmFyCg==

Which decodes to:

  foo%40example.com:foo

Which is *not* the authorized username, and as such, *won't* pass basic
auth.

With this commit, Ansible's url lib behaves like curl, chromium, wget,
etc, and encodes the above to:

  Zm9vQGV4YW1wbGUuY29tOmJhcgo=

Which decodes to:

  foo@example.com:bar

Which will actually pass the HTTP Basic Auth, and is the same behaviour
that you will find ie. with:

  curl -vvI https://foo%40bar:test@example.com 2>&1 |grep Auth | awk '{ print $4 }'
2024-01-23 09:37:36 -06:00
06cd285901 Play recap stats and callbacks for include_role, consolidate with include_tasks (#79260)
This moves handling of callbacks and play recap stats from
_load_included_file to individual strategies so include_role tasks are
accounted for, not just include_tasks.

Fixes #77336
2024-01-23 15:57:05 +01:00
9c5d3060e5 uri: Handle the "force" parameter properly (#82187)
* uri: Two tests that demonstrate missing handling of the "force" parameter

Add unit and integration tests that demonstrate that the uri module is not
handling the "force" parameter.

The unit test demonstrates that when "force" is present in the module parameters,
it is not being passed through to fetch_url().

The integration test demonstrates that "force" does not disable caching as
documented, and calls with a "dest" parameter that points to an existing file
can result in a "304 Not Modified" response.

* uri: Handle the "force" parameter properly

The uri module documents a "force" parameter that can be used to disable caching.
The module accepted the parameter but didn't pass it through to the fetch_url() method
which implements the logic to handle setting the appropriate headers for disabling
caching. This change passes the "force" parameter through as expected, allowing caching
to be disabled when requested by the module caller.
2024-01-23 08:54:18 -05:00
aa40167f40 find - add encoding option to use in conjunction with contains (#82284)
*  when doing a 'contains' search, determine the encoding of the files to be searched

* set default encoding to None for backwards compatibility

* changelog, error handling, tests added

* add sanity ignore.txt for non-utf-8 test
2024-01-22 08:53:37 -05:00
b01f1f207c Support action_plugin in plugin_routing_schema (#82562)
now validation schema matches reality

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
2024-01-19 16:21:10 +00:00
853423c270 test_encrypt: remove unreachable assertion (#82570)
We explicitly skip tests in environments where passlib is not available.
2024-01-19 14:37:25 +01:00
a3e5546e43 🔥 Exterminate __builtin__ import from tests (#82569)
This patch removes an import fallback that was only executed under
Python 2. Now that we don't run tests against that runtime, it
generates an uncovered line. Dropping it will slightly increase the
coverage metric as a side effect.
2024-01-19 14:33:25 +01:00
6935c8e303 Ensure ANSIBLE_NO_LOG is respected (CVE-2024-0690) (#82565) 2024-01-18 15:37:39 -06:00
48bed1e15a Fix ansible.builtin.include_vars - depth (#80995)
* Changes as suggested by sivel

* Add changelog fragment and tests

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
2024-01-18 11:56:54 -05:00
3f74bc08ce Remove crypt support from ansible.utils.encrypt (#81721)
Fixes #81717

Co-authored-by: Matt Clay <matt@mystile.com>
2024-01-18 08:23:01 +01:00
71d81e4a60 Add no-unwanted-characters sanity test for core (#82557) 2024-01-17 11:19:37 -08:00
30169c76de Replace Unicode no-break spaces with ASCII spaces 2024-01-17 10:26:30 -08:00
4aa109897f default svn URL to 127.0.0.1 for subversion integration tests (#82551)
* default svn URL to 127.0.0.1 for subversion integration tests

* svn client gives up before trying IPv4 addresses when localhost->(::1,127.0.0.1) in dual-stack envs (eg podman, most real hosts)
* svn client also requires legacy CN match on cert
* IPv6 works, but setup playbook would need a bunch more templating exceptions to conditionally manage `[::1]`

* explain IPv4 defaults
2024-01-17 09:49:47 -08:00
d9709c5ae9 module_utils/basic.py: remove PY2 compat (#81989) 2024-01-17 15:35:57 +01:00
975cf1655a modules: remove PY2 compat (#81990) 2024-01-17 09:24:35 +01:00
4a2de764ec Fix issues with ansible-playbook-callbacks test (#82407)
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.
2024-01-17 09:22:40 +01:00
5f1b3898e8 Avoid delattr in test callback plugin (#82550)
This prevents the test plugin from tampering with the base callback plugin,
which causes issues with all other callback plugins running in the test.
2024-01-16 22:57:34 +00:00
b8c7ed39e4 Reboot timeout fix (#82526)
reboot now uses fallback as some plugins or older versions on ssh one use 'timeout' instead of 'connect_timeout'
2024-01-16 17:17:14 -05:00
0429520790 expect docs - improve responses description (#82544)
* consolidate notes describing the structure of `responses` with the option description

* include a link to Python regex syntax
2024-01-16 15:03:38 -05:00
6b9f49b6c5 Update attribute description for check_mode (#82536)
Fixes #82509
2024-01-16 16:10:11 +01:00
bf9509bf33 validate_argument_spec: fixed example syntax (#82534) 2024-01-13 08:17:21 -08:00
21247c828e ansible-test - Bypass PEP 668 checks
When ansible-test installs requirements, it now instructs pip to allow installs on externally managed environments as defined by PEP 668.

This only occurs in ephemeral environments managed by ansible-test, such as containers,
or when the `--requirements` option is used.
2024-01-11 14:10:31 -08:00
da9edd7760 expect - fix argument spec error with timeout=null (#82522)
* Fix using timeout=null to wait indefinitely

* fix error message
2024-01-12 05:21:29 +10:00
d7be3824fe [ansible-galaxy] Remove role name conversion when the repo startswith 'ansible-role' (#82508)
* 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>
2024-01-12 05:11:56 +10:00
d2812aeb6f Update example in apt module docs (#82504)
All examples should use fully qualified collection names to avoid confusion.
2024-01-12 05:10:07 +10:00
a69fab86bc ansible-test - remove Fedora 38 container and remote support
Fixes: #82022

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-01-10 11:05:57 -08:00
78c9090986 Don't hard-code Alpine version in container test 2024-01-10 10:09:51 -08:00
4760dae989 document apt auto-installed dep (#82503) 2024-01-09 19:49:13 -05:00
596c75c2bc uri action plugin check_mode support update (#82484)
Also updated base action messages to be more specific
2024-01-09 12:14:00 -05:00
6c2895fd88 ansible-config dedupe ini plugin entries (#82498)
added test for ini file integrity, also ensuring no dupes
2024-01-09 12:07:03 -05:00
623e0eee42 Add Alp-Dolomite to Suse family list (#82496) 2024-01-09 10:49:49 -05:00
53ddc1648e deb822_repository: handle idempotency (#82483)
* deb822_repository: handle idempotency

Sort the parameters in order to handle idempotency

Fixes: #82454

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-01-09 10:34:18 -05:00
57a59e7194 Misc fix (#82482)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-01-09 10:33:29 -05:00
ceaf68a02c Deprecate required param in get_bin_path (#82466)
* Deprecate `required` param in get_bin_path

* The parameter `required` in process.get_bin_path API
  is deprecated. Will be removed in 2.21

Fixes: #82464


Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2024-01-09 10:25:01 -05:00
6c647aa263 Interpret double newlines as paragraph breaks in documentation strings. (#82465) 2024-01-09 10:23:08 -05:00
0a45dad884 Add VMware virt detection for hardware version of ESXi 8.0. (#82455)
* Add VMware virt detection for hardware version of ESXi 8.0.

* Add changelog for PR#82455
2024-01-09 10:10:35 -05:00
caa86cc4df Add the task info for tombstoned module/action plugins (#82451)
* Add the task info for tombstoned plugins

* Fix deprecation for 'include' by removing it from BUILTIN_TASKS which skip the plugin loader lookup

* changelog

remove obsolete unit test using 'include'

* Update changelogs/fragments/improve-tombstone-error.yml
2024-01-08 04:12:39 +00:00
b5649f9686 Remove more Python 2 handling from tests (#82449) 2024-01-08 04:00:10 +00:00
71a5212586 Add skips for encrypt unit tests for Python 3.13 2024-01-05 12:17:42 -08:00
6e4a5acfbd lineinfile, remove incorrect/unused 'others' option (#82436)
* move incorrect, unused 'others' option

 this was to document 'file' options are usable .. but we already
 import the file fragment to document those options.

* removed now bad ignore
2024-01-04 11:29:04 -08:00
8762d9e7e6 Adds details to the password_hash documentation (#82419)
fix for issue 82415

-

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-01-04 09:42:13 -05:00
c75624fbdc ansible-test - Enable shellcheck SC2164 2024-01-03 17:52:29 -08:00
3c432fea43 ansible-test - Update base/default test containers 2024-01-03 17:17:00 -08:00
a1958eefed Fix plugin_loader integration test error handling 2024-01-03 17:14:56 -08:00
630e5dda25 Clean up shellcheck issues in tests 2024-01-03 16:23:25 -08:00
e1bcb8a534 Remove unused unit test code 2024-01-03 14:34:20 -08:00
29b2405b84 Revert "Fix older external connection plugins without _sub_plugin declaration (#79372)" (#82473)
This reverts commit ef1e01aa8b.

broken tests
2024-01-03 17:35:03 +00:00
ef1e01aa8b Fix older external connection plugins without _sub_plugin declaration (#79372)
fixes https://github.com/ansible/ansible/issues/79371

* Check for sub=={} too
* Add a test case for older plugins that do not define '_sub_plugin'
* Add test for legacy plugins
2024-01-03 11:18:31 -05:00
55065c0042 Role fixes (#82339)
* Various fixes to roles

  - static property is now properly set
  - role_names and other magic vars now have full list
  - role public/private var loading is now done when adding to play.roles instead of on each var query
  - added tests

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-12-22 09:52:12 -05:00
fa92228b50 Replace unwelcoming words (#82413)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-12-18 12:05:15 -05:00
4479c9df13 Fix plugin set option (#82300)
* plugin config, ensure set_option correctly casts

  until now we relied on plugin author getting the right type, now
  the config system itself will process as it would for set_options
2023-12-14 09:41:48 -05:00
5346009d2c ansible-test - Allow multiple documents in the YAML stream for EXAMPLES (#82355)
* Allow multiple documents in the YAML stream for EXAMPLES.

* Add integration test

* linting
2023-12-14 06:18:35 +10:00
8328153121 Run all handlers with the same listen topic when notified from another handler (#82364)
Fixes #82363
2023-12-13 10:56:52 +01:00
fe81164fe5 ansible-galaxy - fix exit code for failed role import (#82193) 2023-12-12 13:59:19 -05:00
7f2ad7eea6 assemble: fixed missing parameter error (#82360)
* content is an optional parameter for _get_diff_data API

Fixes: #82359

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-12-12 11:22:23 -05:00
a9919dd7f6 lookups, make file searching use better is_role (#82290)
* lookups, make file searching use better is_role

 The dwim function will internally try by detecting tasks/main['','.yml','.yaml]
 but this is far from optimial, the existince of role path in vars is much better
 indicator that we can use to pass a hint


* updated test to avoid main.yml
2023-12-08 11:05:40 -05:00
5573d4cde9 Scripts inventory plugin, add examples (#82361)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-12-08 09:51:37 -05:00
8af920c892 Add helptext to ansible-inventory's positional arg (#82332)
* Add helptext to ansible-inventory's positional arg

This explanation is already present in the documentation and
should make the usage more clear when looking at the --help output

* fix indentation

* change description of positional arg

It has no effect on --list and the docs now reflect that
2023-12-08 05:12:52 +10:00
9b002d2e63 check if there attributes to set (#78707)
Fixes: #76727
2023-12-06 09:02:51 -08:00
dd0138ba21 🧪 Replace GitHub SVN integration test with local TLS (#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/
2023-12-06 17:10:56 +01:00
6ebefaceb6 Better errors for delegate_to (#82319)
Handle empty result of templating
  Also skip work when we omit
2023-12-04 10:19:12 -05:00
3a42a00368 Targeted fix for installing roles with symlinks containing '..' (#82165)
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
2023-11-30 18:05:48 -05:00
b405958f79 fixes typo in cli/ansible-pull arguments (#82316) 2023-11-30 14:13:39 -05:00
1dd0d6fad7 remote log info (#81711)
Both posix and powershell avenues updated to allow for customized string logging on remote

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2023-11-30 13:12:55 -05:00
4208bdbbcd ansible-test - Update nios-test-container to 3.0.0 2023-11-30 09:59:49 -08:00
ee86dafc6e Amend doc of name= parameter to indicate a list of packages can be used (#82309)
* Amend doc of name= parameter to indicate a list of packages can be used

One of the examples here shows package installing a list of packages, but the name= parameter did not reflect this possibility.

* add dependency to underlying package manager
2023-11-30 11:09:35 -05:00
e80507af32 fact_gathering improve linux thread counts (#82261)
don't use `//` aka `floor()` as some architectures show counts of 1.9 threads per CPU and market as 2 per CPU, `round()` will be closer to that.
2023-11-28 10:49:52 -05:00
fd2d0ecfb7 Remove unneeded Task.is_static assignment (#82288)
Added in b38f746 but there is/was no Task.is_static so this just creates
a new attribute dynamically that is/was never used.
2023-11-28 10:35:31 -05:00
322eb0f884 changed the salt type from int to string (#82274) 2023-11-28 10:23:39 -05:00
265f5e724c apt_repository: Do not convert symlink repo to a normal file (#82271)
* apt_repository: Do not convert symlink repo to a normal file

* module manually writes to repo files. If the file is a symlink
  module used to re-write and convert a symlink to a normal file.
  This fix tracks the symlink and keeps the changes intact.

Fixes: #49809

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-28 10:20:57 -05:00
e6e19e37f7 validate-modules: Check for correct values in choice (#82266)
* validate-modules: Check for correct values in choice

* validate-modules test now checks the length of choices and
  correct option values inside the choice.

Fixes: #82179

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

* Fix sanity tests

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

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-28 10:09:29 -05:00
0806da55b1 Add DCO and update CONTRIBUTING.md (#82105) 2023-11-27 10:19:37 -08:00
479949aad2 Fix broken docs RST reference. (#82286) 2023-11-27 10:02:20 -05:00
afd45aca6a ansible-test - remove rhel 9.2 test remote (#82211)
Fixes #82024
2023-11-27 10:03:42 +01:00
e0bf76e3db Issue #80267: Remove user not found warning (#80291)
Co-authored-by: Sebi94nbg <sebastian.kraetzig@4g-server.eu>
2023-11-23 15:25:35 +01:00
d664f13b4a Allow include_tasks handlers for searching role subdirs (#82248)
Fixes #82241
2023-11-22 17:42:51 +01:00
a4b00793be Update known_hosts module to better handle @cert-authority keys (#70340)
Signed-off-by: Chris Francy <zoredache@gmail.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-21 16:55:01 -08:00
7dde4901d4 unarchive: support 8 character permission strings (#81705) 2023-11-21 16:48:31 -08:00
ce9d268ab8 unarchive: force unarchive if the symlink target changes (#82253)
Fixes: #30420

Original PR from nrwahl2 (https://github.com/ansible/ansible/pull/30463)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-21 09:11:23 -08:00
d6a8df3218 csvfile - add a keycol parameter to specify in which column to search. (#82242) 2023-11-21 10:40:31 -05:00
0a6779f6b7 docs: improve readability & scope of docs for ansible.builtin.assert (#82256)
Co-authored-by: Jonathan Biegert <jonathan.biegert@sva.de>
2023-11-21 10:24:07 -05:00
c35e0e8fd8 Re-enable "group removal" integration test for dnf5 (#82250)
Fixed in https://github.com/rpm-software-management/dnf5/pull/1013
2023-11-21 10:19:28 -05:00
fbdb666411 ansible-test: Added Fedora 39 (#82218)
* Fedora 39 remote
* Fedora 39 container

Fixes: #82018

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-17 02:30:13 +00:00
8fd1aa0d2e syslog: Handle ValueError raised while sending logs to syslog (#82225)
* ValueError exception is raised when Null Character is sent
  to syslog.syslog with Python 3.12.
* Handle this error gracefully instead of stacktrace

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-16 21:15:08 +00:00
1a759659fe Enable vendored copy of distutils in entry_point test (#82232)
* Enable use of vendored copy of distutils by removing
  the environment variable SETUPTOOLS_USE_DISTUTILS

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-16 12:21:19 -08:00
8b102dca4a wait_for, fallback to read for non mmapable files (#82064)
* also handle oserror, added debug jic
2023-11-16 15:20:52 -05:00
f6d7dd0840 displaly. log, handle when caplevel is already taken care of (#82227)
reneables ansible logging
2023-11-16 19:49:40 +00:00
f8cdec6324 ansible-test: Downgrade containerd for Fedora 39 (#82231)
* containerd 1.6.23 on Fedora 39 causes issue. Downgrading
  to containered to 1.6.19-2 works.
* See: https://bugzilla.redhat.com/show_bug.cgi?id=2237396

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-16 19:18:18 +00:00
a45dc10b8f ansible-test: Skip modularity test for Fedora 39 and up (#82230)
* Modularity is deprecated in Fedora 39 and onwards,
  Skip modularity tests

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-16 19:14:07 +00:00
6e448edc63 no_log avoid masking booleans (#82217)
* no_log avoid masking booleans

* clog

* fix issues
2023-11-17 05:04:34 +10:00
f42984eeb3 Fix ManifestControl dataclass to work with future annotations (#82215)
* Fix ManifestControl dataclass to work with future annotations

* Add tests
2023-11-17 05:02:58 +10:00
3d9e5c8b9d fix pc misuse (#82157)
use the more up to date 'task' as play_context only has the 'initial' values.
2023-11-16 09:30:18 -05:00
e2d108db2b log verbosity (#81692)
Allow users to adjust verbosity to logs at same or higher level than to callback/screen

Co-authored-by: Matt Clay <matt@mystile.com>
2023-11-15 20:57:59 -05:00
dbddabce9e Create prefix of file using ansible.builtin.tempfile (#82209)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-15 10:43:10 -08:00
8825e60add ansible-pull: expand destinantion directoy to avoid purgin in / (#82030)
* expand destinantion directoy to avoid purgin in /

  bad things could happen and help alone is not enough
2023-11-15 10:09:04 -05:00
05259aa6ce Restart a Service with Sleep Between Stop and Start (#82210)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-14 19:40:48 -08:00
0bab08ee33 ansible-test - Add RHEL 9.3 support (#82178)
Fixes #82020
2023-11-14 08:23:44 +01:00
2277d470b3 fix typo (#82202) 2023-11-13 14:59:07 -05:00
4a84a9b3db copy keep suffix on temp file for validation (#82158)
Also updated test to require suffix

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2023-11-13 10:03:58 -05:00
a8b6ef7e7c flush_handlers: handle a failure in a nested block with force_handlers (#81572)
Fixes #81532

ci_complete
2023-11-13 09:57:43 +01:00
9c09ed7392 Fix typo in validation.py (#82195)
covert -> convert
2023-11-12 06:54:53 -08:00
667526c22f Fix two misspellings of occurred (#82159) 2023-11-08 13:50:08 -08:00
f2b5c33349 fixed typos in the documentation (#82077) 2023-11-08 11:54:48 -08:00
fd009a073a Remove sefcontext support plugin
It was only used by the subversion test, but is no longer required.
2023-11-07 17:45:13 -08:00
0e6942a4d7 Remove unused unit test code (#82168) 2023-11-07 15:59:08 -08:00
c5b68ef16d Update Python3
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-07 15:43:31 -08:00
98407fc00e Remove unused validate-modules unit test code 2023-11-07 13:43:11 -08:00
dae4e2f07f Remove unused/unreachable unit test code (#82160) 2023-11-07 12:41:42 -08:00
0be33551d7 Remove unit tests dependent on systemd bindings (#82161)
These do no not run as part of our test suite.
2023-11-07 12:41:16 -08:00
78c16d983e Remove type_regex testcase
This is leftover testcase for type checker regex removed in
https://github.com/ansible/ansible/pull/82153

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-07 12:39:08 -08:00
9dd3eafa14 ansible-test - Use pylint unidiomatic-typecheck
This replaces the regex based check previously used within the validate-modules sanity test.

NOTE: The pylint check overlaps with a similar check for pep8.
      Both are used, since the pep8 based check is more nuanced than the one in pylint.
      For example, allowing `is` checks, but not `==` comparisons.
      If the pylint check is ignored, the pep8 check would still be relevant.
2023-11-07 11:04:22 -08:00
78546382b3 setup.cfg: add Programming Language :: Python :: 3.12 classifier (#82151)
ansible-core 2.16+ supports Python 3.12. This corrects missing metadata.
2023-11-07 09:23:47 -06:00
d46b042a94 Reword note on default determination on other OSes (#82147) 2023-11-07 09:20:46 -06:00
40baf5eace iptables - set jump to DSCP when set_dscp_mark or set_dscp_mark_class is set (#82145)
set_dscp_mark and set_dscp_mark_class is only valid when jump is set to
DSCP.

Fixes: #77077

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-07 09:19:25 -06:00
567c78f9a1 Update playbook responses for specific prompts (#82137)
Example is added for multiple questions with responses
2023-11-07 09:14:22 -06:00
7538668731 Check strict before failing to respect skip_broken (#80795)
Fixes #80590
2023-11-07 07:56:12 +01:00
916a20fccd Ignore coverage of test code that does not run 2023-11-06 13:17:30 -08:00
90203b841a Use functools.update_wrapper instead of a copy 2023-11-06 12:01:18 -08:00
dec9eeb2e5 Remove create_new_password parameter in CLI.build_vault_ids (#82066)
* Remove unused argument in call to build_vault_ids

* Remove obsolete build_vault_ids tests

* Change tests to account for argument removal

* Remove redundant test
2023-11-06 09:30:13 -05:00
20a54eb236 restore role param precedence (#82106)
* add test for setfact/param override
2023-11-06 09:18:35 -05:00
5ac62473b0 dnf: properly set gpg options on repos (#80777)
Fixes #80110
2023-11-06 10:22:35 +01:00
51d691bfa9 remove the obsolete TODO comments (#73116)
Co-authored-by: Zhipeng.Gao <zhipeng.gao@monash.edu>
2023-11-06 04:40:03 +00:00
ac3ae94ae1 Ignore coverage on code intended never to execute (#82128)
* Ignore coverage on code intended never to execute

* Fail collection loader test if wrong code runs

* Update boilerplate test to accommodate nocover
2023-11-02 15:28:06 -07:00
8ecc1d485b Fix the strategy plugin description in keywords (#82113)
Fixes: https://github.com/ansible/ansible-documentation/issues/762

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-11-02 17:17:46 -04:00
1df791cd90 Ignore code which coverage can't analyze (#82125)
* Ignore code which coverage can't analyze

Our own tracing function can't be traced.

* Use `nocover` instead of `no cover` for consistency
2023-11-02 14:14:51 -07:00
f8a9fd4758 Remove duplicate winrm test (#82124) 2023-11-03 07:08:15 +10:00
36d6860d80 ansible-test - Remove no-main-display sanity test 2023-11-02 13:34:20 -07:00
6e15fb0ebf ansible-test - Removed no-basestring sanity test 2023-11-02 12:32:01 -07:00
c349b91af3 ansible-test - Removed no-dict-* sanity tests 2023-11-02 11:55:14 -07:00
9765bb46f9 ansible-test - Remove no-unicode-literals test 2023-11-02 11:42:02 -07:00
172a010dd7 Remove unused test support plugins 2023-11-02 11:40:34 -07:00
5b1b0ce762 Remove Python 2 compat (via six) from unit tests 2023-11-01 17:05:36 -07:00
18e8401edd Remove Python 2.x compat from unit tests (#82109) 2023-11-01 16:37:08 -07:00
bea459654a pip - Add module in venv example 2023-10-31 09:14:51 -07:00
89cda0bcae pip - Add break_system_packages option (#82097) 2023-10-30 17:04:03 -07:00
3ea5304a57 add pep668 note to pip module docs (#82096) 2023-10-30 23:38:36 +00:00
f8de6caeec Reboot - delete useless parameter async, not supported (#80017)
Co-authored-by: baptch <b.jean.ch@gmail.com>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2023-10-28 04:14:15 +00:00
2908a2c32a corrected become same user config docs (#82059)
fixes #82057
2023-10-27 00:21:30 -07:00
b34f4a559f Add support for TLS 1.3 Post Handshake Auth (#82063)
TLS 1.3 adds a different method it can use to request a client
certificate after the handshake but Python does not allow this by
default. This commit sets the attribute needed to enable this scenario
when using client certificates on Python 3.8+, 3.7.1+.
2023-10-27 12:00:34 +10:00
f5a0c0dfc8 Ignore testing data for gitleaks (#82083) 2023-10-27 05:49:41 +10:00
9b78316687 docs(template): use unambiguous syntax for mode (#82079) 2023-10-27 05:21:25 +10:00
664fe45be9 Create a User with a Home Directory (#82078) 2023-10-27 05:20:50 +10:00
f5d7dc1a97 Legacy.psm1 - Add note telling people not to use function (#82076) 2023-10-27 05:16:05 +10:00
fb8ede22e1 don't warn about using a yescrypt hash as user password (#82071)
* dont warn about using a yescrypt hash as password

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* add changelog

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* add yescrypt test

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

---------

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
2023-10-27 05:03:49 +10:00
e8ef6b7d7c Consolidate systemd detection logic (#81809)
* Add logic to consider the canary location for systemd files

Fixes: #80975

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-10-25 19:09:46 -07:00
bf29458726 Address nuance in key checking docs (#82058)
* Address nuance in key checking docs

  and add note to ssh plugin to let users know 'final authoritative source'.

* Update lib/ansible/plugins/connection/ssh.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-10-25 12:02:29 -04:00
b4920c83ad Fix locale related parsing error in git.py
* Fix locale related parsing error in git.py

This fixes the issue found at https://github.com/ansible/ansible/issues/77213 which got introduced by changing over to "best parseable locale" approach, but missing out the requirement of locales other than `L` having to have `LANGUAGE` specified as well. For further details, check this post within the issue discussion: https://github.com/ansible/ansible/issues/77213#issuecomment-1446919617

* Add changelog

Create 81931-locale-related-parsing-error-git.yml
2023-10-25 15:47:55 +02:00
fe94a99aa2 any_errors_fatal fixes (#78680)
Fixes #31543
Fixes #36308
Fixes #73246
Fixes #80981
Fixes #81533

ci_complete
2023-10-25 09:42:13 +02:00
c827dc0dab Remove obsolete requirements from prepare_http_tests 2023-10-24 09:19:58 -07:00
0bfc5bcf82 Fix contains example (#82067)
* Added missing round bracket

Fixes: https://github.com/ansible/ansible-documentation/issues/555

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-10-24 17:30:11 +02:00
99e0d25857 ansible-pull now handles all secret files CLI options (#82009)
* ansible-pull added missing pasthrough for secrets

 Both become and connection password file options were missing.
 Also added test
2023-10-24 09:20:25 -04:00
9ee603d1c5 Clarify some points in config lookup documentation (#81951)
Also update tests to support the format on modules/plugins

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-10-24 09:17:32 -04:00
b815b15362 Fix additional spelling errors in builtin modules (#82012) 2023-10-23 21:22:35 -07:00
0b7387d46c Improve filter_encryption test
- Update `data2_vaulted_string_with_id` to match the documented plaintext.
- Add a comment explaining how `data2_vaulted_string_with_id` was derived.
- Add assertions for unvaulted values to ensure they match their plaintext.
- Add round-trip tests for vault+unvault when no salt is used.
2023-10-23 15:46:00 -07:00
2d2211e4e1 Simplify filter_encryption test (#82062) 2023-10-23 19:11:31 +00:00
40263992df remove args passthru on role runme tests that use grep (#82060)
* varying verbosity was masking some first-pass test failures
2023-10-23 17:37:50 +00:00
b4566c18b3 Fix Jinja plugin deduplication (#82002)
for j2 plugins dedupe on path and  not basename
for j2 this is a container file , for other plugins file name == plugin name
2023-10-20 19:00:41 -04:00
e933d9d8a6 ansible-test - Fix parsing of cgroup entries 2023-10-19 15:30:32 -07:00
09d943445c 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
2023-10-19 13:49:00 -07:00
598a9307d7 var names not matching in example. (#82001)
Update to var name as example is not correct.
2023-10-19 12:41:51 -07:00
2e4f5d5ca0 Replace launchpad.net/api with api.launchpad.net @ apt_repository module
This patch is a refactoring change. It replaces one Launchpad endpoint URL with another on a subdomain. There is no functional effect to this whatsoever.

PR #81978

Refs:
* https://github.com/ansible/ansible/pull/81978#issuecomment-1767062178
* https://bugs.launchpad.net/launchpad/+bug/2039251/comments/12
2023-10-19 01:33:11 +02:00
37cee8bdfc ansible-test - Remove special cryptography install (#82008)
Python 3.10 is the minimum version on the controller, and it requires openssl 1.1.1 or later.

As a result, there's no need to check the openssl version any longer.
2023-10-18 10:52:18 -07:00
74f6e6a134 Update apt.py (#81975)
updating documentation
2023-10-17 11:58:04 -04:00
22568305d6 Add ignore invalid options override for mod wrapper (#81899)
Adds an option that can have an action plugin tell the module to ignore
options that do not fit its arg spec. This is to enable support for core
running modules that exist outside of the collection that may not be new
enough to support some of the options supplied to it.
2023-10-17 11:05:21 -04:00
5812cabaf5 Fix typos in builtin modules (#81969) 2023-10-13 20:37:58 -07:00
4f04df75cc Fix outdated S3 URLs (#81964)
We should always use the CloudFront backed endpoint (ci-files) not the direct S3 bucket reference (ansible-ci-files).
2023-10-12 19:28:40 -07:00
f5c742cdfd ansible-test - Clean up old Python 2 compat code (#81962)
* Update generated code __future__ import

* Remove Python 2.x compat from compile sanity test

* Remove __metaclass__ from pylint good names list

* Remove Python 2.x compat from ansible-test injector

* Remove Python 2.x compat from ansible-test importer

* Remove Python 2.x compat from ansible-test units

* Remove Python 2.x compat from validate-modules

* Remove Python 2.x compat from pylint plugins

* Remove more Python 2.x compat from ansible-test

* Remove Python 2.x openssl detection in ansible-test

* Remove obsolete Python 2.x comment

* Remove obsolete ansible-test Python 2.x support

* Remove unused bootstrap script functions

* Keep mypy happy

* Remove unused imports

* Keep pylint happy
2023-10-11 19:04:30 -07:00
3ae8541133 Update boilerplate in galaxy network templates (#81959) 2023-10-11 18:32:57 -07:00
3f607359de Remove obsolete compat code from integration tests (#81961)
Also fix up boilerplate for non .py extension files that contain Python code.
2023-10-11 18:22:33 -07:00
40e4c69724 Cleanup the hacking directory a bit (#81960)
* Clean up hacking/ansible-profile script

Also rename the script so it has a `.py` extension.

* Remove test-module symlink

Use the test-module.py script instead.
2023-10-11 17:44:42 -07:00
9295bb5b5d Unit test cleanup (#81958)
Remove obsolete Python 2.7 and 3.6 support code and fix up existing tests.
2023-10-11 17:31:04 -07:00
fd0f48e99d ansible-test - Update base/default containers (#81957) 2023-10-11 17:17:11 -07:00
d8484f0af7 Update default test container Python to 3.12 and support for PyLint 3.0.1 (#81953)
* temporary PyLint plugin to mask 3.12 finalizer noise

* ansible-test - Default to Python 3.12 for base/default

* ansible-test - Update pylint requirements

* ansible-test - Remove obsoleted changelog entry

* Add changelog fragment for pylint work-around
2023-10-11 13:04:22 -07:00
d2ba76c117 Remove Python < 3.5 selectors fallbacks (#81872) 2023-10-11 08:36:20 -07:00
46623b0a96 Deprecate pycompat24 (#81896) 2023-10-10 12:00:05 -04:00
350a394185 Remove Python 2 importlib.import_module compat (#81879) 2023-10-10 11:52:47 -04:00
92d2c66db2 Remove py2 support from urls.py (#81880) 2023-10-09 11:35:50 -05:00
858a3dbaad Fix example in strftime filter plugin help (#81696)
* Move the timestamp example to to_datetime.yml and be more verbose in its description
2023-10-09 08:55:06 -07:00
8a5ccc9d63 ansible-galaxy - fix traceback error for invalid req file (#81917)
Provide a better error message when encountering a YAML requirements file that is not a dictionary or list.

Fixes: #81901
2023-10-05 12:03:01 -07:00
976067c15f Add more winrm coverage (#81923) 2023-10-06 04:55:47 +10:00
282908c57e Add test coverage for winrm (#81910) 2023-10-06 01:28:12 +10:00
16b23d6779 Rename boilerplate sanity test (#81903)
The test covers more than just future boilerplate, so the shorter name is more appropriate.
2023-10-04 15:33:12 -07:00
9f899f9492 Require from __future__ import annotations (#81902) 2023-10-04 22:11:17 +00:00
921efce43a ansible-test - Remove more Python 2.7 / 3.6 support (#81898) 2023-10-04 11:32:31 -07:00
dfc62589f6 win_fetch - improve test time by not scanning Win dir (#81884) 2023-10-05 00:57:39 +10:00
c0eefa955a docs: update error message (#81554)
* Reword the error message when the module fails to parse parameters
  in JSON format
* misc typo fixes

Fixes: #81188

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-10-04 14:49:03 +00:00
d67d8bd823 Misc typo fixes in connection plugin (#81883) 2023-10-04 06:54:50 -07:00
b94ee1cefd Drop Python 2.7 and Python 3.6 support (#81866)
* Drop Python 2.7 and Python 3.6 support

* Remove obsolete _json_compat
2023-10-03 21:52:38 +00:00
c1343cc304 switch available_hosts to frozenset from list in ansible-inventory (#81870)
* major speedup large inventories, since it's consulted iteratively
2023-10-03 17:20:14 -04:00
debf2be913 optimize host_group_vars and vars plugin loading (#79945)
* Improve host_group_vars efficiency:

* normalize the basedir with `os.path.realpath()` once and cache it
* cache missing paths/files
* reduce the calls to `isinstance`

Add a couple more general improvements in vars/plugins.py get_vars_from_path():

* call `PluginLoader.all()` once for vars plugins and reload specific
  plugins subsequently
* don't reload legacy/builtin vars plugins that are not enabled

Add a test for host_group_vars and legacy plugin loading

Co-authored-by: Matt Davis <mrd@redhat.com>

* changelog

* Add a new is_stateless attribute to the vars plugin baseclass

update integration tests to be quieter and use the same test pattern

Fix deprecation and adjust test that didn't catch the issue (deprecation only occured when the value was False)

move realpath cache to host_group_vars (do not smuggle call state as instance data)

refactor under a single 'if cache:' statement

Call os.path.isdir instead of always calling os.path.exists first. Just call os.path.exists to differentiate between missing and non-directory.

remove call to super(VarsModule, self).get_vars()

use the entity name as the cache key instead of variable location

Remove isinstance checks and use a class attribute just in case any plugins are subclassing Host/Group

Replace startswith by checking index 0 of the name instead, since host/group names are required

* rename is_stateless to cache_instance to make it more clear what it does

* add plugin instance cache using the path to plugin loader

reduce loading stage option if a new instance isn't created

don't require a known subdir on PluginLoader instantiation for backwards
compatibility

rename attribute again

contain reading from/initializing cached instances to a plugin loader method

* Deprecate v2 vars plugins

* Refactor to use the cache in existing plugin loader methods

Rename the attribute again

Refactor host_group_vars with requested changes

Make changelog a bugfixes fragment

Add a deprecation fragment for v2 vars plugins.

Add type hints

* unbreak group_vars

* Apply suggestions from code review

* misc tweaks

* always cache instance by both requested and resolved FQ name
* add lru_cache to stage calculation to avoid repeated config consultation

* handle KeyError from missing stage option

---------

Co-authored-by: Matt Davis <mrd@redhat.com>
2023-10-03 16:24:06 -04:00
9b3ed5ec68 Properly template tags in parent blocks (#81624)
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
2023-10-03 15:07:26 -04:00
304e63d76e Add family fallback for Amzn to register as RedHat (#81755)
* Add family fallback for Amzn to register as RedHat

Fixes: #80882

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-10-03 18:54:14 +00:00
2d5861c185 run_once: unnotify hosts on handlers that are not run (#81667)
Fixes #81666
2023-10-03 14:43:46 -04:00
000cf1dd46 Update the test containers to include Python3.12.0 final (#81858) 2023-10-03 10:46:58 -07:00
b3408ab80b Fix dnf module crash for non-existent url (#81801)
* ci_complete ci_coverage
2023-10-03 12:37:34 -04:00
116766ac3e Add intentional tests for dnf group remove (#81739)
* Add intentional tests for dnf group remove

* Copy tests from yum
2023-10-03 12:34:07 -04:00
b7903669b4 ansible-test - Update distro containers (#81851)
* ansible-test - Update distro containers

* Update the alpine3 container to Python 3.11

* Update changelog
2023-10-03 16:33:37 +00:00
20f17687da ansible-test - Invoke container sleep through env (#81853) 2023-10-03 08:27:55 -07:00
d8f791d88c Bump sanity test requirements for 3.12 (#81846) 2023-10-03 06:38:49 -07:00
ce3954ba74 Bump sanity test requirements for 3.12 (#81843) 2023-10-03 06:18:32 -07:00
ec265ec08a Bump coverage.py to v7.3.2 in ansible-test (#81844) 2023-10-02 20:45:57 +00:00
f31c287348 ansible-test - Improve compatibility with pylint 3 (#81841) 2023-10-02 13:05:39 -07:00
e756e359e0 Remove deprecated JINJA2_NATIVE_WARNING env var (#81720)
Fixes #81714
2023-10-02 15:57:17 -04:00
ab6a544e86 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>
2023-10-02 15:42:00 -04:00
e78cc1e602 Install upgraded crun from edge (#81833) 2023-10-02 14:30:31 -04:00
7fab552563 Fix reporting role as not found when remote_data is None (#81829) 2023-10-02 09:11:12 -07:00
a82dc06116 Update winrm.py (#81817)
fixes some of the issues in #81808
2023-10-02 09:33:11 -04:00
8bf1a41d58 Fixed typos in winrm.py file (#81825)
bewteen ==> between
alligns ==> aligns
2023-10-02 06:32:13 -07:00
7109d392fd fixes spelling errors (#81814) 2023-10-02 09:27:47 -04:00
4d4c50f856 Provide more info about plugin in deprecation message (#81719)
Provide more information about plugin usage which needs to be
used instead of the deprecated plugin in the deprecation message.

Fixes: #80561

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-29 18:19:16 +00:00
27bbff7c22 Add count and mandatory_count parameters in regex_replace filter (#81775) 2023-09-29 10:33:13 -04:00
01d190f3d2 Add intentional tests for module_utils/yumdnf.py (#81776) 2023-09-29 07:48:25 +02:00
d6a356d7cd ansible-test - Update sanity test requirements (#81810) 2023-09-28 14:28:35 -07:00
55f27a579e systemd_service: add a note about module rename (#81803)
* The module systemd is renamed to systemd_service to maintain
  the scope of the module. Mention this in the module description.
* Misc typo fixes.

Fixes: #80917

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-29 05:20:15 +10:00
cb8cb8936a Update ansible-test containers
* Include Python 3.12rc3 and PowerShell 7.3.7
2023-09-28 10:24:03 -04:00
f22231de20 winrm - make command input more resiliant (#81538)
* winrm - make command input more resiliant

* Expand warning message
2023-09-26 22:46:48 +00:00
60c9660952 Add intentional tests for dnf install rpm when higher version is installed (#81740)
* Add intentional tests for dnf install rpm when higher version is installed

* ci_complete ci_coverage
2023-09-26 15:49:14 -04:00
68ab02a504 Test heuristic_log_sanitize (#81730)
* Test heuristic_log_sanitize. See #81689

* Add note about what this test is doing

* grammar

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

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2023-09-26 14:23:15 -05:00
f951c64ee9 Fix typo in finished.yml (#81784)
aysnc -> async
2023-09-26 12:19:10 -07:00
4071f3b803 file: add a note about follow=false (#81788)
While creating a symlink, we apply fs attributes changes
to the destination. But in case of a non-existent destination, we warn
the user. This warning message can be suppressed by setting follow=false.
Add a note of this behavior in the `follow` parameter.

Fixes: #50543

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-26 17:14:37 +00:00
ddf0311c63 Prevent roles from using symlinks to overwrite files outside of the installation directory (#81780)
* Sanitize linkname during role installs

* Add tests

* add clog frag
2023-09-26 11:32:19 -05:00
989ea7a9f0 Misc. fixes in base.yml (#81771)
* Convert Latin short forms to English wording
* Typo fixes
* Sentence rewording

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-26 11:15:14 -04:00
51f2ddd445 Extend mount info (#81768) 2023-09-26 11:12:03 -04:00
230f956e25 Add lineinfile integration test for removing a line that has already been removed (#81762)
ci_complete ci_coverage
2023-09-26 11:07:53 -04:00
7d9889fcb3 Fix typo in action_core.py (#81763)
Fixes typo 'obeys' vs 'objeys' in doc_fragments/action_core.py
2023-09-22 09:48:10 -07:00
85adaa76f1 Add integration test for copy with force=false when dest exists (#81756)
ci_complete ci_coverage
2023-09-22 09:53:24 -04:00
Val
91f94fb59d Daemonize follow-up fixes (#81584)
* Ensure binary data transmission in daemonize

* Add changelog fragment
2023-09-22 09:41:30 -04:00
3794612832 ansible-test - Skip pylint test on Python 3.12 (#81706) 2023-09-21 21:01:58 -07:00
2aef0406d4 ansible-galaxy fix scm dependency error (#81599)
* 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>
2023-09-21 15:49:30 -04:00
7c7385521e Harden the ansiballz and respawn python templates (#81753)
Harden our python templates for respawn and ansiballz around str literal quoting
2023-09-21 12:48:48 -07:00
9edf64eaeb Deprecating paramiko options in base config (#81593)
* Deprecating paramiko options in base config

 they exist in the plugin itself since 2.14

* clog
2023-09-21 15:47:53 -04:00
1e7f7875c6 Allow for searching handler subdir for included task via include_role (#81733)
Fixes #81722
2023-09-21 12:12:04 -07:00
86fd7026a8 Handle exceptions in interpreter discovery (#81745)
* Handle exceptions like AnsibleError, AnsibleConnectionFailure
  raise while interpreter discovery.

Fixes: #78264

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-21 11:13:40 -07:00
62c10199d1 Add intentional tests for dnf list (#81738)
ci_complete ci_coverage
2023-09-21 19:52:43 +02:00
9244b2bff8 Make sure paths are treated correctly when building collection files manifest (#81619)
* Make sure paths are correct when building collection files manifest

This commit makes sure the path of the files part of
the collection build manifest are correct.

This commit uses os.path.commonprefix instead of
dealing with strings.

Signed-off-by: Carlos Camacho <ccamacho@redhat.com>

Bugfix Pull Request
Fixes: #81618

* Revert the change note type to `minor_changes`

* Clarify the change note with user-oriented details

---------

Signed-off-by: Carlos Camacho <ccamacho@redhat.com>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2023-09-20 20:18:37 +02:00
e4b9f9c6ae tests: update CloudStack test container to version 1.7.0. (#81732) 2023-09-20 08:34:02 -07:00
7662a05085 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>
2023-09-20 16:35:54 +02:00
4b7705b07a Remove deprecated APIs from ansible-doc (#81729)
* Removed add_collection_plugins
* Removed find_plugins

Fixes: #81716

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-19 16:48:33 -07:00
3ec7a6e0db Fix ansible-test issues with detecting docker host and forwarding ports (#81726)
* Properly detect docker host using ssh

* Disable ControlPath when creating SSH port forwards

* typo fix

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

* Add clog frag

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2023-09-19 12:10:52 -05:00
710c0a264e Typo in documentation then -> than (#81724) 2023-09-19 17:16:32 +02:00
0ea40e09d1 vars: handle exception in combine_vars (#81700)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-19 17:03:58 +02:00
f7234968d2 bump devel to 2.17.0.dev0 (#81712) 2023-09-18 16:24:44 -05:00
2061 changed files with 14290 additions and 17957 deletions

View File

@ -54,8 +54,6 @@ stages:
nameFormat: Python {0}
testFormat: units/{0}
targets:
- test: 2.7
- test: 3.6
- test: 3.7
- test: 3.8
- test: 3.9
@ -79,34 +77,30 @@ stages:
- template: templates/matrix.yml # context/target
parameters:
targets:
- name: macOS 13.2
test: macos/13.2
- name: RHEL 7.9
test: rhel/7.9
- name: RHEL 8.8 py36
test: rhel/8.8@3.6
- name: RHEL 8.8 py311
test: rhel/8.8@3.11
- name: RHEL 9.2 py39
test: rhel/9.2@3.9
- name: RHEL 9.2 py311
test: rhel/9.2@3.11
- name: FreeBSD 13.2
test: freebsd/13.2
- name: macOS 14.3
test: macos/14.3
- name: RHEL 9.3 py39
test: rhel/9.3@3.9
- name: RHEL 9.3 py311
test: rhel/9.3@3.11
- name: FreeBSD 13.3
test: freebsd/13.3
- name: FreeBSD 14.0
test: freebsd/14.0
groups:
- 1
- 2
- template: templates/matrix.yml # context/controller
parameters:
targets:
- name: macOS 13.2
test: macos/13.2
- name: RHEL 8.8
test: rhel/8.8
- name: RHEL 9.2
test: rhel/9.2
- name: FreeBSD 13.2
test: freebsd/13.2
- name: macOS 14.3
test: macos/14.3
- name: RHEL 9.3
test: rhel/9.3
- name: FreeBSD 13.3
test: freebsd/13.3
- name: FreeBSD 14.0
test: freebsd/14.0
groups:
- 3
- 4
@ -114,14 +108,12 @@ stages:
- template: templates/matrix.yml # context/controller (ansible-test container management)
parameters:
targets:
- name: Alpine 3.18
test: alpine/3.18
- name: Fedora 38
test: fedora/38
- name: RHEL 8.8
test: rhel/8.8
- name: RHEL 9.2
test: rhel/9.2
- name: Alpine 3.19
test: alpine/3.19
- name: Fedora 39
test: fedora/39
- name: RHEL 9.3
test: rhel/9.3
- name: Ubuntu 22.04
test: ubuntu/22.04
groups:
@ -133,14 +125,10 @@ stages:
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3
test: alpine3
- name: CentOS 7
test: centos7
- name: Fedora 38
test: fedora38
- name: openSUSE 15
test: opensuse15
- name: Alpine 3.19
test: alpine319
- name: Fedora 39
test: fedora39
- name: Ubuntu 20.04
test: ubuntu2004
- name: Ubuntu 22.04
@ -152,10 +140,10 @@ stages:
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3
test: alpine3
- name: Fedora 38
test: fedora38
- name: Alpine 3.19
test: alpine319
- name: Fedora 39
test: fedora39
- name: Ubuntu 22.04
test: ubuntu2204
groups:

View File

@ -7,8 +7,7 @@ Keep in mind that Azure Pipelines does not enforce unique job display names (onl
It is up to pipeline authors to avoid name collisions when deviating from the recommended format.
"""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from __future__ import annotations
import os
import re

View File

@ -4,6 +4,7 @@ Upload code coverage reports to codecov.io.
Multiple coverage files from multiple languages are accepted and aggregated after upload.
Python coverage, as well as PowerShell and Python stubs can all be uploaded.
"""
from __future__ import annotations
import argparse
import dataclasses

View File

@ -1,8 +1,7 @@
#!/usr/bin/env python
"""Prepends a relative timestamp to each input line from stdin and writes it to stdout."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from __future__ import annotations
import sys
import time

View File

@ -10,9 +10,11 @@ The GitHub issue tracker is not the best place for questions for various reasons
## CONTRIBUTING ?
By contributing you agree that these contributions are your own (or approved by your employer) and you grant a full, complete, irrevocable copyright license to all users and developers of the project, present and future, pursuant to the license of the project. You can also read the same [CLA](https://docs.ansible.com/ansible/latest/community/contributor_license_agreement.html) on the Ansible docsite.
By contributing to this project you agree to the [Developer Certificate of Origin (DCO)](#developer-certificate-of-origin-dco).
Please review the [Community Guide](https://docs.ansible.com/ansible/latest/community/index.html) for more information on contributing to Ansible.
The Ansible project is licensed under the [GPL-3.0](COPYING) or later. Some portions of the code fall under other licenses as noted in individual files.
The Ansible project accepts contributions through GitHub pull requests. Please review the [Community Guide](https://docs.ansible.com/ansible/latest/community/index.html) for more information on contributing to Ansible.
## BUG TO REPORT ?
@ -23,3 +25,46 @@ You can report bugs or make enhancement requests at the [Ansible GitHub issue pa
Also please make sure you are testing on the latest released version of Ansible or the development branch; see the [Installation Guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) for details.
Thanks!
## DEVELOPER CERTIFICATE OF ORIGIN (DCO)
This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution.
```text
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```

View File

@ -87,7 +87,7 @@ body:
[collections org]: /ansible-collections
placeholder: dnf, apt, yum, pip, user etc.
placeholder: dnf, apt, pip, user etc.
validations:
required: true

View File

@ -139,7 +139,7 @@ body:
[collections org]: /ansible-collections
placeholder: dnf, apt, yum, pip, user etc.
placeholder: dnf, apt, pip, user etc.
validations:
required: true

View File

@ -1,25 +0,0 @@
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
##### ISSUE TYPE
<!--- Pick one below and delete the rest -->
- Bugfix Pull Request
- Docs Pull Request
- Feature Pull Request
- Test Pull Request
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here -->
<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
```

1
.github/PULL_REQUEST_TEMPLATE.md vendored Symbolic link
View File

@ -0,0 +1 @@
PULL_REQUEST_TEMPLATE/Unclear purpose or motivation.md

View File

@ -0,0 +1,20 @@
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
##### ISSUE TYPE
- Bugfix Pull Request
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here -->
<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
```

View File

@ -0,0 +1,19 @@
##### SUMMARY
<!--- Describe the change below, including rationale -->
<!--- HINT: Include "Closes #nnn" if you are fixing an existing issue -->
##### ISSUE TYPE
- Docs Pull Request
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
```

View File

@ -0,0 +1,19 @@
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
<!--- HINT: Include "Resolves #nnn" if you are fixing an existing issue -->
##### ISSUE TYPE
- Feature Pull Request
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
```

View File

@ -0,0 +1 @@
Unclear purpose or motivation.md

20
.github/PULL_REQUEST_TEMPLATE/Tests.md vendored Normal file
View File

@ -0,0 +1,20 @@
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
<!--- HINT: Include "Closes #nnn" if you are fixing an existing issue -->
##### ISSUE TYPE
- Test Pull Request
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here -->
<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
```

View File

@ -0,0 +1,25 @@
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
##### ISSUE TYPE
<!--- Pick one below and delete the rest -->
- Bugfix Pull Request
- Docs Pull Request
- Feature Pull Request
- Test Pull Request
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here -->
<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
```

View File

@ -1,3 +1,4 @@
2.17.0 Gallows Pole
2.16.0 All My Love
2.15.0 Ten Years Gone
2.14.0 C'mon Everybody

View File

@ -46,7 +46,7 @@ in the Ansible community if you want to run the `devel` branch.
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),
* Join a [Working Group](https://docs.ansible.com/ansible/devel/community/communication.html#working-groups),
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
@ -54,7 +54,7 @@ in the Ansible community if you want to run the `devel` branch.
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)
[Communication page](https://docs.ansible.com/ansible/devel/community/communication.html)
## Coding Guidelines

View File

@ -0,0 +1,307 @@
==============================================
ansible-core 2.17 "Gallows Pole" Release Notes
==============================================
.. contents:: Topics
v2.17.0rc2
==========
Release Summary
---------------
| Release Date: 2024-05-13
| `Porting Guide <https://docs.ansible.com/ansible-core/2.17/porting_guides/porting_guide_core_2.17.html>`__
Bugfixes
--------
- Add a version ceiling constraint for pypsrp to avoid potential breaking changes in the 1.0.0 release.
- ansible-doc - fixed "inicates" typo in output
- ansible-doc - format top-level descriptions with multiple paragraphs as multiple paragraphs, instead of concatenating them (https://github.com/ansible/ansible/pull/83155).
- ensure we have logger before we log when we have increased verbosity.
- uri - update the documentation for follow_redirects.
v2.17.0rc1
==========
Release Summary
---------------
| Release Date: 2024-04-29
| `Porting Guide <https://docs.ansible.com/ansible-core/2.17/porting_guides/porting_guide_core_2.17.html>`__
Removed Features (previously deprecated)
----------------------------------------
- Removed Python 2.7 and Python 3.6 as a supported remote version. Python 3.7+ is now required for target execution.
Bugfixes
--------
- Fix handlers not being executed in lockstep using the linear strategy in some cases (https://github.com/ansible/ansible/issues/82307)
- ansible-config will now properly template defaults before dumping them.
- ansible_managed restored it's 'templatability' by ensuring the possible injection routes are cut off earlier in the process.
- dnf5 - replace removed API calls
- facts - add a generic detection for VMware in product name.
v2.17.0b1
=========
Release Summary
---------------
| Release Date: 2024-04-08
| `Porting Guide <https://docs.ansible.com/ansible-core/2.17/porting_guides/porting_guide_core_2.17.html>`__
Major Changes
-------------
- urls.py - Removed support for Python 2
Minor Changes
-------------
- Add ``dump`` and ``passno`` mount information to facts component (https://github.com/ansible/ansible/issues/80478)
- Added MIRACLE LINUX 9.2 in RedHat OS Family.
- Interpreter Discovery - Remove hardcoded references to specific python interpreters to use for certain distro versions, and modify logic for python3 to become the default.
- Use Python's built-in ``functools.update_wrapper`` instead an inline copy from Python 3.7.
- User can now set ansible.log to record higher verbosity than what is specified for display via new configuration item LOG_VERBOSITY.
- ``DEFAULT_PRIVATE_ROLE_VARS`` is now overridden by explicit setting of ``public`` for ``include_roles`` and ``import_roles``.
- ``ansible-galaxy role|collection init`` - accept ``--extra-vars`` to supplement/override the variables ``ansible-galaxy`` injects for templating ``.j2`` files in the skeleton.
- ``import_role`` action now also gets a ``public`` option that controls variable exports, default depending on ``DEFAULT_PRIVATE_ROLE_VARS`` (if using defaults equates to ``public=True``).
- added configuration item ``TARGET_LOG_INFO`` that allows the user/author to add an information string to the log output on targets.
- ansible-doc - treat double newlines in documentation strings as paragraph breaks. This is useful to create multi-paragraph notes in module/plugin documentation (https://github.com/ansible/ansible/pull/82465).
- ansible-doc output has been revamped to make it more visually pleasing when going to a terminal, also more concise, use -v to show extra information.
- ansible-galaxy - Started normalizing build directory with a trailing separator when building collections, internally. (https://github.com/ansible/ansible/pull/81619).
- ansible-galaxy dependency resolution messages have changed the unexplained 'virtual' collection for the specific type ('scm', 'dir', etc) that is more user friendly
- ansible-test - Add Alpine 3.19 container.
- ansible-test - Add Alpine 3.19 to remotes.
- ansible-test - Add Fedora 39 container.
- ansible-test - Add Fedora 39 remote.
- 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``.
- ansible-test - Add support for RHEL 9.3 remotes.
- ansible-test - Added a macOS 14.3 remote VM.
- ansible-test - Bump the ``nios-test-container`` from version 2.0.0 to version 3.0.0.
- ansible-test - Containers and remotes managed by ansible-test will have their Python ``EXTERNALLY-MANAGED`` marker (PEP668) removed. This provides backwards compatibility for existing tests running in newer environments which mark their Python as externally managed. A future version of ansible-test may change this behavior, requiring tests to be adapted to such environments.
- ansible-test - Make Python 3.12 the default version used in the ``base`` and ``default`` containers.
- ansible-test - Remove Alpine 3(.18) container.
- ansible-test - Remove Alpine 3.18 from remotes.
- ansible-test - Remove Fedora 38 remote support.
- ansible-test - Remove Fedora 38 test container.
- ansible-test - Remove rhel/9.2 test remote
- ansible-test - Remove the FreeBSD 13.2 remote.
- ansible-test - Removed fallback to ``virtualenv`` when ``-m venv`` is non-functional.
- ansible-test - Removed test remotes: macos/13.2
- ansible-test - Removed the ``no-basestring`` sanity test. The test is no longer necessary now that Python 3 is required.
- ansible-test - Removed the ``no-dict-iteritems``, ``no-dict-iterkeys`` and ``no-dict-itervalues`` sanity tests. The tests are no longer necessary since Python 3 is required.
- ansible-test - Removed the ``no-main-display`` sanity test. The unwanted pattern is unlikely to occur, since the test has existed since Ansible 2.8.
- ansible-test - Removed the ``no-unicode-literals`` sanity test. The test is unnecessary now that Python 3 is required and the ``unicode_literals`` feature has no effect.
- ansible-test - Special handling for installation of ``cryptography`` has been removed, as it is no longer necessary.
- ansible-test - The ``shellcheck`` sanity test no longer disables the ``SC2164`` check. In most cases, seeing this error means the script is missing ``set -e``.
- ansible-test - The ``unidiomatic-typecheck`` rule has been enabled in the ``pylint`` sanity test.
- ansible-test - The ``unidiomatic-typecheck`` rule has been removed from the ``validate-modules`` sanity test.
- ansible-test - Update the base and default containers to use Ubuntu 22.04 for the base image. This also updates PowerShell to version 7.4.0 with .NET 8.0.0 and ShellCheck to version 0.8.0.
- ansible-test - Updated the CloudStack test container to version 1.7.0.
- ansible-test - Updated the distro test containers to version 6.3.0 to include coverage 7.3.2 for Python 3.8+. The alpine3 container is now based on 3.18 instead of 3.17 and includes Python 3.11 instead of Python 3.10.
- ansible-test - Updated the distro test containers to version 7.1.0.
- ansible-test - When ansible-test installs requirements, it now instructs pip to allow installs on externally managed environments as defined by PEP 668. This only occurs in ephemeral environments managed by ansible-test, such as containers, or when the `--requirements` option is used.
- ansible-test - When invoking ``sleep`` in containers during container setup, the ``env`` command is used to avoid invoking the shell builtin, if present.
- ansible-test - document block name now included in error message for YAML parsing errors (https://github.com/ansible/ansible/issues/82353).
- ansible-test - sanity test allows ``EXAMPLES`` to be multi-document YAML (https://github.com/ansible/ansible/issues/82353).
- ansible-test now has FreeBSD 13.3 and 14.0 support
- ansible.builtin.user - Remove user not found warning (https://github.com/ansible/ansible/issues/80267)
- apt_repository.py - use api.launchpad.net endpoint instead of launchpad.net/api
- async tasks can now also support check mode at the same time.
- async_status now supports check mode.
- constructed inventory plugin - Adding a note that only group_vars of explicit groups are loaded (https://github.com/ansible/ansible/pull/82580).
- csvfile - add a keycol parameter to specify in which column to search.
- dnf - add the ``best`` option
- dnf5 - add the ``best`` option
- filter plugin - Add the count and mandatory_count parameters in the regex_replace filter
- find - add a encoding parameter to specify which encoding of the files to be searched.
- git module - gpg_allowlist name was added in 2.17 and we will eventually deprecate the gpg_whitelist alias.
- import_role - allow subdirectories with ``_from`` options for parity with ``include_role`` (https://github.com/ansible/ansible/issues/82584).
- module argument spec - Allow module authors to include arbitrary additional context in the argument spec, by making use of a new top level key called ``context``. This key should be a dict type. This allows for users to customize what they place in the argument spec, without having to ignore sanity tests that validate the schema.
- modules - Add the ability for an action plugin to call ``self._execute_module(*, ignore_unknown_opts=True)`` to execute a module with options that may not be supported for the version being called. This tells the module basic wrapper to ignore validating the options provided match the arg spec.
- package action now has a configuration that overrides the detected package manager, it is still overridden itself by the use option.
- py3compat - Remove ``ansible.utils.py3compat`` as it is no longer necessary
- removed the unused argument ``create_new_password`` from ``CLI.build_vault_ids`` (https://github.com/ansible/ansible/pull/82066).
- urls - Add support for TLS 1.3 post handshake certificate authentication - https://github.com/ansible/ansible/issues/81782
- urls - reduce complexity of ``Request.open``
- user - accept yescrypt hash as user password
- validate-modules tests now correctly handles ``choices`` in dictionary format.
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.
Deprecated Features
-------------------
- Old style vars plugins which use the entrypoints `get_host_vars` or `get_group_vars` are deprecated. The plugin should be updated to inherit from `BaseVarsPlugin` and define a `get_vars` method as the entrypoint.
- The 'required' parameter in 'ansible.module_utils.common.process.get_bin_path' API is deprecated (https://github.com/ansible/ansible/issues/82464).
- ``module_utils`` - importing the following convenience helpers from ``ansible.module_utils.basic`` has been deprecated: ``get_exception``, ``literal_eval``, ``_literal_eval``, ``datetime``, ``signal``, ``types``, ``chain``, ``repeat``, ``PY2``, ``PY3``, ``b``, ``binary_type``, ``integer_types``, ``iteritems``, ``string_types``, ``test_type``, ``map`` and ``shlex_quote``.
- ansible-doc - role entrypoint attributes are deprecated and eventually will no longer be shown in ansible-doc from ansible-core 2.20 on (https://github.com/ansible/ansible/issues/82639, https://github.com/ansible/ansible/pull/82678).
- paramiko connection plugin, configuration items in the global scope are being deprecated and will be removed in favor or the existing same options in the plugin itself. Users should not need to change anything (how to configure them are the same) but plugin authors using the global constants should move to using the plugin's get_option().
Removed Features (previously deprecated)
----------------------------------------
- Remove deprecated APIs from ansible-docs (https://github.com/ansible/ansible/issues/81716).
- Remove deprecated JINJA2_NATIVE_WARNING environment variable (https://github.com/ansible/ansible/issues/81714)
- Remove deprecated ``scp_if_ssh`` from ssh connection plugin (https://github.com/ansible/ansible/issues/81715).
- Remove deprecated crypt support from ansible.utils.encrypt (https://github.com/ansible/ansible/issues/81717)
- With the removal of Python 2 support, the yum module and yum action plugin are removed and redirected to ``dnf``.
Security Fixes
--------------
- ANSIBLE_NO_LOG - Address issue where ANSIBLE_NO_LOG was ignored (CVE-2024-0690)
- ansible-galaxy - Prevent roles from using symlinks to overwrite files outside of the installation directory (CVE-2023-5115)
- templating - Address issues where internal templating can cause unsafe variables to lose their unsafe designation (CVE-2023-5764)
Bugfixes
--------
- All core lookups now use set_option(s) even when doing their own custom parsing. This ensures that the options are always the proper type.
- Allow for searching handler subdir for included task via include_role (https://github.com/ansible/ansible/issues/81722)
- AnsibleModule.atomic_move - fix preserving extended ACLs of the destination when it exists (https://github.com/ansible/ansible/issues/72929).
- Cache host_group_vars after instantiating it once and limit the amount of repetitive work it needs to do every time it runs.
- Call PluginLoader.all() once for vars plugins, and load vars plugins that run automatically or are enabled specifically by name subsequently.
- Consolidate systemd detection logic into one place (https://github.com/ansible/ansible/issues/80975).
- Consolidated the list of internal static vars, centralized them as constant and completed from some missing entries.
- Do not print undefined error message twice (https://github.com/ansible/ansible/issues/78703).
- Enable file cache for vaulted files during vars lookup to fix a strong performance penalty in huge and complex playbboks.
- Fix NEVRA parsing of package names that include digit(s) in them (https://github.com/ansible/ansible/issues/76463, https://github.com/ansible/ansible/issues/81018)
- Fix ``force_handlers`` not working with ``any_errors_fatal`` (https://github.com/ansible/ansible/issues/36308)
- Fix ``run_once`` being incorrectly interpreted on handlers (https://github.com/ansible/ansible/issues/81666)
- Fix an issue when setting a plugin name from an unsafe source resulted in ``ValueError: unmarshallable object`` (https://github.com/ansible/ansible/issues/82708)
- Fix check for missing _sub_plugin attribute in older connection plugins (https://github.com/ansible/ansible/pull/82954)
- Fix condition for unquoting configuration strings from ini files (https://github.com/ansible/ansible/issues/82387).
- Fix for when ``any_errors_fatal`` was ignored if error occurred in a block with always (https://github.com/ansible/ansible/issues/31543)
- Fix handling missing urls in ansible.module_utils.urls.fetch_file for Python 3.
- Fix issue where an ``include_tasks`` handler in a role was not able to locate a file in ``tasks/`` when ``tasks_from`` was used as a role entry point and ``main.yml`` was not present (https://github.com/ansible/ansible/issues/82241)
- Fix issues when tasks withing nested blocks wouldn't run when ``force_handlers`` is set (https://github.com/ansible/ansible/issues/81533)
- Fix loading vars_plugins in roles (https://github.com/ansible/ansible/issues/82239).
- Fix notifying role handlers by listen keyword topics with the "role_name : " prefix (https://github.com/ansible/ansible/issues/82849).
- Fix setting proper locale for git executable when running on non english systems, ensuring git output can always be parsed.
- Fix tasks in always section not being executed for nested blocks with ``any_errors_fatal`` (https://github.com/ansible/ansible/issues/73246)
- Fixes permission for cache json file from 600 to 644 (https://github.com/ansible/ansible/issues/82683).
- Give the tombstone error for ``include`` pre-fork like other tombstoned action/module plugins.
- Harden python templates for respawn and ansiballz around str literal quoting
- Include the task location when a module or action plugin is deprecated (https://github.com/ansible/ansible/issues/82450).
- Interpreter discovery - Add ``Amzn`` to ``OS_FAMILY_MAP`` for correct family fallback for interpreter discovery (https://github.com/ansible/ansible/issues/80882).
- Mirror the behavior of dnf on the command line when handling NEVRAs with omitted epoch (https://github.com/ansible/ansible/issues/71808)
- 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)
- Provide additional information about the alternative plugin in the deprecation message (https://github.com/ansible/ansible/issues/80561).
- Remove the galaxy_info field ``platforms`` from the role templates (https://github.com/ansible/ansible/issues/82453).
- Restoring the ability of filters/tests can have same file base name but different tests/filters defined inside.
- Reword the error message when the module fails to parse parameters in JSON format (https://github.com/ansible/ansible/issues/81188).
- Reword warning if the reserved keyword _ansible_ used as a module parameter (https://github.com/ansible/ansible/issues/82514).
- Run all handlers with the same ``listen`` topic, even when notified from another handler (https://github.com/ansible/ansible/issues/82363).
- Slight optimization to hostvars (instantiate template only once per host, vs per call to var).
- Stopped misleadingly advertising ``async`` mode support in the ``reboot`` module (https://github.com/ansible/ansible/issues/71517).
- ``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.module_utils.service`` - ensure binary data transmission in ``daemonize()``
- ``any_errors_fatal`` should fail all hosts and rescue all of them when a ``rescue`` section is specified (https://github.com/ansible/ansible/issues/80981)
- ``include_role`` - properly execute ``v2_playbook_on_include`` and ``v2_runner_on_failed`` callbacks as well as increase ``ok`` and ``failed`` stats in the play recap, when appropriate (https://github.com/ansible/ansible/issues/77336)
- allow_duplicates - fix evaluating if the current role allows duplicates instead of using the initial value from the duplicate's cached role.
- ansible-config init will now dedupe ini entries from plugins.
- ansible-galaxy - Deprecate use of the Galaxy v2 API (https://github.com/ansible/ansible/issues/81781)
- ansible-galaxy - Provide a better error message when using a requirements file with an invalid format - https://github.com/ansible/ansible/issues/81901
- ansible-galaxy - Resolve issue with the dataclass used for galaxy.yml manifest caused by using future annotations
- ansible-galaxy - ensure path to ansible collection when installing or downloading doesn't have a backslash (https://github.com/ansible/ansible/pull/79705).
- 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.
- ansible-galaxy role import - exit with 1 when the import fails (https://github.com/ansible/ansible/issues/82175).
- ansible-galaxy role install - fix installing roles from Galaxy that have version ``None`` (https://github.com/ansible/ansible/issues/81832).
- ansible-galaxy role install - fix symlinks (https://github.com/ansible/ansible/issues/82702, https://github.com/ansible/ansible/issues/81965).
- 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).
- ansible-inventory - index available_hosts for major performance boost when dumping large inventories
- ansible-pull now will expand relative paths for the ``-d|--directory`` option is now expanded before use.
- ansible-pull will now correctly handle become and connection password file options for ansible-playbook.
- ansible-test - Add a ``pylint`` plugin to work around a known issue on Python 3.12.
- ansible-test - Explicitly supply ``ControlPath=none`` when setting up port forwarding over SSH to address the scenario where the local ssh configuration uses ``ControlPath`` for all hosts, and would prevent ports to be forwarded after the initial connection to the host.
- ansible-test - Fix parsing of cgroup entries which contain a ``:`` in the path (https://github.com/ansible/ansible/issues/81977).
- ansible-test - Include missing ``pylint`` requirements for Python 3.10.
- ansible-test - Properly detect docker host when using ``ssh://`` protocol for connecting to the docker daemon.
- ansible-test - The ``libexpat`` package is automatically upgraded during remote bootstrapping to maintain compatibility with newer Python packages.
- ansible-test - The ``validate-modules`` sanity test no longer attempts to process files with unrecognized extensions as Python (resolves https://github.com/ansible/ansible/issues/82604).
- ansible-test - Update ``pylint`` to version 3.0.1.
- ansible-test ansible-doc sanity test - do not remove underscores from plugin names in collections before calling ``ansible-doc`` (https://github.com/ansible/ansible/pull/82574).
- ansible-test validate-modules sanity test - do not treat leading underscores for plugin names in collections as an attempted deprecation (https://github.com/ansible/ansible/pull/82575).
- ansible-test — Python 3.8–3.12 will use ``coverage`` v7.3.2.
- ansible.builtin.apt - calling clean = true does not properly clean certain cache files such as /var/cache/apt/pkgcache.bin and /var/cache/apt/pkgcache.bin (https://github.com/ansible/ansible/issues/82611)
- ansible.builtin.uri - the module was ignoring the ``force`` parameter and always requesting a cached copy (via the ``If-Modified-Since`` header) when downloading to an existing local file. Disable caching when ``force`` is ``true``, as documented (https://github.com/ansible/ansible/issues/82166).
- apt - honor install_recommends and dpkg_options while installing python3-apt library (https://github.com/ansible/ansible/issues/40608).
- apt - install recommended packages when installing package via deb file (https://github.com/ansible/ansible/issues/29726).
- apt_repository - do not modify repo files if the file is a symlink (https://github.com/ansible/ansible/issues/49809).
- apt_repository - update PPA URL to point to https URL (https://github.com/ansible/ansible/issues/82463).
- assemble - fixed missing parameter 'content' in _get_diff_data API (https://github.com/ansible/ansible/issues/82359).
- async - Fix bug that stopped running async task in ``--check`` when ``check_mode: False`` was set as a task attribute - https://github.com/ansible/ansible/issues/82811
- blockinfile - when ``create=true`` is used with a filename without path, the module crashed (https://github.com/ansible/ansible/pull/81638).
- check if there are attributes to set before attempting to set them (https://github.com/ansible/ansible/issues/76727)
- copy action now also generates temprary files as hidden ('.' prefixed) to avoid accidental pickup by running services that glob by extension.
- copy action now ensures that tempfiles use the same suffix as destination, to allow for ``validate`` to work with utilities that check extensions.
- deb822_repository - handle idempotency if the order of parameters is changed (https://github.com/ansible/ansible/issues/82454).
- debconf - allow user to specify a list for value when vtype is multiselect (https://github.com/ansible/ansible/issues/81345).
- delegate_to when set to an empty or undefined variable will now give a proper error.
- distribution.py - Recognize ALP-Dolomite as part of the SUSE OS family in Ansible, fixing its previous misidentification (https://github.com/ansible/ansible/pull/82496).
- distro - bump bundled distro version from 1.6.0 to 1.8.0 (https://github.com/ansible/ansible/issues/81713).
- dnf - fix an issue when cached RPMs were left in the cache directory even when the keepcache setting was unset (https://github.com/ansible/ansible/issues/81954)
- dnf - fix an issue when installing a package by specifying a file it provides could result in installing a different package providing the same file than the package already installed resulting in resolution failure (https://github.com/ansible/ansible/issues/82461)
- dnf - properly set gpg check options on enabled repositories according to the ``disable_gpg_check`` option (https://github.com/ansible/ansible/issues/80110)
- dnf - properly skip unavailable packages when ``skip_broken`` is enabled (https://github.com/ansible/ansible/issues/80590)
- dnf - the ``nobest`` option only overrides the distribution default when explicitly used, and is used for all supported operations (https://github.com/ansible/ansible/issues/82616)
- dnf5 - respect ``allow_downgrade`` when installing packages directly from rpm files
- dnf5 - the ``nobest`` option only overrides the distribution default when used
- dwim functions for lookups should be better at detectging role context even in abscense of tasks/main.
- expect - fix argument spec error using timeout=null (https://github.com/ansible/ansible/issues/80982).
- fact gathering on linux now handles thread count by using rounding vs dropping decimals, it should give slightly more accurate numbers.
- facts - detect VMware ESXi 8.0 virtualization by product name VMware20,1
- fetch - Do not calculate the file size for Windows fetch targets to improve performance.
- fetch - add error message when using ``dest`` with a trailing slash that becomes a local directory - https://github.com/ansible/ansible/issues/82878
- find - do not fail on Permission errors (https://github.com/ansible/ansible/issues/82027).
- first_found lookup now always returns a full (absolute) and normalized path
- first_found lookup now always takes into account k=v options
- flush_handlers - properly handle a handler failure in a nested block when ``force_handlers`` is set (http://github.com/ansible/ansible/issues/81532)
- galaxy - skip verification for unwanted Python compiled bytecode files (https://github.com/ansible/ansible/issues/81628).
- handle exception raised while validating with elements='int' and value is not within choices (https://github.com/ansible/ansible/issues/82776).
- include_tasks - include `ansible_loop_var` and `ansible_index_var` in a loop (https://github.com/ansible/ansible/issues/82655).
- include_vars - fix calculating ``depth`` relative to the root and ensure all files are included (https://github.com/ansible/ansible/issues/80987).
- interpreter_discovery - handle AnsibleError exception raised while interpreter discovery (https://github.com/ansible/ansible/issues/78264).
- iptables - add option choices 'src,src' and 'dst,dst' in match_set_flags (https://github.com/ansible/ansible/issues/81281).
- iptables - set jump to DSCP when set_dscp_mark or set_dscp_mark_class is set (https://github.com/ansible/ansible/issues/77077).
- known_hosts - Fix issue with `@cert-authority` entries in known_hosts incorrectly being removed.
- 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').
- moved assemble, raw, copy, fetch, reboot, script and wait_for_connection to query task instead of play_context ensuring they get the lastest and most correct data.
- reboot action now handles connections with 'timeout' vs only 'connection_timeout' settings.
- role params now have higher precedence than host facts again, matching documentation, this had unintentionally changed in 2.15.
- roles, code cleanup and performance optimization of dependencies, now cached, and ``public`` setting is now determined once, at role instantiation.
- roles, the ``static`` property is now correctly set, this will fix issues with ``public`` and ``DEFAULT_PRIVATE_ROLE_VARS`` controls on exporting vars.
- set_option method for plugins to update config now properly passes through type casting and validation.
- ssh - add tests for the SSH connection plugin.
- support url-encoded credentials in URLs like http://x%40:%40@example.com (https://github.com/ansible/ansible/pull/82552)
- syslog - Handle ValueError exception raised when sending Null Characters to syslog with Python 3.12.
- systemd_services - update documentation regarding required_one_of and required_by parameters (https://github.com/ansible/ansible/issues/82914).
- template - Fix error when templating an unsafe string which corresponds to an invalid type in Python (https://github.com/ansible/ansible/issues/82600).
- template action will also inherit the behavior from copy (as it uses it internally).
- templating - ensure syntax errors originating from a template being compiled into Python code object result in a failure (https://github.com/ansible/ansible/issues/82606)
- unarchive - add support for 8 character permission strings for zip archives (https://github.com/ansible/ansible/pull/81705).
- unarchive - force unarchive if symlink target changes (https://github.com/ansible/ansible/issues/30420).
- unarchive modules now uses zipinfo options without relying on implementation defaults, making it more compatible with all OS/distributions.
- 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``
- unsafe data - Enable directly using ``AnsibleUnsafeText`` with Python ``pathlib`` (https://github.com/ansible/ansible/issues/82414)
- uri action plugin now skipped during check mode (not supported) instead of even trying to execute the module, which already skipped, this does not really change the result, but returns much faster.
- vars - handle exception while combining VarsWithSources and dict (https://github.com/ansible/ansible/issues/81659).
- wait_for should not handle 'non mmapable files' again.
- winrm - Better handle send input failures when communicating with hosts under load
- winrm - Do not raise another exception during cleanup when a task is timed out - https://github.com/ansible/ansible/issues/81095
- winrm - does not hang when attempting to get process output when stdin write failed

View File

@ -1,2 +1,678 @@
ancestor: 2.15.0
releases: {}
ancestor: 2.16.0
releases:
2.17.0b1:
changes:
breaking_changes:
- assert - Nested templating may result in an inability for the conditional
to be evaluated. See the porting guide for more information.
bugfixes:
- All core lookups now use set_option(s) even when doing their own custom parsing.
This ensures that the options are always the proper type.
- Allow for searching handler subdir for included task via include_role (https://github.com/ansible/ansible/issues/81722)
- AnsibleModule.atomic_move - fix preserving extended ACLs of the destination
when it exists (https://github.com/ansible/ansible/issues/72929).
- Cache host_group_vars after instantiating it once and limit the amount of
repetitive work it needs to do every time it runs.
- Call PluginLoader.all() once for vars plugins, and load vars plugins that
run automatically or are enabled specifically by name subsequently.
- Consolidate systemd detection logic into one place (https://github.com/ansible/ansible/issues/80975).
- Consolidated the list of internal static vars, centralized them as constant
and completed from some missing entries.
- Do not print undefined error message twice (https://github.com/ansible/ansible/issues/78703).
- Enable file cache for vaulted files during vars lookup to fix a strong performance
penalty in huge and complex playbboks.
- Fix NEVRA parsing of package names that include digit(s) in them (https://github.com/ansible/ansible/issues/76463,
https://github.com/ansible/ansible/issues/81018)
- Fix ``force_handlers`` not working with ``any_errors_fatal`` (https://github.com/ansible/ansible/issues/36308)
- Fix ``run_once`` being incorrectly interpreted on handlers (https://github.com/ansible/ansible/issues/81666)
- 'Fix an issue when setting a plugin name from an unsafe source resulted in
``ValueError: unmarshallable object`` (https://github.com/ansible/ansible/issues/82708)'
- Fix check for missing _sub_plugin attribute in older connection plugins (https://github.com/ansible/ansible/pull/82954)
- Fix condition for unquoting configuration strings from ini files (https://github.com/ansible/ansible/issues/82387).
- Fix for when ``any_errors_fatal`` was ignored if error occurred in a block
with always (https://github.com/ansible/ansible/issues/31543)
- Fix handling missing urls in ansible.module_utils.urls.fetch_file for Python
3.
- Fix issue where an ``include_tasks`` handler in a role was not able to locate
a file in ``tasks/`` when ``tasks_from`` was used as a role entry point and
``main.yml`` was not present (https://github.com/ansible/ansible/issues/82241)
- Fix issues when tasks withing nested blocks wouldn't run when ``force_handlers``
is set (https://github.com/ansible/ansible/issues/81533)
- Fix loading vars_plugins in roles (https://github.com/ansible/ansible/issues/82239).
- 'Fix notifying role handlers by listen keyword topics with the "role_name
: " prefix (https://github.com/ansible/ansible/issues/82849).'
- Fix setting proper locale for git executable when running on non english systems,
ensuring git output can always be parsed.
- Fix tasks in always section not being executed for nested blocks with ``any_errors_fatal``
(https://github.com/ansible/ansible/issues/73246)
- Fixes permission for cache json file from 600 to 644 (https://github.com/ansible/ansible/issues/82683).
- Give the tombstone error for ``include`` pre-fork like other tombstoned action/module
plugins.
- Harden python templates for respawn and ansiballz around str literal quoting
- Include the task location when a module or action plugin is deprecated (https://github.com/ansible/ansible/issues/82450).
- Interpreter discovery - Add ``Amzn`` to ``OS_FAMILY_MAP`` for correct family
fallback for interpreter discovery (https://github.com/ansible/ansible/issues/80882).
- Mirror the behavior of dnf on the command line when handling NEVRAs with omitted
epoch (https://github.com/ansible/ansible/issues/71808)
- 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)
- Provide additional information about the alternative plugin in the deprecation
message (https://github.com/ansible/ansible/issues/80561).
- Remove the galaxy_info field ``platforms`` from the role templates (https://github.com/ansible/ansible/issues/82453).
- Restoring the ability of filters/tests can have same file base name but different
tests/filters defined inside.
- Reword the error message when the module fails to parse parameters in JSON
format (https://github.com/ansible/ansible/issues/81188).
- Reword warning if the reserved keyword _ansible_ used as a module parameter
(https://github.com/ansible/ansible/issues/82514).
- Run all handlers with the same ``listen`` topic, even when notified from another
handler (https://github.com/ansible/ansible/issues/82363).
- Slight optimization to hostvars (instantiate template only once per host,
vs per call to var).
- Stopped misleadingly advertising ``async`` mode support in the ``reboot``
module (https://github.com/ansible/ansible/issues/71517).
- '``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.module_utils.service`` - ensure binary data transmission in ``daemonize()``'
- '``any_errors_fatal`` should fail all hosts and rescue all of them when a
``rescue`` section is specified (https://github.com/ansible/ansible/issues/80981)'
- '``include_role`` - properly execute ``v2_playbook_on_include`` and ``v2_runner_on_failed``
callbacks as well as increase ``ok`` and ``failed`` stats in the play recap,
when appropriate (https://github.com/ansible/ansible/issues/77336)'
- allow_duplicates - fix evaluating if the current role allows duplicates instead
of using the initial value from the duplicate's cached role.
- ansible-config init will now dedupe ini entries from plugins.
- ansible-galaxy - Deprecate use of the Galaxy v2 API (https://github.com/ansible/ansible/issues/81781)
- ansible-galaxy - Provide a better error message when using a requirements
file with an invalid format - https://github.com/ansible/ansible/issues/81901
- ansible-galaxy - Resolve issue with the dataclass used for galaxy.yml manifest
caused by using future annotations
- ansible-galaxy - ensure path to ansible collection when installing or downloading
doesn't have a backslash (https://github.com/ansible/ansible/pull/79705).
- 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.
- ansible-galaxy role import - exit with 1 when the import fails (https://github.com/ansible/ansible/issues/82175).
- ansible-galaxy role install - fix installing roles from Galaxy that have version
``None`` (https://github.com/ansible/ansible/issues/81832).
- ansible-galaxy role install - fix symlinks (https://github.com/ansible/ansible/issues/82702,
https://github.com/ansible/ansible/issues/81965).
- 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).
- ansible-inventory - index available_hosts for major performance boost when
dumping large inventories
- ansible-pull now will expand relative paths for the ``-d|--directory`` option
is now expanded before use.
- ansible-pull will now correctly handle become and connection password file
options for ansible-playbook.
- ansible-test - Add a ``pylint`` plugin to work around a known issue on Python
3.12.
- ansible-test - Explicitly supply ``ControlPath=none`` when setting up port
forwarding over SSH to address the scenario where the local ssh configuration
uses ``ControlPath`` for all hosts, and would prevent ports to be forwarded
after the initial connection to the host.
- ansible-test - Fix parsing of cgroup entries which contain a ``:`` in the
path (https://github.com/ansible/ansible/issues/81977).
- ansible-test - Include missing ``pylint`` requirements for Python 3.10.
- ansible-test - Properly detect docker host when using ``ssh://`` protocol
for connecting to the docker daemon.
- ansible-test - The ``libexpat`` package is automatically upgraded during remote
bootstrapping to maintain compatibility with newer Python packages.
- ansible-test - The ``validate-modules`` sanity test no longer attempts to
process files with unrecognized extensions as Python (resolves https://github.com/ansible/ansible/issues/82604).
- ansible-test - Update ``pylint`` to version 3.0.1.
- ansible-test ansible-doc sanity test - do not remove underscores from plugin
names in collections before calling ``ansible-doc`` (https://github.com/ansible/ansible/pull/82574).
- ansible-test validate-modules sanity test - do not treat leading underscores
for plugin names in collections as an attempted deprecation (https://github.com/ansible/ansible/pull/82575).
- "ansible-test \u2014 Python 3.8\u20133.12 will use ``coverage`` v7.3.2."
- ansible.builtin.apt - calling clean = true does not properly clean certain
cache files such as /var/cache/apt/pkgcache.bin and /var/cache/apt/pkgcache.bin
(https://github.com/ansible/ansible/issues/82611)
- ansible.builtin.uri - the module was ignoring the ``force`` parameter and
always requesting a cached copy (via the ``If-Modified-Since`` header) when
downloading to an existing local file. Disable caching when ``force`` is ``true``,
as documented (https://github.com/ansible/ansible/issues/82166).
- apt - honor install_recommends and dpkg_options while installing python3-apt
library (https://github.com/ansible/ansible/issues/40608).
- apt - install recommended packages when installing package via deb file (https://github.com/ansible/ansible/issues/29726).
- apt_repository - do not modify repo files if the file is a symlink (https://github.com/ansible/ansible/issues/49809).
- apt_repository - update PPA URL to point to https URL (https://github.com/ansible/ansible/issues/82463).
- assemble - fixed missing parameter 'content' in _get_diff_data API (https://github.com/ansible/ansible/issues/82359).
- 'async - Fix bug that stopped running async task in ``--check`` when ``check_mode:
False`` was set as a task attribute - https://github.com/ansible/ansible/issues/82811'
- blockinfile - when ``create=true`` is used with a filename without path, the
module crashed (https://github.com/ansible/ansible/pull/81638).
- check if there are attributes to set before attempting to set them (https://github.com/ansible/ansible/issues/76727)
- copy action now also generates temprary files as hidden ('.' prefixed) to
avoid accidental pickup by running services that glob by extension.
- copy action now ensures that tempfiles use the same suffix as destination,
to allow for ``validate`` to work with utilities that check extensions.
- deb822_repository - handle idempotency if the order of parameters is changed
(https://github.com/ansible/ansible/issues/82454).
- debconf - allow user to specify a list for value when vtype is multiselect
(https://github.com/ansible/ansible/issues/81345).
- delegate_to when set to an empty or undefined variable will now give a proper
error.
- distribution.py - Recognize ALP-Dolomite as part of the SUSE OS family in
Ansible, fixing its previous misidentification (https://github.com/ansible/ansible/pull/82496).
- distro - bump bundled distro version from 1.6.0 to 1.8.0 (https://github.com/ansible/ansible/issues/81713).
- dnf - fix an issue when cached RPMs were left in the cache directory even
when the keepcache setting was unset (https://github.com/ansible/ansible/issues/81954)
- dnf - fix an issue when installing a package by specifying a file it provides
could result in installing a different package providing the same file than
the package already installed resulting in resolution failure (https://github.com/ansible/ansible/issues/82461)
- dnf - properly set gpg check options on enabled repositories according to
the ``disable_gpg_check`` option (https://github.com/ansible/ansible/issues/80110)
- dnf - properly skip unavailable packages when ``skip_broken`` is enabled (https://github.com/ansible/ansible/issues/80590)
- dnf - the ``nobest`` option only overrides the distribution default when explicitly
used, and is used for all supported operations (https://github.com/ansible/ansible/issues/82616)
- dnf5 - respect ``allow_downgrade`` when installing packages directly from
rpm files
- dnf5 - the ``nobest`` option only overrides the distribution default when
used
- dwim functions for lookups should be better at detectging role context even
in abscense of tasks/main.
- expect - fix argument spec error using timeout=null (https://github.com/ansible/ansible/issues/80982).
- fact gathering on linux now handles thread count by using rounding vs dropping
decimals, it should give slightly more accurate numbers.
- facts - detect VMware ESXi 8.0 virtualization by product name VMware20,1
- fetch - Do not calculate the file size for Windows fetch targets to improve
performance.
- fetch - add error message when using ``dest`` with a trailing slash that becomes
a local directory - https://github.com/ansible/ansible/issues/82878
- find - do not fail on Permission errors (https://github.com/ansible/ansible/issues/82027).
- first_found lookup now always returns a full (absolute) and normalized path
- first_found lookup now always takes into account k=v options
- flush_handlers - properly handle a handler failure in a nested block when
``force_handlers`` is set (http://github.com/ansible/ansible/issues/81532)
- galaxy - skip verification for unwanted Python compiled bytecode files (https://github.com/ansible/ansible/issues/81628).
- handle exception raised while validating with elements='int' and value is
not within choices (https://github.com/ansible/ansible/issues/82776).
- include_tasks - include `ansible_loop_var` and `ansible_index_var` in a loop
(https://github.com/ansible/ansible/issues/82655).
- include_vars - fix calculating ``depth`` relative to the root and ensure all
files are included (https://github.com/ansible/ansible/issues/80987).
- interpreter_discovery - handle AnsibleError exception raised while interpreter
discovery (https://github.com/ansible/ansible/issues/78264).
- iptables - add option choices 'src,src' and 'dst,dst' in match_set_flags (https://github.com/ansible/ansible/issues/81281).
- iptables - set jump to DSCP when set_dscp_mark or set_dscp_mark_class is set
(https://github.com/ansible/ansible/issues/77077).
- known_hosts - Fix issue with `@cert-authority` entries in known_hosts incorrectly
being removed.
- 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').
- moved assemble, raw, copy, fetch, reboot, script and wait_for_connection to
query task instead of play_context ensuring they get the lastest and most
correct data.
- reboot action now handles connections with 'timeout' vs only 'connection_timeout'
settings.
- role params now have higher precedence than host facts again, matching documentation,
this had unintentionally changed in 2.15.
- roles, code cleanup and performance optimization of dependencies, now cached, and
``public`` setting is now determined once, at role instantiation.
- roles, the ``static`` property is now correctly set, this will fix issues
with ``public`` and ``DEFAULT_PRIVATE_ROLE_VARS`` controls on exporting vars.
- set_option method for plugins to update config now properly passes through
type casting and validation.
- ssh - add tests for the SSH connection plugin.
- support url-encoded credentials in URLs like http://x%40:%40@example.com (https://github.com/ansible/ansible/pull/82552)
- syslog - Handle ValueError exception raised when sending Null Characters to
syslog with Python 3.12.
- systemd_services - update documentation regarding required_one_of and required_by
parameters (https://github.com/ansible/ansible/issues/82914).
- template - Fix error when templating an unsafe string which corresponds to
an invalid type in Python (https://github.com/ansible/ansible/issues/82600).
- template action will also inherit the behavior from copy (as it uses it internally).
- templating - ensure syntax errors originating from a template being compiled
into Python code object result in a failure (https://github.com/ansible/ansible/issues/82606)
- unarchive - add support for 8 character permission strings for zip archives
(https://github.com/ansible/ansible/pull/81705).
- unarchive - force unarchive if symlink target changes (https://github.com/ansible/ansible/issues/30420).
- unarchive modules now uses zipinfo options without relying on implementation
defaults, making it more compatible with all OS/distributions.
- 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``
- unsafe data - Enable directly using ``AnsibleUnsafeText`` with Python ``pathlib``
(https://github.com/ansible/ansible/issues/82414)
- uri action plugin now skipped during check mode (not supported) instead of
even trying to execute the module, which already skipped, this does not really
change the result, but returns much faster.
- vars - handle exception while combining VarsWithSources and dict (https://github.com/ansible/ansible/issues/81659).
- wait_for should not handle 'non mmapable files' again.
- winrm - Better handle send input failures when communicating with hosts under
load
- winrm - Do not raise another exception during cleanup when a task is timed
out - https://github.com/ansible/ansible/issues/81095
- winrm - does not hang when attempting to get process output when stdin write
failed
deprecated_features:
- Old style vars plugins which use the entrypoints `get_host_vars` or `get_group_vars`
are deprecated. The plugin should be updated to inherit from `BaseVarsPlugin`
and define a `get_vars` method as the entrypoint.
- The 'required' parameter in 'ansible.module_utils.common.process.get_bin_path'
API is deprecated (https://github.com/ansible/ansible/issues/82464).
- '``module_utils`` - importing the following convenience helpers from ``ansible.module_utils.basic``
has been deprecated: ``get_exception``, ``literal_eval``, ``_literal_eval``,
``datetime``, ``signal``, ``types``, ``chain``, ``repeat``, ``PY2``, ``PY3``,
``b``, ``binary_type``, ``integer_types``, ``iteritems``, ``string_types``,
``test_type``, ``map`` and ``shlex_quote``.'
- ansible-doc - role entrypoint attributes are deprecated and eventually will
no longer be shown in ansible-doc from ansible-core 2.20 on (https://github.com/ansible/ansible/issues/82639,
https://github.com/ansible/ansible/pull/82678).
- paramiko connection plugin, configuration items in the global scope are being
deprecated and will be removed in favor or the existing same options in the
plugin itself. Users should not need to change anything (how to configure
them are the same) but plugin authors using the global constants should move
to using the plugin's get_option().
major_changes:
- urls.py - Removed support for Python 2
minor_changes:
- Add ``dump`` and ``passno`` mount information to facts component (https://github.com/ansible/ansible/issues/80478)
- Added MIRACLE LINUX 9.2 in RedHat OS Family.
- Interpreter Discovery - Remove hardcoded references to specific python interpreters
to use for certain distro versions, and modify logic for python3 to become
the default.
- Use Python's built-in ``functools.update_wrapper`` instead an inline copy
from Python 3.7.
- User can now set ansible.log to record higher verbosity than what is specified
for display via new configuration item LOG_VERBOSITY.
- '``DEFAULT_PRIVATE_ROLE_VARS`` is now overridden by explicit setting of ``public``
for ``include_roles`` and ``import_roles``.'
- '``ansible-galaxy role|collection init`` - accept ``--extra-vars`` to supplement/override
the variables ``ansible-galaxy`` injects for templating ``.j2`` files in the
skeleton.'
- '``import_role`` action now also gets a ``public`` option that controls variable
exports, default depending on ``DEFAULT_PRIVATE_ROLE_VARS`` (if using defaults
equates to ``public=True``).'
- added configuration item ``TARGET_LOG_INFO`` that allows the user/author to
add an information string to the log output on targets.
- ansible-doc - treat double newlines in documentation strings as paragraph
breaks. This is useful to create multi-paragraph notes in module/plugin documentation
(https://github.com/ansible/ansible/pull/82465).
- ansible-doc output has been revamped to make it more visually pleasing when
going to a terminal, also more concise, use -v to show extra information.
- ansible-galaxy - Started normalizing build directory with a trailing separator
when building collections, internally. (https://github.com/ansible/ansible/pull/81619).
- ansible-galaxy dependency resolution messages have changed the unexplained
'virtual' collection for the specific type ('scm', 'dir', etc) that is more
user friendly
- ansible-test - Add Alpine 3.19 container.
- ansible-test - Add Alpine 3.19 to remotes.
- ansible-test - Add Fedora 39 container.
- ansible-test - Add Fedora 39 remote.
- 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``.
- ansible-test - Add support for RHEL 9.3 remotes.
- ansible-test - Added a macOS 14.3 remote VM.
- ansible-test - Bump the ``nios-test-container`` from version 2.0.0 to version
3.0.0.
- ansible-test - Containers and remotes managed by ansible-test will have their
Python ``EXTERNALLY-MANAGED`` marker (PEP668) removed. This provides backwards
compatibility for existing tests running in newer environments which mark
their Python as externally managed. A future version of ansible-test may change
this behavior, requiring tests to be adapted to such environments.
- ansible-test - Make Python 3.12 the default version used in the ``base`` and
``default`` containers.
- ansible-test - Remove Alpine 3(.18) container.
- ansible-test - Remove Alpine 3.18 from remotes.
- ansible-test - Remove Fedora 38 remote support.
- ansible-test - Remove Fedora 38 test container.
- ansible-test - Remove rhel/9.2 test remote
- ansible-test - Remove the FreeBSD 13.2 remote.
- ansible-test - Removed fallback to ``virtualenv`` when ``-m venv`` is non-functional.
- 'ansible-test - Removed test remotes: macos/13.2'
- ansible-test - Removed the ``no-basestring`` sanity test. The test is no longer
necessary now that Python 3 is required.
- ansible-test - Removed the ``no-dict-iteritems``, ``no-dict-iterkeys`` and
``no-dict-itervalues`` sanity tests. The tests are no longer necessary since
Python 3 is required.
- ansible-test - Removed the ``no-main-display`` sanity test. The unwanted pattern
is unlikely to occur, since the test has existed since Ansible 2.8.
- ansible-test - Removed the ``no-unicode-literals`` sanity test. The test is
unnecessary now that Python 3 is required and the ``unicode_literals`` feature
has no effect.
- ansible-test - Special handling for installation of ``cryptography`` has been
removed, as it is no longer necessary.
- ansible-test - The ``shellcheck`` sanity test no longer disables the ``SC2164``
check. In most cases, seeing this error means the script is missing ``set
-e``.
- ansible-test - The ``unidiomatic-typecheck`` rule has been enabled in the
``pylint`` sanity test.
- ansible-test - The ``unidiomatic-typecheck`` rule has been removed from the
``validate-modules`` sanity test.
- ansible-test - Update the base and default containers to use Ubuntu 22.04
for the base image. This also updates PowerShell to version 7.4.0 with .NET
8.0.0 and ShellCheck to version 0.8.0.
- ansible-test - Updated the CloudStack test container to version 1.7.0.
- ansible-test - Updated the distro test containers to version 6.3.0 to include
coverage 7.3.2 for Python 3.8+. The alpine3 container is now based on 3.18
instead of 3.17 and includes Python 3.11 instead of Python 3.10.
- ansible-test - Updated the distro test containers to version 7.1.0.
- ansible-test - When ansible-test installs requirements, it now instructs pip
to allow installs on externally managed environments as defined by PEP 668.
This only occurs in ephemeral environments managed by ansible-test, such as
containers, or when the `--requirements` option is used.
- ansible-test - When invoking ``sleep`` in containers during container setup,
the ``env`` command is used to avoid invoking the shell builtin, if present.
- ansible-test - document block name now included in error message for YAML
parsing errors (https://github.com/ansible/ansible/issues/82353).
- ansible-test - sanity test allows ``EXAMPLES`` to be multi-document YAML (https://github.com/ansible/ansible/issues/82353).
- ansible-test now has FreeBSD 13.3 and 14.0 support
- ansible.builtin.user - Remove user not found warning (https://github.com/ansible/ansible/issues/80267)
- apt_repository.py - use api.launchpad.net endpoint instead of launchpad.net/api
- async tasks can now also support check mode at the same time.
- async_status now supports check mode.
- constructed inventory plugin - Adding a note that only group_vars of explicit
groups are loaded (https://github.com/ansible/ansible/pull/82580).
- csvfile - add a keycol parameter to specify in which column to search.
- dnf - add the ``best`` option
- dnf5 - add the ``best`` option
- filter plugin - Add the count and mandatory_count parameters in the regex_replace
filter
- find - add a encoding parameter to specify which encoding of the files to
be searched.
- git module - gpg_allowlist name was added in 2.17 and we will eventually deprecate
the gpg_whitelist alias.
- import_role - allow subdirectories with ``_from`` options for parity with
``include_role`` (https://github.com/ansible/ansible/issues/82584).
- module argument spec - Allow module authors to include arbitrary additional
context in the argument spec, by making use of a new top level key called
``context``. This key should be a dict type. This allows for users to customize
what they place in the argument spec, without having to ignore sanity tests
that validate the schema.
- modules - Add the ability for an action plugin to call ``self._execute_module(*,
ignore_unknown_opts=True)`` to execute a module with options that may not
be supported for the version being called. This tells the module basic wrapper
to ignore validating the options provided match the arg spec.
- package action now has a configuration that overrides the detected package
manager, it is still overridden itself by the use option.
- py3compat - Remove ``ansible.utils.py3compat`` as it is no longer necessary
- removed the unused argument ``create_new_password`` from ``CLI.build_vault_ids``
(https://github.com/ansible/ansible/pull/82066).
- urls - Add support for TLS 1.3 post handshake certificate authentication -
https://github.com/ansible/ansible/issues/81782
- urls - reduce complexity of ``Request.open``
- user - accept yescrypt hash as user password
- validate-modules tests now correctly handles ``choices`` in dictionary format.
release_summary: '| Release Date: 2024-04-08
| `Porting Guide <https://docs.ansible.com/ansible-core/2.17/porting_guides/porting_guide_core_2.17.html>`__
'
removed_features:
- Remove deprecated APIs from ansible-docs (https://github.com/ansible/ansible/issues/81716).
- Remove deprecated JINJA2_NATIVE_WARNING environment variable (https://github.com/ansible/ansible/issues/81714)
- Remove deprecated ``scp_if_ssh`` from ssh connection plugin (https://github.com/ansible/ansible/issues/81715).
- Remove deprecated crypt support from ansible.utils.encrypt (https://github.com/ansible/ansible/issues/81717)
- With the removal of Python 2 support, the yum module and yum action plugin
are removed and redirected to ``dnf``.
security_fixes:
- ANSIBLE_NO_LOG - Address issue where ANSIBLE_NO_LOG was ignored (CVE-2024-0690)
- ansible-galaxy - Prevent roles from using symlinks to overwrite files outside
of the installation directory (CVE-2023-5115)
- templating - Address issues where internal templating can cause unsafe variables
to lose their unsafe designation (CVE-2023-5764)
codename: Gallows Pole
fragments:
- 2.17.0b1_summary.yaml
- 49809_apt_repository.yml
- 76727-chattr-fix-for-backups-of-symlinks.yml
- 77077_iptables.yml
- 77336-include_role-callbacks-stats.yml
- 78703_undefined.yml
- 79705-fix-ensure-path-to-collection-argument-doesnt-have-backslash.yml
- 79945-host_group_vars-improvements.yml
- 80110-repos-gpgcheck.yml
- 80267-ansible_builtin_user-remove-user-not-found-warning.yml
- 80478-extend-mount-info.yml
- 80561.yml
- 80590-dnf-skip_broken-unavailable-pkgs.yml
- 80882-Amazon-os-family-compat.yaml
- 80975-systemd-detect.yml
- 80995-include-all-var-files.yml
- 81053-templated-tags-inheritance.yml
- 81188_better_error.yml
- 81532-fix-nested-flush_handlers.yml
- 81584-daemonize-follow-up-fixes.yml
- 81606-ansible-galaxy-collection-pre-releases.yml
- 81628_galaxy_verify.yml
- 81638-blockinfile.yml
- 81659_varswithsources.yml
- 81666-handlers-run_once.yml
- 81699-zip-permission.yml
- 81713-distro.yml
- 81714-remove-deprecated-jinja2_native_warning.yml
- 81716-ansible-doc.yml
- 81717-remove-deprecated-crypt-support.yml
- 81722-handler-subdir-include_tasks.yml
- 81732-cloudstack-test-container-1.7.0.yml
- 81775-add-regex_replace-parameters.yml
- 81901-galaxy-requirements-format.yml
- 81931-locale-related-parsing-error-git.yml
- 81954-dnf-keepcache.yml
- 81978-launchpad-api-endpoint.yml
- 81995-enable_file_cache.yml
- 82027_find.yml
- 82066.yml
- 82175-fix-ansible-galaxy-role-import-rc.yml
- 82187-uri-handle-force.yml
- 82241-handler-include-tasks-from.yml
- 82353-ansible-sanity-examples.yml
- 82359_assemble_diff.yml
- 82363-multiple-handlers-with-recursive-notification.yml
- 82377-git-gpg-whitelist-allowlist.yml
- 82387-unquote-strings-from-ini-files.yml
- 82455-new-vmware-productname.yml
- 82461-dnf-provides.yml
- 82465-ansible-doc-paragraphs.yml
- 82496-add-alp-dolomite-suse-family.yaml
- 82574-ansible-test-ansible-doc-underscore.yml
- 82575-ansible-test-validate-modules-underscore.yml
- 82580_constructed.yml
- 82606-template-python-syntax-error.yml
- 82611_fix_alignment_apt_clean_with_ansible_apt_clean.yml
- 82616-dnf-best-nobest.yml
- 82655-fix-ansible-loop-index-var-in-includedtasks.yml
- 82675-fix-unsafe-templating-leading-to-type-error.yml
- 82678-role-entrypoint-attributes.yml
- 82683-ansible-fact_cache-permissions-changed-after-ansible-coreupdate.yml
- 82708-unsafe-plugin-name-error.yml
- 82878-fetch-dest-is-dir.yml
- 82954-fix-older-connection-plugins.yml
- a-g-install-version-None.yml
- ansible-galaxy-init-extra-vars.yml
- ansible-galaxy-role-install-symlink.yml
- ansible-test-added-fedora-39.yml
- ansible-test-added-macos-14.3.yml
- ansible-test-alpine-libexpat.yml
- ansible-test-cgroup-split.yml
- ansible-test-container-sleep.yml
- ansible-test-coverage-update.yml
- ansible-test-cryptography.yml
- ansible-test-default-containers.yml
- ansible-test-distro-containers.yml
- ansible-test-docker-forwards.yml
- ansible-test-externally-managed-python.yml
- ansible-test-nios-container.yml
- ansible-test-pep-668.yml
- ansible-test-pylint-update.yml
- ansible-test-pytest-8.yml
- ansible-test-python-3.12-compat.yml
- ansible-test-python-default.yml
- ansible-test-remove-freebsd-13.2.yml
- ansible-test-remove-rhel-9_2-remote.yml
- ansible-test-rhel-9.3.yml
- ansible-test-rmv-fedora-38.yml
- ansible-test-sanity-no-basestring.yml
- ansible-test-sanity-no-dict.yml
- ansible-test-sanity-no-main-display.yml
- ansible-test-sanity-unicode-literals.yml
- ansible-test-shellcheck-exclude.yml
- ansible-test-unidiomatic-type-check.yml
- ansible-test-validate-modules-non-python.yml
- ansible-test-venv.yml
- ansible_test_alpine_3.19.yml
- ansible_test_fbsd_add.yml
- ansible_test_rmv_alpine_318.yml
- ansible_test_rmv_macos_132.yml
- any_errors_fatal-fixes.yml
- apt_install.yml
- apt_recommends.yml
- argument-spec-context.yml
- async-task-check-mode.yml
- async_status_check_mode.yml
- atomic-move-fix-extended-attrs.yml
- check_arguments.yml
- clear-distro-interp-map.yml
- config_set_option_fix.yml
- config_validate_updates.yml
- copy_keep_suffix_temp.yml
- csvfile-keycol.yml
- cve-2023-5115.yml
- cve-2023-5764.yml
- cve-2024-0690.yml
- deb822_repo_idem.yml
- debconf_multiselect.yml
- dedupe_config_init.yml
- delegate_to_invalid.yml
- deprecate-v2-galaxy-api.yml
- distlib-dataclass-annotation.yml
- dnf-installed-checks-api.yml
- dnf5-from-rpm-allow_downgrade.yml
- dwim_is_role_fix.yml
- find-encoding.yml
- first_found_fixes.yml
- fix-allow-duplicates.yml
- fix-ansible-galaxy-info-no-role-found.yml
- fix-build-files-manifest-walk.yml
- fix-default-ansible-galaxy-role-import-name.yml
- fix-dnf-install-missing-url.yml
- fix-expect-indefinite-timeout.yml
- fix-import_role-_from-options.yml
- fix-reboot-plugin.yml
- fix-role-name-handler-prefix-listen.yml
- fix-runtime-metadata-modules-action_plugin.yml
- fix-vars-plugins-in-roles.yml
- functools-update-wrapper.yml
- galaxy_dep_res_msgs.yml
- get_bin_path_required_parameter.yml
- import_role_goes_public.yml
- improve-tombstone-error.yml
- internal_static_vars.yml
- interpreter_discovery.yml
- inv_available_hosts_to_frozenset.yml
- iptables_match_set_flag.yml
- j2_load_fix.yml
- known_hosts_cert-authority_keys.yml
- log_id.yml
- log_verbosity.yml
- lookups_updated.yml
- miracle_linux_distribution_support.yml
- mod_args.yml
- module-ignore-unknown-options.yml
- module_utils-basic-deprecations.yml
- no_log_booly.yml
- paramiko_globals.yml
- pc_fixes.yml
- pkg_mgr_peek.yml
- ppa_https.yml
- prettydoc.yml
- pull_file_secrets.yml
- pull_unfrack_dest.yml
- py-tmpl-hardening.yml
- reboot_timeout_fix.yml
- request-open-reduce-complexity.yml
- restore_role_param_precedence.yml
- rm-compat-environ.yml
- rm-obsolete-url-role-template.yml
- role_fixes.yml
- scp_if_ssh.yml
- ssh_connection_test.yml
- syslog_exception.yml
- systemd_service_note.yml
- thread_counts.yml
- unarchive.yml
- unarchive_fix.yml
- unsafe-fixes-2.yml
- unsafe-intern.yml
- uri_action_cmode.yml
- url_credentials_decode.yml
- urls-no-py2.yml
- urls-tls13-post-handshake-auth.yml
- user-accept-yescrypt-hash.yml
- v2.17.0-initial-commit.yaml
- wait_for_mmap.yml
- winrm-send-input.yml
- winrm-task-timeout.yml
- winrm-timeout.yml
- yum-removal.yml
release_date: '2024-04-08'
2.17.0rc1:
changes:
bugfixes:
- Fix handlers not being executed in lockstep using the linear strategy in some
cases (https://github.com/ansible/ansible/issues/82307)
- ansible-config will now properly template defaults before dumping them.
- ansible_managed restored it's 'templatability' by ensuring the possible injection
routes are cut off earlier in the process.
- dnf5 - replace removed API calls
- facts - add a generic detection for VMware in product name.
release_summary: '| Release Date: 2024-04-29
| `Porting Guide <https://docs.ansible.com/ansible-core/2.17/porting_guides/porting_guide_core_2.17.html>`__
'
removed_features:
- Removed Python 2.7 and Python 3.6 as a supported remote version. Python 3.7+
is now required for target execution.
codename: Gallows Pole
fragments:
- 2.17.0rc1_summary.yaml
- 82307-handlers-lockstep-linear-fix.yml
- ansible_managed_restore.yml
- config_init_fix.yml
- dnf5-api-breaks.yml
- python-support.yml
- vmware_facts.yml
release_date: '2024-04-29'
2.17.0rc2:
changes:
bugfixes:
- Add a version ceiling constraint for pypsrp to avoid potential breaking changes
in the 1.0.0 release.
- ansible-doc - fixed "inicates" typo in output
- ansible-doc - format top-level descriptions with multiple paragraphs as multiple
paragraphs, instead of concatenating them (https://github.com/ansible/ansible/pull/83155).
- ensure we have logger before we log when we have increased verbosity.
- uri - update the documentation for follow_redirects.
release_summary: '| Release Date: 2024-05-13
| `Porting Guide <https://docs.ansible.com/ansible-core/2.17/porting_guides/porting_guide_core_2.17.html>`__
'
codename: Gallows Pole
fragments:
- 2.17.0rc2_summary.yaml
- 83155-ansible-doc-paragraphs.yml
- ansible-doc-inicate.yml
- fix_log_verbosity.yml
- psrp-version-req.yml
- uri_follow_redirect_bool.yml
release_date: '2024-05-13'

View File

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

View File

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

View File

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

View File

@ -1,2 +0,0 @@
minor_changes:
- tasks - the ``retries`` keyword can be specified without ``until`` in which case the task is retried until it succeeds but at most ``retries`` times (https://github.com/ansible/ansible/issues/20802)

View File

@ -1,3 +0,0 @@
minor_changes:
- CLI argument parsing - Automatically prepend to the help of CLI arguments that support being specified multiple times.
(https://github.com/ansible/ansible/issues/22396)

View File

@ -1,2 +0,0 @@
bugfixes:
- fetch - Handle unreachable errors properly (https://github.com/ansible/ansible/issues/27816)

View File

@ -0,0 +1,3 @@
---
bugfixes:
- apt_repository - do not modify repo files if the file is a symlink (https://github.com/ansible/ansible/issues/49809).

View File

@ -1,4 +0,0 @@
---
minor_changes:
- "ansible-vault create: Now raises an error when opening the editor without
tty. The flag --skip-tty-check restores previous behaviour."

View File

@ -1,2 +0,0 @@
bugfixes:
- user - set expiration value correctly when unable to retrieve the current value from the system (https://github.com/ansible/ansible/issues/71916)

View File

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

View File

@ -1,3 +0,0 @@
bugfixes:
- win_fetch - Add support for using file with wildcards in file name.
(https://github.com/ansible/ansible/issues/73128)

View File

@ -1,3 +0,0 @@
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 +0,0 @@
---
bugfixes:
- >-
Fixed `pip` module failure in case of usage quotes for
`virtualenv_command` option for the venv command.
(https://github.com/ansible/ansible/issues/76372)

View File

@ -0,0 +1,2 @@
bugfixes:
- check if there are attributes to set before attempting to set them (https://github.com/ansible/ansible/issues/76727)

View File

@ -0,0 +1,3 @@
---
bugfixes:
- iptables - set jump to DSCP when set_dscp_mark or set_dscp_mark_class is set (https://github.com/ansible/ansible/issues/77077).

View File

@ -0,0 +1,2 @@
bugfixes:
- "``include_role`` - properly execute ``v2_playbook_on_include`` and ``v2_runner_on_failed`` callbacks as well as increase ``ok`` and ``failed`` stats in the play recap, when appropriate (https://github.com/ansible/ansible/issues/77336)"

View File

@ -1,6 +0,0 @@
---
minor_changes:
- >-
Add ``GALAXY_COLLECTIONS_PATH_WARNING`` option to disable the warning
given by ``ansible-galaxy collection install`` when installing a collection
to a path that isn't in the configured collection paths.

View File

@ -0,0 +1,3 @@
---
bugfixes:
- Do not print undefined error message twice (https://github.com/ansible/ansible/issues/78703).

View File

@ -1,6 +0,0 @@
---
bugfixes:
- template - Fix for formatting issues when a template path contains
valid jinja/strftime pattern (especially line break one) and
using the template path in ansible_managed
(https://github.com/ansible/ansible/pull/79129)

View File

@ -1,2 +0,0 @@
bugfixes:
- replace - handle exception when bad escape character is provided in replace (https://github.com/ansible/ansible/issues/79364).

View File

@ -1,2 +0,0 @@
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-galaxy - ensure path to ansible collection when installing or downloading doesn't have a backslash (https://github.com/ansible/ansible/pull/79705).

View File

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

@ -1,2 +0,0 @@
bugfixes:
- setup gather_timeout - Fix timeout in get_mounts_facts for linux.

View File

@ -0,0 +1,5 @@
bugfixes:
- Cache host_group_vars after instantiating it once and limit the amount of repetitive work it needs to do every time it runs.
- Call PluginLoader.all() once for vars plugins, and load vars plugins that run automatically or are enabled specifically by name subsequently.
deprecated_features:
- Old style vars plugins which use the entrypoints `get_host_vars` or `get_group_vars` are deprecated. The plugin should be updated to inherit from `BaseVarsPlugin` and define a `get_vars` method as the entrypoint.

View File

@ -1,2 +0,0 @@
minor_changes:
- 'ansible_user_module - tweaked macos user defaults to reflect expected defaults (https://github.com/ansible/ansible/issues/44316)'

View File

@ -1,5 +0,0 @@
bugfixes:
- ansiballz - Prevent issue where the time on the control host could
change part way through building the ansiballz file, potentially causing
a pre-1980 date to be used during ansiballz unpacking leading to a zip
file error (https://github.com/ansible/ansible/issues/80089)

View File

@ -0,0 +1,2 @@
bugfixes:
- dnf - properly set gpg check options on enabled repositories according to the ``disable_gpg_check`` option (https://github.com/ansible/ansible/issues/80110)

View File

@ -1,3 +0,0 @@
bugfixes:
- file modules - Make symbolic modes with X use the computed permission, not original file (https://github.com/ansible/ansible/issues/80128)
- copy unit tests - Fixing "dir all perms" documentation and formatting for easier reading.

View File

@ -1,2 +0,0 @@
bugfixes:
- iptables - remove default rule creation when creating iptables chain to be more similar to the command line utility (https://github.com/ansible/ansible/issues/80256).

View File

@ -1,4 +0,0 @@
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 @@
minor_changes:
- ansible.builtin.user - Remove user not found warning (https://github.com/ansible/ansible/issues/80267)

View File

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

View File

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

@ -1,2 +0,0 @@
bugfixes:
- file modules - fix validating invalid symbolic modes.

View File

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

View File

@ -1,3 +0,0 @@
---
minor_changes:
- include_vars - os.walk now follows symbolic links when traversing directories (https://github.com/ansible/ansible/pull/80460)

View File

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

View File

@ -0,0 +1,2 @@
minor_changes:
- "Add ``dump`` and ``passno`` mount information to facts component (https://github.com/ansible/ansible/issues/80478)"

View File

@ -1,3 +0,0 @@
bugfixes:
- pip module - Update module to prefer use of the python ``packaging`` and ``importlib.metadata`` modules due to ``pkg_resources`` being deprecated
(https://github.com/ansible/ansible/issues/80488)

View File

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

@ -1,2 +0,0 @@
bugfixes:
- The ``hostname`` module now also updates both current and permanent hostname on OpenBSD. Before it only updated the permanent hostname (https://github.com/ansible/ansible/issues/80520).

View File

@ -1,2 +0,0 @@
minor_changes:
- cli - Added short option '-J' for asking for vault password (https://github.com/ansible/ansible/issues/80523).

View File

@ -0,0 +1,3 @@
---
bugfixes:
- Provide additional information about the alternative plugin in the deprecation message (https://github.com/ansible/ansible/issues/80561).

View File

@ -0,0 +1,2 @@
bugfixes:
- dnf - properly skip unavailable packages when ``skip_broken`` is enabled (https://github.com/ansible/ansible/issues/80590)

View File

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

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

@ -1,2 +0,0 @@
minor_changes:
- ansible-galaxy - Remove internal configuration argument ``v3`` (https://github.com/ansible/ansible/pull/80721)

View File

@ -1,2 +0,0 @@
bugfixes:
- unarchive - fix unarchiving sources that are copied to the remote node using a relative temporory directory path (https://github.com/ansible/ansible/issues/80710).

View File

@ -1,4 +0,0 @@
minor_changes:
- Add Python type hints to the Display class (https://github.com/ansible/ansible/issues/80841)
bugfixes:
- vars_prompt - internally convert the ``unsafe`` value to ``bool``

View File

@ -1,4 +0,0 @@
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,2 @@
bugfixes:
- Interpreter discovery - Add ``Amzn`` to ``OS_FAMILY_MAP`` for correct family fallback for interpreter discovery (https://github.com/ansible/ansible/issues/80882).

View File

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

View File

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

View File

@ -1,2 +0,0 @@
bugfixes:
- Fix ``ast`` deprecation warnings for ``Str`` and ``value.s`` when using Python 3.12.

View File

@ -0,0 +1,3 @@
---
bugfixes:
- Consolidate systemd detection logic into one place (https://github.com/ansible/ansible/issues/80975).

View File

@ -1,2 +0,0 @@
bugfixes:
- distribution facts - fix Source Mage family mapping

View File

@ -0,0 +1,2 @@
bugfixes:
- include_vars - fix calculating ``depth`` relative to the root and ensure all files are included (https://github.com/ansible/ansible/issues/80987).

View File

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

View File

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

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

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

View File

@ -1,5 +0,0 @@
---
minor_changes:
- Use ``importlib.resources.abc.TraversableResources`` instead of deprecated
``importlib.abc.TraversableResources`` where available
(https:/github.com/ansible/ansible/pull/81082).

View File

@ -1,2 +0,0 @@
minor_changes:
- blockinfile - add append_newline and prepend_newline options (https://github.com/ansible/ansible/issues/80835).

View File

@ -1,2 +0,0 @@
bugfixes:
- Inventory scripts parser not treat exception when getting hostsvar (https://github.com/ansible/ansible/issues/81103)

View File

@ -0,0 +1,3 @@
---
bugfixes:
- Reword the error message when the module fails to parse parameters in JSON format (https://github.com/ansible/ansible/issues/81188).

View File

@ -1,2 +0,0 @@
bugfixes:
- pkg_mgr.py - Fix `ansible_pkg_mgr` is unknown in Kylin Linux (https://github.com/ansible/ansible/issues/81332)

View File

@ -1,4 +0,0 @@
bugfixes:
- "ansible-console - fix filtering by collection names when a collection search path was set (https://github.com/ansible/ansible/pull/81450)."
minor_changes:
- "ansible-doc - allow to filter listing of collections and metadata dump by more than one collection (https://github.com/ansible/ansible/pull/81450)."

View File

@ -1,2 +0,0 @@
bugfixes:
- Import ``FILE_ATTRIBUTES`` from ``ansible.module_utils.common.file`` in ``ansible.module_utils.basic`` instead of defining it twice.

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

@ -1,5 +0,0 @@
minor_changes:
- ansible-galaxy - used to crash out with a "Errno 20 Not a directory" error when extracting files from a role when hitting a file with an illegal name (https://github.com/ansible/ansible/pull/81553). Now it gives a warning identifying the culprit file and the rule violation (e.g., ``my$class.jar`` has a ``$`` in the name) before crashing out, giving the user a chance to remove the invalid file and try again. (https://github.com/ansible/ansible/pull/81555).
known_issues:
- ansible-galaxy - dies in the middle of installing a role when that role contains Java inner classes (files with $ in the file name). This is by design, to exclude temporary or backup files. (https://github.com/ansible/ansible/pull/81553).

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

@ -1,2 +0,0 @@
bugfixes:
- lib/ansible/utils/encrypt.py - remove unused private ``_LOCK`` (https://github.com/ansible/ansible/issues/81613)

View File

@ -0,0 +1,3 @@
---
bugfixes:
- galaxy - skip verification for unwanted Python compiled bytecode files (https://github.com/ansible/ansible/issues/81628).

View File

@ -0,0 +1,2 @@
bugfixes:
- "blockinfile - when ``create=true`` is used with a filename without path, the module crashed (https://github.com/ansible/ansible/pull/81638)."

View File

@ -1,2 +0,0 @@
bugfixes:
- Replace uses of ``configparser.ConfigParser.readfp()`` which was removed in Python 3.12 with ``configparser.ConfigParser.read_file()`` (https://github.com/ansible/ansible/issues/81656)

View File

@ -0,0 +1,3 @@
---
bugfixes:
- vars - handle exception while combining VarsWithSources and dict (https://github.com/ansible/ansible/issues/81659).

View File

@ -1,2 +0,0 @@
bugfixes:
- "blockinfile - avoid crash with Python 3 if creating the directory fails when ``create=true`` (https://github.com/ansible/ansible/pull/81662)."

View File

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

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