Compare commits

...

784 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
a1a6550daf inventory_ini: Handle SyntaxWarning in ini parsing (#81707)
* handle SyntaxWarning ini inventory parsing

Fixes: #81328

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-18 10:50:50 -04:00
2793dfa594 reboot: show last error message in verbose log (#81578)
* The last error message is now presented in a verbose log

Fixes: #81574

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-15 17:50:26 +00:00
81c83c623c Add an example for cleaning up the async job cache, and clarify how that works (#81697) 2023-09-15 05:11:28 +10:00
6f65397871 galaxy: check if the target for symlink exists (#81586)
* Symlinks in the collection might be pointing to non-existent
  targets. Check and report the failure to the user.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-12 16:05:51 -07:00
7f0baabbe0 blockinfile: avoid crash on Python 3 when creating directory fails (#81662)
* Avoid crash on Python 3.

* Add a test for the crash on Python 3
2023-09-12 15:46:44 -04:00
3b608f97b1 sanity: update requirements (#81680)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-12 11:33:08 -04:00
e4468dc944 copy: print correct dest path when content + diff is used (#81678)
* when --diff is used with content parameter, print destination
  path instead of temporary file path.

Fixes: #79749

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-12 11:32:41 -04:00
243197f2d4 env-setup.fish: Correct syntax errors (#81677)
- Single quote regular expression values to avoid shell expansion
- Properly test if the $QUIET variable is set and non-zero
2023-09-12 11:31:19 -04:00
67cdaa49f8 ansible-galaxy-collection - fix config permissions for galaxy-importer (#81679)
* Fix permissions for the galaxy-importer config, previously only root had
read/write

* fix ownership instead
2023-09-12 08:43:46 -05:00
7d3d4572ed Fix set filters to use set operations (#81639)
* Fix set filters to use set operations

* Fix integration tests

* Update filter documentation
2023-09-11 09:32:32 -07:00
b1b029c6b5 ansible-doc: allow to filter by more than one collection (#81450)
Make collection filters more flexible for listing collections.
Co-authored-by: Maxwell G <maxwell@gtmx.me>
2023-09-11 09:31:52 -04:00
8034651cd2 Only mark a role as complete once a task in it executes for the target host (#81565)
* If all tasks in the role are skipped or unreachable, the role is not marked as complete for the host.

* Only mark the role as complete if a task in the role succeeds or fails for the host.
2023-09-08 12:11:48 -04:00
3eb96f2c68 Lazy load Templar for [changed,failed]_when (#81650)
The `handler_templar` in `StrategyBase._process_pending_results` was
used for templating handler names which is no longer the case. Now it is
only used for templating `changed_when`/`failed_when`. To prevent
re-creating templars each time results are processed, just create it
on-demand when whens are processed.
2023-09-08 10:06:58 +02:00
cd0aa35c19 encrypt: deprecate passlib_or_crypt (#81571)
* deprecate passlib_or_crypt in favor of do_encrypt

Fixes: #55839
2023-09-07 14:44:26 -07:00
6177888cf6 ansible-vault: Check if the destination is writable (#81660)
* Before performing shredding the original file, check if the
  destination file location is writable or not. This will
  prevent corruption of original file.

Fixes: #81455

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-07 15:30:05 -04:00
a861b1adba Replace ConfigParser.readfp() with read_file() (#81657)
* Replace ConfigParser.readfp() with read_file()

readfp was removed in Python 3.12.

Fixes #81656

* py2?

* Use PY3 for the python check
2023-09-07 15:24:50 -04:00
a65c331e8e Corrected a typo In options list (#81655)
There was a typo in the word "container", it was spelled "contianer"
2023-09-07 15:23:46 -04:00
45f4fc8389 Update user.py (#81653)
The phrase `Does nothing when used with other platforms.` sometimes appears before the supported platforms. Combine this phrase with the supported platform line.
2023-09-07 15:23:26 -04:00
dedc48bda4 Improve ansible-pull documentation (#81646)
* Improve ansible-pull documentation

* chnaged description from local/remote to target
2023-09-07 15:13:23 -04:00
3ec0850df9 Support packaging and importlib.metadata for pip module (#80881) 2023-09-05 16:11:18 -05:00
dd79c49a4d fix various Jinja plugin caching issues (#79781)
* fix various Jinja plugin caching issues

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

* intra-template loader bypass

* fix early exits swallowing some exception detail

* misc comment cleanup
2023-09-05 13:32:36 -07:00
4d40988876 Add type hints to ansible.utils.display::Display (#81400)
* Add type hints to ansible.utils.display::Display

Fixes #80841

* Avoid circular import

* Fix sanity

* type hint some of the functions of the module?

* Fix units

* Not sure about this

* Fix some of the issues from reviews

* Add changelog

* ...

* Update lib/ansible/utils/display.py

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

* remove py2 boilerplate

---------

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2023-09-05 12:08:13 -07:00
48d8e067bf changed link ‘Risks of becoming an unprivileged user’ (#81623)
* changes made in become linkœ

* change become link

* Update lib/ansible/plugins/action/__init__.py

---------

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2023-09-05 17:45:57 +02:00
24aac50369 utils/encrypt.py: remove unused private _LOCK (#81614)
Added in #15299, unused since #30160.

Fixes #81613
2023-09-05 17:02:56 +02:00
786a8abee6 yum/dnf/dnf5/zypper documentation - fix grammatical error (#81601) 2023-08-31 15:14:27 -04:00
0f20540e96 Docs: Clarify copy module's purpose; tweak wording (#81592) 2023-08-31 15:03:10 -04:00
1cc5efa77b tarfile: Handle deprecation warning for extract and extractall (#81545)
* Python 3.11.4 introduces a new parameter 'filter' in extract and
extractall in tarfile. Handle deprecation warning message emitted
in Python 3.12.
* added probing mechanism in ansible-galaxy code to detect broken
data filter implementation in tarfile.

Fixes: #80832

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2023-08-31 12:02:48 -07:00
5a059b81c8 ansible-test - Fix Python coverage stub generation (#81611)
As of coverage 7.1.0, files without arcs are not generated.

To work around this, an empty (0, 0) arc is used for each file instead.

This is a follow-up to https://github.com/ansible/ansible/pull/81077

ci_coverage
ci_complete
2023-08-31 10:53:10 -07:00
ae69b280ad Add short option for --ask-vault-pass (#80527)
Fixes: #80523
2023-08-31 09:43:26 -07:00
e1e0e2709c ansible-test - Enable thread code coverage (#81604)
ci_complete
ci_coverage
2023-08-30 14:39:47 -07:00
261e5ce381 ansible-test - Update mypy to 1.5.1 (#81602) 2023-08-30 10:39:25 -07:00
c59bcbe627 Bump coverage.py to v7.3.0 in ansible-test (#81077) 2023-08-30 08:58:45 -07:00
65a96daaf4 Fix typos in url lookup plugin options (#81587) 2023-08-29 16:27:09 -05:00
509be19357 Fix nested jinja statements in integration tests (#81591) 2023-08-29 14:33:19 -05:00
5dc3a2ee6d mode is a module option. (#81590) 2023-08-29 18:42:43 +01:00
aeec51ac54 Improve ansible.builtin.copy directory_mode parameter docs (#81127)
* Improve ansible.builtin.copy directory_mode parameter docs
2023-08-29 11:23:41 +01:00
bdaa091b33 Add warnings for illegal file names in role (#81555)
Co-authored-by: Aleksey Tsalolikhin <atsaloli.tech@gmail.com>
2023-08-28 14:54:08 -04:00
4ab5ecbe81 dnf - fix for a package from URI and update_only (#81568)
Fixes #81376
2023-08-28 10:48:45 +02:00
da63f32d59 script: add argument validation (#81469)
partially fixes: #81349

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-25 10:27:26 -07:00
37cb44ec37 find: correct typo (#81512) 2023-08-25 10:22:43 -07:00
7865b198d2 PowerShell - Improve error checking (#80984)
Improves the error checking when running PowerShell modules using
Ansible.ModuleUtils.Legacy. It will only return an rc of 1 if both the
PowerShell module runner signalled an error occurred and those error
records were present in the output. This should reduce some false
positive errors when using the older module style.
2023-08-25 05:24:02 +10:00
f3976117fb PowerShell - remove uneeded dotnet code for future compatibility (#81472) 2023-08-25 05:23:48 +10:00
116948cd14 user - set current expiration correctly when no shadow entry exists (#75194) 2023-08-23 11:18:57 -07:00
2e6d849bdb apt: ignore fail_on_autoremove and allow_downgrade when using aptitude (#81445)
* apt: ignore fail_on_autoremove and allow_downgrade when using aptitude

* fail_on_autoremove (--no-remove) and allow_downgrade (--allow-downgrades)
  parameters are only valid for apt-get and not for aptitude. Ignore them when
  aptitude is detected and used.

Fixes: #77868
2023-08-23 08:42:03 -07:00
5deb4ee991 Remove duplicate FILE_ATTRIBUTES definition (#81494)
* Remove duplicated definition of the FILE_ATTRIBUTES constant in basic.py by importing it from the new location.
2023-08-23 09:34:29 -04:00
194f829b0f Fix pause CPU consumption (#81519)
* Sleep for the DEFAULT_INTERNAL_POLL_INTERVAL between polling for user input

Fixes #81516
2023-08-22 15:03:22 -04:00
3e9d374fda fix typo in example human_to_bytes filter (#81559) 2023-08-22 11:25:51 -04:00
aa8a29a9d4 group: remove extraneous warning (#81557)
* remove extraneous warning shown when group does not exist

Fixes: #77049

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-22 11:23:10 -04:00
4a96b3d5b4 path_join: update docs and examples for absolute path (#81544)
Document path_join behavior -
    If a path component is an absolute path, then all previous components
    are ignored and joining continues from the absolute path.

Fixes: #81446

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-22 11:12:21 -04:00
863e2571db debconf: idempotency for password question (#81484)
* Gather value of password using debconf-get-selections command,
  use this information for idempotency.

Fixes: #47676

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-21 18:25:03 -07:00
6627ba9ace Unit test cleanup (#81556)
* Fix cleanup_tmp_file unit tests

* Simplify the problematic wcwidth chars unit test
2023-08-21 15:54:03 -07:00
f28e32c063 ansible-test - Limit deprecated check to core (#81552)
Using `# deprecated:` comment checks in collections would effectively limit those collections to a single version of ansible-core.
2023-08-21 12:58:09 -07:00
c69c83c962 Fix macos defaults (#79999) 2023-08-21 10:02:47 -07:00
390e508d27 ansible-test - Always use managed entry points (#81537) 2023-08-17 19:13:29 -07:00
a48feb4cfc "retries" without "until": retry until success (#81531)
Fixes #20802
2023-08-17 15:17:26 -04:00
98f1627817 include_role: expose vars from parent roles to role's handlers (#81524)
* include_role: expose vars from parent roles to role's handlers

Fixes #80459
2023-08-17 15:14:20 -04:00
a2673cb564 Pre-calculate date early and use it for all zipfile writes (#81521)
* Pre-calculate date early and use it for all zipfile writes

Fixes #80089
Closes #80578
2023-08-17 15:08:53 -04:00
9afaf2216b Remove obsolete text from release.py PR template (#81526) 2023-08-16 10:52:20 -07:00
470f41b275 Deprecate STRING_CONVERSION_ACTION (#78860) 2023-08-16 08:44:35 -07:00
ca08261f08 Add ability to filter find on mode (#81485) 2023-08-15 11:58:19 -05:00
a2d9c4d62f docs: Update examples in systemd_service to use the new name (#81518) 2023-08-15 15:45:31 +00:00
0cba3b7504 Last handler with same name wins for listen too (#81358)
Fixes #49371
Fixes #81013
2023-08-15 15:03:56 +02:00
bd3ffbe109 fix incorrect ansible_managed formatting (#79129)
Ansible breaks configs if file name could be parsed as jinja template
or contains `%` chars.
Especially `%n`[ame%] which is a line break pattern according to [strftime (3)](https://manpages.debian.org/bullseye/manpages-dev/strftime.3.en.html)
2023-08-14 09:59:40 -04:00
01469c558c sanity: Document pep8 known issue with Python 3.12 (#81495)
The ``pep8`` sanity test may detect issues with f-strings on
Python 3.12, such as E201/E202, that are not detected under earlier
Python versions.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2023-08-11 13:23:16 -07:00
6347da9696 Document return values of template module (#75980)
* Document return values of template module

Add documentation for some return values of template module. 

I have not tested this extensively, so it's possible that under special
circumstances this might not be entirely accurate, but briefly looking
at the code as far as I can tell they are correct.

Co-authored-by: mprasil <mprasil@mpT15p>
2023-08-11 14:04:23 -04:00
47ab59753c Clean up release script (#81488)
* Enable mypy for the entire packaging directory

* Return CompletedProcess only when capturing output

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

* Relax return type on ensure_venv

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

* Fix type hint on suppress_when

* Fix callable annotation

* Add type hint for command_parser

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

* Avoid unnecessary TypeVar usage
2023-08-10 13:39:37 -07:00
5dbcf47e02 Add documentation for systemd reload (#81473)
* Add documentation for systemd reload
2023-08-10 15:04:23 -04:00
b4943e45d0 Update cliconf-> __init__.py -> get_capabilities() (#79097)
Doc string was incorrect. 
The `get_capabilities` method returns a Python Dict data structure not a JSON string as stated.
2023-08-10 10:54:15 -07:00
d0699cb44a Add unit tests for module_utils.compat.datetime (#81483) 2023-08-09 12:24:10 -07:00
580b87252c Remove unreachable code in password lookup test (#81482) 2023-08-09 12:23:58 -07:00
726d9a5fcc Fix constructed inventory plugin unit test (#81481) 2023-08-09 12:23:47 -07:00
553f51e728 Revert logic to use Popen.communicate (#80874)
* Back out use of communicate, add better comments, add bufsize, and align with subprocess._communicate

* tests

* re-order logic slightly

* more comments

* loopty loop

* yet another comment

* Revert "yet another comment"

This reverts commit 96cd8ada5fa0441b92f2298bdaa6cb40594847d2.

* Revert "loopty loop"

This reverts commit 96ea066f6a7d18902c04a14f18dd79b38e56f5e7.

* ci_complete

* Copy in comment too

* Wording updates

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

* Back out bufsize

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2023-08-09 11:09:43 -07:00
85d3305889 Fix f-string whitespace in release script (#81477) 2023-08-09 09:35:38 -07:00
1c765a6afc restore conditional lookup nerfing (#81460)
* a recent optimization lost the unsafe lookup disable behavior when templating conditionals with inline templates that referred to untrusted values
* added regression test to catch this case
2023-08-09 09:25:20 -07:00
fa5fe8a7db Bump test container versions to latest (#81471)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-08 19:53:04 -07:00
493c678795 Sanity: Bump version to match Python 3.12 (#81399)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-08 09:05:46 -07:00
f3a15a4a95 filters vault/unvault fix vault_id parameter usage (#81422)
* vault/unvault filters, fixed id field to match documented.

fixes #81420

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-04 17:50:57 -04:00
a1569ea4ca iptables chain creation does not populate with a rule (#80257)
* iptables chain creation does not populate with a rule

fixes #80256

* Add changelog fragment

* Add rules and flush chain during integration tests

* Check chain rule on comment

* Update test/integration/targets/iptables/tasks/chain_management.yml
2023-08-04 13:59:21 -04:00
f10d11bcdc dpkg_selections: Check if package exists before selection operation (#81406)
* dpkg_selections: Check if the package exists before the selection operation

Fixes: #81404

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-03 14:01:20 -07:00
95fdd555b3 galaxy: Cross check the collection type (#81423)
* User-provided collection type might differ from collection
  source. Cross-check the type before proceeding

Fixes: #79463

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-03 13:59:59 -07:00
f894ce89b4 Overhaul package-data sanity test (#81427)
The sanity test now only inspects the sdist and wheel instead of trying to install the sdist using setup.py.
2023-08-03 13:24:25 -07:00
c07652f42e yum_repository: deprecate keepcache parameter (#81426)
* keepcache parameter can not be set in repository file
  instead it goes in yum.conf or dnf.conf

Fixes: #78693 

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-03 12:33:43 -07:00
cc01a73ef0 service action: improve documenation about service and service (#81405)
* service action: improve documenation about service and service

moudule used as backup and cli that confuses everyone

* Update service.py

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2023-08-03 19:17:07 +00:00
ab9a48d4b1 Fix comment about authorization (#81401)
Move all information about supported platforms to the same bullet point.
2023-08-03 12:06:27 -07:00
f5431321a2 password_hash - fix bcrypt algorithm when passlib is not installed (#81385) 2023-08-03 14:32:42 -04:00
dbb3feddaf Update update-sanity-requirements.py script (#81424)
Frozen requirements can now preserve any explicitly installed package that would normally be omitted, not just setuptools.
2023-08-03 10:58:19 -07:00
2ebeb43d6f ansible-galaxy - improve ignoring multiple signature status codes (#77610)
* ansible-galaxy - improve ignoring multiple signature status codes when using --ignore-signature-status-code

* fix backwards compatibility by adding a new plural option instead, and hide the singular from --help
2023-08-03 13:00:07 +00:00
76aa0bdbd6 Update bot link in the GH templates (#81390)
Also remove "Component Name" section from the PR template as components
are automatically detected by the bot from the list of changed files.
2023-08-03 09:20:32 +02:00
c525514994 ansible-test - Update source layout detection (#81418) 2023-08-02 20:24:13 -07:00
0c03a6bcf6 Add changelog fragment for docs/examples removal (#81410) 2023-08-02 12:27:10 -07:00
d1cd06073f Extend setup_collections timeout to 3 minutes (#81408) 2023-08-02 10:43:21 -07:00
b9daa6891f Remove unused sanity test code (#81398) 2023-08-01 14:08:01 -07:00
11e261b54f CI: remove FreeBSD 12.4 from test matrix (#81315)
Fixes: #80417

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-01 13:37:26 -07:00
691c8e8603 Omit pre-built man pages from sdist (#81395)
Since man pages aren't accessible to users after a `pip install`, there's no need to include them in the sdist.
This change makes it trivial to build man pages from source, which makes them much easier to iterate on.
It also simplifies creation and testing of the sdist, since it no longer requires building man pages.

The new `packaging/cli-doc/build.py` script can generate both man pages and RST documentation.
This supports inclusion on the docs site without a dependency on `ansible-core` internals.
Having a single implementation for both simplifies keeping the two formats in sync.
2023-08-01 12:48:01 -07:00
6d1f85bbe9 ansible-test: remove alpine 3.17 (#81124) 2023-08-01 11:54:33 -07:00
0b9d83ccdb fixed become page link in PE error message (#81391) 2023-08-01 11:35:06 -04:00
b8db05f13e Update reboot module to include message option (#81374) 2023-08-01 11:24:45 -04:00
2e4a501549 add type hints for DataLoader methods (#81359)
* add type hints for DataLoader methods

* fix list of tuples

* remove mention of pre-2.4 vault method

* Add None return type

Use | instead of typing.Optional or typing.Union
2023-08-01 11:20:20 -04:00
081c60b9d3 Include subcommands in generated man pages (#81378)
Sub commands of `ansible-galaxy role` and `ansible-galaxy collection` are now documented.
2023-07-31 13:04:17 -07:00
32b388b4ca Fix missing command descriptions in manpages/docs (#81366) 2023-07-28 18:01:11 -07:00
f9d674fcfd Fix command doc lookup in man page generation (#81365) 2023-07-28 16:24:04 -07:00
fead654671 Exclude internal options from man pages and docs (#81360) 2023-07-28 14:58:18 -07:00
6db006a5fa fix networking path (#81295)
* now uses class property instead of only relying on network_os variable

---------

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2023-07-27 10:59:55 -04:00
010e542a13 Fix blockinfile code comment (#81351) 2023-07-26 18:19:04 -04:00
d5d1c27bf3 Add option to blockinfile to wrap inserted block with blank lines (#81083)
* Add new blockinfile options 'prepend_newline' and 'append_newline' to wrap inserted block with blank lines
2023-07-26 17:38:07 -04:00
4c41562270 remove deprecated datetime.datetime methods (#81323)
* Remove datetime.datetime.utcfromtimestamp and datetime.datetime.uctnow
  from controller code since they are deprecated in Python 3.12.

* Update target side code to use new utcfromtimestamp and utcnow utils in ansible.module_utils.compat.datetime that return aware datetime objects on Python 2.7 and 3.

Co-authored-by: Matt Clay <matt@mystile.com>
2023-07-26 17:26:33 -04:00
923ede4f72 pep8: fix sanity for 3.12 (#81348)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-26 14:17:08 -07:00
a5ccc0124f Fix ansible_pkg_mgr is unknown in Kylin Linux (#81314)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2023-07-25 14:45:30 -07:00
6a8c51bb9c fix redis cache setup (#81329)
* use https repo
* increase default download timeout of 10s for slow/lagged connections
2023-07-25 13:09:40 -07:00
2a19c80b89 Refactor test cases to improve unit test quality (#81334) 2023-07-25 11:35:57 -07:00
cd13812e32 Fix ansible_pkg_mgr incorrect in TencentOS Server Linux (#81336)
Signed-off-by: denisecheng <denisecheng@tencent.com>
Co-authored-by: denisecheng <denisecheng@tencent.com>
2023-07-25 17:18:18 +02:00
c8bc393871 Raise the minimum setuptools version to 66.1.0 (#81341)
* Raise the minimum setuptools version to 66.1.0

This is the first version to support Python 3.12.

While Python 3.10 and 3.11 could use an older version, a consistent minimum is easier to work with and test against.

* Fix PEP 517 integration test
2023-07-24 16:02:05 -07:00
5167618e46 Update ansible-test containers to test Python 3.12 with the test venvs (#81330) 2023-07-21 20:15:07 -07:00
48dfe8e215 add Python 3.12 support to ansible-test (#80834)
* update docker containers versions to use newer ansible-test ref in the pre-built venvs

* Allow invoking ansible-test with Python 3.12

* Add python3.12 to the INTERPRETER_PYTHON_FALLBACK

* changelog

* add Python 3.12 as a non-default Python version for the test containers

* Update mypy ignores for Python 3.12

* Add Python 3.12 to CI matrix for unit tests, generic tests, and galaxy

* Update unit test for using the Python 2 collection loader path with Python 3.

Skip the existing test on Python 3.12, since find_module is removed.

Suppress the pre-existing deprecation warnings using the Python 2
codepath with Python 3.

Add a test for Python >= 3.12, which doesn't call find_module.

* Ignore sanity test errors on systems without libselinux present.
2023-07-21 10:23:14 -07:00
efbc00b6e4 Consider all configured collection paths when installing collections (#81243)
* Only install collections which can't be satisfied by a collection in any of the configured paths.

* Improve warning for unexpected collection install path

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

Normalize the path before validating to fix warning consistency
2023-07-20 18:30:59 -04:00
c5d18c39d8 Update sanity requirements comments (#81321)
Also remove a redundant indirect dependency.

The requirements file updates are being deferred until other changes are required.
2023-07-20 14:31:25 -07:00
99eeaf7da8 ansible-test: cloudstack: bump test container version (#81319) 2023-07-20 14:26:00 -07:00
26d855c87e update ansible-galaxy testserver to use SSLContext.load_cert_chain (#80961)
* update ansible-galaxy testserver to use SSLContext.load_cert_chain for Python 3.12 compatibility
2023-07-20 16:15:13 -04:00
e34807d010 find, stay simple (#81313)
* find, stay simple

* Apply suggestions from code review

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-20 15:02:16 -04:00
d20a0c02cc ansible-test - update module_utils/urls.py unit test to support cryptography >= 41.0.0 (#81296) 2023-07-20 09:47:47 -04:00
79560410bf Update user module documentation to include MacOS password change behavior (#80958) 2023-07-19 17:59:32 -04:00
371b62eab1 Add test for 256-color configuration values (#78613)
* Add test for 256-color configuration values

See #78607.

* color is not restricted to 16 choices

 currently supports up to 256, not listing them all
 TOOD: create examples and point to/list the basic 16

---------

Co-authored-by: Brian Coca <brian.coca+git@gmail.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2023-07-19 15:46:47 -04:00
18cbfc688b Add missing skip entries for selinux module_util (#81305) 2023-07-18 18:27:25 -07:00
e964078a83 ansible-test - Pre-build PyYAML wheels (#81300)
This works around Cython failures when attempting to install PyYAML >= 5.4 <= 6.0.
2023-07-18 18:17:48 -07:00
261a12b8a9 Disable cron integration test on Alpine (#81301)
The tests are now failing due to the lack of `libfaketime` in the Alpine repos.
2023-07-18 17:38:37 -07:00
1e929ada6f filter: fix documentation (#81113)
* Updated urldecode documentation
* Misc typo fixes
* Better formatting
* Corrected some example

Fixes: #81112

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-18 15:14:05 -04:00
528e7859d0 smart connection deprecation version fix (#81262) 2023-07-18 17:19:27 +02:00
894c339df8 Fix stealth exceptions and blocking select() in daemonize() (#81064)
* Fix stealth exceptions and blocking select() in daemonize()

* Add changelog entry
2023-07-17 12:47:57 -04:00
b771e59793 The split filter was added in ansible-core 2.11. (#81275)
I thought it was 'hysterical' ...
2023-07-17 10:00:08 -04:00
9d6179780c Update comment to match correct form parameter (#81270)
Updated `refresh_token` to match value in the form payload from line 63.
2023-07-14 17:39:05 -07:00
765b2bd783 ansible-test - Narrow the scope of some sanity tests (#81273)
* ansible-test - Limit scope of replace-urlopen test

Only ansible-core code and plugins in collections can be expected to rely on module_utils.

* ansible-test - Limit scope of use-compat-six test

Only ansible-core code and plugins in collections can be expected to rely on module_utils.

* ansible-test - Limit scope of no-get-exception test

Only ansible-core code and plugins in collections should be checked for usage of outdated module_utils functions.

* Add integration tests
2023-07-14 17:19:33 -07:00
3f7bf0bcd4 ansible-test - Fix sanity traceback with -e opt (#81271)
Also remove redundant warning about missing programs.

Includes integration tests to verify `-e` does not traceback.
2023-07-14 15:50:14 -07:00
39ef570e16 Remove BOTMETA.yml and sanity tests for it (#81198) 2023-07-14 14:03:52 +02:00
26cb1652bc Add docs and examples to obsolete-files test (#81258) 2023-07-13 16:20:37 -07:00
479928c199 Add missing use case with module purge (#81237)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-13 15:47:06 -07:00
c5e54be5ea apt: Return calculated diff while running apt clean (#81247)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-14 05:27:05 +10:00
c3015c5eb1 replace: handle exception while parsing escape char (#81244)
* replace: handle exception while parsing escape char

* Fail early when bad escape character is provided in replace module

Fixes: #79364

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

* Run tests in Python 3.6 or greater env

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

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-14 05:25:08 +10:00
d373ec572b regex_replace: correct Python function in docs (#81253)
regex_replace calls re.sub()
2023-07-13 10:51:06 -07:00
b6ebb9d41a Replace reboot_command integration test with unit tests (#78956)
Co-authored-by: Matt Clay <matt@mystile.com>
2023-07-13 19:26:21 +02:00
ee12bafe48 deprecate 'smart' connection value (#81218)
Co-authored-by: Jordan Borean <jborean93@gmail.com>
2023-07-13 12:57:26 -04:00
59a791ee3b ansible-test - remove Fedora 37 container and remote support (#81093) 2023-07-13 08:50:15 -04:00
effb494db4 Update wait_for_connection to not reference configure script (#81250) 2023-07-13 17:12:19 +10:00
08307de366 ansible-test - Remove obsolete WinRM setup script (#81249)
The WinRM setup is handled internally by ansible-core-ci now.
2023-07-12 19:52:49 -07:00
8edba0bb72 filter: add documentation for msg parameter (#81110)
* mandatory filter provides `msg` parameter. Document the same.

Fixes: #81105

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-12 16:02:56 -07:00
b93a628aed Omit hacking directory from MANIFEST.in (#81245)
* Omit `hacking` directory from `MANIFEST.in`

* Update package-data sanity test
2023-07-12 14:43:08 -07:00
3e3fb26b35 Use semantic markup for modules. (#81190) 2023-07-12 10:06:32 -04:00
f2ade88334 Fix yaml syntax in csvfile_lookup example (#81221)
Testing this example gives a parse error.
The correct syntax needs a colon for assignment, not equal sign
2023-07-12 09:57:48 -04:00
1ca03139cc Update regex_* docs (#81016)
* Update regex_* docs
* Remove Python 3 regex link
* Added references to inline regex flags

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-11 19:38:36 -07:00
7c6564ad0e Revert "define code owners to support branch-protection rules on docs (#81041)" (#81228)
This reverts commit 9117762358.
2023-07-11 16:27:29 -07:00
2915424541 Update env-setup.fish (#81208)
## Description

This commit includes improvements and optimizations to the script:

- Clarified the purpose of the quiet flag with a comment.
- Adjusted conditions for appending to PYTHONPATH and MANPATH variables.
- Enhanced Python executable check for reliability and cross-platform support.
- Improved comments and function clarity.
- Ensured consistency with the original code.

These changes enhance readability, efficiency, and maintainability of the script.
2023-07-11 16:16:14 -07:00
876be11f8c Add pymarkdown sanity test for core (#81220)
* Clean up markdown

* Add pymarkdown sanity test for core

* Update unit test SHA
2023-07-11 14:40:47 -07:00
72e038e823 Remove docs and examples directories (#81011)
* Remove docs dir

* Updates to reflect docs removal

* Fix integration test

* Remove examples dir

* Updates to reflect examples removal

* Remove build_library and build-ansible.py

* Remove refs to build_library and build-ansible.py

* Remove obsolete template

* Remove obsolete template reference

* Remove the now obsolete rstcheck sanity test
2023-07-11 12:40:06 -07:00
38e50c9f81 Convert non-docs *.rst files to *.md (#81217)
* Rename README.rst to README.md

* Change README format from reStructuredText to Markdown

* Fix whitespace in README.md

* Update setup.cfg to use README.md

* Replace changelog placeholder with README.md

* Update package-data sanity test
2023-07-11 11:42:40 -07:00
dce51f4ff4 Module docs fixes. (#81213) 2023-07-11 12:10:16 -04:00
c7eca0e5c0 first_found lookup, let lookup handle templating errors (#81178)
* first_found lookup, let lookup handle templating errors

Avoids case in which TE was not sending valid and templatable entries to the lookup
The lookup already handles the case TE was attempting to itself, so no need for this code anymore.

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2023-07-11 11:48:33 -04:00
5014a6025e Add space to make linter happy (#81175) 2023-07-11 11:41:27 -04:00
c3f479e378 Add type annotation for connection plugins (#78552)
* Add type annotation for connection plugins

* Use new | syntax instead of Union/Optional

* Fix pep issue

* Use ParamSpec and other minor fixes

* Fix up ParmaSpec args and kwargs type
2023-07-11 11:23:57 +10:00
67b78a17c4 Remove Python 3.9 support for the controller (#80973)
* Remove obsolete Python <=3.9 controller code
* Remove Python 3.9 test controller bootstrapping
* Update test requirements

Co-authored-by: Matt Clay <matt@mystile.com>
2023-07-10 12:01:47 -04:00
73b95db66b fix doc report template (#81202)
* fix doc report template

* Update .github/ISSUE_TEMPLATE/documentation_report.yml

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

---------

Co-authored-by: Sandra McCann <samccann@redhat.com>
2023-07-10 11:56:44 -04:00
faca205ca1 Add multirepo tip to doc issue report (#81140) 2023-07-10 10:40:47 -04:00
7cf15d0732 Use semantic markup for remaining plugins. (#81189)
also change  `ansible_psrp_protocol` for `protocol`  as what matters is the option itself, not what was used to set it
2023-07-10 09:30:33 -04:00
c3af71a2c8 dnf5: utilize automatic gpg check via transaction.run() (#81144)
https://github.com/rpm-software-management/dnf5/pull/607
2023-07-10 15:19:17 +02:00
eb19692f48 Properly disable modularity tests for dnf5 only (#81195) 2023-07-10 10:51:05 +02:00
7b2647f3b2 Re-introduce RHEL 9 modularity testing in CI (#81160) 2023-07-10 09:54:36 +02:00
f4ff6768f3 ansible-test - Remove old pytest-forked constraint (#81185) 2023-07-07 13:10:42 -07:00
3d2ff64264 ansible-test - Fix import sanity test for targets (#81184) 2023-07-06 22:57:10 -07:00
ca3ffbf4c2 ansible-test - remove test remotes: rhel 8.7/9.1 (#81065)
Fixes #80419
Fixes #80420
2023-07-06 11:25:57 -07:00
ad0e082ac0 script inventory plugin, link to dev script howto docs (#80796) 2023-07-06 10:26:06 -04:00
5cf58f9a15 Use semantic markup for docs fragments (#81152) 2023-07-06 09:41:24 -04:00
73dde45f0f ansible-galaxy - add pre-release hint to dependency resolution error (#81147)
* add pre-release hint to dependency resolution error if --pre wasn't provided

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2023-06-30 10:36:12 -04:00
f1ddcb4ae4 Simplify release name tracking and testing (#81151)
Convert the release names list from YAML to plain text, removing the need for YAML parsing in the sanity test.
2023-06-29 10:18:15 -07:00
8c9f5c9106 Remove unused unit test code (#81150) 2023-06-28 16:26:00 -07:00
bcdb82992a user - add parameter for password expiration warning days (#79884)
* user - add parameter to set number of warning days before password expires

Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>
2023-06-28 17:36:35 -04:00
b06f7de24a Remove unused strategy plugin unit tests (#81146) 2023-06-28 12:07:25 -07:00
0cc50e0673 dnf5: enable now implemented cacheonly functionality (#81141)
Note that this also fixes a traceback caused by backwards incompatible
change in dnf5 where cacheonly was changed from bool to string:
https://github.com/rpm-software-management/dnf5/pull/665/files#diff-ab65249ff7fccadfb2864b6826f6559f7f16fad43fd3bf2da0b4fe8db790d59aR179
2023-06-28 16:05:59 +02:00
63946eaed6 Remove unreachable code in curses unit test (#81138) 2023-06-27 23:24:42 -07:00
5f58775a1f More unit test code coverage improvements (#81136) 2023-06-27 17:38:35 -07:00
a5a4903b03 edited the documentation for 'groups' in user.py (#81114)
* edited the documentation for 'groups' in user.py

* Update user.py
2023-06-27 11:03:20 -04:00
2f820381ea Inventory Script Plugin: raise execution error (#81104)
It adds exception treatment when execute a inventory based on script with the --host argument

---------

Co-authored-by: Everson Leal <everson.leal@sonda.com>
2023-06-26 17:29:59 -04:00
ed8a404f4a add coverage for Python 3.12 (#81125) 2023-06-26 10:38:22 -07:00
e780b5e56d ansible-galaxy - add config option for the default ansible-galaxy timeout (#81108)
allow configuring the default server timeout via env/ini
2023-06-26 13:10:41 -04:00
e22fe9be56 ansible-test add alpine 3.18 as remote (#81109)
* add crun to avoid runc
2023-06-26 10:41:31 -04:00
e535eb625b Remove long obsolete hacking/get_library.py (#81122) 2023-06-23 18:42:48 -07:00
5b586096b3 Remove hacking/fix_test_syntax.py (#81121)
This script is no longer needed, since using tests as filters was removed in 2.9.
2023-06-23 18:31:42 -07:00
7e2b25beac Revert "Add a custom policy for hackers using ansible-test (#68535)" (#81120)
This reverts commit bd9e31fcb0.
2023-06-23 17:36:36 -07:00
82b5544b09 Improve code coverage of unit tests (#81119)
- Remove unused code
- Remove unnecessary code
- Ignore coverage for unreachable code
- Use previously unused code to increase coverage
2023-06-23 16:08:54 -07:00
da2cd157f1 Fix arg splitting and key/value parsing (#80030)
* Improve readability of unit test output

This drops the trailing `-expectedXXX` suffixes from test names generated by parametrize.

* Add more splitter unit tests

This fills in code coverage gaps in the exising unit tests.

* Bug fixes and code cleanup

- Fix IndexError exceptions caused by parsing a leading newline, space or escaped space.
- Fix an AttributeError exception in `parse_args` when parsing `None`.
- Fix incorrect parsing of multi-line Jinja2 blocks, which resulted in doubling newlines.
- Remove unreachable exception handlers in the `parse_kv` function.
  The unreachable code was verified through analysis of the code as well as use of the `atheris` fuzzer.
- Remove unnecessary code in the `split_args` function.
- Add an optimization to `split_args` for the empty args case.

* Add unit tests for bug fixes

The splitter code is now fully covered by unit tests.

* Add another issue ref in changelog
2023-06-22 16:19:52 -07:00
98d1cf7aa2 Deprecate plural collections_paths option (#81063)
* Deprecate plural collections_paths option

* Fix test assumption
2023-06-23 04:41:59 +10:00
a7d2a4e032 display, also proxy warnings and deprecations (#81060)
Use generic proxy for display  methods with decorator
2023-06-22 13:57:59 -04:00
38067860e2 template escaping: use configured variable start instead of default one (#81001)
this will handle escaping correctly in tempaltes that override the default jinja variable tokens
also fix optimization for single var path when overrides happen
2023-06-22 11:40:25 -04:00
c3926268e2 ansible-test - Avoid using atexit module (#81096) 2023-06-21 14:41:25 -07:00
1f9836fe9a Fix typo in to_yaml filter examples (#81094) 2023-06-21 10:13:07 -04:00
bd5b0b4293 Avoid deprecated importlib.abc.TraversableResources (#81082)
* Avoid usage of deprecated importlib.abc.TraversableResources

This fixes ansible-compat test failures with Python 3.12.

* Add deprecated: marker for compat code

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

* add declarative deprecation comment to < 3.9 case

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

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2023-06-20 11:54:06 -07:00
c69951daca ansible-test: remove Ubuntu 20.04 LTS (#81070) 2023-06-20 11:25:12 -07:00
bc68ae8b97 ansible-test: Added Fedora 38 (#81074) 2023-06-20 11:24:08 -07:00
56b67cccc5 Resolve issues on python pre-3.10.6 with collection dirs longer than 100 characters (#81061) 2023-06-15 16:15:11 -05:00
6fead15334 Pylint deprecated comment checker (#81071)
Co-authored-by: Matt Clay <matt@mystile.com>
2023-06-15 16:14:52 -05:00
534f688a53 remove Freebsd 13.1 from test matrix (#81058)
* remove Freebsd 13.1 from test matrix

fixes #80416


Co-authored-by: Matt Clay <matt@mystile.com>
2023-06-15 14:59:33 -04:00
cde15f3c81 Add test support for Python 3.11 on RHEL 8.8/9.2 (#80990)
Fixes #80412
Fixes #80413
2023-06-14 18:16:28 -07:00
c1bc445aa7 ansible-test - Update openSUSE containers (#81062)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-06-14 17:54:43 -07:00
ecbbd7e5d1 Remove Python 3.5 support (#80972)
* Remove Python 3.5 support

* changelog

* add requested changes

* Update changelogs/fragments/remove-python3.5.yml

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

* remove Python3 < 3.5 error handling

* remove Python3 < 3.5 error handling in TE too

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2023-06-15 00:05:50 +02:00
660f1726c8 Register handlers immediately if currently iterating handlers (#80898)
This fixes the issue where handlers notifying other handlers are
not properly run because the notification is not registered unless
another flush_handlers occurs. Instead, if the current host state
is iterating handlers we immediately register the handler to be
run so the notification is not lost.

Fixes #80880
2023-06-14 17:39:20 +02:00
73e04ef2d6 Don't mutate templar.environment, only overlay on local myenv (#81005) 2023-06-13 11:37:17 -05:00
cf803d6d58 Improved return docs (#81006)
* Improved the return docs for modules `sysvinit`
  and `systemd_service`

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-06-13 08:23:50 -07:00
f13e35cbf9 dnf5 - enable env groups testing in CI (#81032)
Implemented in https://github.com/rpm-software-management/dnf5/pull/585
2023-06-13 11:20:22 -04:00
440b5fd040 Make sure that values that should be strings are actually strings. (#81029) 2023-06-13 11:19:40 -04:00
ce55e0faf5 Update example in apt_key module (#81017)
* Verify checksum of downloaded key

Fixes: #79892

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-06-13 11:17:42 -04:00
9117762358 define code owners to support branch-protection rules on docs (#81041)
* during interim docs/ (and related dirs) split to separate repo, prevent merges that might require a rebase of the target repo
2023-06-12 11:16:40 -07:00
796d41ff18 Bump azure-pipelines-test-container to v4.0.1 @ CI (#80916)
This patch updates the test container used in CI to the new v4 that
defaults to using Python 3.10 and is based on Ubuntu 22.04 Jammy[[1]].

[1]: https://github.com/ansible/azure-pipelines-test-container/pull/17
2023-06-12 09:23:03 -07:00
42ca0803a1 Bump azure-pipelines-test-container to v4.0.1 @ CI (#80916)
* Bump azure-pipelines-test-container to v4.0.1 @ CI

This patch updates the test container used in CI to the new v4 that
defaults to using Python 3.10 and is based on Ubuntu 22.04 Jammy[[1]].

[1]: https://github.com/ansible/azure-pipelines-test-container/pull/17
2023-06-12 09:22:35 -07:00
cf4d4577ac Remove hacking dir dependency from build backend (#81021)
* Copy man generation files into build backend

* Use copied files in build backend
2023-06-09 16:56:48 -07:00
a473bb798d modules/find: param contains: Describe matching behavior (#80744) 2023-06-09 13:47:01 -04:00
6ac0ea3567 Use *.md instead of *.rst for test READMEs (#81009) 2023-06-08 23:04:32 -07:00
faa6d55ee6 Fix Source Mage family mapping (#80985)
* Fix Source Mage family mapping

* Update docs too

* Add changelog fragment
2023-06-09 14:03:39 +10:00
ff359fa8e1 Reorganize CI sanity test matrix (#81004) 2023-06-08 13:07:54 -07:00
b3f1290bcd Remove docs dir dependency from man page build (#81003) 2023-06-08 12:41:45 -07:00
30a8ef0277 Roadmap: Update 8.1.0 ETA (#80998) 2023-06-08 11:58:49 -04:00
6e137433ae Ansible 9 roadmap (#80851) 2023-06-08 09:08:52 +01:00
519caca70c Update modules_intro.rst (#80588) 2023-06-07 17:05:41 -04:00
ef56284f9d Revert "update intersphinx links for Ansible 8" (#80960)" (#80993)
This reverts commit 7a01fb221a.
2023-06-07 12:46:14 -07:00
6fcbed0f3f Simplify conditional.py (#80584)
* Simplify conditional.py
2023-06-07 12:14:07 -04:00
25b3d3a6f7 Check if skeleton is /dev/null while creating home folder (#75948)
* Check if skeleton is /dev/null while creating home folder

* Add test for linux

Co-authored-by: Holger Dörner <h.doerner@bitexpert.de>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2023-06-07 12:10:21 -04:00
1ecc62ba06 Document lookups using dwim (#80878) 2023-06-07 12:08:52 -04:00
c511a79172 Add simpleinit_msb fact for service_mgr (#80963)
* Add simpleinit_msb fact for service_mgr
2023-06-07 12:07:08 -04:00
fda66eeee0 Sanity Fixes: (#80953)
* Typo fixes
* arguments-renamed
* pep8:E501
* pylint:use-a-generator
* pep8:E231
* use-argspec-type-path

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-06-07 12:06:30 -04:00
090a5cdfcf add 2.16 to the release and maintenance table (#80974) 2023-06-07 11:54:23 -04:00
e801921b98 update backport instructions to use 2.15 examples (#80959) 2023-06-07 11:52:42 -04:00
7a01fb221a update intersphinx links for Ansible 8" (#80960) 2023-06-07 11:52:09 -04:00
9e14a85fe3 Added link to argument_spec (#80967) 2023-06-07 11:51:26 -04:00
9a87ae4406 Add 2.16 roadmap items (#80971) 2023-06-07 09:30:24 -05:00
92d5ffda82 Update galaxy_ng container for tests (#80721) 2023-06-07 09:09:01 -05:00
af84f7a00e Update other_tools_and_programs.rst (#80895) 2023-06-07 13:06:43 +01:00
6e325d9e4d Clean up MANIFEST.in (#80688)
* Remove unnecessary MANIFEST.in commands

This eliminates more setuptools warnings during build.

* Sort MANIFEST.in

Now that only include commands are used, the order of the commands no longer effects the build output.
2023-06-06 14:48:16 -07:00
08a647214f Indicate which args can be provided multiple times. Fixes #22396 (#80970) 2023-06-06 12:29:54 -05:00
d210260afc Correct syntax error in the example (#80976)
* Update success.yml
* Update reachable.yml
* Update unreachable.yml
2023-06-06 10:20:29 -07:00
ef3b806dd3 Fix remote_tmp tests so that they actually use the remote_tmp (#80969)
* Fix remote_tmp tests so that they actually use the remote_tmp

* Isolate remote_tmp dir during remote_tmp tests. Fixes #80965

* Do everything without become
2023-06-06 11:24:53 -04:00
742d47fa15 replace deprecated ast.value.s with ast.value.value (#80968)
* replace deprecated ast.value.s with ast.value.value

the s attribute is deprecated since Python 3.8 and emits a warning in
3.12 causing some test failures
2023-06-06 11:22:26 -04:00
aa67d544fc Handle unreachable errors in fetch properly. Fixes #27816 (#80952) 2023-06-06 11:03:22 -04:00
5e550b6086 Update COLLECTIONS_8.rst (#80962)
ansible-core 2.15.1 is expected on 2023-06-19, adjusting the dates accordingly

Fix mention of Ansible-9 for when minor releases (of ansible-8) will stop
2023-06-05 10:05:08 -04:00
0982d5fa98 Fix TypeError when installing subdir collections. Fixes #80943 (#80949) 2023-06-01 15:58:06 -05:00
c069cf88de Added an example of mixed format argv in command module (#80933)
Fixes: #80126

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-06-02 05:05:45 +10:00
79677c16f1 add mission survey to docs banner (#80931)
Co-authored-by: Don Naro <dnaro@redhat.com>
2023-05-31 11:57:20 -04:00
e91bf2248f Update manager.py (#80926) 2023-05-31 11:04:15 -04:00
939f2741c6 Docs: Update changelog for Ansible 8 (#80886) 2023-05-30 13:46:24 -04:00
124f33b230 Add Ansible community 8.0.0 porting guide (#80927) 2023-05-30 13:29:22 -04:00
9fb03093b3 set latest version to 8 (#80892) 2023-05-30 17:25:32 +01:00
6011b7c4c1 Update split.yml (#80915)
typo in description
2023-05-30 11:18:48 -04:00
d0686f0f77 fix typo in from_yaml_all.yml (#80911)
mulitple -> multiple
2023-05-30 11:14:24 -04:00
3a1d58bc58 ansible-test - Use raise from to handle exceptions (#80905) 2023-05-26 20:25:17 -07:00
43c31c5dc2 Use isinstance in unit tests for type checks (#80906) 2023-05-26 19:25:26 -07:00
585b82838b Improve code coverage of unit tests (#80904)
* Improve coverage of validate-modules unit tests

* Remove unused galaxy unit test code

* Fix galaxy unit test teardown logic

* Improve coverage of galaxy unit test code

* Improve coverage of galaxy unit tests

* Remove unused code in galaxy API tests

* Remove unused galaxy collection unit test code

* Improve coverage of galaxy collection unit tests

* Remove unused galaxy unit test code
2023-05-26 16:54:11 -07:00
a5bb4c7dee ansible-test - local change detection without --fork-point (#79734) 2023-05-26 14:07:20 -07:00
e88ff32b10 deb822_repository: use http-agent with open_url (#80876)
* Use http-agent in open_url API while getting
  cloudflare content

Fixes: #80809

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-25 12:09:53 -07:00
09387eaa24 Update dnf5 module to handle API change for setting the download directory. Fixes #80887 (#80888) 2023-05-25 12:13:38 -04:00
0775e991d5 Documentation tweaks for apt repo key management. Fixes #78063 (#80872) 2023-05-25 10:37:59 -05:00
9f4dfff69b Pylint fixes (#80855)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-24 11:58:42 -07:00
56f2e65ee7 Remove unused test files (#80879)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-24 10:01:40 -07:00
c9f76f6d49 Remove unused import (#80875)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-24 09:02:04 -07:00
09b4cae4fb unarchive - ensure src is an absolute path before picking handler (#80738) 2023-05-24 10:56:37 -05:00
86e7cd57b7 Add Ansible community 8.0.0rc1 porting guide (#80873) 2023-05-23 17:42:08 +01:00
d955fb1590 Removed unused get_md5 parameter from stat (#80871)
* removed unused, undocumented `get_md5` parameter from stat module.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-23 11:52:23 -04:00
8652b231f2 Align yum_repository documentation with arguments (#80867) 2023-05-23 11:44:42 -04:00
0c7361d9ac URI Module find json sub type (#80745)
* uri: fixed search for json types to include strings in the format xxx/yyy+json
2023-05-23 09:38:05 -05:00
47539a19ea Add Ansible community 7.6.0 porting guide (#80868) 2023-05-23 12:09:06 +01:00
652ddc4078 Fix pylint disallowed-name errors (#80854)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-22 11:11:36 -07:00
a551e8db80 eol 2.12 docs (#80850) 2023-05-22 19:08:47 +01:00
61157f6a9e Switch from multiprocessing.Queue to SimpleQueue (#80838) 2023-05-22 10:02:52 -05:00
202195f5e4 Remove unreachable error for removed include_role.static (#80837) 2023-05-22 09:09:47 -05:00
9526338273 validate-modules and docsite build: bump antsibull-docs(-parser) dependencies to new major versions (#80846)
* Bump antsibull-docs-parser version to 1.0.0.

There are no functional changes that affect the functionality used in validate-modules.

* Bump antsibull-docs to 2.0.0.
2023-05-19 16:18:59 -07:00
f4b2d4d4bb Add pipx instructions to install guide (#80833) 2023-05-19 14:51:34 -04:00
10d91db003 [Docs] update node req table for 2.15 (#80823) 2023-05-19 10:22:19 -04:00
4899d4a4d6 simple skip of connection (#80638)
Avoid 'persistent' connection handling if not needed
removed useless connection passing
added property to action classes as indicator/selector
2023-05-19 09:23:27 -04:00
19b85ff415 have docs explain why we import guard (#80569)
Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Don Naro <dnaro@redhat.com>
2023-05-18 16:38:30 -04:00
be02813d25 fix yes/no to true/false in loop documents etc (#80591) 2023-05-18 16:36:42 -04:00
e4194112a0 Update inconsistency playbooks_checkmode (#80692) 2023-05-18 16:28:21 -04:00
c7e3c91294 Missing space in docs (#80779)
* Missing space between $ and ansible command

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-18 16:19:50 -04:00
8db9bd7574 Remove deprecated include (#80752)
* Remove deprecated include

* Add tombstone entry for include

* Use string for date

* Use todays date

* Remove uneeded if statement
2023-05-19 05:49:07 +10:00
2253837453 command - Add option to disable argument var expansion (#80512)
* command - Add option to disable argument var expansion

* Use test char that isn't an escape sequence
2023-05-19 05:36:52 +10:00
dbfb0d3cc4 Fix typo in service_mgr.py (#80824)
faild -> failed
2023-05-18 15:10:23 -04:00
070ce87440 Add test for symbolic to octal when others is omitted (#80822)
* Add test for symbolic to octal when others is omitted

Add case when there should be no permissions for other.
And specific permissions for owner and group.

* Fix permissions test by explicitly setting no permissions for others

* Add additional cases where multiple permissions are specified
2023-05-18 15:09:28 -04:00
0a36cd910e Removed testing support for Server 2012 and 2012 R2 (#80778) 2023-05-18 11:02:58 -07:00
0df794e5a4 urls - remove deprecated client key calls (#80751) 2023-05-17 17:17:25 -05:00
b16041f1a9 ansible-test - Fix traceback when mixing sources (#80801)
* ansible-test - Fix traceback when mixing sources

* ansible-test - Refactor layout error handling
2023-05-17 09:07:04 -07:00
2fd64161c1 Fix hard-coded interpreter in test_async_wrapper (#80816) 2023-05-16 16:55:57 -07:00
e837680f4b Use strings for removal_date in runtime metadata (#80815) 2023-05-16 14:23:46 -07:00
2ba24957dd Use subset checks for some collection loader tests (#80812) 2023-05-16 10:29:46 -07:00
c1f2a9ea6c No core irc meeting (#80811) 2023-05-16 11:03:42 -05:00
bf53a26deb Add Ansible community 8.0.0b1 porting guide (#80807) 2023-05-16 09:14:49 +01:00
1ff5d2bf5c update version switcher for 2.15 (#80556) 2023-05-15 20:09:32 +01:00
0830b69059 config lookup, new option to show origin of value (#80651) 2023-05-11 11:54:41 -04:00
156493eed5 ansible-test - Add RHEL 9.2 support (#80755) 2023-05-11 14:36:36 +02:00
aacab0633a ansible-test - Fix handling of long timeouts (#80769) 2023-05-10 17:08:53 -07:00
4c6aa70662 ansible-test - Fix timeout handling (#80764) 2023-05-10 14:55:57 -07:00
93216e276c [sanity-mypy] Ignore re-import warning (#80763)
* get_origin is already imported warning can be
  ignore safely.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-10 14:43:39 -07:00
fd341265d0 ansible-test - Avoid use of deprecated utcnow (#80750)
The timestamps are only used by ansible-test, not the junit callback, so this change only impacts ansible-test.
2023-05-10 11:26:49 -07:00
905131fc76 junit-xml - Remove outdated type ignore hint (#80748) 2023-05-09 17:20:41 -07:00
b576f0cda7 fix error if path had wildcard in it (#74723)
* fix error if path had wildcard in it

* add test

* add changelog fragment
2023-05-10 08:58:22 +10:00
7ef8e0e102 Remove unnecessary test case in vault editor (#80741)
* Remove test_real_path_symlink test case
* Check if we do not get `-` return when some value other `-` is passed

Fixes: #80444

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-09 11:22:41 -04:00
4b0d014d58 setup module, retry facter to handle --puppet errors (#80645)
* setup module, retry facter to handle --puppet errors

facter versions have changed how they deal with the --puppet flag
when puppet is not present, most versions will just ignore it and not error,
but initial versions of facter 4 changed the behaviour (later reverted).

fixes #80496
2023-05-08 16:53:53 -04:00
790e0b0983 ansible-test - Update the NIOS test container (#80739) 2023-05-08 13:53:01 -07:00
5a84ff26df first_found fix no terms option (#76550)
also fix bug with multiple items clobbering previous settings

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2023-05-08 14:25:25 -04:00
70e0b1f544 docsite build: upgrade sphinx-ansible-theme and antsibull-core (#80734) 2023-05-08 15:31:53 +01:00
932abc0711 Prevent setting arbitrary attrs on Jinja2 envs via overrides (#80715) 2023-05-05 16:18:35 +02:00
cdeb607b1d ansible-test - Always use unique container names (#80724) 2023-05-04 15:41:14 -07:00
2b6d5536d7 Fix docstrings RST markup in ansible-console CLI module (#80719)
* 📝🐛 Fix RST list @ `ansible-console` manpage

Said CLI entrypoint docstring is used to construct the corresponding
manpage. `docutils` were producing the following warning with the
current RST markup used there, as follows:

  :36: (WARNING/2) Bullet list ends without a blank line; unexpected unindent.

This change puts a portion of the first list entry on a separate line
which allows the RST parser stomach it without any problems and
produce correct output without gibberish in it.

* 🎨📝 Use RST inline code @ ansible-console doc

The single backtick syntax was causing things to be interpreted as
italics text. The inline code needs double backticks.
2023-05-04 11:15:31 -05:00
8cd95a8e66 Account for overlays when interacting with Jinja envs (#80705)
Instead of using Templar.environment in Templar.do_template for
accessing/mutating the environment, myenv local variable should be used
because it is the environment used for actual templating. It can either
point to Templar.environment or newly created environment overlay.

Fixes #80605
2023-05-04 14:55:27 +02:00
7eada15d1e Remove unused code from lib/ansible/collections/ (#80712) 2023-05-03 18:41:25 -07:00
d12aa7f69c Add FreeBSD 13.2 to ansible-test (#80698) 2023-05-03 10:24:53 -07:00
2cd1744be3 Use ansible.module_utils.common.text.converters (#80704)
Replace use of old `ansible.module_utils._text` and add a unit test to maintain backwards compatibility.
2023-05-03 08:58:00 -07:00
eea7137449 Fix os.walk issues in package-data sanity test (#80703) 2023-05-02 16:17:00 -07:00
54576cd794 pep517 backend - Copy symlinks when copying source (#80690) 2023-05-02 14:35:59 -07:00
23e2ca91c2 Improve coverage of role unit tests (#80695) 2023-05-02 10:53:42 -07:00
be6f2f43b6 Wording change (#80664) 2023-05-02 16:53:31 +01:00
40fd86c618 Fix typo in comment filter option (#80672) 2023-05-02 11:08:30 -04:00
dbd3bf27ec Add Ansible community 8.0.0a3 porting guide (#80691) 2023-05-02 12:18:00 +01:00
7f48fa0129 Better parse virtualenv_command option for pip (#80624)
Atthe moment if a users wants to protect  virtualenv_command by using
quotes around 'venv', module will fail out as literal parsing is used
at the moment. In order to imrpove things, argparse is leveraged to
parse out passed value to the virtualenv_command

Closes-Bug: #76372

Signed-off-by: Dmitriy Rabotyagov <noonedeadpunk@gmail.com>
2023-05-02 09:52:11 +02:00
251360314d Fix docs-build test to not mutate source tree (#80689) 2023-05-01 17:04:13 -07:00
884215bd1c Improve unit test code coverage (#80683) 2023-05-01 09:41:43 -07:00
d37678c5ff Release tool improvements (#80641)
* Provide reproducible sdist builds.
* Use reproducible wheel builds.
* Add PyPI artifact checks.
2023-05-01 09:30:19 -07:00
06dcb4ad7a Don't include a default for cli as it overrides config with lesser pr… (#80650)
* Don't include a default for CLI as it overrides config with lesser precedence

  connection plugins should already use the same config entries (and more)
  than DEFAULT_TIMEOUT.
2023-05-01 10:20:08 -04:00
1568f07b22 Removes extraneous parentheses; Fixes 80670 (#80671)
* Added missing parentheses; Fixes 80670

* Removes both parentheses.
2023-04-28 15:33:02 -04:00
9bd698b3a7 service module : remove flag confugration from openbsd enable/disable service (#80628)
fixes #66434


* removed flag setting from enable/disable on openbsd
  service was changing permanent config on openbsd, which is not expected from the this module
* if in check mode, module should not stop at enable/disable
* simplify and clean up opensd service enable/disable
* does break for those that were using service for configuring flags
2023-04-27 16:15:24 -04:00
d5e2e7a0a8 [ansible-galaxy] Fix installing signed collections (#80661)
* Fix installing signed collections by using the fqcn, version, source, and type as a unique identifier.

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

* Remove PinnedCandidateRequests since it is redundant now.

* Fix verifying against a signed remote when the keyring isn't configured
2023-04-27 16:11:17 -04:00
71f6e10dae Use assertRaisesRegex in unit test (#80663) 2023-04-27 12:43:35 -07:00
058b722a54 Remove terminal viewing docs (#80655)
* ansible-doc command can not handle terminal plugins since they
  are not documentable and configurable. Removing documentation section
  to list them.

Fixes: #80140

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-04-27 15:14:23 -04:00
d18d4f84ec _symbolic_mode_to_octal- fix raising ValueError for invalid symbolic modes (#80449)
validate the full user and perm strings instead of just first character

fixes unhelpful unarchive error for some invalid modes
2023-04-27 13:19:37 -04:00
ed749cf0a0 Remove deprecated FileLock class (#80438) 2023-04-27 16:04:09 +02:00
8754d8e1e1 ActionBase: remove deprecated _remote_checksum (#80440) 2023-04-27 13:46:13 +02:00
cc5f8c529b Remove deprecated default.fact_caching_prefix ini config option (#80441) 2023-04-27 12:59:41 +02:00
5ac292e12d Use package_data instead of include_package_data (#80652)
This resolves warnings generated by setuptools such as the following:

_Warning: Package 'ansible.galaxy.data' is absent from the `packages` configuration.
2023-04-26 16:23:26 -07:00
0c63b9622e source module compression setting directly from config (#80647)
* source module compression setting directly from config

no need to proxy via play_context, which can fall out of date w/o constant variable updates.
2023-04-26 17:29:35 -04:00
4d25e3d54f Set the minimum setuptools to 45.2.0 (#80649)
Also update the package-data sanity test to use the minimum setuptools version.
2023-04-26 16:01:56 -05:00
ece8da71ea Add TTY check and argument to disable it (#50603) (#68260)
* Add TTY check and argument to disable it (#50603)

* Fix formatting

* add changelog

* rename flag and updated help description

* add tests for tty check

* replace deprecated uses of assertRaisesRegexp to assertRaisesRegex

* fix yaml syntax

* shorten line 79

* Revert "replace deprecated uses of assertRaisesRegexp to assertRaisesRegex"

This reverts commit cea5fe1655.

* change back to assertRaisesRegexp
2023-04-27 05:55:44 +10:00
b2c0095722 Fix gather parallel (#80597)
* fix meaning of parallel in gather_facts
 * Update docs with note about parallel not always being faster
 * add 'smarter' usage of gahter_timeout for parallel tasks
 * restore async when needed, not always
 * added typing
 * parallelism tests
2023-04-26 11:14:39 -04:00
1e8b889b93 Templar: remove deprecated shared_loader_obj param (#80439) 2023-04-26 17:09:05 +02:00
038ff8b3de Add Ansible community 8.0.0a2 porting guide (#80643) 2023-04-26 12:18:44 +01:00
5f6e1b22a7 Add Ansible community 7.5.0 porting guide (#80642) 2023-04-26 08:52:19 +01:00
850a403226 service_facts, get more info for rcctl services (#80630)
uses rcctl get function to get all settables for a service
2023-04-25 23:53:44 -04:00
5e220416a2 ansible-test - Update the default containers (#80635) 2023-04-25 14:54:04 -07:00
372fc99686 ansible-test - Update pylint to 2.17.3 (#80632) 2023-04-25 12:45:26 -07:00
a2be8915de PlayIterator: remove deprecated methods (#80437) 2023-04-25 09:33:17 +02:00
36df60e226 dnf5: use new API to check package signatures (#80609) 2023-04-25 08:26:05 +02:00
abc58c026b ansible-test - Use FreeBSD packaged setuptools (#80615)
This will avoid issues during bootstrapping caused by breaking changes in setuptools.
2023-04-24 12:13:59 -07:00
989a7d6951 Fix calling v2_playbook_on_notify callback (#80585)
Co-authored-by: Matt Martz <matt@sivel.net>
2023-04-24 17:06:07 +02:00
f4615d69ad tests: replace a mock import with unittest.mock (#80589) 2023-04-21 12:34:36 -07:00
734f38b259 Add GALAXY_COLLECTIONS_PATH_WARNINGS option. (#78487)
* Add GALAXY_COLLECTIONS_PATH_WARNING option.

This allows users to disable warnings from `ansible-galaxy collection
install` about `--collections-path` missing from Ansible's configured
collections_paths.
2023-04-21 08:29:10 -04:00
748f534312 Use target of /usr/bin/dnf for dnf version detection (#80550)
Fixes #80376
2023-04-21 08:53:07 +02:00
68e270d4cc Add note guidelines for additional distributions (#80389) 2023-04-20 15:13:34 -04:00
a4fb670e9c Update DOCUMENTATION.yml (#80579) 2023-04-20 15:03:09 -04:00
791510ccba Vars Plugin Documentation Improvement (#80470) 2023-04-20 15:01:22 -04:00
ed9cd39d0f apt key and repository example security patch (#80381) 2023-04-20 14:49:06 -04:00
9ca863501c note in systemd that systemctl can change behaviour due to diff order… (#80570) 2023-04-20 14:44:08 -04:00
f05abd4540 fix become yes/no to true/false (#80515) 2023-04-20 14:40:41 -04:00
449c628f3d uri module, fix example (#80554) 2023-04-20 14:39:17 -04:00
560d5b00d0 Remove docs references to obsolete test plugins (#80576) 2023-04-19 14:40:58 -07:00
7b50571588 ansible-test - Remove deprecated features (#80558) 2023-04-18 17:17:22 -07:00
1fdeff949c ansible-test - Update default containers (#80559) 2023-04-18 17:16:29 -07:00
ba47dd9ef4 ansible-test - Update pylint to 2.17.2 (#80555) 2023-04-18 13:44:27 -07:00
44794e3ebc Update tools and programs page as per community feedback (#80493) 2023-04-18 14:30:54 -04:00
c1d8130df5 redirect old vmware guide (#80553) 2023-04-18 14:29:28 -04:00
8d685b89f2 Update validate_argument_spec.py (#80547)
##### SUMMARY
Fix example with file lookup, filter 'from_yaml' is required.


##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2023-04-18 11:30:53 -04:00
64fb64643d Fix PolicyRcD.__exit__ docstring (#80528) 2023-04-18 11:17:51 -04:00
0ee7cfb128 Implement checks, and backwards compat change, to move forward with UTF-8 only (#80370)
Co-authored-by: Sandra McCann <samccann@redhat.com>
2023-04-17 17:30:08 -05:00
694c11d5bd argspec - fix validating type for required options that are None (#79677)
* Only bypass type validation for null parameters if the default is None. A default is mutually exclusive with required.

* Prevent coercing None to str type. Fail the type check instead.
2023-04-17 15:42:58 -04:00
964e678a7f ansible-galaxy - fix installing dir sources with a trailing path separator (#79110)
* strip trailing path separator from type=dir sources
2023-04-17 15:24:55 -04:00
676b731e6f ansible-test - Replace pytest-forked (#80525)
- Unit tests now report warnings generated during test runs.
- Python 3.12 warnings about `os.fork` usage with threads (due to `pytest-xdist`) are suppressed.
- Added integration tests to verify forked test behavior.
2023-04-14 15:13:58 -07:00
6aac0e2460 Extend OpenBSDStrategy to also update current hostname. (#80521)
Fixes #80520
2023-04-14 10:41:44 -04:00
2e62724a8a feature: add support for symbolic links when passing "dir" (#80460)
* update the include_vars action plugin to always follow symbolic links when traversing directories
2023-04-14 08:07:08 -04:00
bd6feeb6e7 Validate task attributes with first finalized attrs after loop (#80476)
* Validate task attributes `run_once` and `action` with finalized attrs after individual loop results

* Validate task attribute `ignore_unreachable` using individual loop results

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

This replaces the fix introduced in https://github.com/ansible/ansible/pull/80051.
2023-04-13 11:18:38 -04:00
d081ed3616 Adds Ansible 8 Porting Guide to Index Page (#80511) 2023-04-12 16:51:28 -04:00
f3774ae7d4 --syntax-check is only applicable to ansible-playbook. Fixes #80506 (#80507) 2023-04-12 15:24:34 -04:00
362c949622 Add Ansible community 8.0.0a1 porting guide (#80498) 2023-04-12 13:59:08 -04:00
43c5cbcaef Fix galaxy CLI unit test assertions (#80504) 2023-04-12 10:32:59 -07:00
3ec828703f Fix unit test asserts (#80500) 2023-04-12 10:04:42 -07:00
e87802cf2c pep517 backend - Use correct import_module import (#80480) 2023-04-12 10:00:09 -07:00
74b102b33c Fix unit tests returning values (#80499) 2023-04-12 09:59:11 -07:00
bd22b849c6 Fix unclosed files in unit tests (#80497) 2023-04-12 09:51:20 -07:00
09dd80b4ec Last handler defined runs, fix for roles (#79558)
Fixes #73643
* clear_notification method and simplify ifs
* Deduplicate code
* Limit number of Templar creations
* Fix sanity
* Preserve handler callbacks order as they were notified
2023-04-12 09:45:43 -04:00
9026bc5d76 Remove obsolete pkg_resources usage (#80489) 2023-04-11 19:33:57 -07:00
0371ea08d6 ansible-test - Add support for argcomplete 3 (#80482) 2023-04-11 12:03:18 -07:00
62211097cb Expand pylint deprecated plugin to catch ansible.module_utils.common.warnings uses (#80462) 2023-04-11 11:45:56 -05:00
d5f3578369 Fixing bit shift, extra comma, reformatting "copy" test. (#80458) 2023-04-11 12:13:36 -04:00
a7d6fdda66 Update ansible_tips_tricks.rst (#80477)
Fix quotation marks in example
2023-04-11 11:38:02 -04:00
bc3cc426bf fetch_url: remove auto disabling decompress when gzip is not available (#80474) 2023-04-11 11:33:04 -04:00
9f0a9cf20d get_action_args_with_defaults: remove deprecated redirected_names arg (#80473) 2023-04-11 11:31:43 -04:00
2a795e5747 Manage basic.selinux completely, instead of mocking potentially missing module (#80448)
* Manage basic.selinux completely, instead of mocking potentially missing module. Fixes #80436

* pep8
2023-04-11 11:02:20 -04:00
5ddd530d1d Templar: do not add dict to globals (#80475)
All required Jinja2 versions (>=3.0) already do this, see
f9d804ead7
2023-04-11 09:49:00 -04:00
4e9d21ec32 installation_distros: update Fedora section (#80453) 2023-04-11 09:37:58 -04:00
243aea45ce Symbolic modes with X or =[ugo] always use original mode (#80132)
* Symbolic modes with X or =[ugo] always use original mode (Fixes #80128)

Here's what's happening, by way of this mode example: u=,u=rX

At the first step in the loop, the "u" bits of are set to 0. On the next
step in the loop, the current stat of the filesystem object is used to
determine X, not the "new_mode" in the previous iteration of the loop. So
while most operations kind of operate left to right, "X" is always going
back to the original file to determine whether to set x bit.

The Linux "chmod" (the only one I've tested) doesn't operate this way. In
it, "X" operates on the current state the loop understands it is in,
based on previous operations (and starting with the file permissions).

This is an issue with "X" and any of the "=[ugo]" settings, because
they are lookups. For example, if a file is 755 and you do "ug=rx,o=u",
file module produces 0557 and chmod produces 0555.

This really becomes a problem when you want to recursively change a
directory of files, and the files are currently 755, but you want to
change the directory to 750 and the files to 640. In chmod you can do
"a=,ug=rX,u+w" (or "a=,u=rwX,g=rX"), and have it apply equally to the
directory and the files. I can't come up with a single way in the ansible
file module to deterministically, recursively, set a directory to 750
and the contents to 640 no matter what the current permissions are,
as the code currently is.

The fix is to pass in "new_mode" to _get_octal_mode_from_symbolic_perms
in lib/ansible/module_utils/basic.py inside _symbolic_mode_to_octal. And
then take "new_mode" as an argument and use it instead of the filesystem
object stat.st_mode value.

* Fixing my new unit test, fixing bug in test comments
2023-04-10 18:29:10 -04:00
f9534fd7b7 ansible-test - Update default containers (#80468) 2023-04-10 14:29:09 -07:00
2ed4396558 Fix typo in playbooks_keywords.rst.j2 (#80461) 2023-04-10 14:33:40 -04:00
5a44acc704 Update P() semantic markup example (#80464) 2023-04-10 14:30:11 -04:00
a84b3a4e72 Fix misrendered sections in manpage generation
This change fixes bugs in the manpage generator that existed since it
was first added.

It exposes CLI `ARGUMENTS` value to manpage templates.

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

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

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

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

This patch also deduplicates calling `opt_doc_list` @ generate_man.

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

It fixes rendering library and inventory in manpages.

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

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

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

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

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

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

PR #80450.
2023-04-08 14:04:59 +02:00
babdec80cc Fix the parsing integration tests (#80454)
Most of the bad_parsing tests were no longer running, with several of them no longer being valid.
The invalid tests have been removed and the valid ones rewritten.
2023-04-07 10:03:45 -07:00
bf4e0166a5 Update password.py documentation (#80297)
* Update password.py documentation with new semantic markup
2023-04-06 16:06:41 -04:00
032881e4f1 documents approaches to octal modes better (#80112) 2023-04-06 15:39:25 -04:00
af6d75e313 Add OpenSUSE to the distro's installation guide (#80308)
* Add OpenSUSE to the distro's installation guide

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

Signed-off-by: ybonatakis <ybonatakis@suse.com>
2023-04-06 15:27:58 -04:00
ec403db1c7 Document how to run all tasks, even the ones with the never tag (#80315)
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2023-04-06 15:20:28 -04:00
a6e0012b8a Update playbooks_templating.rst (#80375) 2023-04-06 15:04:42 -04:00
0460f78081 Documentation changes for #80367 and #80270 (#80391) 2023-04-06 14:55:39 -04:00
db8f1756bc [Docs] communication.rst: Add a hint about adding Matrix shields to READMEs (#80392) 2023-04-06 14:53:17 -04:00
7251938370 ansible.builtin inferred by collection_name == None (#80446) 2023-04-06 13:51:39 -05:00
88a380c8f0 📝 Document macOS user deletion over SSH (#80358)
Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Don Naro <dnaro@redhat.com>
2023-04-06 18:08:24 +01:00
4029da9a9f Semantic markup docs (#80240)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
Co-authored-by: Don Naro <dnaro@redhat.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2023-04-06 16:46:03 +01:00
92c694372b Replace validate-modules's semantic markup parser with antsibull-docs-parser (#80406) 2023-04-05 17:45:44 -07:00
96f7fd5539 Extend ansible-doc test with more classic markup. (#80407) 2023-04-05 16:14:35 -07:00
163f297d7f Extend bulk issue creator (#80423)
It can now be used to create feature requests, not just deprecation bug reports.
2023-04-05 15:24:21 -07:00
fc5c0aadc9 Correct bypass_host_loop attribute for group_by (#80380)
This action originally bypassed the host loop, but it does not
currently.
2023-04-05 16:51:25 -05:00
12ce7d2e4e dnf5: fix module/pkg names in the failed respawn msg (#80402) 2023-04-05 11:18:04 -05:00
8d5c250234 dnf5: use the logs API to determine transaction problems (#80401) 2023-04-05 11:17:50 -05:00
6d1e355639 Only use the selectors code path when we are prompt matching (#79931) 2023-04-04 15:20:26 -05:00
460abe0cef Fetch signatures from galaxy after the dependency resolver runs (#80334)
Reduce the number of Galaxy API calls made during dependency resolution by fetching remote signatures afterwards, since these are not used in backtracking.

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

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
2023-04-04 14:43:58 -04:00
4f7f7d1c26 Remove old release announcement scripts (#80371)
These have been replaced by `packaging/release.py`
2023-04-04 11:08:44 -07:00
d7e7c2d872 Update URLs in COPYING (#80385) 2023-04-04 10:37:23 -05:00
c1e19e4bdd Fix getting timeout for get mounts facts on Linux (#79847)
* Fix how to get the gather_timeout setting while getting the
mounts facts on Linux.

Issue: #79844
2023-04-04 11:02:41 -04:00
5e131a96c0 bump devel to 2.16.0.dev0 (#80390) 2023-04-03 15:26:32 -07:00
3026 changed files with 23745 additions and 151797 deletions

View File

@ -31,7 +31,7 @@ variables:
- name: fetchDepth
value: 500
- name: defaultContainer
value: quay.io/ansible/azure-pipelines-test-container:3.0.0
value: quay.io/ansible/azure-pipelines-test-container:4.0.1
pool: Standard
@ -46,9 +46,6 @@ stages:
targets:
- test: 1
- test: 2
- test: 3
- test: 4
- test: 5
- stage: Units
dependsOn: []
jobs:
@ -57,14 +54,12 @@ stages:
nameFormat: Python {0}
testFormat: units/{0}
targets:
- test: 2.7
- test: 3.5
- test: 3.6
- test: 3.7
- test: 3.8
- test: 3.9
- test: '3.10'
- test: 3.11
- test: 3.12
- stage: Windows
dependsOn: []
jobs:
@ -73,8 +68,6 @@ stages:
nameFormat: Server {0}
testFormat: windows/{0}/1
targets:
- test: 2012
- test: 2012-R2
- test: 2016
- test: 2019
- test: 2022
@ -84,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.7 py36
test: rhel/8.7@3.6
- name: RHEL 8.7 py39
test: rhel/8.7@3.9
- name: RHEL 9.1
test: rhel/9.1
- name: FreeBSD 12.4
test: freebsd/12.4
- name: FreeBSD 13.1
test: freebsd/13.1
- name: 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.7
test: rhel/8.7
- name: RHEL 9.1
test: rhel/9.1
- name: FreeBSD 13.1
test: freebsd/13.1
- 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
@ -119,16 +108,12 @@ stages:
- template: templates/matrix.yml # context/controller (ansible-test container management)
parameters:
targets:
- name: Alpine 3.17
test: alpine/3.17
- name: Fedora 37
test: fedora/37
- name: RHEL 8.7
test: rhel/8.7
- name: RHEL 9.1
test: rhel/9.1
- name: Ubuntu 20.04
test: ubuntu/20.04
- 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:
@ -140,14 +125,10 @@ stages:
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3
test: alpine3
- name: CentOS 7
test: centos7
- name: Fedora 37
test: fedora37
- 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
@ -159,10 +140,10 @@ stages:
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3
test: alpine3
- name: Fedora 37
test: fedora37
- name: Alpine 3.19
test: alpine319
- name: Fedora 39
test: fedora39
- name: Ubuntu 22.04
test: ubuntu2204
groups:
@ -177,9 +158,9 @@ stages:
nameFormat: Python {0}
testFormat: galaxy/{0}/1
targets:
- test: 3.9
- test: '3.10'
- test: 3.11
- test: 3.12
- stage: Generic
dependsOn: []
jobs:
@ -188,9 +169,9 @@ stages:
nameFormat: Python {0}
testFormat: generic/{0}/1
targets:
- test: 3.9
- test: '3.10'
- test: 3.11
- test: 3.12
- stage: Incidental_Windows
displayName: Incidental Windows
dependsOn: []
@ -200,8 +181,6 @@ stages:
nameFormat: Server {0}
testFormat: i/windows/{0}
targets:
- test: 2012
- test: 2012-R2
- test: 2016
- test: 2019
- test: 2022

View File

@ -16,7 +16,7 @@ provider="${P:-default}"
python_default="$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._internal import constants; print(constants.CONTROLLER_MIN_PYTHON_VERSION)')"
# version to test when only testing a single version
single_version=2012-R2
single_version=2022
# shellcheck disable=SC2086
ansible-test windows-integration --list-targets -v ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} > /tmp/explain.txt 2>&1 || { cat /tmp/explain.txt && false; }

View File

@ -7,12 +7,32 @@ IFS='/:' read -ra args <<< "$1"
group="${args[1]}"
group2_include=(
ansible-doc
changelog
package-data
pep8
pylint
validate-modules
)
group1_exclude=(
"${group2_include[@]}"
)
options=()
case "${group}" in
1) options=(--skip-test pylint --skip-test ansible-doc --skip-test docs-build --skip-test package-data --skip-test changelog --skip-test validate-modules) ;;
2) options=( --test ansible-doc --test docs-build --test package-data --test changelog) ;;
3) options=(--test pylint --exclude test/units/ --exclude lib/ansible/module_utils/) ;;
4) options=(--test pylint test/units/ lib/ansible/module_utils/) ;;
5) options=( --test validate-modules) ;;
1)
for name in "${group1_exclude[@]}"; do
options+=(--skip-test "${name}")
done
;;
2)
for name in "${group2_include[@]}"; do
options+=(--test "${name}")
done
;;
esac
# shellcheck disable=SC2086

View File

@ -21,7 +21,7 @@ IFS=' ' read -r -a python_versions <<< \
python_default="$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._internal import constants; print(constants.CONTROLLER_MIN_PYTHON_VERSION)')"
# version to test when only testing a single version
single_version=2012-R2
single_version=2022
# shellcheck disable=SC2086
ansible-test windows-integration --list-targets -v ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} > /tmp/explain.txt 2>&1 || { cat /tmp/explain.txt && false; }

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

151
.github/BOTMETA.yml vendored
View File

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

View File

@ -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
@ -249,7 +249,7 @@ body:
[ansibot help]:
/ansible/ansibullbot/blob/master/ISSUE_HELP.md#for-issue-submitters
/ansible/ansibotmini#ansibotmini
- type: checkboxes

View File

@ -34,6 +34,32 @@ body:
[submit a pull request]:
https://docs.ansible.com/ansible-core/devel/community/documentation_contributions.html
- type: markdown
attributes:
value: >
**Check the repository for your issue.**
Source files for Ansible community documentation are
hosted in different repositories. Please make sure to file an
issue in the correct project.
Documentation for modules/plugins/etc that are officially
supported by the Ansible Core Engineering team is available
in this (`ansible/ansible`) repository.
The Installation Guide, Playbook Guide, Developer Guide,
and other documentation is available in the
[ansible/ansible-documentation] repository.
Documentation for other modules/plugins/etc is likely to be
available in one of the [Ansible Collections][collections index].
If available in the collection documentation, select the
**Issue Tracker** button to go directly to the GitHub issues.
[ansible/ansible-documentation]: /ansible/ansible-documentation
[collections index]:
https://docs.ansible.com/ansible/latest/collections/index.html
- type: textarea
attributes:
@ -64,9 +90,6 @@ body:
<em>Why?</em>
</summary>
We would do it by ourselves but unfortunatelly, the curent
edition of GitHub Issue Forms Alpha does not support this yet 🤷
_We will make it easier in the future, once GitHub
supports dropdown defaults. Promise!_
@ -85,19 +108,7 @@ body:
Write the short name of the rst file, module, plugin, task or
feature below, *use your best guess if unsure*.
**Tip:** Be advised that the source for some parts of the
documentation are hosted outside of this repository. If the page
you are reporting describes modules/plugins/etc that are not
officially supported by the Ansible Core Engineering team, there
is a good chance that it is coming from one of the [Ansible
Collections maintained by the community][collections org]. If this
is the case, please make sure to file an issue under the
appropriate project there instead.
[collections org]: /ansible-collections
placeholder: docs/docsite/rst/dev_guide/debugging.rst
placeholder: lib/ansible/modules/copy.py
validations:
required: true
@ -185,7 +196,7 @@ body:
[ansibot help]:
/ansible/ansibullbot/blob/master/ISSUE_HELP.md#for-issue-submitters
/ansible/ansibotmini#ansibotmini
- type: checkboxes

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
@ -176,7 +176,7 @@ body:
[ansibot help]:
/ansible/ansibullbot/blob/master/ISSUE_HELP.md#for-issue-submitters
/ansible/ansibotmini#ansibotmini
- type: checkboxes

View File

@ -1,23 +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
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below -->
##### 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
```

18
.github/RELEASE_NAMES.txt vendored Normal file
View File

@ -0,0 +1,18 @@
2.17.0 Gallows Pole
2.16.0 All My Love
2.15.0 Ten Years Gone
2.14.0 C'mon Everybody
2.13.0 Nobody's Fault but Mine
2.12.0 Dazed and Confused
2.11.0 Hey Hey, What Can I Do
2.10.0 When the Levee Breaks
2.9.0 Immigrant Song
2.8.0 How Many More Times
2.7.0 In the Light
2.6.0 Heartbreaker
2.5.0 Kashmir
2.4.0 Dancing Days
2.3.0 Ramble On
2.2.0 The Battle of Evermore
2.1.0 The Song Remains the Same
2.0.0 Over the Hills and Far Away

View File

@ -1,17 +0,0 @@
---
- 2.15.0 Ten Years Gone
- 2.14.0 C'mon Everybody
- 2.13.0 Nobody's Fault but Mine
- 2.12.0 Dazed and Confused
- 2.11.0 Hey Hey, What Can I Do
- 2.10.0 When the Levee Breaks
- 2.9.0 Immigrant Song
- 2.8.0 How Many More Times
- 2.7.0 In the Light
- 2.6.0 Heartbreaker
- 2.5.0 Kashmir
- 2.4.0 Dancing Days
- 2.3.0 Ramble On
- 2.2.0 The Battle of Evermore
- 2.1.0 The Song Remains the Same
- 2.0.0 Over the Hills and Far Away

2
.gitignore vendored
View File

@ -99,8 +99,6 @@ lib/ansible/_vendor/*
/test/integration/cloud-config-*.*
!/test/integration/cloud-config-*.*.template
.python-version
/hacking/tests/selinux/*.mod
/hacking/tests/selinux/*.pp
# Release directory
packaging/release/ansible_release
/.cache/

View File

@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
@ -664,12 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

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

89
README.md Normal file
View File

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

View File

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

View File

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

8
changelogs/README.md Normal file
View File

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

View File

@ -1,2 +1,678 @@
ancestor: 2.14.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

@ -1,2 +0,0 @@
bugfixes:
- ansible_facts.hardware - Define all processor facts on s390x (https://github.com/ansible/ansible/issues/19755)

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:
- sanity tests - updates the collection-deprecated-version tests to ignore the ``prerelease`` component of the collection version ().

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,2 +0,0 @@
bugfixes:
- unarchive - log errors from commands to assist in debugging (https://github.com/ansible/ansible/issues/64612)

View File

@ -1,2 +0,0 @@
bugfixes:
- unarchive - allow relative path for ``dest`` (https://github.com/ansible/ansible/issues/64612)

View File

@ -1,2 +0,0 @@
minor_changes:
- Add support for custom salt for vault encoding to make it deterministic (https://github.com/ansible/ansible/issues/35480).

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-test sanity - correctly report invalid YAML in validate-modules (https://github.com/ansible/ansible/issues/75837).

View File

@ -1,2 +0,0 @@
bugfixes:
- Module and role argument validation - include the valid suboption choices in the error when an invalid suboption is provided.

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

@ -1,5 +0,0 @@
bugfixes:
- paramiko - Add a new option to allow paramiko >= 2.9 to easily work with
all devices now that rsa-sha2 support was added to paramiko, which
prevented communication with numerous platforms.
(https://github.com/ansible/ansible/issues/76737)

View File

@ -1,4 +0,0 @@
bugfixes:
- copy remote_src=true - fix copying subdirs recursively when the dest exists and the src and dest have
multiple common subdirectories in a common directory (https://github.com/ansible/ansible/issues/74536).
- copy remote_src=true - fix reporting changed for copying empty directories.

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,2 +0,0 @@
minor_changes:
- "ansible-test sanity --test ansible-doc - now also lists documentation for test and filter plugins that are documented (https://github.com/ansible/ansible/pull/77737)."

View File

@ -1,2 +0,0 @@
minor_changes:
- Allow force deletion of a group even when it is the primary group of a user. (https://github.com/ansible/ansible/issues/77849)

View File

@ -1,3 +0,0 @@
---
bugfixes:
- "strategy plugins: get the correctly templated and validated run_once value on strategy linear (https://github.com/ansible/ansible/issues/78492)"

View File

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

View File

@ -1,3 +0,0 @@
bugfixes:
- copy - fix reporting changes to file attributes in check mode with remote_src=True (https://github.com/ansible/ansible/issues/77957).
- copy - fix creating the dest directory in check mode with remote_src=True (https://github.com/ansible/ansible/issues/78611).

View File

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

View File

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

View File

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

View File

@ -1,4 +0,0 @@
minor_changes:
- "ansible-test runtime-metadata sanity test - ensure that ``redirect`` entries in ``meta/runtime.yml`` contain collection names, except for ``module_utils`` plugin redirects and ``import_redirect`` redirects (https://github.com/ansible/ansible/pull/78802)."
bugfixes:
- "ansible-test runtime-metadata sanity test - do not crash on YAML parsing errors without a context mark (https://github.com/ansible/ansible/pull/78802)."

View File

@ -1,3 +0,0 @@
removed_features:
- Remove deprecated ``ANSIBLE_COW_WHITELIST`` configuration environment variable, use ``ANSIBLE_COW_ACCEPTLIST`` instead. (https://github.com/ansible/ansible/issues/78819)
- Remove deprecated ``cow_whitelist`` configuration option, use ``cowsay_enabled_stencils`` instead. (https://github.com/ansible/ansible/issues/78820)

View File

@ -1,3 +0,0 @@
removed_features:
- Remove deprecated ``ANSIBLE_CALLBACK_WHITELIST`` configuration environment variable, use ``ANSIBLE_CALLBACKS_ENABLED`` instead. (https://github.com/ansible/ansible/issues/78821)
- Remove deprecated ``callback_whitelist`` configuration option, use ``callbacks_enabled`` instead. (https://github.com/ansible/ansible/issues/78822)

View File

@ -1,2 +0,0 @@
minor_changes:
- add parameter ``numeric`` to the iptables module to disable dns lookups when running list -action internally (https://github.com/ansible/ansible/issues/78793).

View File

@ -1,2 +0,0 @@
bugfixes:
- "Do not crash when templating an expression with a test or filter that is not a valid Ansible filter name (https://github.com/ansible/ansible/issues/78912, https://github.com/ansible/ansible/pull/78913)."

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-galaxy collection install - respect symlinks when installing from source or local repository (https://github.com/ansible/ansible/issues/78442)

View File

@ -1,6 +0,0 @@
bugfixes:
- >-
ansible-vault encrypt_string - started appending a line feed at the end of the encrypted string output. Missing newline
character caused problems identifying where the string ends in some shells (like bash) or accidentally copying an
extra trailing terminator symbol (e.g., zsh prints out a ``%`` sign to signal where the original output stops)
(https://github.com/ansible/ansible/issues/78932).

View File

@ -1,3 +0,0 @@
bugfixes:
- keyword inheritance - Ensure that we do not squash keywords in validate
(https://github.com/ansible/ansible/issues/79021)

View File

@ -1,2 +0,0 @@
bugfixes:
- "handlers - fix an issue where the ``flush_handlers`` meta task could not be used with FQCN: ``ansible.builtin.meta`` (https://github.com/ansible/ansible/issues/79023)"

View File

@ -1,2 +0,0 @@
bugfixes:
- include_role - Inherit from role parents beyond a depth of 3 (https://github.com/ansible/ansible/issues/47023).

View File

@ -1,2 +0,0 @@
bugfixes:
- "jinja2_native: preserve quotes in strings (https://github.com/ansible/ansible/issues/79083)"

View File

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

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-galaxy collection/role init - preserve symlinks (https://github.com/ansible/ansible/issues/39334).

View File

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

View File

@ -1,2 +0,0 @@
minor_changes:
- updated the vendored distro library to upstream version (https://github.com/ansible/ansible/pull/79227)

View File

@ -1,2 +0,0 @@
minor_changes:
- "ansible-test validate-modules - no longer treat falsy non-``False`` values for defaults as ``None`` (https://github.com/ansible/ansible/pull/79267)."

View File

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

View File

@ -1,3 +0,0 @@
minor_changes:
- collections - Add additional includes for REUSE license files (https://github.com/ansible/ansible/issues/79368)
- collections - Add additional ignores for commonly rejected file extensions

View File

@ -1,2 +0,0 @@
bugfixes:
- Fixes leftover _valid_attrs usage.

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-galaxy - support ``resolvelib >= 0.5.3, < 0.10.0``.

View File

@ -1,4 +0,0 @@
---
minor_changes:
- galaxy - include ``license_file`` in the default manifest directives
(https://github.com/ansible/ansible/pull-request/79420)

View File

@ -1,3 +0,0 @@
bugfixes:
- file - touch action in check mode was always returning ok. Fix now evaluates the different conditions and
returns the appropriate changed status. (https://github.com/ansible/ansible/issues/79360)

View File

@ -1,2 +0,0 @@
bugfixes:
- Fixes the password lookup to not rewrite files if they are not changed when using the "encrypt" parameter (#79430).

View File

@ -1,2 +0,0 @@
bugfixes:
- "Fix a traceback occuring when a task is named ``meta`` (https://github.com/ansible/ansible/issues/79459)"

View File

@ -1,2 +0,0 @@
bugfixes:
- apt - set locale to fix updating the cache (https://github.com/ansible/ansible/issues/79523).

View File

@ -1,3 +0,0 @@
bugfixes:
- Fix using ``GALAXY_IGNORE_CERTS`` when downloading tarballs from Galaxy servers (https://github.com/ansible/ansible/issues/79557).
- Fix using ``GALAXY_IGNORE_CERTS`` in conjunction with collections in requirements files which specify a specific ``source`` that isn't in the configured servers.

View File

@ -1,2 +0,0 @@
bugfixes:
- systemd - daemon-reload and daemon-reexec ignore errors when running in a chroot (https://github.com/ansible/ansible/pull/79643)

View File

@ -1,2 +0,0 @@
minor_changes:
- apt_repository - adds ``sources_added`` and ``sources_removed`` to the return of the module (https://github.com/ansible/ansible/issues/79306).

View File

@ -1,2 +0,0 @@
bugfixes:
- "argument spec validation - again report deprecated parameters for Python-based modules. This was accidentally removed in ansible-core 2.11 when argument spec validation was refactored (https://github.com/ansible/ansible/issues/79680, https://github.com/ansible/ansible/pull/79681)."

View File

@ -1,2 +0,0 @@
bugfixes:
- "normal action plugin - remove obsolete ``if`` (https://github.com/ansible/ansible/pull/79690)."

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:
- Correctly count rescued tasks in play recap (https://github.com/ansible/ansible/issues/79711)

View File

@ -1,2 +0,0 @@
bugfixes:
- get_url - Ensure we are passing ciphers to all url_get calls (https://github.com/ansible/ansible/issues/79717)

View File

@ -1,2 +0,0 @@
bugfixes:
- vault - show filename additionally if missing secrets prevents decryption (https://github.com/ansible/ansible/issues/79723)

View File

@ -1,3 +0,0 @@
bugfixes:
- "argument spec validation - ensure that deprecated aliases in suboptions are also reported (https://github.com/ansible/ansible/pull/79740)."
- "argument spec validation - fix warning message when two aliases of the same option are used for suboptions to also mention the option's name they are in (https://github.com/ansible/ansible/pull/79740)."

View File

@ -1,2 +0,0 @@
bugfixes:
- Fix traceback when using the ``template`` module and running with ``ANSIBLE_DEBUG=1`` (https://github.com/ansible/ansible/issues/79763)

View File

@ -1,2 +0,0 @@
bugfixes:
- Fix conditionally notifying ``include_tasks` handlers when ``force_handlers`` is used (https://github.com/ansible/ansible/issues/79776)

View File

@ -1,2 +0,0 @@
bugfixes:
- "Fix an issue where the value of ``become`` was ignored when used on a role used as a dependency in ``main/meta.yml`` (https://github.com/ansible/ansible/issues/79777)"

View File

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

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-playbook -K breaks when passwords have quotes (https://github.com/ansible/ansible/issues/79836).

View File

@ -1,3 +0,0 @@
---
bugfixes:
- templates - Fixed ``TypeError`` when a lookup plugin has an option called ``name``.

View File

@ -1,2 +0,0 @@
minor_changes:
- debug - Perform argspec valdiation in debug action plugin (https://github.com/ansible/ansible/issues/79862)

View File

@ -1,2 +0,0 @@
bugfixes:
- TaskExecutor - don't ignore templated _raw_params that k=v parser failed to parse (https://github.com/ansible/ansible/issues/79862)

View File

@ -0,0 +1,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:
- Make using blocks as handlers a parser error (https://github.com/ansible/ansible/issues/79968)

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