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

1661 commits

Author SHA1 Message Date
patchback[bot]
5343eff594
[PR #12201/877f20f2 backport][stable-12] replace lingering ansible_xxx with ansible_facts.xxx (#12203)
replace lingering ansible_xxx with ansible_facts.xxx (#12201)

(cherry picked from commit 877f20f278)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-06-06 11:52:56 +02:00
patchback[bot]
10f86cff19
[PR #12163/f9d4f0ad backport][stable-12] Fix incus Windows modules with ansible-core 2.21 (#12178)
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:39 +02:00
patchback[bot]
61c5767d0e
[PR #12162/cdd9c1dd backport][stable-12] test(integration): explicitly add executable to iso_extract on Fedora (#12165)
test(integration): explicitly add executable to iso_extract on Fedora (#12162)

This provides a (temporary) workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2373874:
On Fedora 43+ 7zip is unable to find the 7z.so module when it is not in the
same path as the 7z binary or in /usr/bin/

(cherry picked from commit cdd9c1ddde)

Co-authored-by: spike77453 <spike77453@users.noreply.github.com>
2026-06-01 06:33:54 +02:00
patchback[bot]
a58bb6af00
[PR #12123/49ca175f backport][stable-12] htpasswd: fix hash_scheme aliases and Apache-compatible bcrypt (#12155)
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:55 +02:00
patchback[bot]
31aabddc46
[PR #12121/6e6199ae backport][stable-12] parted: ignore MBR partition type codes in flags on SUSE systems (#12146)
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:36 +02:00
patchback[bot]
789789f202
[PR #12137/5d62edc6 backport][stable-12] pamd: handle non-PAM lines in authselect profile files (#12144)
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:00 +02:00
patchback[bot]
eedba20600
[PR #12128/a794ccf1 backport][stable-12] zpool: reduce disk usage in integration tests by using sparse files (#12135)
zpool: reduce disk usage in integration tests by using sparse files (#12128)

* zpool: use sparse files in integration tests to reduce diskspace usage

* changelog: add PR link to zpool disk space fragment

* remove changelog fragment for test-only change

(cherry picked from commit a794ccf127)

Co-authored-by: Shreyashxredhat <shrbhosa@redhat.com>
2026-05-30 15:11:19 +02:00
patchback[bot]
410383e95f
[PR #12084/8468fea3 backport][stable-12] composer: config file hash to evaluate whether a change occurred (#12131)
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 14:34:42 +02:00
patchback[bot]
b759173038
[PR #12095/b1c7700a backport][stable-12] multiple: mark integration tests that run pip install as destructive (#12099)
multiple: mark integration tests that run `pip install` as destructive (#12095)

test(integration): mark pip-installing tests as destructive


(cherry picked from commit b1c7700a1b)

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:21:12 +02:00
patchback[bot]
3e276c4e6e
[PR #12085/fdace385 backport][stable-12] nmcli: fix check/diff for bond arp_interval and arp_ip_target (#11588) (#12091)
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:22 +02:00
patchback[bot]
232d27b9ab
[PR #12078/e6ca0df5 backport][stable-12] Fix typing (#12079)
* Fix typing (#12078)

Fix typing.

ansible-core 2.21.0 is out and has more type definitions.

(cherry picked from commit e6ca0df592)

* Also add no-assert to 2.17 ignore file.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-19 08:25:30 +02:00
Felix Fontein
dedbedf917 Revert "[PR #11996/2cb4a5d4 backport][stable-12] gitlab_user: update SSH keys when key material changes (#12038)"
This reverts commit b94ac3fa21.
2026-05-17 12:59:18 +02:00
patchback[bot]
fd13c1bcde
[PR #12072/528c2879 backport][stable-12] Mark nomad tests as unstable (#12074)
Mark nomad tests as unstable (#12072)

Mark nomad tests as unstable.

(cherry picked from commit 528c2879d5)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-17 11:49:41 +02:00
patchback[bot]
d2e3646c3a
[PR #12052/2f96093d backport][stable-12] CI: Replace Ubuntu 22.04 with 26.04 for ansible-core devel (#12053)
CI: Replace Ubuntu 22.04 with 26.04 for ansible-core devel (#12052)

Replace Ubuntu 22.04 with 26.04 for devel.

(cherry picked from commit 2f96093dbf)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-15 12:48:14 +02:00
patchback[bot]
0085876c0a
[PR #12045/5447d0eb backport][stable-12] Setup pip path generic (#12046)
Setup pip path generic (#12045)

* setup_pip_path: use sysconfig to build pip scripts path generically



* setup_pip_path: calculate PATH prepended with pip installation path

* move environment up to block

* obtain path from pip itself

* apparently the python interpreter doesnt go into ansible_facts

* rename role to setup_pip_scripts_path

---------


(cherry picked from commit 5447d0eb4f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 14:16:21 +02:00
patchback[bot]
b94ac3fa21
[PR #11996/2cb4a5d4 backport][stable-12] gitlab_user: update SSH keys when key material changes (#12038)
gitlab_user: update SSH keys when key material changes (#11996)

* gitlab_user: update SSH keys when key material changes

Compare SSH keys by key type and key material so comment-only differences remain idempotent while changed keys are replaced. Add unit and integration coverage for SSH key updates.

Fixes #6516

* gitlab_user: add SSH key update modes

Restore backward-compatible same-name SSH key handling by default and
add explicit update and deduplicate modes for controlled replacement
behavior.

Refs: #6516

* Apply suggestions from code review



---------


(cherry picked from commit 2cb4a5d4e7)

Co-authored-by: Fulvius <31437530+LCerebo@users.noreply.github.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-05-13 08:07:21 +02:00
patchback[bot]
983e3fc2bb
[PR #12023/87a42725 backport][stable-12] java_cert/java_keystore: re-enable RHEL tests (#12027)
java_cert/java_keystore: re-enable RHEL tests (#12023)

* java_cert/java_keystore: re-enable RHEL tests

* bump java to version 21 in RHEL

(cherry picked from commit 87a42725e0)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-05-10 11:59:17 +02:00
patchback[bot]
bb539f1d56
[PR #12013/abef8f2a backport][stable-12] xml: fix print_match not populating matches return value (#12021)
xml: fix `print_match` not populating `matches` return value (#12013)

* fix(xml): populate matches when print_match is set, fix returned doc



* test(xml): add integration tests for print_match



* changelog: add fragment for PR 12013



---------


(cherry picked from commit abef8f2aed)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 10:22:16 +02:00
patchback[bot]
7f688e78bf
[PR #11959/d87a8a16 backport][stable-12] xml: fail for non-string values (#12001)
xml: fail for non-string `value`s (#11959)

* fix(xml): coerce boolean values to string with a warning

Fixes #7171



* test(xml): add integration tests for boolean value handling



* changelog: add fragment for PR 11959



* adjustments from review

* test(xml): update boolean-value integration tests to expect failure

Now that xml fails on non-string values, replace the old success-path
tests with failure assertions and add a positive test for quoted strings.
Remove the no-longer-needed result XML fixtures.



* adjustments from review

* fix(xml): correct boolean test assertions to match actual error message format



---------


(cherry picked from commit d87a8a167f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 20:10:45 +02:00
patchback[bot]
caeafeec1f
[PR #11943/38d49d24 backport][stable-12] yarn: add Alpine Linux support in integration tests (#12002)
yarn: add Alpine Linux support in integration tests (#11943)

* test(yarn): add Alpine Linux support via apk

Install nodejs and yarn via apk on Alpine, sharing the functional
test block with the existing non-Alpine (pre-built binary) path.
Extracts the test block into tests.yml to avoid duplication.

Fixes #4270



* fix(yarn): skip Node.js runtime warnings in stderr processing

Node.js 24 emits DeprecationWarning lines to stderr (e.g. for url.parse())
that are not JSON, causing _process_yarn_error to fail with "Unexpected
stderr output from Yarn". Skip lines starting with "(node:" before
attempting JSON parsing.



* test(yarn): add changelog fragment for #11943



* fix(yarn): only JSON-parse lines starting with '{' in stderr

Node.js 24 emits multi-line DeprecationWarnings to stderr (e.g. the hint
line "(Use `node --trace-deprecation ...`") that are not JSON and were
tripping the "Unexpected stderr output from Yarn" failure. Yarn's
structured output always starts with '{', so skip any line that doesn't.



* test(yarn): install sqlite on Alpine to fix nodejs 22 symbol error

On Alpine 3.21 nodejs 22 requires SQLite session extension symbols
(sqlite3session_*) that are not present in sqlite-libs; installing
the full sqlite package provides them.



* test(yarn): refresh apk cache and upgrade sqlite-libs before installing nodejs

The CI Alpine container may have a stale sqlite-libs that lacks the
session extension symbols (sqlite3session_*) required by nodejs 22+.
Force a cache refresh and upgrade sqlite-libs to the latest revision.



* fix(yarn): warn on non-JSON stderr lines instead of silently skipping

Non-JSON lines in stderr (e.g. Node.js runtime DeprecationWarnings) are
surfaced to the user via module.warn() rather than being silently ignored,
since their content and meaning are not known in advance.



* prefix yarn output line

* Update changelogs/fragments/11943-yarn-nodejs-runtime-warnings.yml



---------



(cherry picked from commit 38d49d240e)

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-06 20:10:35 +02:00
patchback[bot]
c2129d331b
[PR #11956/7b05c052 backport][stable-12] nomad: re-enable tests (#11960)
nomad: re-enable tests (#11956)

* nomad: re-enable tests

* test(nomad): revamp integration tests

- bump nomad to 2.0.0
- update job.hcl to Nomad 1.x+ HCL syntax
- add macOS support: skip unzip install on Darwin, add arm64/aarch64 arch mapping
- skip Alpine in aliases instead of runtime gate in main.yml
- move nomad_version/nomad_cmd/nomad_uri/arch_map to role vars
- flatten block structure



---------


(cherry picked from commit 7b05c05205)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 21:50:20 +02:00
patchback[bot]
31c00e365d
[PR #11948/b754d75d backport][stable-12] lmdb_kv lookup: enable tests (#11964)
lmdb_kv lookup: enable tests (#11948)

* lmdb_kv lookup: enable tests

* skip freebsd 14.2

(cherry picked from commit b754d75d18)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-05-01 21:50:03 +02:00
patchback[bot]
365e02d10c
[PR #11944/c7be9e4d backport][stable-12] odbc: add Arch Linux support via AUR psqlodbc (#11963)
odbc: add Arch Linux support via AUR psqlodbc (#11944)

* test(odbc): add Arch Linux support via AUR psqlodbc

Fixes #4267

* test(setup_postgresql_db): guard Arch Linux initdb with creates

* test(odbc): add setup_remote_tmp_dir dependency

(cherry picked from commit c7be9e4d5b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-05-01 21:49:56 +02:00
patchback[bot]
f37d543eb9
[PR #11945/036811e6 backport][stable-12] test(integration): enable homectl test for ArchLinux (#11966)
test(integration): enable homectl test for ArchLinux (#11945)

* test(integration): enable homectl test for ArchLinux

* install passlib in Arch Linux

* test: requires vm in homectl aliases

(cherry picked from commit 036811e668)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-05-01 21:49:40 +02:00
patchback[bot]
78f7cabcc1
[PR #11941/36b55c73 backport][stable-12] test(integration): enable homectl test for RHEL 9+ (#11967)
test(integration): enable homectl test for RHEL 9+ (#11941)

(cherry picked from commit 36b55c73e0)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-05-01 21:49:32 +02:00
patchback[bot]
10f4e9796d
[PR #11925/d0f0e9d0 backport][stable-12] lvol: fix thin-pool creation with percentage size (#11930)
lvol: fix thin-pool creation with percentage size (#11925)

* fix(lvol): use --extents (-l) for thin-pool creation with percentage size

Fixes #11923



* chore(lvol): add changelog fragment for #11925



* test(lvol): add integration tests for thin-pool creation with percentage sizes



* test(lvol): use extent-aligned size for thin-pool absolute-size idempotency test



* test(lvol): reduce thin-pool sizes to leave space for test_pvs.yml



* test(lvol): add shrink=false to thin-pool absolute-size idempotency check



* test(lvol): add shrink: false to thin volume idempotency test

LVM reports thin volume size slightly above requested (metadata overhead),
triggering spurious shrink attempts. Disable shrink for idempotency checks
to avoid false failures.



---------


(cherry picked from commit d0f0e9d00f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 21:42:57 +02:00
patchback[bot]
dc79f4a170
[PR #11860/25b21183 backport][stable-12] udm_user, homectl - replace crypt/legacycrypt with passlib (#11884)
udm_user, homectl - replace crypt/legacycrypt with passlib (#11860)

* udm_user - replace crypt/legacycrypt with passlib

The stdlib crypt module was removed in Python 3.13. Replace the
crypt/legacycrypt import chain with passlib (already used elsewhere
in the collection) and use CryptContext.verify() for password
comparison.

Fixes #4690



* Add changelog fragment for PR 11860



* remove redundant ignore file entries

* udm_user, homectl - replace crypt/legacycrypt with _crypt module utils

Add a new _crypt module_utils that abstracts password hashing and
verification. It uses passlib when available, falling back to the
stdlib crypt or legacycrypt, and raises ImportError if none of them
can be imported. Both udm_user and homectl now use this shared
utility, fixing compatibility with Python 3.13+.

Fixes #4690



* Add BOTMETA entry for _crypt module utils



* _crypt - fix mypy errors and handle complete unavailability

Replace CryptContext = object fallback (rejected by mypy) with a
proper dummy class definition. Add has_crypt_context flag so modules
can detect when no backend is available. Update both modules to
import and check has_crypt_context instead of testing for None.



* adjsutments from review

* Update plugins/modules/homectl.py



* Update plugins/modules/udm_user.py



---------



(cherry picked from commit 25b21183bb)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-19 22:51:20 +02:00
patchback[bot]
748882dfa8
[PR #11879/77509be2 backport][stable-12] Replace .format() calls with f-strings across multiple plugins (#11881)
Replace .format() calls with f-strings across multiple plugins (#11879)

* Replace .format() calls with f-strings across multiple plugins



* Add changelog fragment for PR 11879



---------


(cherry picked from commit 77509be2aa)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 12:49:29 +02:00
patchback[bot]
449a179d8f
[PR #11750/6c809dd9 backport][stable-12] pacemaker: fix race condition on resource creation (#11877)
pacemaker: fix race condition on resource creation (#11750)

* remove pacemaker wait arg and fix race condition

* fix up pacemaker resource and stonith polling

* add changelog for pacemaker timeout bug

* remove env from test case and fix changelog file name

* Update changelogs/fragments/11750-pacemaker-wait-race-condition.yml



---------


(cherry picked from commit 6c809dd9db)

Co-authored-by: munchtoast <45038532+munchtoast@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-18 22:55:56 +02:00
patchback[bot]
27ca6be10a
[PR #11813/edf8f249 backport][stable-12] parted: add unit_preserve_case option to fix unit case in return value (#11875)
parted: add unit_preserve_case option to fix unit case in return value (#11813)

* parted: add unit_preserve_case option to fix unit case in return value

Adds O(unit_preserve_case) feature flag (bool, default None) to control
the case of the ``unit`` field in the module return value.

Previously the unit was always lowercased (e.g. ``kib``), making it
impossible to feed ``disk.unit`` back as the ``unit`` parameter without
a validation error. With O(unit_preserve_case=true) the unit is returned
in its original mixed case (e.g. ``KiB``), matching the accepted input
values.

The default (None) emits a deprecation notice; the default will become
V(true) in community.general 14.0.0.

Fixes #1860



* parted: add changelog fragment for PR #11813



* adjustments from review

* Comment 15.0.0 deprecation in option decription.

* parted: fix unit test calls to parse_partition_info after signature change



* parted: fix unit_preserve_case - parted outputs lowercase units in machine mode

Parted's machine-parseable output always uses lowercase unit suffixes
(e.g. ``kib``, ``mib``) regardless of what was passed to the ``unit``
parameter. Removing the explicit ``.lower()`` call was therefore not
enough to preserve case.

Add a ``canonical_unit()`` helper that maps a unit string to its canonical
mixed-case form using ``parted_units`` as the reference, and use it
instead of a bare identity when ``unit_preserve_case=true``.

Also fix a yamllint violation in the DOCUMENTATION block (missing space
after ``#`` in inline comments).



* Update plugins/modules/parted.py



* Update plugins/modules/parted.py



---------



(cherry picked from commit edf8f24959)

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-04-18 22:55:45 +02:00
patchback[bot]
2873d439c3
[PR #11764/e9110811 backport][stable-12] logrotate: fix parameter and config file validation and more (#11856)
logrotate: fix parameter and config file validation and more (#11764)

* fix(logrotate): add missing defaults and parameter validation declarations

- Add default="present" to state parameter
- Add default="/etc/logrotate.d" to config_dir parameter
- Add required_by declarations for shred and compression parameters

* fix(logrotate): fix runtime validation bugs, remove duplicate checks

- Fix shred_cycles TypeError when value is None
- Fix enabled=None handling in get_config_path
- Remove duplicate runtime mutually_exclusive checks
- Add runtime boolean truthiness checks
- Add 'create' parameter format validation
- Remove stale test method

* fix(logrotate): restructure file operations, validate before write

- Write content to tmpdir temp file, validate, then atomic move to destination.
- Wrap all os.remove() calls in try/except with fail_json on error
- Wrap all module.atomic_move() calls in try/except with fail_json on error
- Also add self.mock_module.tmpdir = self.test_dir to test setUp for new code path

* docs(logrotate): update DOCUMENTATION block

- Add 'default: present' to state option
- Add 'default: /etc/logrotate.d' to config_dir option

* feat(logrotate): add optional backup parameter

* chore: add logrotate fixes changelog fragment

* chore(changelog/logrotate): use present tense singular

* fix(logrotate): handle trailing spaces in create param



* refactor(logrotate): remove redundant checks

These are already handled by `required_if` statements in the module spec

* refactor(logrotate): use tempfile to create temporary file

* refactor(logrotate): remove redundant `bool()` casts on `target_enabled`

`target_enabled` is guaranteed to be bool by this point. It's either the module param (typed bool) or falls back to `current_enabled` (also bool). The `bool()` wraps are no-ops.

* refactor(logrotate): remove unused `self.config_file` attribute

* refactor(logrotate): remove dead `any_state` parameter from `read_existing_config`

* fix(logrotate): raise error instead of falling through on enabled-state rename failures

* refactor(logrotate): tighten `get_config_path` sig to bool

`None` callers are removed now so this is safe

* test(logrotate): remove stale open mock assertion after tempfile refactor

* style(logrotate): format file

* chore(logrotate): add missing `version_added` attribute



* fix(logrotate): clean up temp file



* fix(logrotate): remove redundant temp file cleanup



* refactor(logrotate): Use dict subscript to access required backup param



* fix(logrotate): fix: only remove old config file when path differs from target



* fix(logrotate): update logrotate_bin type hint to str

* feat(logrotate): add backup file handling when removing old config

* style(logrotate): format file

* test(logrotate): add missing backup default to `_setup_module_params`

* test(logrotate): fix incorrect `os.remove` assertion in update test

* refactor(logrotate): remove unnecessary `to_native()` call



* refactor(logrotate): replace str quotes with !r



* fix(logrotate): change backup default back to true

* fix(logrotate): raise error when `shred_cycle`s is set with `shred=false`

* docs(logrotate): clarify `shred_cycles` behaviour

* fix(logrotate): remove to_native calls for exception messages

* docs(logrotate): improve `config_dir` param description

* refactor(logrotate): simplify backup file assignment logic

* style(logrotate): format file

* docs(logrotate): improve config_map description

---------



(cherry picked from commit e911081102)

Co-authored-by: tigattack <10629864+tigattack@users.noreply.github.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-17 18:32:36 +02:00
patchback[bot]
729eb996e8
[PR #11836/ef656cb9 backport][stable-12] CI: Replace Fedora 43 with 44 for devel (#11846)
CI: Replace Fedora 43 with 44 for devel (#11836)

* Replace Fedora 43 with 44 for devel in CI.

* Adjust tests.

* Adjust flatpak module to Fedora 44.

(cherry picked from commit ef656cb9b6)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-16 22:00:37 +02:00
patchback[bot]
3e721f9572
[PR #11842/7884a3f2 backport][stable-12] CI: Temporarily skip failing callback unit tests for ansible-core 2.21+ (#11844)
CI: Temporarily skip failing callback unit tests for ansible-core 2.21+ (#11842)

Temporarily skip failing unit tests.

(cherry picked from commit 7884a3f2a2)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-16 21:39:55 +02:00
patchback[bot]
f78a44c6a3
[PR #11825/d1448b76 backport][stable-12] iso_extract: strip leading path separator from file entries (#11832)
iso_extract: strip leading path separator from file entries (#11825)

* iso_extract: strip leading path separator from file entries

Fixes #5283



* iso_extract: add changelog fragment for issue 5283



---------


(cherry picked from commit d1448b76c1)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 22:01:19 +02:00
patchback[bot]
705ffc564d
[PR #11771/df252e5f backport][stable-12] incus, machinectl, run0 - fix become over pty connections (#11827)
incus, machinectl, run0 - fix become over pty connections (#11771)

* incus, machinectl, run0 - fix become over pty connections

Four small fixes across three plugins, all discovered while trying to
use community.general.machinectl (and later community.general.run0)
as become methods over the community.general.incus connection.

Core bug: machinectl and run0 both set require_tty = True, but the
incus connection plugin was ignoring that hint and invoking
'incus exec' without -t. Honor require_tty by passing -t, mirroring
what the OpenSSH plugin does with -tt.

Once the pty is in place, both become plugins emit terminal control
sequences (window-title OSC, ANSI reset) around the child command
that land in captured stdout alongside the module JSON and trip the
result parser with "Module invocation had junk after the JSON data".
Suppress that decoration at the source by prefixing the constructed
shell command with SYSTEMD_COLORS=0. TERM=dumb would work too but
has a wider blast radius (it also affects interactive tools inside
the become-user session); SYSTEMD_COLORS is the documented
systemd-scoped knob.

run0 was also missing pipelining = False. When run0 is used over a
connection that honors require_tty, ansible's pipelining sends the
module source on stdin to remote python3, which cannot be forwarded
cleanly through the pty chain and hangs indefinitely. Disable
pipelining the same way community.general.machinectl already does.

Also add tests/unit/plugins/become/test_machinectl.py mirroring the
existing test_run0.py. machinectl had no unit test coverage before,
which is why CI did not catch the SYSTEMD_COLORS=0 prefix change
when the equivalent run0 change broke test_run0_basic/test_run0_flags.



* Update changelogs/fragments/11771-incus-machinectl-run0-become-pty.yml



---------



(cherry picked from commit df252e5fab)

Co-authored-by: Martin Schürrer <martin@schuerrer.org>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-04-15 22:01:06 +02:00
patchback[bot]
32c4bbea30
[PR #11748/972bed66 backport][stable-12] flatpak: add from_url parameter, deprecate URLs in name (#11814)
flatpak: add from_url parameter, deprecate URLs in name (#11748)

* flatpak: add from_url parameter, deprecate URLs in name

Adds a new `from_url` parameter for installing flatpaks from a
.flatpakref URL, using `flatpak install --from <url>`. The `name`
parameter then carries the reverse DNS application ID, enabling
reliable idempotency checks.

Passing URLs directly in `name` is now deprecated and will be
removed in community.general 14.0.0.

Fixes #4000



* flatpak: add changelog fragment for PR #11748



* flatpak: remove deprecation, adjust docs tone



* flatpak: add integration tests for from_url parameter



---------


(cherry picked from commit 972bed66f4)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 21:30:31 +02:00
patchback[bot]
d01187d03b
[PR #11768/b40608a3 backport][stable-12] Ensure standard locale in run_command (group5-batch1) (#11795)
Ensure standard locale in run_command (group5-batch1) (#11768)

* ensure standard locale in run_command (group5-batch1)

Adds ``LANGUAGE=C`` and ``LC_ALL=C`` to ``run_command()`` calls in modules
that parse command output, to prevent locale-dependent parsing failures on
non-C-locale systems.

Modules updated: apache2_module, composer, facter_facts, known_hosts module
utils, lvg_rename, macports, modprobe, monit, open_iscsi, pacman_key,
rhsm_release, rpm_ostree_pkg, sysupgrade.



* add changelog fragment for group5-batch1



* Remove lvg_rename from locale fix — superseded by PR #11746

PR #11746 (feat: use CmdRunner for LVM commands) takes priority and
will handle lvg_rename.py via CmdRunner refactor. Removing our
run_command_environ_update change to avoid conflict.



---------


(cherry picked from commit b40608a39d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 22:29:14 +02:00
patchback[bot]
c8f2219fb0
[PR #11733/6f12d930 backport][stable-12] gem: use CmdRunner (#11791)
gem: use `CmdRunner` (#11733)

* gem: use `CmdRunner`

* add changelog frag

* gem: restore get_rubygems_path() helper to preserve executable splitting



---------


(cherry picked from commit 6f12d93057)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 13:38:08 +02:00
patchback[bot]
04367d8b9c
[PR #11742/bdd31745 backport][stable-12] nmcli: use get_best_parsable_locale() to support UTF-8 connection names (#11757)
nmcli: use get_best_parsable_locale() to support UTF-8 connection names (#11742)

* nmcli: start locale fix - normalize run_command environ to LANGUAGE=C, LC_ALL=C

Work in progress - issue #10384 (UTF-8 conn_name support) requires deeper
investigation beyond simple locale variable normalization.



* nmcli: use get_best_parsable_locale() to support UTF-8 connection names

Fixes issue where UTF-8 connection names (e.g. Chinese characters) were
corrupted to '????' when LC_ALL=C forced ASCII encoding, causing
connection_exists() to always return False for non-ASCII names.



* add changelog fragment for PR #11742



---------


(cherry picked from commit bdd3174563)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 15:46:30 +02:00
patchback[bot]
e5f9516335
[PR #11741/e59888dd backport][stable-12] Ensure standard locale in run_command (group3-batch3) (#11756)
Ensure standard locale in run_command (group3-batch3) (#11741)

* run_command locale group3 batch3: normalise to LANGUAGE=C, LC_ALL=C



* fix changelog fragment: bugfixes, American English, separate code spans



* fix changelog fragment: correct PR number (11741)



---------


(cherry picked from commit e59888dd7e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 15:34:34 +02:00
patchback[bot]
5f5043d4b8
[PR #11743/849a7ee8 backport][stable-12] Add stable-2.21 to CI (#11745)
Add stable-2.21 to CI (#11743)

Add stable-2.21 to CI.

(cherry picked from commit 849a7ee899)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-06 22:13:07 +02:00
patchback[bot]
fa9ac2b3a9
[PR #11719/66886d08 backport][stable-12] integration tests: remove CentOS conditionals - part 2 (#11730)
integration tests: remove CentOS conditionals - part 2 (#11719)

* test(integration): remove CentOS references - part 2

* adjustments from review

(cherry picked from commit 66886d08f5)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-04-03 12:34:15 +00:00
patchback[bot]
f77d731faf
[PR #11715/79431c36 backport][stable-12] integration tests: remove CentOS conditionals (#11726)
integration tests: remove CentOS conditionals (#11715)

* test(integration): remove CentOS references

* further simplification

* more removals

* rollback systemd_info for now

* ufw: not trivially used with RHEL9 and RHEL10, simplifying tests

* remove tasks for setup_epel where unused

* adjustments from review

(cherry picked from commit 79431c36b5)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-04-03 10:41:10 +02:00
patchback[bot]
56bcb0c32b
[PR #11697/8b114e99 backport][stable-12] consul integration tests: re-enable on macOS (#11727)
consul integration tests: re-enable on macOS (#11697)

* consul integration tests: re-enable on macOS

- Update consul version to 1.22.6
- Add arm64/aarch64 architecture support
- Fix macOS Gatekeeper quarantine on downloaded binary
- Add wait_for before ACL bootstrap (race condition fix)
- Update HCL config to use tls stanza (required in 1.22)
- Disable gRPC port (conflicts with tls stanza when not configured)
- Remove skip/macos from aliases

Fixes: https://github.com/ansible-collections/community.general/issues/1016



* changelogs/fragments: add PR number for consul tests fix



* remove changelog fragment (test-only PR)



---------


(cherry picked from commit 8b114e999e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 08:03:09 +02:00
patchback[bot]
83aa142331
[PR #11682/b79a4575 backport][stable-12] snap_connect: new module to manage snap interface connections (#11722)
snap_connect: new module to manage snap interface connections (#11682)

* snap_connect: new module to manage snap interface connections

Fixes #7722



* simplify _get_connections()

---------


(cherry picked from commit b79a45753f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 07:35:13 +02:00
patchback[bot]
cac85a5480
[PR #11720/982f9472 backport][stable-12] test(integration): fix for ansible-core devel changes in register (#11724)
test(integration): fix for ansible-core devel changes in register (#11720)

(cherry picked from commit 982f9472c5)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-04-03 07:35:02 +02:00
patchback[bot]
1df4b3ee74
[PR #11690/f4e5fc09 backport][stable-12] monit: re-enable tests in RHEL (#11714)
monit: re-enable tests in RHEL (#11690)

* re-enable monit tests in rhel

* enable EPEL for RHEL<11

* rollback EPEL setup, skip only specific versions

* remove skip entirely

* change download URL in setup_epel, adjusted code to use it

* claude tries to install virtualenv, round 1

* claude tries python3 -m venv instead

* remove outdated centos6 file

(cherry picked from commit f4e5fc09d7)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-04-01 07:06:16 +02:00
patchback[bot]
66d394dc81
[PR #11686/68ae04a9 backport][stable-12] Cleanup of aliases skip statements (#11709)
Cleanup of `aliases` skip statements (#11686)

* add scripts to clean aliases' skips

* remove legacy skips

* code cosmetics

* add license to ALIASES.md

* Fix typos in ALIASES.md documentation

* rolling back freebsd14.2 and 14.3 in iso_extract

* fix versions and re-run

(cherry picked from commit 68ae04a95a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-30 19:58:13 +02:00
patchback[bot]
de180d01e0
[PR #11689/a4bba992 backport][stable-12] composer - make create-project idempotent, add force parameter (#11700)
composer - make `create-project` idempotent, add `force` parameter (#11689)

* composer - make create-project idempotent, add force parameter

Adds a check for an existing composer.json in working_dir before running
create-project, so the task is skipped rather than failing on second run.
A new force parameter allows bypassing this check when needed.

Fixes #725.



* changelog fragment: rename to PR number, add PR URL



---------


(cherry picked from commit a4bba99203)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 21:34:35 +01:00
patchback[bot]
03a639e809
[PR #11677/ef700b11 backport][stable-12] nsupdate: add unit tests (#11692)
nsupdate: add unit tests (#11677)

* nsupdate: add unit tests



* fix var name to regain sanity

* remove unneeded typing from test file

* formatting

---------


(cherry picked from commit ef700b116a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 21:47:56 +01:00