Compare commits

...

244 Commits

Author SHA1 Message Date
sivel / Matt Martz 694320a67e
New release v2.16.15rc1 (#86283) 22 hours ago
Brian Coca 1c1e37654a
Show file instead of vars on load error (#86282)
(cherry picked from commit 490795770f34120adc02b08fc24fc50be6ac68a2)
(cherry picked from commit 11a2d02bf2)
22 hours ago
Matt Clay 3c4f0f99bc
[stable-2.16] ansible-test - Improve AZP commit API error handling (#86204)
* [stable-2.16] ansible-test - Improve AZP commit API error handling (#86197)

(cherry picked from commit 3d26431e4f)

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

* Fix tests on Python 3.10 and earlier
3 weeks ago
Matt Clay 631fac59ed
ansible-test - Use latest RHEL minor versions (#86207) 3 weeks ago
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) 5c06fa5998
[stable-2.16] 🧪 Set timeouts for CI jobs (#86105)
Sometimes, AZP would mark steps in jobs as cancelled when they've
actually exited successfully but on the boundary of the default
60-minute timeout. Such logs might be difficult to reason about.

Additionally, `entry-point.sh` sets a 60-minute timeout for the main
test invocation but it would never trigger earlier that AZP would kill
such a job as the job-global timeout was 60 minutes already and it'd
always be hit earlier than the test runner one.

The patch sets maximum observable job timeouts with extra buffer to
account for flakiness.

PR #86073
(cherry picked from commit 730af32)

Co-authored-by: Matt Clay <matt@mystile.com>
3 weeks ago
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) 3fe2668d12
[stable-2.16] Install `xt_comment` kernel mod @ `iptables` test (#86187) (#86191)
This patch fixes integration test jobs running under RHEL 10.0 that don't have this extension pre-installed.

Co-Authored-By: sivel / Matt Martz <matt@sivel.net>

(cherry picked from commit 69c9fbed26)
3 weeks ago
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) 4afb6417b2
[stable-2.16] 🧪 Pin codecov-cli deptree used in AZP (#85904)
* Use codecov-cli for uploads (#85386)

ci_coverage
ci_complete

(cherry picked from commit 4a03ccbd41)

* 🧪 Pin codecov-cli deptree used in AZP

PR #85888

`codecov-cli == 11.0.3` allows `click == 8.3.0` in its deps but the latter causes commit auto-discovery breakage in the former. With https://github.com/getsentry/prevent-cli/pull/95, `codecov-cli == 11.2.3` excludes this version so this patch updates the requirement to that.

To prevent this from happening again, the change also makes use of a pip constraint file that pins the entire dependency tree to concrete versions. The constraint file is managed by `pip-tools`.

Refs:
* https://github.com/getsentry/prevent-cli/pull/95
* https://github.com/pallets/click/issues/3066

ci_coverage
ci_complete

(cherry picked from commit 1e572ba5cc)

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2 months ago
sivel / Matt Martz 937980fa6c
[stable-2.16] Prevent IO capture hang/loss in `basic.run_command` (#85869) (#85894)
* Prevent run_command output truncation or hang

In cases when the selector used to monitor stdout/stderr activates without
data ready to read (a rare but normal condition), a read from a non-blocking
FD can return `None`, which was being conflated with an empty read (EOF)
condition. This caused the selector to be unregistered prematurely,
sometimes resulting in truncated output or hangs. `None` read results
are now excluded from EOF conditions.

* add changelog

---------
(cherry picked from commit 79ddee1)

Co-authored-by: Chris Meyers <chrismeyersfsu@users.noreply.github.com>
Co-authored-by: Matt Davis <nitzmahone@redhat.com>
2 months ago
Matt Clay 5cf9c07608
ansible-test - Update Ansible Core CI auth (#85717) (#85771)
Implement new authentication methods for accessing the Ansible Core CI service.

(cherry picked from commit be9e57366b)
3 months ago
Matt Clay bf2db550e9
[stable-2.16] CI - Add missing args to generic.sh (#85737) (#85741)
(cherry picked from commit 7b598f3fc9)
3 months ago
Matt Clay 1d1be866f1
[stable-2.16] ansible-test - Limit bootstrap package install retries (#85544) (#85549)
(cherry picked from commit ee297bb7ca)
4 months ago
Matt Clay a9663745f5
[stable-2.16] Update azure-pipelines-test-container (#85578) (#85582)
(cherry picked from commit 62dc40ce1c)
4 months ago
Matt Clay 91676a9a8f
Trim down CI test matrix (#85527)
Now that 2.16 is EOL upstream, the test matrix can be reduced.
4 months ago
Matt Clay 64096fc370
[stable-2.16] ansible-test - Fix relative import resolution (#85328) (#85447)
(cherry picked from commit 093ac8df2d)
5 months ago
Matt Clay ed807e929f
Drop incidental network tests from CI (#85425) (#85431)
(cherry picked from commit 35252fd96c)
5 months ago
Matt Clay 4a616ffa64
[stable-2.16] ansible-test - Add RHEL 10.0 remote (#85189) (#85268)
* ansible-test - Add RHEL 10.0 remote (#85189)

* ansible-test - Add RHEL 10.0 remote

* Update tests for RHEL 10
* Fix iptables test
* Rework rpm_key integration test

(cherry picked from commit 53b0f1645b)

* Remove unsupported sub_key tests

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

* Add RHEL 10 support to dnf test

* Adjust signature check in tests

* use yum

The dnf action plugin is not able to redirect to yum (the value of `pkg_mgr` in RHEL 7) in 2.16 before yum removal.

* Use redhat-*-fonts for yum test

The lohit-*-fonts are not available on RHEL 10.

* yum integration tests fixes

* use fonts package available in "all" RHEL versions
* use dnf Python module to retrieve the releasever value

* fix sanity

* zlib not available on RHEL10

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
6 months ago
Martin Krizek 078f350014
[stable-2.16] dnf5 tests: do not remove attr (#85218) (#85272)
On RHEL 10, the attr package is in the dependency tree of dnf itself
and cannot be removed.
(cherry picked from commit a0132fec0b)
6 months ago
Matt Clay df967f21ec
[stable-2.16] User: Update prompt for SSH key passphrase prompt (#84521) (#85236)
* [stable-2.16] User: Update prompt for SSH key passphrase prompt (#84521)

* update prompt for SSH key passphrase prompt
* introduce timeout in SSH key passphrase interaction

Fixes: #84484

(cherry picked from commit 8588401387)

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

* Fix Python 2.7 compat

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
6 months ago
Matt Clay 5814732d2a
[stable-2.16] release.py - Remove email announcement support (#85060) (#85141)
Also add missing git and run overloads.

(cherry picked from commit 93aa611435)
7 months ago
Matt Davis 878901dd1e
add fuzzy matching to package_data sanity (#85103) (#85138)
* add fuzzy matching to package_data sanity

* relaxes exact directory matches for license files to allow setuptools > 72 to pass

* sanity

(cherry picked from commit 7e00053a30)
7 months ago
Sloane Hertel 24b2747b8d
Fix old_style_cache_plugins test failure using latest redis (#85092)
Pin last working version instead
7 months ago
Matt Clay 80156dc807
[stable-2.16] ansible-test - Use `-t` for container stop timeout (#85019) (#85058)
(cherry picked from commit 0aa8afbaf4)
7 months ago
Matt Clay cd23556e80
[stable-2.16] ansible-test - Replace FreeBSD 13.2 with 13.3 (#85030)
* ansible-test - Replace FreeBSD 13.2 with 13.3

* Fix psutil integration test

* Remove outdated constraint for paramiko setup

(cherry picked from commit 2b1a5dd7a0)
7 months ago
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) 8082fb0424
[stable-2.16] default svn URL to 127.0.0.1 for subversion integration tests (#82551) (#85031)
* 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

(cherry picked from commit 4aa109897f)

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
8 months ago
Brian Coca e8bfe2b8cd
Fix uninstall tests (#84973) (#84976)
match file name to package_manager detection of dnf5

(cherry picked from commit 6fc592df9b)
8 months ago
Matt Clay f4180a6289
[stable-2.16] Pin `wheel` to resolve build issues (#84943) (#84946)
(cherry picked from commit 8b0c4825ae)
8 months ago
Martin Krizek d96d956b1b
[stable-2.16] targets/handlers: fix incorrect test cmd (#84567) (#84603)
(cherry picked from commit 3b6d086f5e)
10 months ago
Matt Clay 39062af6bf
[stable-2.16] ansible-test - Use urllib intead of curl (#84551) (#84631)
Also added automatic retries on HTTP request exceptions, since all currently implemented methods (GET/PUT/DELETE) are idempotent.

(cherry picked from commit 7677bf1c9b)
10 months ago
Matt Clay 88a452a601
[stable-2.16] Use separate venvs for each release command (#84641) (#84649)
This avoids requirements conflicts between different commands invoked by the release tool.

(cherry picked from commit 4cc47307ef)
10 months ago
Matt Clay aa59ea58c2
release.py - Use changelog requirements (#83920) (#84646)
Use the changelog sanity test requirements instead of the package-data sanity test requirements.

This enables removal of most package-data sanity test requirements, as they are no longer used by the test itself.
The additional requirements were being maintained only to provide pinned requirements for building the changelog during a release.

(cherry picked from commit cd342f76b4)
10 months ago
Jordan Borean c6bb15e7b0
ansible-test - fix coverage for test modules (#84366) (#84399)
Fixes the coverage path translation for modules located in integration
test paths. Instead of trying to match by the unique temporary path name
that the module is executed as, the reporting tool will translate it to
the static path that the module is actually located under.

(cherry picked from commit f9b58fa13f)
11 months ago
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) 5541c9df98
[stable-2.16] Bump subversion to latest in its test on openSUSE (#84511)
This is necessary because the openSUSE repo in use [[1]] got package
updates on Dec 17, 2024. Our tests require "any" version of the
`subversion` and `subversion-server` packages. So with `subversion`
being pre-installed, it remained on some older version while the
playbook installed the latest version of `subversion-server`. This
caused Apache to fail loading the corresponding module
`mod_dav_svn.so`. The task invoking `httpd` is asynchronous and no
logic checks that it started correctly before attempting to run the
tests — it only checks for the `svn` binary presence.

This is how the problem manifests itself when the server is spawned
interactively:

```
root@2d3bae23bb22:/$ apachectl -k start -f /tmp/ansible-svn/subversion.conf
which: no w3m in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
which: no lynx in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
httpd-prefork: Syntax error on line 3 of /tmp/ansible-svn/subversion.conf: Cannot load /usr/lib64/apache2/mod_dav_svn.so into server: /usr/lib64/apache2/mod_dav_svn.so: undefined symbol: svn_repos__validate_new_path
```

This patch addresses the issue by setting minimum required version to
install to what's currently the latest.

[1]: http://download.opensuse.org/update/leap/15.5/sle/x86_64/
11 months ago
Matt Clay 8cb94e3443
[stable-2.16] Fix result_pickle_error integration test (#84506) (#84509)
The test has been updated to use a custom type which does not support pickling,
instead of relying on Jinja's `Undefined` type. As of Jinja 3.1.5 that type now
supports pickle, which breaks the original implementation of the test.
(cherry picked from commit 5ec236b)
11 months ago
Matt Martz 4de4550af1
Update Ansible release version to v2.16.14.post0. (#84416) 1 year ago
Matt Martz 92aaf6493f
New release v2.16.14 (#84413) 1 year ago
Matt Martz a564f15ddf
Update Ansible release version to v2.16.14rc1.post0. (#84391) 1 year ago
Matt Martz bdd8cbbd46
New release v2.16.14rc1 (#84388) 1 year ago
Brian Coca c817156b7c
command module, fix docs to reflect reality (#84191) (#84279)
though the previous docs were the 'intended' outcome,
the current behaviour has been active for a long time and should
not be removed due to backward compatibility issues.

One thing we can do going forward is deprecate substitution enabled by default.

(cherry picked from commit bf48b538f8)
1 year ago
Jordan Borean 70e83e72b4
Fix CVE-2024-11079 hostvars unsafe context (#84339) (#84353)
Fix to preserve an unsafe variable when accessing through an
intermediary variable from hostvars.

(cherry picked from commit 2936b80dbb)
1 year ago
Matt Clay 12abfb06c2
[stable-2.16] ansible-test - Fix interactive cmd traceback (#84264) (#84267)
(cherry picked from commit 68bfa37838)
1 year ago
Matt Martz 2173442ed1
Update Ansible release version to v2.16.13.post0. (#84256) 1 year ago
Matt Martz 060d2a8ad8
New release v2.16.13 (#84249) 1 year ago
Matt Clay 8ae505fa2c
Update Ansible release version to v2.16.13rc1.post0. (#84200) 1 year ago
Matt Clay 6d06996ca2
New release v2.16.13rc1 (#84195) 1 year ago
Matt Davis 0595e83c22
[stable-2.16] Preserve `_ansible_no_log` from action result; fix `include_vars` to set properly (#84143) (#84181)
* fixes for CVE-2024-8775

* propagate truthy `_ansible_no_log` in action result (previously superseded by task-calculated value)
* always mask entire `include_vars` action result if any file loaded had a false `show_content` flag (previously used only the flag value from the last file loaded)

* update no_log tests for CVE-2024-8775
* include validation of _ansible_no_log preservation when set by actions
* replace static values with dynamic for increased robustness to logging/display/callback changes (but still using grep counts :( )

* changelog

* use ternary, coerce to bool explicitly
(cherry picked from commit c9ac477e53)
1 year ago
Martin Krizek 94126e4082
Reduce number of implicit meta tasks (#84007) (#84046)
This greatly reduces run time on large inventories since meta tasks are
executed in the main process sequentially and just executing them is expensive.

This change avoids running the following implicit meta tasks:
  * ``flush_handlers`` on hosts where no handlers are notified
  * ``noop`` for the linear strategy's lockstep, instead hosts that are
    not executing the current task are just not part of the current host loop

A playbook consiting of two simple plays both running on ~6000 hosts
runs in:
devel: 37s
this PR: 1.3s

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit d6d2251929)
1 year ago
Brian Coca 9d7312f695
[stable-2.16] user action, fix ssh-keygen issues (#84169)
* user module avoid conflicts ssh pub key (#84165)

Remove pub key if we are going to generate private
fix tests for os X

(cherry picked from commit 11e4a6a722)

* old python, no f''

* Restore test import missing from backport

---------

Co-authored-by: Matt Clay <matt@mystile.com>
1 year ago
Sviatoslav Sydorenko (Святослав Сидоренко) 6bb6b9548f
[2.16] Trim `selinux_policytype` @ integration tests (#84139)
The shell command sometimes prints a trailing whitespace which breaks
the tests on old RHELs. This patch is supposed to fix that.

(cherry picked from commit cd74c4bcd5)
1 year ago
Matt Clay aa770130bd
[stable-2.16] ansible-test - Improve container probe error handling (#84109) (#84112)
(cherry picked from commit 48be6f8b6f)
1 year ago
Matt Clay 286a1b3588
[stable-2.16] ansible-test - Work around pylint issue on 3.11 (#84094) (#84098)
(cherry picked from commit 62ce21b6e4)
1 year ago
Matt Martz 4c97263895
Update Ansible release version to v2.16.12.post0. (#84066) 1 year ago
Matt Martz 7ad58ab11b
New release v2.16.12 (#84064) 1 year ago
Matt Martz 522e8ab76a
Update Ansible release version to v2.16.12rc1.post0. (#84029) 1 year ago
Matt Martz 8adbd8fbd3
New release v2.16.12rc1 (#84026) 1 year ago
Sloane Hertel a1cd7ee6e8
[2.16] Clarify galaxy CLI --help about install locations (#83919) (#83964)
* Clarify galaxy CLI --help about install locations (#83919)

* add descriptions for `ansible-galaxy install` and `ansible-galaxy role|collection install`

* fix the usage for installing roles and collections together and include collections in the description for -r

Closes #81159

Co-authored-by: Alan Rominger <arominge@redhat.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
(cherry picked from commit 85d9a40aac)

* ansible-galaxy - fix the usage for role/collection install (#83979)

(cherry picked from commit bf8da52aac)
1 year ago
Martin Krizek 83eeced0f7
dnf5: re-introduce ``state: installed`` alias (#83961) (#83977)
Fixes #83960

(cherry picked from commit aa24e97435)
1 year ago
Matt Clay 1c4804a69d
[stable-2.16] release.py - Include pyproject.toml in git add (#83892) (#83898)
(cherry picked from commit e3ccdaaa2e)
1 year ago
Matt Martz 69fd0b6be3
Update Ansible release version to v2.16.11.post0. (#83926) 1 year ago
Matt Martz 39fc4bd8bb
New release v2.16.11 (#83923) 1 year ago
Matt Martz 860a7fefbc
Update Ansible release version to v2.16.11rc1.post0. (#83893) 1 year ago
Matt Martz 21db2fe85a
New release v2.16.11rc1 (#83890) 1 year ago
Matt Clay 09b69fa133
[stable-2.16] release.py - Add missing setuptools arg to prepare (#83887) (#83889)
* release.py - Add missing setuptools arg to prepare

This allows the prepare command to accept the `--no-setuptools` argument.

It also fixes a traceback when using the `prepare` command.

* Use a more accurate type hint
(cherry picked from commit b544ac13ec)
1 year ago
Felix Fontein dd62bcd957
runtime-metadata sanity test: do not fail deprecation version checks if galaxy.yml has empty `version` (#83831) (#83857)
* Do not create invalid SemanticVersion objects.
* Fix SemanticVersion.parse().
* Add basic runtime-metadata tests.

(cherry picked from commit faf446a895)
1 year ago
Jordan Borean 8d01d0d39d
Add location on include_tasks fail inside include (#83876) (#83882)
Adds the datastore details to the parser error when attempting to
include tasks that contain include_tasks without a filename set. This
change will now display the exact location of the include_tasks that
failed like any normal syntax error.

(cherry picked from commit 1503805b70)
1 year ago
Sloane Hertel b0c737dc69
atomic_move - fix creating file in directory with setgid bit (#83718) (#83765)
* fix creating file in directory with setgid bit

* add a test using the copy module's content option to create a file in a directory with setgid bit

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
(cherry picked from commit 2b91c57c85)
1 year ago
Jordan Borean 40a2fbe50a
ssh and psrp - Support more complex characters in fetch_file (#83753) (#83816) (#83848)
* ssh and psrp - Support more complex chars in fetch_file

Fixes the psrp and ssh (with piped) fetch function to work with paths
that contains glob like characters in the path. For Windows this was
needed when using paths that contain `[]` in the path. For ssh this was
a problem with FreeBSD when using the piped transfer method with similar
characters.

Also tidies up the psrp logic to not inject the paths and buffer size
in the script but pass it as an object through an argument/parameter.

* Fix sanity check

(cherry picked from commit 520fa688ba)
1 year ago
Matt Clay 79046689b9
[stable-2.16] release.py - Auto-update setuptools upper bound (#83713) (#83743)
When releases are prepared, the upper bound on setuptools in pyproject.toml will be automatically updated
to the latest version available on PyPI. This version will then be tested by the package-data sanity test
during the release process and will be used to build the release.

This change ensures that a released version of ansible-core can be built in the future if a new setuptools
release includes breaking changes that would prevent building a functional package. If a downstream package
maintainer requires a newer setuptools version than the upper bound permits, they can patch pyproject.toml
as needed. Since ansible-core releases support specific Python versions, lack of support for new setuptools
releases will have no effect on support for future Python versions.
(cherry picked from commit 4e69d83fac)
1 year ago
Matt Martz b0c138b35e
[stable-2.16] Fix module arg parsing with respawned module on Python 2 (#83846)
* Fix module arg parsing with respawned module on Python 2. Fixes #83812

* smuggled_args should be bytes
1 year ago
Brian Coca f9ac2f0e22
connection plugins: extras fix (#83353) (#83820)
Currently we match the load name, which can be an fqcn, but most users expect the 'naked' name
Now plugins can declare that name by setting _extras_prefix property or fallback to 'non fqcn' if no extras prefix

(cherry picked from commit 718ce13673)
1 year ago
Sloane Hertel 56e39b3e72
Fix ansible-vault integration test for missing vault ids (#83777) (#83783)
* Fix broken, circumvented test for missing vault ids

* verify the command returns a non-zero exit code

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit fe7e68bfcb)
1 year ago
Jordan Borean c58b88b1dd
ssh and psrp - Support more complex characters in fetch_file (#83753) (#83816)
* ssh and psrp - Support more complex chars in fetch_file

Fixes the psrp and ssh (with piped) fetch function to work with paths
that contains glob like characters in the path. For Windows this was
needed when using paths that contain `[]` in the path. For ssh this was
a problem with FreeBSD when using the piped transfer method with similar
characters.

Also tidies up the psrp logic to not inject the paths and buffer size
in the script but pass it as an object through an argument/parameter.

* Fix sanity check

(cherry picked from commit 520fa688ba)
1 year ago
Jordan Borean 52599ee873
Add explicit winrm/psrp tests for HTTP and HTTPS (#83769) (#83809)
(cherry picked from commit dec49e6288)
1 year ago
Martin Krizek bba9f4d02d
Ensure skipped loop iteration register var is available (#83756) (#83789)
Fixes #83619

(cherry picked from commit 9a54ba5a39)
1 year ago
Martin Krizek e97e4239a6
Fix meta tasks breaking host/fork affinity with host_pinned (#83438) (#83779)
Fixes #83294

(cherry picked from commit 5c84220dbb)
1 year ago
Sloane Hertel 050573c256
[stable-2.16] csvfile lookup - fix giving an error when no search term is provided (#83710) (#83733)
* csvfile lookup - fix giving an error when no search term is provided (#83710)

Fixes #83689

(cherry picked from commit 26c8a28d05)

* Fix csvfile test - quote file argument (#83751)

file was intended to be a string, not an undefined variable

(cherry picked from commit 97a60c1e86)
1 year ago
Sloane Hertel c150d1ed91
Fix task-adjacent search path in roles (#83621) (#83731)
* Restore search path in the current task file’s directory for roles

(cherry picked from commit 0be66ed6dc)
1 year ago
Matt Martz 93ce28e51c
Update Ansible release version to v2.16.10.post0. (#83770) 1 year ago
Matt Martz 1344463a76
New release v2.16.10 (#83767) 1 year ago
Matt Martz d550c55ac1
Update Ansible release version to v2.16.10rc1.post0. (#83721) 1 year ago
Matt Martz 9427b825c7
New release v2.16.10rc1 (#83719) 1 year ago
Abhijeet Kasurde b8e011cd5f
[stable-2.16] Update any.yml (#83606)
* fixed typo in description
* fixed comment in examples

(cherry picked from commit 506d12de69)

Co-authored-by: Alex Barth <alexbarth92@outlook.com>
1 year ago
Brian Coca bff59efaaf
module compression is now again settable via var (#83573) (#83592)
Previous change overlooked 'uncommenting' the variable entry as a way to update this  to keep the functionality.

Co-authored-by: Glandos <bugs-github@antipoul.fr>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 0eeb933238)
1 year ago
Martin Krizek 8a5a2c581a
linear: fix included handlers executing in lockstep (#83209) (#83529)
Fixes #83019

(cherry picked from commit 775bc1110e)
1 year ago
Matt Clay 887f24d11a
[stable-2.16] tests: use keyserver with keyid while using apt_key (#83694) (#83702)
(cherry picked from commit 3daf01e270)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
1 year ago
Abhijeet Kasurde 241c75aa44
[stable-2.16] ansible-test - Improve unknown env error message (#83678)
(cherry picked from commit 906c969b55)

Co-authored-by: Matt Clay <matt@mystile.com>
1 year ago
Matt Clay 5b35295b81
[stable-2.16] ansible-test - Remove VyOS tests and support files (#83650) (#83652)
The VyOS remote image required for running the tests is no longer functional.
(cherry picked from commit 79f819dc54)
1 year ago
Matt Clay 7bec343023
[stable-2.16] Use build instead of pep517 for integration test (#83639)
(cherry picked from commit f261a6142f)
1 year ago
Matt Clay 7f5948450b
Update Ansible release version to v2.16.9.post0. (#83614) 1 year ago
Matt Clay 61e9dbac62
New release v2.16.9 (#83612) 1 year ago
Matt Clay 4f74aa1d49
[stable-2.16] Quality-of-life improvements for release tool (#83551) (#83559)
* Quality-of-life improvements for release tool

- Default devel releases to b1
- Default non-devel releases to rc1
- Default to release announcement to console
- Avoid auto-links in GH release annoucements for file sizes

(cherry picked from commit 20a815b03f)
1 year ago
Matt Davis a550dc6af0
Update Ansible release version to v2.16.9rc1.post0. (#83552) 1 year ago
Matt Davis 24fcd34559
New release v2.16.9rc1 (#83550) 1 year ago
Matt Davis 2ed5f661d7
Revert "dnf - arches must be the same in the is_newer_installed check (#83417) (#83505)" (#83549)
This reverts commit 58b22a3476.
1 year ago
Martin Krizek 58b22a3476
dnf - arches must be the same in the is_newer_installed check (#83417) (#83505)
Fixes #83406

(cherry picked from commit 2930a4664c)
1 year ago
Brian Coca a4499fdba0
linear strategy, show templated task name on start (#83473) (#83487)
we only templated in some cases but when queueing we could get an untemplated name for the 'on start' event.

(cherry picked from commit 0d28705ce5)
1 year ago
Brian Coca f0179c0f0c
hostvars templating fix, override serialization (#83509) (#83516)
fixes #82872
nicer implementation courtesy of nitzmahone

(cherry picked from commit 6c0f4c8a2d)
1 year ago
Martin Krizek a4ca9e5ee2
dnf, dnf5: fix installing via wildcard (#83481) (#83492)
Fixes #83373

(cherry picked from commit 0ee6e39615)
1 year ago
Martin Krizek afcaaeb9f6
[stable-2.16] Use f38 official repo for libdnf5 package (#83430)
This will make stable-2.16 testing more stable as the f38 copr repo is
going away at some point. It suffices to test against the nightly repo
in stable-2.17 and devel.
1 year ago
Sviatoslav Sydorenko (Святослав Сидоренко) c8c45cdfb4
🧪 Switch CentOS 7 yum repo mirrors to the vault (#83523)
The distro itself reached EoL on June 30, 2024, but these repository
archives live on and should remain usable for testing.

Refs:
* https://www.redhat.com/en/topics/linux/centos-linux-eol
* https://github.com/ansible/pylibssh/commit/01d3442f
* https://gist.github.com/hkneptune/4961532c2df691db79a1c6b72c251b25
* https://vault.centos.org/7.9.2009/
1 year ago
Matt Martz 0293a105ec
Update Ansible release version to v2.16.8.post0. (#83463) 1 year ago
Matt Martz 2be0e277c4
New release v2.16.8 (#83461) 1 year ago
Matt Clay 3135e55dc9
[stable-2.16] ansible-test - Update PyPI test container to 3.1.0 (#83432). (#83440)
(cherry picked from commit 5af5b4b6c8)
1 year ago
Matt Martz 147bb4e54c
Update Ansible release version to v2.16.8rc1.post0. (#83409) 2 years ago
Matt Martz 97384de6c1
New release v2.16.8rc1 (#83407) 2 years ago
Matt Clay 4576f33ac5
Update azure-pipelines-test-container (#83376) 2 years ago
Abhijeet Kasurde a31f07eee7
[stable-2.16] filter: update the documentation for win_splitdrive (#83307)
Fixes: #83299

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit c1d41ee44e)
2 years ago
Sloane Hertel 68463c2e4d
Fix task.resolved_action callbacks (#82003) (#83330)
* Fix task.resolved_action for callbacks when playbooks use action or local_action

* Fix using module_defaults with 'action' and 'local_action' task FA and add a test case

Fixes #81905

(cherry picked from commit f2435375a8)
2 years ago
Abhijeet Kasurde bcc4718202
[stable-2.16] The extension returned by the splitext contains the dot (#83334)
Fixed examples for splitext filter plugin

(cherry picked from commit 454dd9e91d)

Co-authored-by: Benoît Geeraerts <10222438+b-enoit-be@users.noreply.github.com>
2 years ago
Jordan Borean ae8da5eeae
powershell - Improve Add-Type tempdir handler (#83080) (#83344)
Improves the Add-Type temporary directory handler to include a retry
mechanism and not fail on an error. Deleting a temporary file used in
compilation is not a critical error and should improve the reliability
of Ansible on Windows hosts.

(cherry picked from commit b8f1add983)
2 years ago
Abhijeet Kasurde 1ef184ba2d
[stable-2.16] Fix Test failure with cowsay installed/present (#83350)
(cherry picked from commit e07b4edc54)

Co-authored-by: MajesticMagikarpKing <69774548+yctomwang@users.noreply.github.com>
2 years ago
Matt Martz a97e39b90f
Update Ansible release version to v2.16.7.post0. (#83283) 2 years ago
Matt Martz 4a0839bf60
New release v2.16.7 (#83279) 2 years ago
Matt Martz 92a0ed8ad5
Update Ansible release version to v2.16.7rc1.post0. (#83245) 2 years ago
Matt Martz 495fe7537d
New release v2.16.7rc1 (#83241) 2 years ago
Jordan Borean 96bacf54b2
Add version ceiling for pypsrp (#83122) (#83163)
* 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)
2 years ago
Matt Clay c0f7e9cc2c
ansible-test - Use PyPI proxy for centos7 (#83226) 2 years ago
Martin Krizek c93643fc4d
handlers: fix executing in lockstep using linear (#83030) (#83073)
Fixes #82307

(cherry picked from commit a3cdd831b3)
2 years ago
Matt Martz 5d3a372ef6
[stable-2.16] Issue #80267: Remove user not found warning (#80291) (#83078)
(cherry picked from commit e0bf76e)

Co-authored-by: Sebbo94BY <Sebastian-Kraetzig@gmx.de>
2 years ago
Brian Coca 40bdb2b471
inspect components, ansible_managed templatable (#83053) (#83128)
* inspect components, ansible_managed templatable

fixes #82322

(cherry picked from commit 124d03145c)
2 years ago
Sloane Hertel 59c5f776b6
Add the task info for tombstoned module/action plugins (#82451) (#83040)
* 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

(cherry picked from commit caa86cc4df)
2 years ago
Martin Krizek 28092180b0
[stable-2.16] dnf fixes (#83084)
* dnf: fix installing a package based the file it provides (#82744)

Fixes #82461

(cherry picked from commit a28709f92d)

* dnf: utilize the API for the installed checks (#82725)

Fixes #71808
Fixes #76463
Fixes #81018

(cherry picked from commit f1ded0f417)

* setup_rpm_repo/create_repo: "Arch dependent binaries in noarch package" (#83108)

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)
2 years ago
Abhijeet Kasurde 1f4eb2160b
[stable-2.16] assemble: fixed missing parameter error (#83124)
* content is an optional parameter for _get_diff_data API

Fixes: #82359

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Sloane Hertel 72013559fe
Fix installing roles containing symlinks (#82911) (#83137)
* 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)
2 years ago
Abhijeet Kasurde b92e2eb20b
[stable-2.16] uri: update docs for follow_redirects (#83177)
* [stable-2.16] uri: update docs for follow_redirects

* Updated the docs for the parameter follow_redirects

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

* CI fixes

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

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Matt Martz 3761e11a5c
[stable-2.16] Don't hardcode the dnf module, dynamically select one (#83183). (#83185)
(cherry picked from commit dc6b77beca)
2 years ago
Matt Clay 691ee745e0
[stable-2.16] Update sdist path in release tool (#83059)
The latest setuptools package uses a normalized package name for the sdist.

(cherry picked from commit 8bc0d809a6)
2 years ago
Matt Clay 955d771fbf
Update Ansible release version to v2.16.6.post0. (#83048) 2 years ago
Matt Davis 5bd74a531f
New release v2.16.6 (#83045) 2 years ago
Abhijeet Kasurde 16a89780ed
[stable-2.16] Fixes permission for cache json file to 644 (#83017)
* 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.

* [bp-2.16] Fixes permission for cache json file to 644

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.

---------

Co-authored-by: Rudnei Bertol Junior <rudnei@redhat.com>
2 years ago
Brian Coca 1b860558e3
ansible-config: ensure we get templated default (#82974) (#83009)
AKA all defaults rendered

(cherry picked from commit 46137127a2)
2 years ago
Abhijeet Kasurde 09f4549859
[bp-2.16] facts: Add a generic detection for VMware product name (#83024)
* Use startswith instead of hardcoded values in VMWare product
  detction

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Martin Krizek e6361322e3
2.16: dnf5: replace removed API calls and add fallbacks (#83026)
* 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>
2 years ago
Felix Fontein e631b5b36a
Do not mangle plugin names in collections that start with an underscore. (#82574) (#82885)
(cherry picked from commit c0821346fc)
2 years ago
Brian Coca e70203300a
Unarchive get zipinfo on more OS/distros (#82873) (#82877)
Not all implementations use -l as default for -Z on unzip

(cherry picked from commit 481d8bdc1e)
2 years ago
Abhijeet Kasurde 416517c90e
[stable-2.16] find: do not fail on PermissionError (#82880)
* Log and skip permission errors on files and directories

Fixes: #82027


(cherry picked from commit f73d72e830)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Jordan Borean edbb6d1d59
Allow check mode async task disabling check_mode (#82827) (#82861)
* 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

(cherry picked from commit c9086061ca)
2 years ago
Felix Fontein 9b77492e96
blockinfile: do not crash when filename has no path (#81638) (#82869)
* Do not crash when filename has no path.

* Clean up file after test.

(cherry picked from commit e659c23bf2)
2 years ago
Jordan Borean daf71c51e0
winrm - Handle task timeout (#82784) (#82864)
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.

(cherry picked from commit 8aecd1f9b2)
2 years ago
Brian Coca f8162c19a2
centralize and complete the internal static vars (#82872) (#82925)
* centralize and complete the internal static vars

These vars are internal and should not be overridden nor templated
from inventory nor hostvars.

(cherry picked from commit 8704b9fc29)
2 years ago
Sloane Hertel 85697beee0
fix handling allow_duplicates with the role cache (#82691) (#82927)
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

(cherry picked from commit b3d8cdde5d)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2 years ago
Sloane Hertel 6ac75a20d0
Fix traceback inheriting from NetworkConnectionBase and add integration tests (#82954) (#82956)
(cherry picked from commit 4bddbe69d5)

Co-authored-by: Jeroen van Bemmel <jvb127@gmail.com>
2 years ago
Matt Martz bdf45d1fbc
[stable-2.16] dnf: obey the keepcache setting (#82735) (#82964)
Fixes #81954
(cherry picked from commit 77ab7af)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2 years ago
Jordan Borean 5a3bcd4bac
fetch - add error check on calculated dest (#82970) (#82990)
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)
2 years ago
Matt Martz 1e03880b6f
Update Ansible release version to v2.16.5.post0. (#82910) 2 years ago
Matt Martz ee04df4796
New release v2.16.5 (#82907) 2 years ago
Matt Clay d469cffff5
[stable-2.16] ansible-test - Fix Alpine libexpat bootstrapping (#82896)
(cherry picked from commit ca168eb367)
2 years ago
Matt Martz a1e5c83223
Update Ansible release version to v2.16.5rc1.post0. (#82843) 2 years ago
Matt Martz a1e38ba26b
New release v2.16.5rc1 (#82839) 2 years ago
Matt Martz 4bf051486e
[stable-2.16] Harden the ansiballz and respawn python templates (#81753) (#82747)
Harden our python templates for respawn and ansiballz around str literal quoting
(cherry picked from commit 7c73855)
2 years ago
Jordan Borean 00d6f00a43
Re-enable psrp tests that were disabled (#82785) (#82788)
(cherry picked from commit bb030db546)
2 years ago
Jordan Borean 075623770d
Avoid winrm hang on stdin write failure (#82766) (#82782)
If the connection plugin fails to write the data to run to stdin we will
only attempt to get the output with one operation attempt. If this times
out we will consider the command to have failed and raise an exception
instead of forever attempting to get the output.

(cherry picked from commit 942424e10b)
2 years ago
Martin Krizek 627a92e34a
Fix error when templating an unsafe string leading to a type error in Python (#82675) (#82745)
Fixes #82600

(cherry picked from commit 79ea21a39f)

Co-authored-by: Davide Sbetti <davide.sbetti@gmail.com>
2 years ago
Matt Martz eb73cc488b
[stable-2.16] Install crun from Alpine 3.19 for known musl compatibility (#82812) (#82814)
(cherry picked from commit 86f48a5)
2 years ago
Martin Krizek 56f31126ad
Prevent failures due to unsafe plugin name (#82759) 2 years ago
Matt Clay b65a6cd1b2
[stable-2.16] ansible-test - Add work-around for pytest>=8 errors (#82723) (#82727)
* ansible-test - Add work-around for pytest>=8 errors
* Update changelogs/fragments/ansible-test-pytest-8.yml

(cherry picked from commit a1edb61ce7)
2 years ago
Matt Martz 4a92114686
Update Ansible release version to v2.16.4.post0. (#82751) 2 years ago
Matt Martz 9f6649cadc
New release v2.16.4 (#82746) 2 years ago
Matt Martz 6ad778c6b5
[stable-2.16] Disable ansible-test podman container tests on Ubuntu 22.04 (#82748) (#82750)
(cherry picked from commit 9a8be1e)
2 years ago
Matt Martz f41469fe0c
Update Ansible release version to v2.16.4rc1.post0. (#82710) 2 years ago
Matt Martz 8c4aa28696
New release v2.16.4rc1 (#82709) 2 years ago
Mark Goddard 23d055e835
Fix issues with ansible-playbook-callbacks test (#82407) (#82630)
The timing of the async tasks was a little unpredictable, meaning that
sometimes we would get an unexpected number of v2_runner_on_async_poll
callbacks, and fail the test. This change fixes the issue by increasing
the poll interval to 2 seconds and the sleep duration to 3 seconds, such
that on a reasonably responsive system we will poll twice per task, with
the sleep ending in the middle of the two polls.

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

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

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

(cherry picked from commit 4a2de764ec)
2 years ago
Sloane Hertel 74f99dc36c
Fix ansible.builtin.include_vars - depth (#80995) (#82610)
* 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>
(cherry picked from commit 48bed1e15a)

Co-authored-by: tachyontec <92679798+tachyontec@users.noreply.github.com>
2 years ago
Martin Krizek c93234304b
Do not ignore SyntaxError from jinja2.Environment.from_string (#82607) (#82614)
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

(cherry picked from commit 6d34eb88d9)
2 years ago
Sloane Hertel add76f36f5
fix loading vars_plugins in roles (#82273) (#82609)
* 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

(cherry picked from commit 13e6d8487a)
2 years ago
Sloane Hertel 9a07ab72b4
[2.16] expect - fix argument spec error with timeout=null (#82522) (#82608)
* expect - fix argument spec error with timeout=null (#82522)

* Fix using timeout=null to wait indefinitely

* fix error message

(cherry picked from commit da9edd7760)

* python2-ify
2 years ago
Maxwell G 3e3c29b86e
changelog: use correct spelling for possessive pronoun its (#82594) 2 years ago
Matt Martz 10211fcf02
Update Ansible release version to v2.16.3.post0. (#82622) 2 years ago
Matt Martz df6c5244ef
New release v2.16.3 (#82619) 2 years ago
Matt Martz 5bef147a5d
Update Ansible release version to v2.16.3rc1.post0. (#82591) 2 years ago
Matt Martz 19e82eca02
New release v2.16.3rc1 (#82587) 2 years ago
Nilashish Chakraborty d817f5e87f
Support `action_plugin` in plugin_routing_schema (#82562) (#82581)
now validation schema matches reality

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit b01f1f207c)
2 years ago
Brian Coca 611d0e4dcf Better errors for delegate_to (#82319)
Handle empty result of templating
  Also skip work when we omit

(cherry picked from commit 6ebefaceb6)
2 years ago
Brian Coca 50736c45ba 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

(cherry picked from commit a9919dd7f6)
2 years ago
snipfoo c3b4b3ebe3 Run all handlers with the same `listen` topic when notified from another handler (#82364)
Fixes #82363

(cherry picked from commit 8328153121)
2 years ago
Brian Coca cfa8caff39
[stable-2.16] Role fixes (#82339) (#82452)
* 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>
(cherry picked from commit 55065c0042)

* import_role does not get public until next version
2 years ago
Brian Coca 46d9d4b17c ansible-config dedupe ini plugin entries (#82498)
added test for ini file integrity, also ensuring no dupes

(cherry picked from commit 6c2895fd88)
2 years ago
Sloane Hertel 9252584e89
ansible-galaxy - fix exit code for failed role import (#82193) (#82412)
(cherry picked from commit fe81164fe5)
2 years ago
Sloane Hertel 16c40a03ae
[ansible-galaxy] Remove role name conversion when the repo startswith 'ansible-role' (#82508) (#82532)
* Remove role name conversion based on whether the repo name starts with
ansible-role

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

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

changelog

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

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

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

---------

Co-authored-by: flowerysong <junk+github@flowerysong.com>
(cherry picked from commit d7be3824fe)
2 years ago
Matt Martz b9a03bbf5a
[stable-2.16] Ensure ANSIBLE_NO_LOG is respected (CVE-2024-0690) (#82565) (#82566)
(cherry picked from commit 6935c8e)
2 years ago
Sloane Hertel a25fe10056
Targeted fix for installing roles with symlinks containing '..' (#82165) (#82323)
Set the tarfile attribute to a normalized value from unfrackpath instead
of validating path parts and omiting potentially invald parts

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

(cherry picked from commit 3a42a00368)
2 years ago
Matt Martz c6a652c081
[stable-2.16] Enable directly using `AnsibleUnsafeText` with Python `pathlib` (#82510)
* Enable directly using `AnsibleUnsafeText` with Python `pathlib`. Fixes #82414
2 years ago
Felix Fontein 94ac041cb7
Fix broken docs RST reference. (#82286) (#82297)
(cherry picked from commit 479949aad2)
2 years ago
Matt Martz 643277b976
Update Ansible release version to v2.16.2.post0. (#82404) 2 years ago
Matt Martz 71a1f55a34
New release v2.16.2 (#82399) 2 years ago
Matt Martz afe3fc184f
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
2 years ago
Sviatoslav Sydorenko d949af5093
[backport][stable-2.16] 🧪 Replace GitHub SVN integration test with local TLS (#82368)
* [backport][stable-2.16] 🧪 Replace GitHub SVN integration test with local TLS

PR #82334

* Run svn integration test locally with TLS

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

Resolves #82207

* Replace GitHub SVN HTTPS URL w/ localhost over TLS

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

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

(cherry picked from commit dd0138ba21)

* Implement compat w/ opensuse15, centos7 & rhel7/8
2 years ago
Matt Martz 94e8d99ef4
Update Ansible release version to v2.16.1.post0. (#82349) 2 years ago
Matt Martz 6d40beeef4
New release v2.16.1 (#82346) 2 years ago
Matt Clay 59aa0145d2
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
2 years ago
Matt Martz 6655343d6d
Update Ansible release version to v2.16.1rc1.post0. (#82304) 2 years ago
Matt Martz 5007068bfe
New release v2.16.1rc1 (#82301) 2 years ago
Matt Martz 270b39f6ff
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
2 years ago
Martin Krizek f302b2f592
Allow include_tasks handlers for searching role subdirs (#82248) (#82268)
Fixes #82241

(cherry picked from commit d664f13b4a)
2 years ago
Brian Coca bb787c119d
ansible-pull: expand destinantion directoy to avoid purgin in / (#82030) (#82221)
* expand destinantion directoy to avoid purgin in /

  bad things could happen and help alone is not enough

(cherry picked from commit 8825e60add)
2 years ago
Brian Coca 8a87e1c5d3
no_log avoid masking booleans (#82217) (#82235)
* no_log avoid masking booleans (#82217)

* no_log avoid masking booleans

* clog

* fix issues

(cherry picked from commit 6e448edc63)

* unused boil is hot
2 years ago
Brian Coca fb5d254a79
wait_for, fallback to read for non mmapable files (#82064) (#82233)
* wait_for, fallback to read for non mmapable files (#82064)

* also handle oserror, added debug jic

(cherry picked from commit 8b102dca4a)

* skip problem versions
2 years ago
Martin Krizek 2f7376ce06
flush_handlers: handle a failure in a nested block with force_handlers (#81572) (#82197)
Fixes #81532

ci_complete

(cherry picked from commit a8b6ef7e7c)
2 years ago
Maxwell G 32aedb8bab
setup.cfg: add `Programming Language :: Python :: 3.12` classifier (#82152)
ansible-core 2.16+ supports Python 3.12. This corrects missing metadata.
2 years ago
Brian Coca 71b00cefac
restore role param precedence (#82106) (#82138)
* add test for setfact/param override

(cherry picked from commit 20a54eb236)
2 years ago
Abhijeet Kasurde 6f8261bcf9
[bp-2.16] Fix the strategy plugin description in keywords (#82133)
Fixes: https://github.com/ansible/ansible-documentation/issues/762

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 8ecc1d485b)
2 years ago
Jordan Borean c2a3cad466
Remove duplicate winrm test (#82124) (#82127)
(cherry picked from commit f8a9fd4758)
2 years ago
Matt Davis 75bce4b9d5
add pep668 note to pip module docs (#82096) (#82098)
(cherry picked from commit 3ea5304a57)
2 years ago
Brian Coca e13569d0e2
ansible-pull now handles all secret files CLI options (#82009) (#82070)
* ansible-pull added missing pasthrough for secrets

 Both become and connection password file options were missing.
 Also added test

(cherry picked from commit 99e0d25857)
2 years ago
Brian Coca 6cfa8ec021
Fix Jinja plugin deduplication (#82002) (#82053)
for j2 plugins dedupe on path and  not basename
for j2 this is a container file , for other plugins file name == plugin name

(cherry picked from commit b4566c18b3)
2 years ago
Abhijeet Kasurde 859f2876f0
[bp-2.16] Update Python3 (#82203)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit c5b68ef16d)
2 years ago
Matt Martz 862c5824d0
Update Ansible release version to v2.16.0.post0. (#82144) 2 years ago
Matt Martz 704ee70943
New release v2.16.0 (#82141) 2 years ago
Matt Davis a13df22c02
remove args passthru on role runme tests that use grep (#82060) (#82061)
* varying verbosity was masking some first-pass test failures

(cherry picked from commit 40263992df)
2 years ago
Matt Clay 31aac52a72 [stable-2.16] ansible-test - Fix parsing of cgroup entries
(cherry picked from commit e933d9d8a6)

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay 00f74e03b2 [stable-2.16] Fix subversion integration test (#82029)
- Remove dependency on the htpasswd module (and thus passlib)
- Fix setup/teardown of the httpd process
- Fix cleanup of temporary directories.
(cherry picked from commit 09d943445c)

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Martz f6fb5b2031
Update Ansible release version to v2.16.0rc1.post0. (#81987) 2 years ago
Matt Martz 2223709bdd
New release v2.16.0rc1 (#81986) 2 years ago
Matt Clay 33248690fe
ansible-test - Update base/default containers (#81956) 2 years ago
Matt Clay f9dfd28cff
[stable-2.16] Update default test container Python to 3.12 and support for PyLint 3.0.1 (#81953) (#81955)
* 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.

(cherry picked from commit d8484f0af7)
2 years ago
Martin Krizek 9c91e578d0
[stable-2.16] run_once: unnotify hosts on handlers that are not run (#81667) (#81920)
Fixes #81666
(cherry picked from commit 2d5861c)
2 years ago
Martin Krizek f3f0e6a0f8
[stable-2.16] Properly template tags in parent blocks (#81624) (#81921)
When templating tags (which happens outside of standard `post_validate`) we
need to template each object in the inheritance chain and set the templated
values on those objects individually. That way when `task.tags` is called the
`extend` functionality properly picks up the templated values of all
parents into one flatten list.

Fixes #81053
(cherry picked from commit 9b3ed5e)
2 years ago
Jordan Borean e856696f09
ansible-galaxy - fix traceback error for invalid req file (#81917) (#81924)
Provide a better error message when encountering a YAML requirements file that is not a dictionary or list.

Fixes: #81901
(cherry picked from commit 8a5ccc9d63)
2 years ago
Jordan Borean c70f7d829f
Add test coverage for winrm (#81910) - 2.16 (#81914)
* Add test coverage for winrm (#81910)

(cherry picked from commit 282908c57e)

* Add more winrm coverage (#81923)

(cherry picked from commit 976067c15f)
2 years ago
Sloane Hertel 889248bcf7
optimize host_group_vars and vars plugin loading (#79945) (#81878)
* 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>
(cherry picked from commit debf2be913)
2 years ago
Matt Davis 7d789de400
switch available_hosts to `frozenset` from `list` in ansible-inventory (#81870) (#81875)
* major speedup large inventories, since it's consulted iteratively

(cherry picked from commit c1343cc304)
2 years ago
Jordan Borean 5665eca5e9
win_fetch - improve test time by not scanning Win dir (#81884) (#81888)
(cherry picked from commit dfc62589f6)
2 years ago
Matt Martz 4ac5b51529
Update Ansible release version to v2.16.0b2.post0. (#81868) 2 years ago
Matt Martz 2dd22e3025
New release v2.16.0b2 (#81864) 2 years ago
Matt Clay 2578664198
[stable-2.16] ansible-test - Update distro containers (#81851) (#81859)
* ansible-test - Update distro containers

* Update the alpine3 container to Python 3.11

* Update changelog.

(cherry picked from commit b7903669b4)
2 years ago
Brian Coca 9a4bc7e7b3
Restore import_role variable exporting behavior (#81840)
* Import role public (#81772)

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

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

* adapted to prev version

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

* remove typoe

* quote it
2 years ago
Sloane Hertel cbae91501a
Update the test containers to include Python 3.12.0 final (#81857) 2 years ago
Matt Clay 8c4736dd76
[stable-2.16] ansible-test - Invoke container sleep through env (#81853) (#81856)
(cherry picked from commit 20f17687da)
2 years ago
Abhijeet Kasurde a8e59b2547
[backport/2.16] Bump Pylint sanity test requirements for 3.12 (#81850)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Abhijeet Kasurde de732ed712
[backport/2.16] Bump sanity test requirements for 3.12 (#81848) 2 years ago
Sviatoslav Sydorenko c7793e65ec
Bump `coverage.py` to v7.3.2 in `ansible-test` (#81844) (#81845)
(cherry picked from commit ec265ec08a)
2 years ago
Matt Clay 58cf53b3c3
[stable-2.16] ansible-test - Improve compatibility with pylint 3 (#81841) (#81842)
(cherry picked from commit f31c287348)
2 years ago
Sloane Hertel 755a7c7387
Fix reporting role as not found when remote_data is None (#81829) (#81838)
(cherry picked from commit 7fab552563)
2 years ago
Matt Martz 5008c56c50
[stable-2.16] Install upgraded crun from edge (#81833) (#81839)
(cherry picked from commit e78cc1e)
2 years ago
Matt Martz 831dc6e444
Add compat function for parsing Content-Disposition header (#81807)
* py2 compat for get_param

* Add tests, and handle ValueError

* Add clog frag
2 years ago
Matt Clay c2567b1d67
[stable-2.16] ansible-test - Update sanity test requirements (#81810) (#81811)
(cherry picked from commit d6a356d7cd)
2 years ago
Jordan Borean 9632086901
winrm - make command input more resiliant (#81538) (#81794)
* winrm - make command input more resiliant

* Expand warning message

(cherry picked from commit f22231de20)
2 years ago
Sloane Hertel 42d7a06cd8
Update test container versions for stable-2.16 (#81790) 2 years ago
Matt Martz fffb3c403f
[stable-2.16] Prevent roles from using symlinks to overwrite files outside of the installation directory (#81780) (#81783)
* Sanitize linkname during role installs

* Add tests

* add clog frag
(cherry picked from commit ddf0311)
2 years ago
Matt Martz c6affcf7c1
Update Ansible release version to v2.16.0b1.post0. (#81779) 2 years ago
Matt Martz 00ca6b94d0
New release v2.16.0b1 (#81778) 2 years ago
Val V 37a0754cbf
Daemonize follow-up fixes (#81584) (#81766)
* Ensure binary data transmission in daemonize

* Add changelog fragment

(cherry picked from commit 91f94fb59d)
2 years ago
Martin Krizek 9033002a86
Allow for searching handler subdir for included task via include_role (#81733) (#81759)
Fixes #81722

(cherry picked from commit 1e7f7875c6)
2 years ago
Sviatoslav Sydorenko e470954985
Always allow "no-other-choice" pre-release dependencies when resolving collection dependency tree (#81746)
PR #81606.

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

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

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

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

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

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

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit 7662a05085)
2 years ago
Matt Clay e3eecf096f
[stable-2.16] ansible-test - Skip pylint test on Python 3.12 (#81706) (#81757)
(cherry picked from commit 3794612832)
2 years ago

@ -31,7 +31,7 @@ variables:
- name: fetchDepth
value: 500
- name: defaultContainer
value: quay.io/ansible/azure-pipelines-test-container:4.0.1
value: quay.io/ansible/azure-pipelines-test-container:7.0.0
pool: Standard
@ -79,34 +79,30 @@ stages:
- template: templates/matrix.yml # context/target
parameters:
targets:
- name: macOS 13.2
test: macos/13.2
- name: RHEL 7.9
test: rhel/7.9
- name: RHEL 8.8 py36
test: rhel/8.8@3.6
- name: RHEL 8.8 py311
test: rhel/8.8@3.11
- name: RHEL 9.2 py39
test: rhel/9.2@3.9
- name: RHEL 9.2 py311
test: rhel/9.2@3.11
- name: FreeBSD 13.2
test: freebsd/13.2
- name: RHEL 8.10 py36
test: rhel/8.10@3.6
- name: RHEL 8.10 py311
test: rhel/8.10@3.11
- name: RHEL 9.6 py39
test: rhel/9.6@3.9
- name: RHEL 9.6 py311
test: rhel/9.6@3.11
- name: RHEL 10.0
test: rhel/10.0
groups:
- 1
- 2
- template: templates/matrix.yml # context/controller
parameters:
targets:
- name: macOS 13.2
test: macos/13.2
- name: RHEL 8.8
test: rhel/8.8
- name: RHEL 9.2
test: rhel/9.2
- name: FreeBSD 13.2
test: freebsd/13.2
- name: RHEL 8.10
test: rhel/8.10
- name: RHEL 9.6
test: rhel/9.6
- name: RHEL 10.0
test: rhel/10.0
groups:
- 3
- 4
@ -114,14 +110,12 @@ stages:
- template: templates/matrix.yml # context/controller (ansible-test container management)
parameters:
targets:
- name: Alpine 3.18
test: alpine/3.18
- name: Fedora 38
test: fedora/38
- name: RHEL 8.8
test: rhel/8.8
- name: RHEL 9.2
test: rhel/9.2
- name: RHEL 8.10
test: rhel/8.10
- name: RHEL 9.6
test: rhel/9.6
- name: RHEL 10.0
test: rhel/10.0
- name: Ubuntu 22.04
test: ubuntu/22.04
groups:
@ -133,14 +127,6 @@ stages:
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3
test: alpine3
- name: CentOS 7
test: centos7
- name: Fedora 38
test: fedora38
- name: openSUSE 15
test: opensuse15
- name: Ubuntu 20.04
test: ubuntu2004
- name: Ubuntu 22.04
@ -152,10 +138,6 @@ stages:
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3
test: alpine3
- name: Fedora 38
test: fedora38
- name: Ubuntu 22.04
test: ubuntu2204
groups:
@ -196,17 +178,6 @@ stages:
- test: 2016
- test: 2019
- test: 2022
- stage: Incidental
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: i/{0}/1
targets:
- name: IOS Python
test: ios/csr1000v/
- name: VyOS Python
test: vyos/1.1.8/
- stage: Summary
condition: succeededOrFailed()
dependsOn:
@ -218,6 +189,5 @@ stages:
- Galaxy
- Generic
- Incidental_Windows
- Incidental
jobs:
- template: templates/coverage.yml

@ -13,6 +13,9 @@ else
target="shippable/generic/"
fi
stage="${S:-prod}"
# shellcheck disable=SC2086
ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
--remote-terminate always --remote-stage "${stage}" \
--docker default --python "${python}"

@ -0,0 +1,6 @@
[tool.pip-tools]
allow-unsafe = true # weird outdated default
annotation-style = "line" # put the source tracking comments inline
generate-hashes = false # pip bug https://github.com/pypa/pip/issues/9243
resolver = "backtracking" # modern depresolver
strip-extras = true # so that output files are true pip constraints

@ -0,0 +1,18 @@
#
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# pip-compile --allow-unsafe --annotation-style=line --output-file=codecov.txt --strip-extras codecov.in
#
certifi==2025.8.3 # via requests, sentry-sdk
charset-normalizer==3.4.3 # via requests
click==8.2.1 # via codecov-cli
codecov-cli==11.2.3 # via -r codecov.in
idna==3.10 # via requests
ijson==3.4.0 # via codecov-cli
pyyaml==6.0.2 # via codecov-cli
requests==2.32.5 # via responses
responses==0.21.0 # via codecov-cli
sentry-sdk==2.38.0 # via codecov-cli
test-results-parser==0.5.4 # via codecov-cli
urllib3==2.5.0 # via requests, responses, sentry-sdk

@ -8,11 +8,15 @@ Python coverage, as well as PowerShell and Python stubs can all be uploaded.
import argparse
import dataclasses
import pathlib
import shutil
import shlex
import subprocess
import tempfile
import typing as t
import urllib.request
import venv
SCRIPTS_DIR = pathlib.Path(__file__).parent.resolve()
DEPS_DIR = SCRIPTS_DIR / 'dependencies'
@dataclasses.dataclass(frozen=True)
@ -42,6 +46,36 @@ def parse_args() -> Args:
return Args(**kwargs)
def run(*args: str | pathlib.Path) -> None:
cmd = [str(arg) for arg in args]
print(f'==> {shlex.join(cmd)}', flush=True)
subprocess.run(cmd, check=True)
def install_codecov(dest: pathlib.Path) -> pathlib.Path:
"""Populate a transitively pinned venv with ``codecov-cli``."""
requirement_file = DEPS_DIR / 'codecov.in'
constraint_file = requirement_file.with_suffix('.txt')
venv_dir = dest / 'venv'
python_bin = venv_dir / 'bin' / 'python'
codecov_bin = venv_dir / 'bin' / 'codecovcli'
venv.create(venv_dir, with_pip=True)
run(
python_bin,
'-m',
'pip',
'install',
f'--constraint={constraint_file!s}',
f'--requirement={requirement_file!s}',
'--disable-pip-version-check',
)
return codecov_bin
def process_files(directory: pathlib.Path) -> t.Tuple[CoverageFile, ...]:
processed = []
for file in directory.joinpath('reports').glob('coverage*.xml'):
@ -56,45 +90,42 @@ def process_files(directory: pathlib.Path) -> t.Tuple[CoverageFile, ...]:
return tuple(processed)
def upload_files(codecov_bin: pathlib.Path, files: t.Tuple[CoverageFile, ...], dry_run: bool = False) -> None:
def upload_files(codecov_bin: pathlib.Path, config_file: pathlib.Path, files: t.Tuple[CoverageFile, ...], dry_run: bool = False) -> None:
for file in files:
cmd = [
str(codecov_bin),
'--name', file.name,
'--file', str(file.path),
'--disable-telem',
'--codecov-yml-path',
config_file,
'upload-process',
'--disable-search',
'--disable-file-fixes',
'--plugin',
'noop',
'--name',
file.name,
'--file',
file.path,
]
for flag in file.flags:
cmd.extend(['--flags', flag])
cmd.extend(['--flag', flag])
if dry_run:
print(f'DRY-RUN: Would run command: {cmd}')
continue
subprocess.run(cmd, check=True)
cmd.append('--dry-run')
def download_file(url: str, dest: pathlib.Path, flags: int, dry_run: bool = False) -> None:
if dry_run:
print(f'DRY-RUN: Would download {url} to {dest} and set mode to {flags:o}')
return
run(*cmd)
with urllib.request.urlopen(url) as resp:
with dest.open('w+b') as f:
# Read data in chunks rather than all at once
shutil.copyfileobj(resp, f, 64 * 1024)
dest.chmod(flags)
def main():
def main() -> None:
args = parse_args()
url = 'https://ci-files.testing.ansible.com/codecov/linux/codecov'
with tempfile.TemporaryDirectory(prefix='codecov-') as tmpdir:
codecov_bin = pathlib.Path(tmpdir) / 'codecov'
download_file(url, codecov_bin, 0o755, args.dry_run)
config_file = pathlib.Path(tmpdir) / 'config.yml'
config_file.write_text('')
codecov_bin = install_codecov(pathlib.Path(tmpdir))
files = process_files(args.path)
upload_files(codecov_bin, files, args.dry_run)
upload_files(codecov_bin, config_file, files, args.dry_run)
if __name__ == '__main__':

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

@ -12,6 +12,7 @@ jobs:
- job: test_${{ replace(replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_'), '@', '_') }}
displayName: ${{ job.name }}
container: $[ variables.defaultContainer ]
timeoutInMinutes: 65
workspace:
clean: all
steps:

@ -0,0 +1,680 @@
=============================================
ansible-core 2.16 "All My Love" Release Notes
=============================================
.. contents:: Topics
v2.16.15rc1
===========
Release Summary
---------------
| Release Date: 2025-12-02
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Minor Changes
-------------
- ansible-test - Add RHEL 10.0 as a remote platform for testing.
- ansible-test - Automatically retry HTTP GET/PUT/DELETE requests on exceptions.
- ansible-test - Implement new authentication methods for accessing the Ansible Core CI service.
- ansible-test - Replace FreeBSD 13.2 remote with 13.3.
- ansible-test - Switch from RHEL 8.8 to 8.10.
- ansible-test - Switch from RHEL 9.2 to 9.6.
- ansible-test - Use Python's ``urllib`` instead of ``curl`` for HTTP requests.
- ansible-test - Use the ``-t`` option to set the stop timeout when stopping a container. This avoids use of the ``--time`` option which was deprecated in Docker v28.0.
Bugfixes
--------
- Variable loading now uses file source instead of variables when invalidly formmated vars file is loaded.
- ansible-test - Fix Python relative import resolution from ``__init__.py`` files when using change detection.
- ansible-test - Fix up coverage reporting to properly translate the temporary path of integration test modules to the expected static test module path.
- ansible-test - Limit package install retries during managed remote instance bootstrapping.
- build - Pin ``wheel`` in ``pyproject.toml`` to ensure compatibility with supported ``setuptools`` versions.
- run_command - Fixed premature selector unregistration on empty read from stdout/stderr that caused truncated output or hangs in rare situations.
- user - Set timeout for passphrase interaction.
- user - Update prompt for SSH key passphrase (https://github.com/ansible/ansible/issues/84484).
v2.16.14
========
Release Summary
---------------
| Release Date: 2024-12-02
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Security Fixes
--------------
- Templating will not prefer AnsibleUnsafe when a variable is referenced via hostvars - CVE-2024-11079
Bugfixes
--------
- ansible-test - Fix traceback that occurs after an interactive command fails.
v2.16.13
========
Release Summary
---------------
| Release Date: 2024-11-04
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Minor Changes
-------------
- ansible-test - Improve container runtime probe error handling. When unexpected probe output is encountered, an error with more useful debugging information is provided.
Security Fixes
--------------
- include_vars action - Ensure that result masking is correctly requested when vault-encrypted files are read. (CVE-2024-8775)
- task result processing - Ensure that action-sourced result masking (``_ansible_no_log=True``) is preserved. (CVE-2024-8775)
- user action won't allow ssh-keygen, chown and chmod to run on existing ssh public key file, avoiding traversal on existing symlinks (CVE-2024-9902).
Bugfixes
--------
- Improve performance on large inventories by reducing the number of implicit meta tasks.
- ansible-test - Enable the ``sys.unraisablehook`` work-around for the ``pylint`` sanity test on Python 3.11. Previously the work-around was only enabled for Python 3.12 and later. However, the same issue has been discovered on Python 3.11.
- user action will now require O(force) to overwrite the public part of an ssh key when generating ssh keys, as was already the case for the private part.
v2.16.12
========
Release Summary
---------------
| Release Date: 2024-10-07
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Bugfixes
--------
- Add descriptions for ``ansible-galaxy install --help` and ``ansible-galaxy role|collection install --help``.
- ``ansible-galaxy install --help`` - Fix the usage text and document that the requirements file passed to ``-r`` can include collections and roles.
- dnf5 - re-introduce the ``state: installed`` alias to ``state: present`` (https://github.com/ansible/ansible/issues/83960)
v2.16.11
========
Release Summary
---------------
| Release Date: 2024-09-09
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Bugfixes
--------
- Fix ``SemanticVersion.parse()`` to store the version string so that ``__repr__`` reports it instead of ``None`` (https://github.com/ansible/ansible/pull/83831).
- Fix an issue where registered variable was not available for templating in ``loop_control.label`` on skipped looped tasks (https://github.com/ansible/ansible/issues/83619)
- Fix for ``meta`` tasks breaking host/fork affinity with ``host_pinned`` strategy (https://github.com/ansible/ansible/issues/83294)
- Fix using the current task's directory for looking up relative paths within roles (https://github.com/ansible/ansible/issues/82695).
- atomic_move - fix using the setgid bit on the parent directory when creating files (https://github.com/ansible/ansible/issues/46742, https://github.com/ansible/ansible/issues/67177).
- connection plugins using the 'extras' option feature would need variables to match the plugin's loaded name, sometimes requiring fqcn, which is not the same as the documented/declared/expected variables. Now we fall back to the 'basename' of the fqcn, but plugin authors can still set the expected value directly.
- csvfile lookup - give an error when no search term is provided using modern config syntax (https://github.com/ansible/ansible/issues/83689).
- include_tasks - Display location when attempting to load a task list where ``include_*`` did not specify any value - https://github.com/ansible/ansible/issues/83874
- module respawn - Address an issue with Python 2 where a respawned module could not parse module args (https://github.com/ansible/ansible/issues/83812)
- powershell - Improve CLIXML decoding to decode all control characters and unicode characters that are encoded as surrogate pairs.
- psrp - Fix bug when attempting to fetch a file path that contains special glob characters like ``[]``
- runtime-metadata sanity test - do not crash on deprecations if ``galaxy.yml`` contains an empty ``version`` field (https://github.com/ansible/ansible/pull/83831).
- ssh - Fix bug when attempting to fetch a file path with characters that should be quoted when using the ``piped`` transfer method
v2.16.10
========
Release Summary
---------------
| Release Date: 2024-08-12
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Minor Changes
-------------
- ansible-test - Improve the error message shown when an unknown ``--remote`` or ``--docker`` option is given.
- ansible-test - Removed the ``vyos/1.1.8`` network remote as it is no longer functional.
Bugfixes
--------
- config, restored the ability to set module compression via a variable
- linear strategy: fix handlers included via ``include_tasks`` handler to be executed in lockstep (https://github.com/ansible/ansible/issues/83019)
v2.16.9
=======
Release Summary
---------------
| Release Date: 2024-07-15
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Bugfixes
--------
- dnf, dnf5 - fix for installing a set of packages by specifying them using a wildcard character (https://github.com/ansible/ansible/issues/83373)
- linear strategy now provides a properly templated task name to the v2_runner_on_started callback event.
- templating hostvars under native jinja will not cause serialization errors anymore.
v2.16.8
=======
Release Summary
---------------
| Release Date: 2024-06-17
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Minor Changes
-------------
- ansible-test - Update ``pypi-test-container`` to version 3.1.0.
Bugfixes
--------
- Fix the task attribute ``resolved_action`` to show the FQCN instead of ``None`` when ``action`` or ``local_action`` is used in the playbook.
- Fix using ``module_defaults`` with ``local_action``/``action`` (https://github.com/ansible/ansible/issues/81905).
- fixed unit test test_borken_cowsay to address mock not been properly applied when existing unix system already have cowsay installed.
- powershell - Implement more robust deletion mechanism for C# code compilation temporary files. This should avoid scenarios where the underlying temporary directory may be temporarily locked by antivirus tools or other IO problems. A failure to delete one of these temporary directories will result in a warning rather than an outright failure.
v2.16.7
=======
Release Summary
---------------
| Release Date: 2024-05-20
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Minor Changes
-------------
- ansible.builtin.user - Remove user not found warning (https://github.com/ansible/ansible/issues/80267)
Bugfixes
--------
- Add a version ceiling constraint for pypsrp to avoid potential breaking changes in the 1.0.0 release.
- 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 handlers not being executed in lockstep using the linear strategy in some cases (https://github.com/ansible/ansible/issues/82307)
- Give the tombstone error for ``include`` pre-fork like other tombstoned action/module plugins.
- Include the task location when a module or action plugin is deprecated (https://github.com/ansible/ansible/issues/82450).
- Mirror the behavior of dnf on the command line when handling NEVRAs with omitted epoch (https://github.com/ansible/ansible/issues/71808)
- ansible-test - Automatically enable the PyPI proxy for the ``centos7`` container to restore the ability to use ``pip`` in that container.
- ansible_managed restored it's 'templatability' by ensuring the possible injection routes are cut off earlier in the process.
- assemble - fixed missing parameter 'content' in _get_diff_data API (https://github.com/ansible/ansible/issues/82359).
- 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)
- uri - update the documentation for follow_redirects.
v2.16.6
=======
Release Summary
---------------
| Release Date: 2024-04-15
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Bugfixes
--------
- Consolidated the list of internal static vars, centralized them as constant and completed from some missing entries.
- Fix check for missing _sub_plugin attribute in older connection plugins (https://github.com/ansible/ansible/pull/82954)
- Fixes permission for cache json file from 600 to 644 (https://github.com/ansible/ansible/issues/82683).
- Slight optimization to hostvars (instantiate template only once per host, vs per call to var).
- allow_duplicates - fix evaluating if the current role allows duplicates instead of using the initial value from the duplicate's cached role.
- ansible-config will now properly template defaults before dumping them.
- 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).
- 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).
- 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)
- dnf5 - replace removed API calls
- facts - add a generic detection for VMware in product name.
- 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).
- unarchive modules now uses zipinfo options without relying on implementation defaults, making it more compatible with all OS/distributions.
- winrm - Do not raise another exception during cleanup when a task is timed out - https://github.com/ansible/ansible/issues/81095
v2.16.5
=======
Release Summary
---------------
| Release Date: 2024-03-25
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Minor Changes
-------------
- ansible-test - Add a work-around for permission denied errors when using ``pytest >= 8`` on multi-user systems with an installed version of ``ansible-test``.
Bugfixes
--------
- Fix an issue when setting a plugin name from an unsafe source resulted in ``ValueError: unmarshallable object`` (https://github.com/ansible/ansible/issues/82708)
- Harden python templates for respawn and ansiballz around str literal quoting
- ansible-test - The ``libexpat`` package is automatically upgraded during remote bootstrapping to maintain compatibility with newer Python packages.
- template - Fix error when templating an unsafe string which corresponds to an invalid type in Python (https://github.com/ansible/ansible/issues/82600).
- winrm - does not hang when attempting to get process output when stdin write failed
v2.16.4
=======
Release Summary
---------------
| Release Date: 2024-02-26
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Bugfixes
--------
- Fix loading vars_plugins in roles (https://github.com/ansible/ansible/issues/82239).
- expect - fix argument spec error using timeout=null (https://github.com/ansible/ansible/issues/80982).
- include_vars - fix calculating ``depth`` relative to the root and ensure all files are included (https://github.com/ansible/ansible/issues/80987).
- 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)
v2.16.3
=======
Release Summary
---------------
| Release Date: 2024-01-29
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Security Fixes
--------------
- ANSIBLE_NO_LOG - Address issue where ANSIBLE_NO_LOG was ignored (CVE-2024-0690)
Bugfixes
--------
- Run all handlers with the same ``listen`` topic, even when notified from another handler (https://github.com/ansible/ansible/issues/82363).
- ``ansible-galaxy role import`` - fix using the ``role_name`` in a standalone role's ``galaxy_info`` metadata by disabling automatic removal of the ``ansible-role-`` prefix. This matches the behavior of the Galaxy UI which also no longer implicitly removes the ``ansible-role-`` prefix. Use the ``--role-name`` option or add a ``role_name`` to the ``galaxy_info`` dictionary in the role's ``meta/main.yml`` to use an alternate role name.
- ``ansible-test sanity --test runtime-metadata`` - add ``action_plugin`` as a valid field for modules in the schema (https://github.com/ansible/ansible/pull/82562).
- ansible-config init will now dedupe ini entries from plugins.
- ansible-galaxy role import - exit with 1 when the import fails (https://github.com/ansible/ansible/issues/82175).
- 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).
- delegate_to when set to an empty or undefined variable will now give a proper error.
- dwim functions for lookups should be better at detectging role context even in abscense of tasks/main.
- 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.
- unsafe data - Enable directly using ``AnsibleUnsafeText`` with Python ``pathlib`` (https://github.com/ansible/ansible/issues/82414)
v2.16.2
=======
Release Summary
---------------
| Release Date: 2023-12-11
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Bugfixes
--------
- unsafe data - Address an incompatibility when iterating or getting a single index from ``AnsibleUnsafeBytes``
- unsafe data - Address an incompatibility with ``AnsibleUnsafeText`` and ``AnsibleUnsafeBytes`` when pickling with ``protocol=0``
v2.16.1
=======
Release Summary
---------------
| Release Date: 2023-12-04
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Breaking Changes / Porting Guide
--------------------------------
- assert - Nested templating may result in an inability for the conditional to be evaluated. See the porting guide for more information.
Security Fixes
--------------
- templating - Address issues where internal templating can cause unsafe variables to lose their unsafe designation (CVE-2023-5764)
Bugfixes
--------
- 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)
- Plugin loader does not dedupe nor cache filter/test plugins by file basename, but full path name.
- Restoring the ability of filters/tests can have same file base name but different tests/filters defined inside.
- 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.
- flush_handlers - properly handle a handler failure in a nested block when ``force_handlers`` is set (http://github.com/ansible/ansible/issues/81532)
- module no_log will no longer affect top level booleans, for example ``no_log_module_parameter='a'`` will no longer hide ``changed=False`` as a 'no log value' (matches 'a').
- role params now have higher precedence than host facts again, matching documentation, this had unintentionally changed in 2.15.
- wait_for should not handle 'non mmapable files' again.
v2.16.0
=======
Release Summary
---------------
| Release Date: 2023-11-06
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Minor Changes
-------------
- Add Python type hints to the Display class (https://github.com/ansible/ansible/issues/80841)
- Add ``GALAXY_COLLECTIONS_PATH_WARNING`` option to disable the warning given by ``ansible-galaxy collection install`` when installing a collection to a path that isn't in the configured collection paths.
- Add ``python3.12`` to the default ``INTERPRETER_PYTHON_FALLBACK`` list.
- Add ``utcfromtimestamp`` and ``utcnow`` to ``ansible.module_utils.compat.datetime`` to return fixed offset datetime objects.
- Add a general ``GALAXY_SERVER_TIMEOUT`` config option for distribution servers (https://github.com/ansible/ansible/issues/79833).
- Added Python type annotation to connection plugins
- CLI argument parsing - Automatically prepend to the help of CLI arguments that support being specified multiple times. (https://github.com/ansible/ansible/issues/22396)
- DEFAULT_TRANSPORT now defaults to 'ssh', the old 'smart' option is being deprecated as versions of OpenSSH without control persist are basically not present anymore.
- Documentation for set filters ``intersect``, ``difference``, ``symmetric_difference`` and ``union`` now states that the returned list items are in arbitrary order.
- Record ``removal_date`` in runtime metadata as a string instead of a date.
- Remove the ``CleansingNodeVisitor`` class and its usage due to the templating changes that made it superfluous. Also simplify the ``Conditional`` class.
- Removed ``exclude`` and ``recursive-exclude`` commands for generated files from the ``MANIFEST.in`` file. These excludes were unnecessary since releases are expected to be built with a clean worktree.
- Removed ``exclude`` commands for sanity test files from the ``MANIFEST.in`` file. These tests were previously excluded because they did not pass when run from an sdist. However, sanity tests are not expected to pass from an sdist, so excluding some (but not all) of the failing tests makes little sense.
- Removed redundant ``include`` commands from the ``MANIFEST.in`` file. These includes either duplicated default behavior or another command.
- The ``ansible-core`` sdist no longer contains pre-generated man pages. Instead, a ``packaging/cli-doc/build.py`` script is included in the sdist. This script can generate man pages and standalone RST documentation for ``ansible-core`` CLI programs.
- The ``docs`` and ``examples`` directories are no longer included in the ``ansible-core`` sdist. These directories have been moved to the https://github.com/ansible/ansible-documentation repository.
- The minimum required ``setuptools`` version is now 66.1.0, as it is the oldest version to support Python 3.12.
- Update ``ansible_service_mgr`` fact to include init system for SMGL OS family
- Use ``ansible.module_utils.common.text.converters`` instead of ``ansible.module_utils._text``.
- Use ``importlib.resources.abc.TraversableResources`` instead of deprecated ``importlib.abc.TraversableResources`` where available (https:/github.com/ansible/ansible/pull/81082).
- Use ``include`` where ``recursive-include`` is unnecessary in the ``MANIFEST.in`` file.
- Use ``package_data`` instead of ``include_package_data`` for ``setup.cfg`` to avoid ``setuptools`` warnings.
- Utilize gpg check provided internally by the ``transaction.run`` method as oppose to calling it manually.
- ``Templar`` - do not add the ``dict`` constructor to ``globals`` as all required Jinja2 versions already do so
- ansible-doc - allow to filter listing of collections and metadata dump by more than one collection (https://github.com/ansible/ansible/pull/81450).
- ansible-galaxy - Add a plural option to improve ignoring multiple signature error status codes when installing or verifying collections. A space-separated list of error codes can follow --ignore-signature-status-codes in addition to specifying --ignore-signature-status-code multiple times (for example, ``--ignore-signature-status-codes NO_PUBKEY UNEXPECTED``).
- ansible-galaxy - Remove internal configuration argument ``v3`` (https://github.com/ansible/ansible/pull/80721)
- ansible-galaxy - add note to the collection dependency resolver error message about pre-releases if ``--pre`` was not provided (https://github.com/ansible/ansible/issues/80048).
- ansible-galaxy - used to crash out with a "Errno 20 Not a directory" error when extracting files from a role when hitting a file with an illegal name (https://github.com/ansible/ansible/pull/81553). Now it gives a warning identifying the culprit file and the rule violation (e.g., ``my$class.jar`` has a ``$`` in the name) before crashing out, giving the user a chance to remove the invalid file and try again. (https://github.com/ansible/ansible/pull/81555).
- ansible-test - Add Alpine 3.18 to remotes
- ansible-test - Add Fedora 38 container.
- ansible-test - Add Fedora 38 remote.
- ansible-test - Add FreeBSD 13.2 remote.
- ansible-test - Add new pylint checker for new ``# deprecated:`` comments within code to trigger errors when time to remove code that has no user facing deprecation message. Only supported in ansible-core, not collections.
- ansible-test - Add support for RHEL 8.8 remotes.
- ansible-test - Add support for RHEL 9.2 remotes.
- ansible-test - Add support for testing with Python 3.12.
- ansible-test - Allow float values for the ``--timeout`` option to the ``env`` command. This simplifies testing.
- ansible-test - Enable ``thread`` code coverage in addition to the existing ``multiprocessing`` coverage.
- ansible-test - Make Python 3.12 the default version used in the ``base`` and ``default`` containers.
- ansible-test - RHEL 8.8 provisioning can now be used with the ``--python 3.11`` option.
- ansible-test - RHEL 9.2 provisioning can now be used with the ``--python 3.11`` option.
- ansible-test - Refactored ``env`` command logic and timeout handling.
- ansible-test - Remove Fedora 37 remote support.
- ansible-test - Remove Fedora 37 test container.
- ansible-test - Remove Python 3.8 and 3.9 from RHEL 8.8.
- ansible-test - Remove obsolete embedded script for configuring WinRM on Windows remotes.
- ansible-test - Removed Ubuntu 20.04 LTS image from the `--remote` option.
- ansible-test - Removed `freebsd/12.4` remote.
- ansible-test - Removed `freebsd/13.1` remote.
- ansible-test - Removed test remotes: rhel/8.7, rhel/9.1
- ansible-test - Removed the deprecated ``--docker-no-pull`` option.
- ansible-test - Removed the deprecated ``--no-pip-check`` option.
- ansible-test - Removed the deprecated ``foreman`` test plugin.
- ansible-test - Removed the deprecated ``govcsim`` support from the ``vcenter`` test plugin.
- ansible-test - Replace the ``pytest-forked`` pytest plugin with a custom plugin.
- ansible-test - The ``no-get-exception`` sanity test is now limited to plugins in collections. Previously any Python file in a collection was checked for ``get_exception`` usage.
- ansible-test - The ``replace-urlopen`` sanity test is now limited to plugins in collections. Previously any Python file in a collection was checked for ``urlopen`` usage.
- ansible-test - The ``use-compat-six`` sanity test is now limited to plugins in collections. Previously any Python file in a collection was checked for ``six`` usage.
- ansible-test - The openSUSE test container has been updated to openSUSE Leap 15.5.
- ansible-test - Update pip to ``23.1.2`` and setuptools to ``67.7.2``.
- ansible-test - Update the ``default`` containers.
- ansible-test - Update the ``nios-test-container`` to version 2.0.0, which supports API version 2.9.
- ansible-test - Update the logic used to detect when ``ansible-test`` is running from source.
- ansible-test - Updated the CloudStack test container to version 1.6.1.
- 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 - Use ``datetime.datetime.now`` with ``tz`` specified instead of ``datetime.datetime.utcnow``.
- ansible-test - Use a context manager to perform cleanup at exit instead of using the built-in ``atexit`` module.
- 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 - remove Alpine 3.17 from remotes
- ansible-test — Python 3.83.12 will use ``coverage`` v7.3.2.
- ansible-test — ``coverage`` v6.5.0 is to be used only under Python 3.7.
- ansible-vault create: Now raises an error when opening the editor without tty. The flag --skip-tty-check restores previous behaviour.
- ansible_user_module - tweaked macos user defaults to reflect expected defaults (https://github.com/ansible/ansible/issues/44316)
- apt - return calculated diff while running apt clean operation.
- blockinfile - add append_newline and prepend_newline options (https://github.com/ansible/ansible/issues/80835).
- cli - Added short option '-J' for asking for vault password (https://github.com/ansible/ansible/issues/80523).
- command - Add option ``expand_argument_vars`` to disable argument expansion and use literal values - https://github.com/ansible/ansible/issues/54162
- config lookup new option show_origin to also return the origin of a configuration value.
- display methods for warning and deprecation are now proxied to main process when issued from a fork. This allows for the deduplication of warnings and deprecations to work globally.
- dnf5 - enable environment groups installation testing in CI as its support was added.
- dnf5 - enable now implemented ``cacheonly`` functionality
- executor now skips persistent connection when it detects an action that does not require a connection.
- find module - Add ability to filter based on modes
- gather_facts now will use gather_timeout setting to limit parallel execution of modules that do not themselves use gather_timeout.
- group - remove extraneous warning shown when user does not exist (https://github.com/ansible/ansible/issues/77049).
- include_vars - os.walk now follows symbolic links when traversing directories (https://github.com/ansible/ansible/pull/80460)
- module compression is now sourced directly via config, bypassing play_context possibly stale values.
- reboot - show last error message in verbose logs (https://github.com/ansible/ansible/issues/81574).
- service_facts now returns more info for rcctl managed systesm (OpenBSD).
- tasks - the ``retries`` keyword can be specified without ``until`` in which case the task is retried until it succeeds but at most ``retries`` times (https://github.com/ansible/ansible/issues/20802)
- user - add new option ``password_expire_warn`` (supported on Linux only) to set the number of days of warning before a password change is required (https://github.com/ansible/ansible/issues/79882).
- yum_repository - Align module documentation with parameters
Breaking Changes / Porting Guide
--------------------------------
- Any plugin using the config system and the `cli` entry to use the `timeout` from the command line, will see the value change if the use had configured it in any of the lower precedence methods. If relying on this behaviour to consume the global/generic timeout from the DEFAULT_TIMEOUT constant, please consult the documentation on plugin configuration to add the overlaping entries.
- ansible-test - Test plugins that rely on containers no longer support reusing running containers. The previous behavior was an undocumented, untested feature.
- service module will not permanently configure variables/flags for openbsd when doing enable/disable operation anymore, this module was never meant to do this type of work, just to manage the service state itself. A rcctl_config or similar module should be created and used instead.
Deprecated Features
-------------------
- Deprecated ini config option ``collections_paths``, use the singular form ``collections_path`` instead
- Deprecated the env var ``ANSIBLE_COLLECTIONS_PATHS``, use the singular form ``ANSIBLE_COLLECTIONS_PATH`` instead
- 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.
- Support for Windows Server 2012 and 2012 R2 has been removed as the support end of life from Microsoft is October 10th 2023. These versions of Windows will no longer be tested in this Ansible release and it cannot be guaranteed that they will continue to work going forward.
- ``STRING_CONVERSION_ACTION`` config option is deprecated as it is no longer used in the Ansible Core code base.
- the 'smart' option for setting a connection plugin is being removed as its main purpose (choosing between ssh and paramiko) is now irrelevant.
- vault and unfault filters - the undocumented ``vaultid`` parameter is deprecated and will be removed in ansible-core 2.20. Use ``vault_id`` instead.
- yum_repository - deprecated parameter 'keepcache' (https://github.com/ansible/ansible/issues/78693).
Removed Features (previously deprecated)
----------------------------------------
- ActionBase - remove deprecated ``_remote_checksum`` method
- PlayIterator - remove deprecated ``cache_block_tasks`` and ``get_original_task`` methods
- Remove deprecated ``FileLock`` class
- Removed Python 3.9 as a supported version on the controller. Python 3.10 or newer is required.
- Removed ``include`` which has been deprecated in Ansible 2.12. Use ``include_tasks`` or ``import_tasks`` instead.
- ``Templar`` - remove deprecated ``shared_loader_obj`` parameter of ``__init__``
- ``fetch_url`` - remove auto disabling ``decompress`` when gzip is not available
- ``get_action_args_with_defaults`` - remove deprecated ``redirected_names`` method parameter
- ansible-test - Removed support for the remote Windows targets 2012 and 2012-R2
- inventory_cache - remove deprecated ``default.fact_caching_prefix`` ini configuration option, use ``defaults.fact_caching_prefix`` instead.
- module_utils/basic.py - Removed Python 3.5 as a supported remote version. Python 2.7 or Python 3.6+ is now required.
- stat - removed unused `get_md5` parameter.
Security Fixes
--------------
- ansible-galaxy - Prevent roles from using symlinks to overwrite files outside of the installation directory (CVE-2023-5115)
Bugfixes
--------
- Allow for searching handler subdir for included task via include_role (https://github.com/ansible/ansible/issues/81722)
- AnsibleModule.run_command - Only use selectors when needed, and rely on Python stdlib subprocess for the simple task of collecting stdout/stderr when prompt matching is not required.
- 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.
- Display - Defensively configure writing to stdout and stderr with a custom encoding error handler that will replace invalid characters while providing a deprecation warning that non-utf8 text will result in an error in a future version.
- Exclude internal options from man pages and docs.
- Fix ``ansible-config init`` man page option indentation.
- Fix ``ast`` deprecation warnings for ``Str`` and ``value.s`` when using Python 3.12.
- Fix ``run_once`` being incorrectly interpreted on handlers (https://github.com/ansible/ansible/issues/81666)
- Fix exceptions caused by various inputs when performing arg splitting or parsing key/value pairs. Resolves issue https://github.com/ansible/ansible/issues/46379 and issue https://github.com/ansible/ansible/issues/61497
- Fix incorrect parsing of multi-line Jinja2 blocks when performing arg splitting or parsing key/value pairs.
- Fix post-validating looped task fields so the strategy uses the correct values after task execution.
- Fixed `pip` module failure in case of usage quotes for `virtualenv_command` option for the venv command. (https://github.com/ansible/ansible/issues/76372)
- From issue https://github.com/ansible/ansible/issues/80880, when notifying a handler from another handler, handler notifications must be registered immediately as the flush_handler call is not recursive.
- Import ``FILE_ATTRIBUTES`` from ``ansible.module_utils.common.file`` in ``ansible.module_utils.basic`` instead of defining it twice.
- Inventory scripts parser not treat exception when getting hostsvar (https://github.com/ansible/ansible/issues/81103)
- On Python 3 use datetime methods ``fromtimestamp`` and ``now`` with UTC timezone instead of ``utcfromtimestamp`` and ``utcnow``, which are deprecated in Python 3.12.
- PluginLoader - fix Jinja plugin performance issues (https://github.com/ansible/ansible/issues/79652)
- PowerShell - Remove some code which is no longer valid for dotnet 5+
- Prevent running same handler multiple times when included via ``include_role`` (https://github.com/ansible/ansible/issues/73643)
- Prompting - add a short sleep between polling for user input to reduce CPU consumption (https://github.com/ansible/ansible/issues/81516).
- Properly disable ``jinja2_native`` in the template module when jinja2 override is used in the template (https://github.com/ansible/ansible/issues/80605)
- Properly template tags in parent blocks (https://github.com/ansible/ansible/issues/81053)
- Remove unreachable parser error for removed ``static`` parameter of ``include_role``
- Replace uses of ``configparser.ConfigParser.readfp()`` which was removed in Python 3.12 with ``configparser.ConfigParser.read_file()`` (https://github.com/ansible/ansible/issues/81656)
- Set filters ``intersect``, ``difference``, ``symmetric_difference`` and ``union`` now always return a ``list``, never a ``set``. Previously, a ``set`` would be returned if the inputs were a hashable type such as ``str``, instead of a collection, such as a ``list`` or ``tuple``.
- Set filters ``intersect``, ``difference``, ``symmetric_difference`` and ``union`` now use set operations when the given items are hashable. Previously, list operations were performed unless the inputs were a hashable type such as ``str``, instead of a collection, such as a ``list`` or ``tuple``.
- Switch result queue from a ``multiprocessing.queues.Queue` to ``multiprocessing.queues.SimpleQueue``, primarily to allow properly handling pickling errors, to prevent an infinite hang waiting for task results
- The ``ansible-config init`` command now has a documentation description.
- The ``ansible-galaxy collection download`` command now has a documentation description.
- The ``ansible-galaxy collection install`` command documentation is now visible (previously hidden by a decorator).
- The ``ansible-galaxy collection verify`` command now has a documentation description.
- The ``ansible-galaxy role install`` command documentation is now visible (previously hidden by a decorator).
- The ``ansible-inventory`` command command now has a documentation description (previously used as the epilog).
- The ``hostname`` module now also updates both current and permanent hostname on OpenBSD. Before it only updated the permanent hostname (https://github.com/ansible/ansible/issues/80520).
- Update module_utils.urls unit test to work with cryptography >= 41.0.0.
- When generating man pages, use ``func`` to find the command function instead of looking it up by the command name.
- ``StrategyBase._process_pending_results`` - create a ``Templar`` on demand for templating ``changed_when``/``failed_when``.
- ``ansible-galaxy`` now considers all collection paths when identifying which collection requirements are already installed. Use the ``COLLECTIONS_PATHS`` and ``COLLECTIONS_SCAN_SYS_PATHS`` config options to modify these. Previously only the install path was considered when resolving the candidates. The install path will remain the only one potentially modified. (https://github.com/ansible/ansible/issues/79767, https://github.com/ansible/ansible/issues/81163)
- ``ansible.module_utils.service`` - ensure binary data transmission in ``daemonize()``
- ``ansible.module_utils.service`` - fix inter-process communication in ``daemonize()``
- ``import_role`` reverts to previous behavior of exporting vars at compile time.
- ``pkg_mgr`` - fix the default dnf version detection
- ansiballz - Prevent issue where the time on the control host could change part way through building the ansiballz file, potentially causing a pre-1980 date to be used during ansiballz unpacking leading to a zip file error (https://github.com/ansible/ansible/issues/80089)
- ansible terminal color settings were incorrectly limited to 16 options via 'choices', removing so all 256 can be accessed.
- ansible-console - fix filtering by collection names when a collection search path was set (https://github.com/ansible/ansible/pull/81450).
- ansible-galaxy - Enabled the ``data`` tarfile filter during role installation for Python versions that support it. A probing mechanism is used to avoid Python versions with a broken implementation.
- ansible-galaxy - Fix issue installing collections containing directories with more than 100 characters on python versions before 3.10.6
- ansible-galaxy - Fix variable type error when installing subdir collections (https://github.com/ansible/ansible/issues/80943)
- 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 - fix installing collections from directories that have a trailing path separator (https://github.com/ansible/ansible/issues/77803).
- ansible-galaxy - fix installing signed collections (https://github.com/ansible/ansible/issues/80648).
- ansible-galaxy - reduce API calls to servers by fetching signatures only for final candidates.
- 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 collection verify - fix verifying signed collections when the keyring is not configured.
- ansible-galaxy info - fix reporting no role found when lookup_role_by_name returns None.
- ansible-inventory - index available_hosts for major performance boost when dumping large inventories
- ansible-test - Add a ``pylint`` plugin to work around a known issue on Python 3.12.
- ansible-test - Add support for ``argcomplete`` version 3.
- ansible-test - All containers created by ansible-test now include the current test session ID in their name. This avoids conflicts between concurrent ansible-test invocations using the same container host.
- ansible-test - Always use ansible-test managed entry points for ansible-core CLI tools when not running from source. This fixes issues where CLI entry points created during install are not compatible with ansible-test.
- ansible-test - Fix a traceback that occurs when attempting to test Ansible source using a different ansible-test. A clear error message is now given when this scenario occurs.
- ansible-test - Fix handling of timeouts exceeding one day.
- ansible-test - Fix parsing of cgroup entries which contain a ``:`` in the path (https://github.com/ansible/ansible/issues/81977).
- ansible-test - Fix several possible tracebacks when using the ``-e`` option with sanity tests.
- ansible-test - Fix various cases where the test timeout could expire without terminating the tests.
- ansible-test - Include missing ``pylint`` requirements for Python 3.10.
- ansible-test - Pre-build a PyYAML wheel before installing requirements to avoid a potential Cython build failure.
- ansible-test - Remove redundant warning about missing programs before attempting to execute them.
- ansible-test - The ``import`` sanity test now checks the collection loader for remote-only Python support when testing ansible-core.
- ansible-test - Unit tests now report warnings generated during test runs. Previously only warnings generated during test collection were reported.
- ansible-test - Update ``pylint`` to 2.17.2 to resolve several possible false positives.
- ansible-test - Update ``pylint`` to 2.17.3 to resolve several possible false positives.
- ansible-test - Update ``pylint`` to version 3.0.1.
- ansible-test - Use ``raise ... from ...`` when raising exceptions from within an exception handler.
- ansible-test - When bootstrapping remote FreeBSD instances, use the OS packaged ``setuptools`` instead of installing the latest version from PyPI.
- ansible-test local change detection - use ``git merge-base <branch> HEAD`` instead of ``git merge-base --fork-point <branch>`` (https://github.com/ansible/ansible/pull/79734).
- ansible-vault - fail when the destination file location is not writable before performing encryption (https://github.com/ansible/ansible/issues/81455).
- apt - ignore fail_on_autoremove and allow_downgrade parameters when using aptitude (https://github.com/ansible/ansible/issues/77868).
- blockinfile - avoid crash with Python 3 if creating the directory fails when ``create=true`` (https://github.com/ansible/ansible/pull/81662).
- connection timeouts defined in ansible.cfg will now be properly used, the --timeout cli option was obscuring them by always being set.
- copy - print correct destination filename when using `content` and `--diff` (https://github.com/ansible/ansible/issues/79749).
- copy unit tests - Fixing "dir all perms" documentation and formatting for easier reading.
- core will now also look at the connection plugin to force 'local' interpreter for networking path compatibility as just ansible_network_os could be misleading.
- deb822_repository - use http-agent for receiving content (https://github.com/ansible/ansible/issues/80809).
- debconf - idempotency in questions with type 'password' (https://github.com/ansible/ansible/issues/47676).
- distribution facts - fix Source Mage family mapping
- dnf - fix a failure when a package from URI was specified and ``update_only`` was set (https://github.com/ansible/ansible/issues/81376).
- dnf5 - Update dnf5 module to handle API change for setting the download directory (https://github.com/ansible/ansible/issues/80887)
- dnf5 - Use ``transaction.check_gpg_signatures`` API call to check package signatures AND possibly to recover from when keys are missing.
- dnf5 - fix module and package names in the message following failed module respawn attempt
- dnf5 - use the logs API to determine transaction problems
- dpkg_selections - check if the package exists before performing the selection operation (https://github.com/ansible/ansible/issues/81404).
- encrypt - deprecate passlib_or_crypt API (https://github.com/ansible/ansible/issues/55839).
- fetch - Handle unreachable errors properly (https://github.com/ansible/ansible/issues/27816)
- file modules - Make symbolic modes with X use the computed permission, not original file (https://github.com/ansible/ansible/issues/80128)
- file modules - fix validating invalid symbolic modes.
- first found lookup has been updated to use the normalized argument parsing (pythonic) matching the documented examples.
- first found lookup, fixed an issue with subsequent items clobbering information from previous ones.
- first_found lookup now gets 'untemplated' loop entries and handles templating itself as task_executor was removing even 'templatable' entries and breaking functionality. https://github.com/ansible/ansible/issues/70772
- galaxy - check if the target for symlink exists (https://github.com/ansible/ansible/pull/81586).
- galaxy - cross check the collection type and collection source (https://github.com/ansible/ansible/issues/79463).
- gather_facts parallel option was doing the reverse of what was stated, now it does run modules in parallel when True and serially when False.
- handlers - fix ``v2_playbook_on_notify`` callback not being called when notifying handlers
- handlers - the ``listen`` keyword can affect only one handler with the same name, the last one defined as it is a case with the ``notify`` keyword (https://github.com/ansible/ansible/issues/81013)
- include_role - expose variables from parent roles to role's handlers (https://github.com/ansible/ansible/issues/80459)
- inventory_ini - handle SyntaxWarning while parsing ini file in inventory (https://github.com/ansible/ansible/issues/81457).
- iptables - remove default rule creation when creating iptables chain to be more similar to the command line utility (https://github.com/ansible/ansible/issues/80256).
- lib/ansible/utils/encrypt.py - remove unused private ``_LOCK`` (https://github.com/ansible/ansible/issues/81613)
- lookup/url.py - Fix incorrect var/env/ini entry for `force_basic_auth`
- man page build - Remove the dependency on the ``docs`` directory for building man pages.
- man page build - Sub commands of ``ansible-galaxy role`` and ``ansible-galaxy collection`` are now documented.
- module responses - Ensure that module responses are utf-8 adhereing to JSON RFC and expectations of the core code.
- module/role argument spec - validate the type for options that are None when the option is required or has a non-None default (https://github.com/ansible/ansible/issues/79656).
- modules/user.py - Add check for valid directory when creating new user homedir (allows /dev/null as skeleton) (https://github.com/ansible/ansible/issues/75063)
- paramiko_ssh, psrp, and ssh connection plugins - ensure that all values for options that should be strings are actually converted to strings (https://github.com/ansible/ansible/pull/81029).
- password_hash - fix salt format for ``crypt`` (only used if ``passlib`` is not installed) for the ``bcrypt`` algorithm.
- pep517 build backend - Copy symlinks when copying the source tree. This avoids tracebacks in various scenarios, such as when a venv is present in the source tree.
- pep517 build backend - Use the documented ``import_module`` import from ``importlib``.
- pip module - Update module to prefer use of the python ``packaging`` and ``importlib.metadata`` modules due to ``pkg_resources`` being deprecated (https://github.com/ansible/ansible/issues/80488)
- pkg_mgr.py - Fix `ansible_pkg_mgr` incorrect in TencentOS Server Linux
- pkg_mgr.py - Fix `ansible_pkg_mgr` is unknown in Kylin Linux (https://github.com/ansible/ansible/issues/81332)
- powershell modules - Only set an rc of 1 if the PowerShell pipeline signaled an error occurred AND there are error records present. Previously it would do so only if the error signal was present without checking the error count.
- replace - handle exception when bad escape character is provided in replace (https://github.com/ansible/ansible/issues/79364).
- role deduplication - don't deduplicate before a role has had a task run for that particular host (https://github.com/ansible/ansible/issues/81486).
- service module, does not permanently configure flags flags on Openbsd when enabling/disabling a service.
- service module, enable/disable is not a exclusive action in checkmode anymore.
- setup gather_timeout - Fix timeout in get_mounts_facts for linux.
- setup module (fact gathering) will now try to be smarter about different versions of facter emitting error when --puppet flag is used w/o puppet.
- syntax check - Limit ``--syntax-check`` to ``ansible-playbook`` only, as that is the only CLI affected by this argument (https://github.com/ansible/ansible/issues/80506)
- tarfile - handle data filter deprecation warning message for extract and extractall (https://github.com/ansible/ansible/issues/80832).
- template - Fix for formatting issues when a template path contains valid jinja/strftime pattern (especially line break one) and using the template path in ansible_managed (https://github.com/ansible/ansible/pull/79129)
- templating - In the template action and lookup, use local jinja2 environment overlay overrides instead of mutating the templars environment
- templating - prevent setting arbitrary attributes on Jinja2 environments via Jinja2 overrides in templates
- templating escape and single var optimization now use correct delimiters when custom ones are provided either via task or template header.
- unarchive - fix unarchiving sources that are copied to the remote node using a relative temporory directory path (https://github.com/ansible/ansible/issues/80710).
- uri - fix search for JSON type to include complex strings containing '+'
- uri/urls - Add compat function to handle the ability to parse the filename from a Content-Disposition header (https://github.com/ansible/ansible/issues/81806)
- urls.py - fixed cert_file and key_file parameters when running on Python 3.12 - https://github.com/ansible/ansible/issues/80490
- user - set expiration value correctly when unable to retrieve the current value from the system (https://github.com/ansible/ansible/issues/71916)
- validate-modules sanity test - replace semantic markup parsing and validating code with the code from `antsibull-docs-parser 0.2.0 <https://github.com/ansible-community/antsibull-docs-parser/releases/tag/0.2.0>`__ (https://github.com/ansible/ansible/pull/80406).
- vars_prompt - internally convert the ``unsafe`` value to ``bool``
- vault and unvault filters now properly take ``vault_id`` parameter.
- win_fetch - Add support for using file with wildcards in file name. (https://github.com/ansible/ansible/issues/73128)
- winrm - Better handle send input failures when communicating with hosts under load
Known Issues
------------
- ansible-galaxy - dies in the middle of installing a role when that role contains Java inner classes (files with $ in the file name). This is by design, to exclude temporary or backup files. (https://github.com/ansible/ansible/pull/81553).
- ansible-test - The ``pep8`` sanity test is unable to detect f-string spacing issues (E201, E202) on Python 3.10 and 3.11. They are correctly detected under Python 3.12. See (https://github.com/PyCQA/pycodestyle/issues/1190).

File diff suppressed because it is too large Load Diff

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

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

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

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

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

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

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

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

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

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2024-09-30
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

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

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

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2024-12-02
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2024-11-25
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2025-12-02
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

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

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

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

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

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

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2024-02-26
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2024-02-19
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

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

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

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

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

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

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

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2024-06-10
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

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

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2024-07-09
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

@ -0,0 +1,2 @@
bugfixes:
- atomic_move - fix using the setgid bit on the parent directory when creating files (https://github.com/ansible/ansible/issues/46742, https://github.com/ansible/ansible/issues/67177).

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

@ -0,0 +1,2 @@
minor_changes:
- ansible.builtin.user - Remove user not found warning (https://github.com/ansible/ansible/issues/80267)

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

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

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

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

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

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

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

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

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

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

@ -0,0 +1,2 @@
bugfixes:
- "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)"

@ -0,0 +1,3 @@
---
bugfixes:
- find - do not fail on Permission errors (https://github.com/ansible/ansible/issues/82027).

@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy role import - exit with 1 when the import fails (https://github.com/ansible/ansible/issues/82175).

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

@ -0,0 +1,2 @@
bugfixes:
- Fix handlers not being executed in lockstep using the linear strategy in some cases (https://github.com/ansible/ansible/issues/82307)

@ -0,0 +1,3 @@
---
bugfixes:
- assemble - fixed missing parameter 'content' in _get_diff_data API (https://github.com/ansible/ansible/issues/82359).

@ -0,0 +1,2 @@
bugfixes:
- Run all handlers with the same ``listen`` topic, even when notified from another handler (https://github.com/ansible/ansible/issues/82363).

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

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

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

@ -0,0 +1,2 @@
bugfixes:
- template - Fix error when templating an unsafe string which corresponds to an invalid type in Python (https://github.com/ansible/ansible/issues/82600).

@ -0,0 +1,2 @@
bugfixes:
- Fixes permission for cache json file from 600 to 644 (https://github.com/ansible/ansible/issues/82683).

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

@ -0,0 +1,4 @@
bugfixes:
- >-
fetch - add error message when using ``dest`` with a trailing slash that becomes a local directory -
https://github.com/ansible/ansible/issues/82878

@ -0,0 +1,2 @@
bugfixes:
- Fix check for missing _sub_plugin attribute in older connection plugins (https://github.com/ansible/ansible/pull/82954)

@ -0,0 +1,2 @@
bugfixes:
- "linear strategy: fix handlers included via ``include_tasks`` handler to be executed in lockstep (https://github.com/ansible/ansible/issues/83019)"

@ -0,0 +1,2 @@
bugfixes:
- Fix for ``meta`` tasks breaking host/fork affinity with ``host_pinned`` strategy (https://github.com/ansible/ansible/issues/83294)

@ -0,0 +1,3 @@
---
bugfixes:
- fixed unit test test_borken_cowsay to address mock not been properly applied when existing unix system already have cowsay installed.

@ -0,0 +1,2 @@
bugfixes:
- dnf, dnf5 - fix for installing a set of packages by specifying them using a wildcard character (https://github.com/ansible/ansible/issues/83373)

@ -0,0 +1,2 @@
bugfixes:
- Fix an issue where registered variable was not available for templating in ``loop_control.label`` on skipped looped tasks (https://github.com/ansible/ansible/issues/83619)

@ -0,0 +1,3 @@
bugfixes:
- module respawn - Address an issue with Python 2 where a respawned module
could not parse module args (https://github.com/ansible/ansible/issues/83812)

@ -0,0 +1,3 @@
bugfixes:
- "runtime-metadata sanity test - do not crash on deprecations if ``galaxy.yml`` contains an empty ``version`` field (https://github.com/ansible/ansible/pull/83831)."
- "Fix ``SemanticVersion.parse()`` to store the version string so that ``__repr__`` reports it instead of ``None`` (https://github.com/ansible/ansible/pull/83831)."

@ -0,0 +1,4 @@
bugfixes:
- >-
include_tasks - Display location when attempting to load a task list where ``include_*`` did not specify any value -
https://github.com/ansible/ansible/issues/83874

@ -0,0 +1,2 @@
bugfixes:
- "dnf5 - re-introduce the ``state: installed`` alias to ``state: present`` (https://github.com/ansible/ansible/issues/83960)"

@ -0,0 +1,7 @@
bugfixes:
- >-
powershell - Implement more robust deletion mechanism for C# code compilation
temporary files. This should avoid scenarios where the underlying temporary
directory may be temporarily locked by antivirus tools or other IO problems.
A failure to delete one of these temporary directories will result in a
warning rather than an outright failure.

@ -0,0 +1,5 @@
bugfixes:
- >-
Add descriptions for ``ansible-galaxy install --help` and ``ansible-galaxy role|collection install --help``.
- >-
``ansible-galaxy install --help`` - Fix the usage text and document that the requirements file passed to ``-r`` can include collections and roles.

@ -0,0 +1,3 @@
bugfixes:
- ansible-galaxy role install - normalize tarfile paths and symlinks using ``ansible.utils.path.unfrackpath`` and consider them valid as long as the realpath is in the tarfile's role directory (https://github.com/ansible/ansible/issues/81965).
- ansible-galaxy role install - fix symlinks (https://github.com/ansible/ansible/issues/82702, https://github.com/ansible/ansible/issues/81965).

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - The ``libexpat`` package is automatically upgraded during remote bootstrapping to maintain compatibility with newer Python packages.

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Implement new authentication methods for accessing the Ansible Core CI service.

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Limit package install retries during managed remote instance bootstrapping.

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

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

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Fix Python relative import resolution from ``__init__.py`` files when using change detection.

@ -0,0 +1,3 @@
minor_changes:
- ansible-test - When invoking ``sleep`` in containers during container setup, the ``env`` command is used to avoid invoking
the shell builtin, if present.

@ -0,0 +1,3 @@
minor_changes:
- ansible-test - Use the ``-t`` option to set the stop timeout when stopping a container.
This avoids use of the ``--time`` option which was deprecated in Docker v28.0.

@ -0,0 +1,4 @@
bugfixes:
- >-
ansible-test - Fix up coverage reporting to properly translate the temporary path of integration test modules to
the expected static test module path.

@ -1,7 +1,7 @@
---
minor_changes:
- ansible-test — Python 3.83.12 will use ``coverage`` v7.3.0.
- ansible-test — Python 3.83.12 will use ``coverage`` v7.3.2.
- ansible-test — ``coverage`` v6.5.0 is to be used only under Python 3.7.
...

@ -0,0 +1,3 @@
minor_changes:
- ansible-test - Use Python's ``urllib`` instead of ``curl`` for HTTP requests.
- ansible-test - Automatically retry HTTP GET/PUT/DELETE requests on exceptions.

@ -1,2 +1,4 @@
minor_changes:
- ansible-test - The openSUSE test container has been updated to openSUSE Leap 15.5.
- 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.

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Improve the error message shown when an unknown ``--remote`` or ``--docker`` option is given.

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Fix traceback that occurs after an interactive command fails.

@ -0,0 +1,3 @@
minor_changes:
- ansible-test - Improve container runtime probe error handling.
When unexpected probe output is encountered, an error with more useful debugging information is provided.

@ -0,0 +1,4 @@
bugfixes:
- ansible-test - Enable the ``sys.unraisablehook`` work-around for the ``pylint`` sanity test on Python 3.11.
Previously the work-around was only enabled for Python 3.12 and later.
However, the same issue has been discovered on Python 3.11.

@ -0,0 +1,3 @@
bugfixes:
- ansible-test - Update ``pylint`` to version 3.0.1.
- ansible-test - Include missing ``pylint`` requirements for Python 3.10.

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Update ``pypi-test-container`` to version 3.1.0.

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

Loading…
Cancel
Save