1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-17 21:33:11 +00:00
Commit graph

2529 commits

Author SHA1 Message Date
Felix Fontein
73be10786b
Release 13.1.0. 2026-06-16 18:08:24 +02:00
patchback[bot]
2f53f735b4
[PR #12285/57739cbb backport][stable-13] adds GFS2 support (#12287)
adds GFS2 support (#12285)

* adds GFS support

* changes PR id

(cherry picked from commit 57739cbbd9)

Co-authored-by: Robert Sander <r.sander@heinlein-support.de>
2026-06-15 18:02:43 +02:00
patchback[bot]
c18d643dd2
[PR #12219/07df65f2 backport][stable-13] Unhardcode dnf_config_manager DNF bin path (#12284)
Unhardcode dnf_config_manager DNF bin path (#12219)

Unhardcode the binary path to dnf in dnf_config_manager

(cherry picked from commit 07df65f293)

Co-authored-by: Maksym Hazevych <mhazevych@mailbox.org>
2026-06-15 05:59:18 +02:00
patchback[bot]
42325505b4
[PR #12234/7dc2441f backport][stable-13] xbps: include stdout and stderr in module output (#12278)
xbps: include `stdout` and `stderr` in module output (#12234)

* fix(xbps): add stdout/stderr to module output and fix error message typo

Include stdout and stderr from the last executed command in all
exit_json and fail_json calls so users can see the actual xbps output
when debugging failures (addresses issue #2478).



* test(xbps): add basic unit tests using uthelper

Cover install (new, already present, failure) and remove (installed,
absent) scenarios. Verifies stdout/stderr are propagated in output.



* changelog: add fragment for PR 12234



* Add version_added.



---------



(cherry picked from commit 7dc2441fc8)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-06-14 21:40:06 +02:00
patchback[bot]
265b9bf546
[PR #12235/33ae6c10 backport][stable-13] filesystem: handle BusyBox blkid output when detecting existing filesystem (#12273)
filesystem: handle BusyBox `blkid` output when detecting existing filesystem (#12235)

* fix(filesystem): handle BusyBox blkid output when detecting existing filesystem

BusyBox blkid ignores util-linux -o/-s flags and outputs the full device
info line instead of just the filesystem type. Parse the TYPE= field from
the raw output when it does not look like a plain type name.

Fixes #7283

* changelog: add fragment for PR 12235

(cherry picked from commit 33ae6c1018)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-06-14 20:55:51 +02:00
patchback[bot]
9e690837bd
[PR #12238/f4339d8c backport][stable-13] java_cert: detect silent keytool failures by verifying import outcome (#12268)
java_cert: detect silent `keytool` failures by verifying import outcome (#12238)

* fix(java_cert): detect silent keytool failures by verifying import outcome



* test(java_cert): add integration tests for silent keytool failure detection



* changelog: add fragment for PR 12238



* dummy

---------


(cherry picked from commit f4339d8c0d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 08:38:42 +02:00
patchback[bot]
d0bdd8a357
[PR #12206/ff7f90fb backport][stable-13] Fix dnf_config_manager incompatibility with DNF5 (#12266)
* Fix dnf_config_manager incompatibility with DNF5 (#12206)

* Extract fixtures from dnf_config_manager tests

* Implement support for DNF5

* Format code

(cherry picked from commit ff7f90fb4f)

* Exclude dnf_config_manager fixtures from trailing space check.

(cherry picked from commit ebb813680e)

---------

Co-authored-by: Maksym Hazevych <mhazevych@mailbox.org>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-06-14 07:54:10 +02:00
patchback[bot]
5bcc247768
[PR #12262/f1317d30 backport][stable-13] Revert "filesystem module gfs2 support (#12218)" (#12264)
Revert "filesystem module gfs2 support (#12218)" (#12262)

This reverts commit 9c0051e325.

(cherry picked from commit f1317d3039)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-06-14 00:41:38 +02:00
patchback[bot]
660b5d2c9d
[PR #12022/6c2301db backport][stable-13] zypper_repository: fix enabled/autorefresh/gpgcheck being overridden by .repo file content (#12251)
zypper_repository: fix `enabled`/`autorefresh`/`gpgcheck` being overridden by .repo file content (#12022)

* fix(zypper_repository): stop .repo file content overriding user-specified enabled/autorefresh/gpgcheck

When repo= pointed to a .repo file, values parsed from that file were
overwriting the desired state set from module params, causing enabled: false
to have no effect.

Fixes #8783

* changelog: add fragment for PR 12022

* fix(zypper_repository): preserve .repo file settings when parameters are not explicitly provided

When enabled/autorefresh/disable_gpg_check are not provided by the user,
fall back to values from the .repo file before applying hard defaults,
so that existing tasks relying on the .repo file content are not broken.



---------


(cherry picked from commit 6c2301db33)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 17:34:02 +02:00
patchback[bot]
5bb9c6c805
[PR #12067/f677c2ab backport][stable-13] counter_enabled callback: display output for looped tasks (#12241)
counter_enabled callback: display output for looped tasks (#12067)

* fix(counter_enabled): display output for looped tasks with delegate_to

Implement v2_runner_item_on_ok, v2_runner_item_on_failed, and
v2_runner_item_on_skipped so that looped tasks (including those
using delegate_to: localhost) produce visible output.

Also extract _host_label, _display_result_ok, _display_result_failed,
and _display_result_skipped helpers to eliminate repeated delegation
and message-building logic across the callback methods.

Fixes #8187



* changelog(counter_enabled): add fragment for PR #12067



* test(counter_enabled): add integration tests, adjust _host_label



* test(counter_enabled): migrate integration tests to callback test framework



* test(counter_enabled): fix integration tests to use set_fact instead of debug



---------


(cherry picked from commit f677c2ab7d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 17:33:53 +02:00
patchback[bot]
c14620fcf6
[PR #12151/994b7560 backport][stable-13] java_cert: fix PKCS12 password not passed to keytool -list (#12243)
java_cert: fix PKCS12 password not passed to `keytool -list` (#12151)

* fix(java_cert): remove -noprompt from keytool -list to allow stdin password

-noprompt is not a valid option for keytool -list (only for importkeystore/
importcert). On Java 8, passing it caused keytool to skip reading the store
password from stdin, resulting in a null password and NullPointerException.

Fixes #3023



* test(java_cert): add idempotency test for pkcs12 import with password

Exercises _export_public_cert_from_pkcs12 when the alias already exists,
verifying the password is correctly read from stdin on the comparison path.



* changelog: add fragment for PR 12151



---------


(cherry picked from commit 994b756026)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 17:33:42 +02:00
patchback[bot]
74207ab57f
[PR #12149/3fa258f5 backport][stable-13] udm_dns_record: fix idempotency with shortened IPv6 addresses (#12245)
udm_dns_record: fix idempotency with shortened IPv6 addresses (#12149)

* fix(udm_dns_record): normalize IPv6 addresses before comparison

UCS stores IPv6 addresses in expanded form; providing a shortened address
causes obj.diff() to always detect a difference and report changed=True.
Normalize IPv6 values in the data dict to exploded form before updating
the Univention object.

Fixes #317

* changelog: add fragment for PR 12149

* add type hint

(cherry picked from commit 3fa258f5a8)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-06-13 17:33:33 +02:00
patchback[bot]
a4cac6f833
[PR #12122/b12c21f0 backport][stable-13] launchd: fix restarted and reloaded always reporting changed=False (#12247)
launchd: fix `restarted` and `reloaded` always reporting `changed=False` (#12122)

* fix(launchd): restarted and reloaded always report changed

Both actions unconditionally execute commands (unload/load/start),
so changed must always be True in non-check mode, regardless of
whether the PID or state happened to match before and after.



* feat(changelog): add fragment for PR 12122



* fix(launchd): restarted and reloaded always report changed in check mode too



* consolidate if branches

---------


(cherry picked from commit b12c21f0ce)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 17:33:24 +02:00
patchback[bot]
3bc92d03c4
[PR #12148/5004c9f7 backport][stable-13] xml: preserve DOCTYPE declaration when writing XML files (#12249)
xml: preserve DOCTYPE declaration when writing XML files (#12148)

* fix(xml): preserve DOCTYPE declaration when writing XML files

Pass `doctype=tree.docinfo.doctype` to all `ElementTree.write()` calls
so lxml does not silently drop the DOCTYPE on serialization. Also replace
`etree.tostring()` with BytesIO+write() in the diff and xmlstring paths
for consistency.

Fixes #2762



* test(xml): add integration test for DOCTYPE preservation



* feat(changelog): add fragment for xml DOCTYPE fix (#12148)



---------


(cherry picked from commit 5004c9f70f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 17:33:15 +02:00
patchback[bot]
58d8bbf164
[PR #12218/9c0051e3 backport][stable-13] filesystem module gfs2 support (#12239)
filesystem module gfs2 support (#12218)

* adds GFS2 to filesystem module

* adds changelog fragment

* adds PR URL

* adds blank line

* removes RedHat, package not available

* renames file and removes license remark

* adds remark about adding gfs2 to 13.1.0

* corrects typo

* Update changelogs/fragments/12218-filesystem-gfs2.yaml



---------


(cherry picked from commit 9c0051e325)

Co-authored-by: Robert Sander <github@gurubert.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-06-13 16:43:29 +02:00
patchback[bot]
cdab3ee401
[PR #12215/4d72ec32 backport][stable-13] xenserver_guest_info: use fallback chain for VDI format detection (#12230)
xenserver_guest_info: use fallback chain for VDI format detection (#12215)

* xenserver_guest_info: use fallback chain for VDI format detection

* changelog: add PR URL to
  changelog fragment

* test: set mismatched vdi_type in vm-3 fixture to test fallback chain precedence

Set vdi_type to "vhd" while image-format remains "qcow2" so the unit
test verifies that image-format takes precedence in the fallback chain.



---------


(cherry picked from commit 4d72ec3299)

Co-authored-by: Shreyash <shrbhosa@redhat.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-12 23:46:27 +02:00
patchback[bot]
f5acbe2fef
[PR #12186/59e4e5f4 backport][stable-13] sudoers: add defaults attribute to allow specifying scoped defaults (#12227)
sudoers: add defaults attribute to allow specifying scoped defaults (#12186)

Assisted-by: multi-model agent


(cherry picked from commit 59e4e5f4fa)

Co-authored-by: Tiziano Müller <tiziano.mueller@hpe.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-06-12 23:46:12 +02:00
patchback[bot]
876f8ca18c
[PR #12185/213581be backport][stable-13] fix: treat chdev execution failures as module errors in aix_devices (#12197)
fix: treat chdev execution failures as module errors in aix_devices (#12185)

* fix: treat chdev execution failures as module errors in aix_devices

##### SUMMARY
Fix the aix_devices module so that a failed chdev command is reported as a module failure instead of a successful result.

The previous implementation called fail_json incorrectly by returning success through the normal completion path when chdev returned a non-zero exit status. This could allow a playbook to continue even though the requested device attribute change was not applied.

This change replaces the success-style error handling with proper failure handling in the chdev execution path, making task results consistent with the actual command outcome.

##### ISSUE TYPE
- Bugfix Pull Request

##### COMPONENT NAME
aix_devices

##### ADDITIONAL INFORMATION
The affected code path is in change_device_attr() when the module executes chdev to apply attribute updates.

Before this change:
- chdev could fail
- the module could still report success
- later tasks could run against an unexpected system state

After this change:
- chdev failures are returned through fail_json
- the task stops with an error
- playbook behavior matches the real execution result

```paste below
Before:
module.exit_json(msg="Failed to run chdev.", rc=rc, err=err)

After:
module.fail_json(msg="Failed to run chdev.", rc=rc, err=err)
```

* Add changelog fragment for aix_devices chdev failure fix (#12185)

---------


(cherry picked from commit 213581bef8)

Co-authored-by: Hirofumi Arimoto <hiro0107@users.noreply.github.com>
Co-authored-by: Hirofumi Arimoto <harimoto@jp.ibm.com>
2026-06-05 13:47:25 +02:00
patchback[bot]
4ce8fa29c2
[PR #12182/4d66b3da backport][stable-13] opkg - path_prefix needs to be a list (#12190)
opkg - path_prefix needs to be a list (#12182)

* opkg - path_prefix needs to be a list

path_prefix is passed to get_bin_path() which expects opt_dirs to be a list
of paths. Passing in a string instead of a list of paths results in incorrect
values being adding to the path when searching for the command to run.

* Add changelog

(cherry picked from commit 4d66b3dae8)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2026-06-05 07:34:43 +02:00
patchback[bot]
828eef091e
[PR #12140/48db8630 backport][stable-13] filetree lookup: handle invalid exclude regex with AnsibleError (#12184)
filetree lookup: handle invalid exclude regex with AnsibleError (#12140)

* filetree lookup - handle invalid exclude regex with AnsibleError Wrap re.compile() for the exclude option so invalid regular expressions produce a clear AnsibleError instead of an uncaught re.error traceback.

* add changelog fragment

* add changelog fragment

* Fix changelog fragment line endings (LF)



* Used AnsibleLookupError instead of AnsibleError

* Update changelogs/fragments/12140-filetree-exclude-regex-error.yml



* Used AnsibleLookupError instead of AnsibleError

* Updated changelog format

---------



(cherry picked from commit 48db863096)

Co-authored-by: Santosh Mahale <santoshmahale7676@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-06-04 06:28:33 +02:00
patchback[bot]
06f2bf2aee
[PR #12163/f9d4f0ad backport][stable-13] Fix incus Windows modules with ansible-core 2.21 (#12179)
Fix incus Windows modules with ansible-core 2.21 (#12163)

* Fix incus Windows modules with ansible-core 2.21

* strip wrapper quotes for payload flags (-enc, -encodedcommand, -command, -c, -file, -f) before incus exec argv handoff, added changelogs

* Fixed some edge cases for powershell parsing

* Fixed changelogs

* Fixed pep8 format

* Added warning message when modifying direct commands

* Fixed changelogs fragement

(cherry picked from commit f9d4f0ad6b)

Co-authored-by: Simon Bouchard <simon.bouchard23@gmail.com>
2026-06-02 21:18:49 +02:00
patchback[bot]
f414c77e17
[PR #12168/1e3da48d backport][stable-13] portage: include msg in depclean failure fail_json (#12175)
portage: include msg in depclean failure fail_json (#12168)

cleanup_packages() called module.fail_json(cmd=, rc=, stdout=, stderr=)
without the mandatory msg= argument. When the underlying emerge --depclean
exited non-zero, AnsibleModule.fail_json() itself crashed with
"AnsibleModule.fail_json() missing 1 required positional argument: 'msg'"
before the real failure could reach the controller, leaving users with no
diagnostic about why depclean actually failed.

Same wording style as the sibling install_packages() failure branch
("Packages not installed.").

(cherry picked from commit 1e3da48d70)

Co-authored-by: Yoann Gauthier-Colin <yoann@gwerlas.net>
2026-06-02 21:18:25 +02:00
patchback[bot]
8f62bee2ac
[PR #12124/b799c6f5 backport][stable-13] redfish_config: fix KeyError: 'ret' when SetManagerNic cannot find a matching NIC (#12176)
redfish_config: fix `KeyError: 'ret'` when `SetManagerNic` cannot find a matching NIC (#12124)

* fix(redfish_config): return proper error dict when manager NIC not found

get_manager_ethernet_uri() returned an empty dict {} when no matching NIC
was found, causing a KeyError on 'ret' in main(). Now returns a consistent
{"ret": False, "msg": ...} like all other error paths in the function.

Fixes #5892

* feat(changelog): add fragment for PR 12124

(cherry picked from commit b799c6f579)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-06-02 21:18:12 +02:00
patchback[bot]
583ff920a9
[PR #12087/7b01bcba backport][stable-13] keycloak_realm - add `max_secondary_auth_failures` parameter to configure brute force detection for secondary authentication mechanisms. (#12177)
keycloak_realm - add ``max_secondary_auth_failures`` parameter to configure brute force detection for secondary authentication mechanisms. (#12087)

* minor_changes:
  - keycloak_realm - add ``max_secondary_auth_failures`` parameter to configure brute force detection for secondary authentication mechanisms.

* Update changelogs/fragments/12087-keycloak-realm-max-secondary-auth-failures.yml



---------


(cherry picked from commit 7b01bcbadf)

Co-authored-by: amPrimeSign <146177975+amPrimeSign@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-06-02 21:18:01 +02:00
patchback[bot]
f8e9c9ce1b
[PR #12120/d46ce24a backport][stable-13] consul_kv: add empty_value option for null Consul values (#12153)
consul_kv: add `empty_value` option for null Consul values (#12120)

* feat(consul_kv): add empty_value option for null Consul values

Add the ``empty_value`` option to the ``consul_kv`` lookup plugin, allowing
users to control what is returned when a key exists in Consul but has a
null/empty value. Defaults to ``'None'`` to preserve existing behaviour.



* feat(changelog): add fragment for PR 12120



* feat(consul_kv): make empty_value a choices option

Replace the free-form string empty_value with a choices option:
textual_none (default, legacy behaviour), python_none, empty_string.



* docs(consul_kv): use dict form for empty_value choices



---------


(cherry picked from commit d46ce24abb)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 16:59:05 +02:00
patchback[bot]
544b3ce678
[PR #12123/49ca175f backport][stable-13] htpasswd: fix hash_scheme aliases and Apache-compatible bcrypt (#12156)
htpasswd: fix `hash_scheme` aliases and Apache-compatible bcrypt (#12123)

* fix(htpasswd): support HtpasswdFile aliases and Apache-compatible bcrypt

CryptContext does not recognise HtpasswdFile alias names such as
portable, portable_apache_24, host_apache_24, causing a KeyError.
In addition, building a CryptContext for bcrypt produced $2b$ hashes
that Apache rejects (it only accepts $2y$/$2a$).

Use htpasswd_context for schemes it already supports, fall back to
htpasswd_context on KeyError for aliases, and import CryptContext
from module_utils/_crypt.py instead of passlib directly.

Fixes #6135



* feat(changelog): add fragment for PR 12123



* fix(_crypt): silence DeprecationWarning when importing stdlib crypt

On Python 3.11/3.12, `import crypt` emits a DeprecationWarning that
ansible-test sanity --test import treats as an error. Suppress it since
the import is an intentional fallback when passlib is not available.



* fix(htpasswd): fix sanity ignores and bcrypt version constraint

- Revert _crypt.py DeprecationWarning suppression; add sanity ignore
  entries for htpasswd.py import-3.11/3.12 instead (mirrors existing
  entries for _crypt.py itself)
- Pin bcrypt<4.2 in integration tests: bcrypt 4.2 removed __about__
  which passlib 1.7.x uses, breaking passlib.apache import
- Fix regex_search assertion to use 'is not none' for a boolean result
- Add bcrypt version constraint note to module documentation



* fix(htpasswd): handle system-installed bcrypt in integration tests

On Debian/Ubuntu, bcrypt may be installed by the system package manager
with no RECORD file, making pip downgrade impossible. Move bcrypt
installation into a self-contained block in test_schemes.yml with
ignore_errors, a functional passlib+bcrypt check, and always-cleanup.
Bcrypt tests are skipped when a compatible version cannot be used.



* refactor(htpasswd): extract obtain_crypt_context(); import CryptContext from passlib directly

Extract context selection logic into obtain_crypt_context(). Import
CryptContext inside the deps.declare("passlib") block instead of from
module_utils/_crypt.py — passlib is already a hard dependency and
other symbols are imported from it there. Remove now-unnecessary
htpasswd.py sanity import ignore entries.



---------


(cherry picked from commit 49ca175f01)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 16:58:57 +02:00
patchback[bot]
709e596700
[PR #12121/6e6199ae backport][stable-13] parted: ignore MBR partition type codes in flags on SUSE systems (#12147)
parted: ignore MBR partition type codes in flags on SUSE systems (#12121)

* parted: ignore MBR partition type codes reported as flags by SUSE parted

SUSE's patched parted reports MBR partition type codes (e.g., type=8e for
Linux LVM) in the machine-parseable flags output. The module was trying to
unset these pseudo-flags via 'parted set N type=8e off', which is not a
valid parted command, causing the task to fail when using flags: [lvm] on
msdos-labelled disks on SUSE systems.

Fixes #6292



* feat(changelog): add fragment for PR 12121

* Update changelogs/fragments/12121-parted-suse-msdos-type-code.yml



---------



(cherry picked from commit 6e6199ae3d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-31 08:35:40 +02:00
patchback[bot]
9821ff20c4
[PR #12137/5d62edc6 backport][stable-13] pamd: handle non-PAM lines in authselect profile files (#12145)
pamd: handle non-PAM lines in authselect profile files (#12137)

* fix(pamd): handle non-PAM lines in authselect profile files



* test(pamd): add test for authselect directive lines



* feat(changelog): add fragment for PR 12137



---------


(cherry picked from commit 5d62edc673)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 00:05:03 +02:00
patchback[bot]
3b5eb565fb
[PR #12119/9208cbfd backport][stable-13] xenserver_guest_info: add VDI uuid and vdi_type to disk info (#12141)
xenserver_guest_info: add VDI uuid and vdi_type to disk info (#12119)

* xenserver_guest_info: add VDI uuid and vdi_type to disk info

  Add uuid and vdi_type (VHD/QCOW2) fields to the disk information
  returned by xenserver_guest_info module.

  Fixes #11998

* changelog: add PR URL to changelog fragment

* xenserver_guest_info: add uuid and vdi_type to RETURN example output

(cherry picked from commit 9208cbfd43)

Co-authored-by: Shreyash <shrbhosa@redhat.com>
2026-05-30 20:29:53 +02:00
patchback[bot]
a865f528cb
[PR #12113/ef5b22d1 backport][stable-13] unixy callback: fix KeyError when task is delegated to host without ansible_host set (#12143)
unixy callback: fix KeyError when task is delegated to host without ansible_host set (#12113)

* fixes issue #12112

* adjust PR ID

* adjust PR ID, mistake was made

* adjust PR ID

* I messed up all these numbers

---------


(cherry picked from commit ef5b22d18e)

Co-authored-by: Stefan Midjich <stemid@users.noreply.github.com>
Co-authored-by: Stefan Midjich <stefan@sydit.se>
2026-05-30 20:29:46 +02:00
patchback[bot]
f1c89afb1f
[PR #12084/8468fea3 backport][stable-13] composer: config file hash to evaluate whether a change occurred (#12132)
composer: config file hash to evaluate whether a change occurred (#12084)

* composer: Use config file hash to evaluate whether a change occurred (instead of unreliable output). Ensure `--working-dir` option consistently comes first (sudo-friendly)

* Update plugins/modules/composer.py



* whitespace fixes + changelog fragment

* Update changelogs/fragments/composer-working-dir-and-config-sha256.yaml



* Update changelogs/fragments/composer-working-dir-and-config-sha256.yaml



* Update plugins/modules/composer.py



* fragment

* ruff format  plugins/modules/composer.py

---------



(cherry picked from commit 8468fea3b0)

Co-authored-by: Raphaël Droz <raphael@droz.eu>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-30 15:12:16 +02:00
patchback[bot]
bced112f9a
[PR #12032/580e8ad3 backport][stable-13] slack: support file upload (#12126)
slack: support file upload (#12032)

* slack: add support for file uploads and threading

* slack: add support for file uploads and threading

* docs: rename fragment to match PR #12032

* Fix validate-modules issues and update documentation for files support

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* chore: fix nox sanity issues

* style: add author copyright

* style: fix examples

* build: trigger CI due to infrastructure timeout

* Update plugins/modules/slack.py



* doc: address reviewer feedback on changelog and token placeholder

* doc: address reviewer feedback on changelog and token placeholder

* fix: address maintainer feedback

* fix: pipeline status, rm continue

* fix: fix unit tests

* fix: linter fix

* fix: fix comments

* Update plugins/modules/slack.py



* Update plugins/modules/slack.py



* docs: remove outdated comment about failing logic

* Update plugins/modules/slack.py



* Update plugins/modules/slack.py



* fix: handle missing files via fail_on_file_error

* Apply suggestions from code review



* Apply suggestions from code review



* fix: adjust options syntax and formatting

---------




(cherry picked from commit 580e8ad3f9)

Co-authored-by: Maxim Bakurevych <43715761+BakurD@users.noreply.github.com>
Co-authored-by: Максим Бакуревич <maksimbakurevic@MacBook-Air-Maksim.local>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-30 15:11:47 +02:00
Felix Fontein
e64c578b66 The next release will be 13.1.0. 2026-05-30 13:48:09 +02:00
patchback[bot]
598bdffc07
[PR #12106/50046965 backport][stable-13] lxc_container: Fix create_script in plugins/module_utils/_lxc.py (#12111)
lxc_container: Fix create_script in plugins/module_utils/_lxc.py (#12106)

* Fix create_script in plugins/module_utils/_lxc.py

* Added changelog fragment

* Apply suggestions from code review - updated typing



* Apply suggestion from code review - fixed docstring argument name



* Apply suggestion from code review



* Update plugins/module_utils/_lxc.py



---------



(cherry picked from commit 50046965c9)

Co-authored-by: usbpc <3638901+usbpc@users.noreply.github.com>
Co-authored-by: Kevin Holm <kevin@holm.dev>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-27 12:49:00 +02:00
Felix Fontein
d6d608a16f
Release 13.0.1. 2026-05-25 21:19:41 +02:00
Felix Fontein
c312e39df7 Fix release summary. 2026-05-25 21:19:19 +02:00
patchback[bot]
c646edecd8
[PR #12094/cbc6f6ee backport][stable-13] multiple: replace namedtuple with dataclass (#12102)
multiple: replace `namedtuple` with dataclass (#12094)

* refactor(multiple): replace namedtuple with dataclass



* chore(changelog): add fragment for PR 12094



* Update comment.

---------



(cherry picked from commit cbc6f6eed3)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-25 15:59:50 +02:00
patchback[bot]
f074ca9b05
[PR #12097/850ef03f backport][stable-13] snap: enforce hold when installing at a specific revision (#12101)
snap: enforce hold when installing at a specific revision (#12097)

* snap: enforce hold when installing at a specific revision

When `revision` is specified, run `snap refresh --hold` after install/refresh
to actually pin the snap and prevent automatic updates from overriding it.
Detects hold-mismatch idempotently via the Notes column of `snap list`.

Fixes #12088



* feat(changelog): add fragment for snap hold fix (#12097)



* test(snap): remove incorrect manual-refresh assertion from hold test

snap refresh --hold only blocks the snapd auto-refresh daemon; a manual
snap refresh bypasses the hold. Remove the block that ran snap refresh
manually and asserted the revision was unchanged.



* snap: add bare-refresh hold test and docs warning for manual refresh bypass



---------


(cherry picked from commit 850ef03fe7)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 15:58:44 +02:00
Felix Fontein
62e60952e7 Prepare 13.0.1. 2026-05-25 15:43:40 +02:00
patchback[bot]
c975b1bdd5
[PR #12093/1bf5e6e6 backport][stable-13] iptables_state: clean up code (#12098)
iptables_state: clean up code (#12093)

* Get rid of unnecessary dummy variables.

* wrap_async isn't defined if the if condition isn't true.

* _back is in module_args if and only if both starter_cmd and confirm_cmd are not None.

* Add changelog.

(cherry picked from commit 1bf5e6e69a)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-25 15:34:01 +02:00
patchback[bot]
20c46a835c
[PR #12085/fdace385 backport][stable-13] nmcli: fix check/diff for bond arp_interval and arp_ip_target (#11588) (#12092)
nmcli: fix check/diff for bond arp_interval and arp_ip_target (#11588) (#12085)

* nmcli: bond ARP options stop lying in check/diff (#11588)

Align arp_interval/arp_ip_target keys with bond.options parsing, route
ARP settings via +bond.options, and fix bond MTU false positives.

* Changelog: nmcli fragment gets PR links and clearer diff wording

Address reviewer feedback on #12085 — both entries now cite the PR URL
and the MTU entry says "incorrectly reports diff" instead of "false positives".

---------


(cherry picked from commit fdace38501)

Co-authored-by: Asif Draxi <47986843+AsifAd@users.noreply.github.com>
Co-authored-by: Asif Draxi <asif.draxi@blackline.com>
2026-05-23 21:40:19 +02:00
Felix Fontein
127e59a2da
Release 13.0.0. 2026-05-18 20:22:05 +02:00
Felix Fontein
93dec9c341 Adjust release summary. 2026-05-18 20:19:28 +02:00
Felix Fontein
ea02e6a5a9
onepassword* lookups: drop support for op v1 (#12061)
Drop support for op v1.
2026-05-18 05:12:14 +02:00
Alexander Freiherr von Buddenbrock
23bd56990c
Start opentelemetry spans on host start instead of task start (#11434)
* Start opentelemetry spans on host start instead of task start

v2_playbook_on_task_start does not have the host information, so spans
would always start at the same time for every host in that task, even if
they started at different times, like when hosts > forks with strategy
host_pinned. This also hides the duration of the task for that host.

This change uses the newer v2_runner_on_start callback and adds the acutal
host start time to the span. The change is backwards compatible with ansible
versions that do not have v2_runner_on_start and makes no assumptions around
the ordering of v2_runner_on_start and v2_playbook_on_task_start.

* Add changelog fragment

* Remove redundant callback hooks

v2_runner_on_starts gets called by ansible right after the strategy has called on_task_start or on_handler_start. So there is no need to keep this code as the minimum ansible-core version is guaranteed to have this function. on_cleanup (removed around ansible-core 2.0) and on_no_hosts (removed around ansible-core 2.5) never get called.

* Fix unreachable hosts causing exceptions

If finish_task is never called for a host the result object stays None, which caused an exception in update_span_data. This was the case for unreachable hosts, as the callback plugin did not implement v2_runner_on_unreachable.

* Fix import order in test_opentelemetry
2026-05-17 11:28:15 +02:00
Gerben Welter
3558e3c74a
Fix flatpak id check (#12063)
* Fix flatpak id check

This PR fixes the flatpak ID check by allowing the last component of the ID to contain dashes. The regular expression will match the flatpak ID according to the flatpak specification. It matches all 4600+ IDs currently present in flathub.

Fixes #12062

* Add changelog fragment

* Update plugins/modules/flatpak.py

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

* Update changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-17 11:12:38 +02:00
Alexei Znamensky
15616be827
xml: fix predicated xpath no-match incorrectly creating nodes (#12031)
* fix(xml): no-op when predicated xpath finds no match instead of creating nodes

When using xpath like element[text()='old'] with value=new, a no-match due
to the predicate not being satisfied incorrectly triggered node creation,
corrupting the XML. Now treats predicate misses as a no-op.

Fixes #8730

* changelog(xml): add fragment for PR #12031

* fix(xml): remove spurious test-unset-element-value include from main.yml

That file belongs to a different branch and was accidentally dragged in
during a stash conflict resolution.

* feat(xml): add create_if_missing option to control node creation on value no-match

Instead of implicitly creating nodes when value is set and xpath finds no match,
expose create_if_missing (default true, preserving old behavior) so callers
can opt into a silent no-op with create_if_missing=false.

Fixes #8730
2026-05-17 10:48:56 +02:00
Alexei Znamensky
2f83a5b084
selective callback plugin: align host names in stats output (#12065)
* fix(selective): align host names in stats output

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* changelog(selective): add fragment for PR #12065

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 10:38:33 +02:00
Alexei Znamensky
9cba458e3e
cargo: fix version parsing when state=latest (#12064)
* fix(cargo): fix greedy regex in get_latest_published_version

Fixes #8949

* docs(cargo): add changelog fragment for #12064
2026-05-17 20:24:03 +12:00
bne1hm
c2485ea57b
apt_rpm: fix upgrade of local RPM not present in repository (#9161) (#12039) 2026-05-17 09:48:08 +02:00