Commit Graph

4251 Commits

Author SHA1 Message Date
patchback[bot]
fa179e6d0c [PR #11694/180da98a backport][stable-12] ipa_dnsrecord: add exclusive parameter for append-without-replace semantics (#11885)
ipa_dnsrecord: add `exclusive` parameter for append-without-replace semantics (#11694)

* ipa_dnsrecord: add solo parameter for append-without-replace semantics

Fixes #682

Adds O(solo) boolean parameter (default true, preserving current
replace behaviour) consistent with other DNS modules such as
community.general.dnsimple. When solo=false, only values not
already present in IPA are added, leaving existing values untouched.



* ipa_dnsrecord: rename solo parameter to exclusive

Rename O(solo) to O(exclusive) following reviewer feedback.
'exclusive' is the established Ansible convention for this semantic
(e.g. community.general.ini_file), while 'solo' implies single-value
DNS records.



* ipa_dnsrecord: fix changelog fragment symbol markup

Use double backticks per RST convention in changelog fragments,
not the O() macro (which is for module docstrings).



* Update plugins/modules/ipa_dnsrecord.py



* ipa_dnsrecord: implement exclusive semantics for state=absent

- exclusive=true + state=absent: remove all existing values of that
  record type and name, ignoring the specified record_value(s)
- exclusive=false + state=absent: remove only the specified values
  that actually exist in IPA, preserving all others

Also updates the exclusive parameter documentation to cover both
state=present and state=absent behaviour.



---------



(cherry picked from commit 180da98a7c)

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-19 23:07:11 +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]
6458abb9c1 [PR #11838/d0d213a4 backport][stable-12] homebrew_cask: fix false failure on upgrade of latest-versioned casks (#11880)
homebrew_cask: fix false failure on upgrade of latest-versioned casks (#11838)

* homebrew_cask: fix false failure on upgrade of latest-versioned casks

Use rc == 0 to determine upgrade success, consistent with _upgrade_all().
The previous check (_current_cask_is_installed() and not _current_cask_is_outdated())
was unreliable: for `latest`-versioned casks under --greedy, brew may still
list the cask as outdated after a successful upgrade, causing the task to fail
with a harmless warning from stderr as the error message.

Fixes #1647



* homebrew_cask: add changelog fragment for #11838



* Fix changelog fragment

---------


(cherry picked from commit d0d213a41d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 12:49:23 +02:00
patchback[bot]
09201bf49e [PR #11878/1b0b8d5c backport][stable-12] gitlab_project_variable - use find_project() for graceful error handling (#11882)
gitlab_project_variable - use find_project() for graceful error handling (#11878)

* gitlab_project_variable - use find_project() for consistent error handling

Replace the bare projects.get() call in GitlabProjectVariables.get_project()
with find_project() from module_utils/gitlab, which all other GitLab modules
already use. This ensures a graceful fail_json (with a clear error message)
when the project is not found, rather than an unhandled GitlabGetError
propagating as a module traceback.



* Add changelog fragment for PR 11878



* minor adjustment in f-string

---------


(cherry picked from commit 1b0b8d5cc1)

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:16 +02:00
patchback[bot]
973b5be063 [PR #11824/39f4cda6 backport][stable-12] locale_gen: support locales not yet listed in /etc/locale.gen (#11883)
locale_gen: support locales not yet listed in /etc/locale.gen (#11824)

* locale_gen: support locales not yet listed in /etc/locale.gen

On systems like Gentoo where /etc/locale.gen starts with only a handful
of commented examples, set_locale_glibc() now appends missing locale
entries sourced from /usr/share/i18n/SUPPORTED instead of silently
doing nothing. Also extracts the shared locale-entry regex into a
module-level constant RE_LOCALE_ENTRY.



* locale_gen: add changelog fragment for issue 2399



---------


(cherry picked from commit 39f4cda6b5)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 12:49:10 +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]
3867300eca [PR #11839/afe9de75 backport][stable-12] homebrew_service: remove redundant code (#11876)
homebrew_service: remove redundant code (#11839)

* homebrew_service: remove redundant code

* homebrew_services: add changelog fragment for #11839



---------


(cherry picked from commit afe9de7562)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 22:55:25 +02:00
patchback[bot]
ae05131a54 [PR #11702/314863e3 backport][stable-12] xenserver_guest: changed cdrom handling for userdevice != 3, fixes #11624 (#11872)
xenserver_guest: changed cdrom handling for userdevice != 3, fixes #11624 (#11702)

* xenserver_guest: changed cdrom handling for userdevice != 3, fixes #11624

  - CD-ROM handling code has been moved before disk handling code. This more
    closely mimics XenCenter/XCP-ng Center behavior. CD-ROM device, if added,
    will now grab position 3 before any disk grabs it.
  - Position 3 is now skipped when adding disks to leave it reserved for
    CD-ROM device. If any disk ends up occupying position 3 and CD-ROM
    device ends up pushed to position above 3, booting from ISO is not
    possible (#11624).

* Added changelog fragment for #11702

* Added missing issue and PR URLs to changelog fragment for #11702

* Fixed changelog fragment for #11702

(cherry picked from commit 314863e3a7)

Co-authored-by: Bojan Vitnik <bvitnik@yahoo.com>
2026-04-17 18:55:33 +02:00
patchback[bot]
f67003cf3a [PR #11835/3416efa5 backport][stable-12] lvg - migrate to CmdRunner (#11858)
lvg - migrate to CmdRunner (#11835)


(cherry picked from commit 3416efa5bf)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 18:33:10 +02:00
patchback[bot]
2bd64a891c [PR #11817/175808d9 backport][stable-12] consul_kv: add ca_path option for custom CA certificate (#11852)
consul_kv: add ca_path option for custom CA certificate (#11817)

* consul_kv: add ca_path option for custom CA certificate

Adds ca_path parameter to both the consul_kv module and consul_kv lookup
plugin, allowing users to specify a CA bundle for HTTPS connections instead
of being limited to toggling certificate validation on/off.



* consul_kv: add changelog fragment for PR #11817



* consul_kv: address review comments from felixfontein

- Fix verify logic: ca_path is ignored when validate_certs=false
- Improve validate_certs description to nudge users toward ca_path



---------


(cherry picked from commit 175808d997)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 18:33:02 +02:00
patchback[bot]
6e226f4588 [PR #11812/e2a7dc46 backport][stable-12] sefcontext: flush in-process matchpathcon cache (#11854)
sefcontext: flush in-process matchpathcon cache (#11812)

* fix sefcontext: flush in-process matchpathcon cache after changes

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



* update changelog fragment with PR number and URL



---------


(cherry picked from commit e2a7dc467d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 18:32:53 +02:00
patchback[bot]
d82bf01128 [PR #11849/74c096b0 backport][stable-12] homebrew_cask: handle placeholder version from brew --version (#11855)
homebrew_cask: handle placeholder version from brew --version (#11849)

* homebrew_cask: handle placeholder version from brew --version

When brew is run as the wrong user, git repositories may be owned by
a different user, causing brew --version to output a placeholder like
"Homebrew >= 4.3.0 (shallow or no git repository)" instead of the real
version. The parsed version would then be lower than the 2.6.0 threshold,
causing _brew_cask_command_is_deprecated() to return False and the module
to use the disabled "brew cask" command syntax.

Detect the ">=" prefix in the parsed version and treat it as a modern
installation.

Fixes #4708



* homebrew_cask: add changelog fragment for #11849



---------


(cherry picked from commit 74c096b00c)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 18:32: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]
956fc075ef [PR #11837/87ecfa34 backport][stable-12] iso_extract: retry umount on busy filesystem before cleanup (#11857)
iso_extract: retry umount on busy filesystem before cleanup (#11837)

* iso_extract: retry umount on busy filesystem before cleanup

Fixes #5333



* iso_extract: add changelog fragment for #11837



* make chglog more concise

---------


(cherry picked from commit 87ecfa3432)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 18:32:27 +02:00
patchback[bot]
7b82e694a2 [PR #11859/dad84dd3 backport][stable-12] udm_user - fix alias-to-canonical param name mismatch (#11863)
udm_user - fix alias-to-canonical param name mismatch (#11859)

* udm_user - fix alias-to-canonical param name mismatch

The loop that maps UDM object properties to module params iterated
over UDM keys (camelCase, e.g. displayName, primaryGroup) and looked
them up directly in module.params, which is keyed by canonical names
(snake_case, e.g. display_name, primary_group). This caused all
aliased params to be silently ignored.

Build an alias-to-canonical mapping from argument_spec and use it
to resolve UDM keys to the correct module.params entries.

Also fix the direct module.params["displayName"] access which raised
KeyError when the user did not explicitly use the alias form.

Fixes #2950
Fixes #3691



* Add changelog fragment for PR 11859



---------


(cherry picked from commit dad84dd36d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 18:32:17 +02:00
patchback[bot]
119623952d [PR #11848/c4ed3467 backport][stable-12] homebrew_tap: fix None in command, redundant brew tap calls, format strings, and drop no-op locale vars (#11865)
homebrew_tap: fix None in command, redundant brew tap calls, format strings, and drop no-op locale vars (#11848)

* homebrew_tap: fix None in command list, redundant brew tap calls, and bad format strings

- Fix None being injected into the run_command list when url is not
  provided to add_tap (filter with [opt for opt in [...] if opt])
- Reduce redundant `brew tap` calls: add_taps and remove_taps now
  fetch the tap list once upfront and pass it to the per-tap functions;
  already_tapped accepts an optional pre-fetched list to avoid re-running
  brew for every tap in a batch
- Fix mixed f-string/%-formatting in error messages in add_taps and
  remove_taps, replaced with plain f-strings



* homebrew_tap: simplify command construction in add_tap

Replace the opaque list comprehension filter with an explicit conditional
append — only url is ever optional, so testing the known-present items
was misleading.



* homebrew_tap: remove unnecessary locale env vars

Homebrew has no i18n/l10n support — all output is hardcoded English.
LANGUAGE=C and LC_ALL=C have no effect on brew output.



* homebrew_tap: add changelog fragment for #11848



* remove hombrew_tap from PR #11783 changelog - change reverted here

---------


(cherry picked from commit c4ed3467b6)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 18:32:10 +02:00
patchback[bot]
644d362228 [PR #11851/1db3d4f4 backport][stable-12] gitlab_project_members: fail when multiple projects match by name (#11864)
gitlab_project_members: fail when multiple projects match by name (#11851)

* gitlab_project_members: fail when multiple projects match by name

When the project parameter is a bare name (not a full path), and the
search returns more than one match, the module now fails with a clear
error asking the user to provide the full path (group/project) to
disambiguate, instead of silently operating on the first result.

Fixes #2767



* gitlab_project_members: improve code formatting



* gitlab_project_members: add changelog fragment for #11851



---------


(cherry picked from commit 1db3d4f441)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 18:32:02 +02:00
patchback[bot]
8def5bf46e [PR #11850/f8869af6 backport][stable-12] homebrew_cask: fix sudo_password failing with special characters (#11867)
homebrew_cask: fix sudo_password failing with special characters (#11850)

* homebrew_cask: fix sudo_password with special characters in password

The SUDO_ASKPASS script embedded the password inside single quotes, which
breaks shell parsing whenever the password contains a single quote. Use a
quoted heredoc (cat <<'SUDO_PASS') instead, which treats the content
completely literally regardless of special characters.

Also replace .file.close() with .flush() (correct semantics — flushes
the write buffer without leaving the NamedTemporaryFile in a half-closed
state) and remove the redundant add_cleanup_file() call (the context
manager already deletes the file on exit).

Fixes #4957



* homebrew_cask: add changelog fragment for #11850



* homebrew_cask: fix sudo_password example and clarify ansible_become_password



* homebrew_cask: use shlex.quote() for sudo_password instead of heredoc

shlex.quote() is the standard Python approach for shell-safe quoting
and handles all special characters without the edge cases of heredocs.



---------


(cherry picked from commit f8869af65f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 18:31:52 +02:00
patchback[bot]
057fd16cc0 [PR #11861/076bc4e0 backport][stable-12] etcd3 lookup - improve HTTPS connection handling and docs (#11871)
etcd3 lookup - improve HTTPS connection handling and docs (#11861)

* etcd3 lookup - improve HTTPS connection handling and documentation

Improve user experience when connecting to HTTPS etcd3 endpoints:
- Strip URL scheme from host option when present, with a warning
- Warn when HTTPS endpoint is specified but ca_cert is not provided
- Document that ca_cert is required to enable TLS
- Add HTTPS connection example
- Fix minor doc markup issue in notes section

Fixes #1664



* Add changelog fragment for PR 11861



---------


(cherry picked from commit 076bc4e03b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 18:31:39 +02:00
patchback[bot]
3a56f19656 [PR #11862/342a76d5 backport][stable-12] Remove unstable CI target (#11870)
Remove unstable CI target (#11862)

Remove unstable CI target.

(cherry picked from commit 342a76d5dd)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-17 18:31:21 +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]
4d30704615 [PR #11826/7dcd3c1c backport][stable-12] lxd_container: document that config values must be strings (#11829)
lxd_container: document that config values must be strings (#11826)

Fixes #8307


(cherry picked from commit 7dcd3c1c45)

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:36 +02:00
patchback[bot]
308a5d7e06 [PR #11823/71723268 backport][stable-12] lvol: fix LVM version regex to handle date formats without dashes (#11831)
lvol: fix LVM version regex to handle date formats without dashes (#11823)

* lvol: fix LVM version regex to handle date formats without dashes

Fixes #5445



* lvol: add changelog fragment for issue 5445



---------


(cherry picked from commit 7172326868)

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:28 +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]
1b4e58bbbf [PR #11811/ff5c34c4 backport][stable-12] lvm_pv - use CmdRunner (#11833)
lvm_pv - use CmdRunner (#11811)

* lvm_pv - migrate to CmdRunner using shared runners from module_utils/_lvm



* lvm_pv - add changelog fragment for #11811



* Update changelogs/fragments/11811-lvm_pv-use-cmdrunner.yml



---------



(cherry picked from commit ff5c34c4a7)

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-15 22:01:11 +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]
86dc3c8816 [PR #11815/78d004d9 backport][stable-12] lvg: clarify desired-state semantics of pvs parameter in docs (#11821)
lvg: clarify desired-state semantics of pvs parameter in docs (#11815)

lvg: doc adjustment
(cherry picked from commit 78d004d96e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-04-14 22:03:13 +02:00
patchback[bot]
1b1746896d [PR #11772/24ca7965 backport][stable-12] dconf: add dbus-broker support by improving D-Bus session discovery (#11820)
dconf: add dbus-broker support by improving D-Bus session discovery (#11772)

* dconf: add dbus-broker support by improving D-Bus session discovery

Extend DBusWrapper._get_existing_dbus_session() to check:
1. DBUS_SESSION_BUS_ADDRESS in the current process environment
2. /run/user/<uid>/bus (canonical socket for systemd and dbus-broker)
3. Process scan (legacy fallback, as before)

Also add _validate_address() to support both dbus-send and busctl,
making the module work on systems using dbus-broker (e.g. Fedora Silverblue)
where no process exposes DBUS_SESSION_BUS_ADDRESS in its environment.

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



* dconf: add changelog fragment for dbus-broker support



* dconf: restore dbus validator requirement and example usage

Restore fail_json when neither dbus-send nor busctl is available,
preserving the original hard requirement for a validator binary.
Restore the example invocation in DBusWrapper docstring.



---------


(cherry picked from commit 24ca79658a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 22:02:54 +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]
e278490fe7 [PR #11746/61060532 backport][stable-12] feat: use CmdRunner for LVM commands (#11794)
feat: use CmdRunner for LVM commands (#11746)

* feat: use CmdRunner for LVM commands

* Update plugins/module_utils/lvm.py



* rename module util to _lvm

---------


(cherry picked from commit 61060532f9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-12 22:29:22 +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]
3ef5b36066 [PR #11773/8fbb43e6 backport][stable-12] Ensure standard locale in run_command (group5-batch2) (#11806)
Ensure standard locale in run_command (group5-batch2) (#11773)

* ensure standard locale in run_command (group5-batch2)

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: cronvar, dnf_versionlock, dpkg_divert, flatpak_remote, hg.



* add changelog fragment for group5-batch2



---------


(cherry picked from commit 8fbb43e660)

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:04 +02:00
patchback[bot]
150f63b36b [PR #11779/d6909578 backport][stable-12] Ensure standard locale in run_command (group5-batch8) (#11804)
Ensure standard locale in run_command (group5-batch8) (#11779)

* Fix locale env vars in run_command() calls for group5 batch8 modules

Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in lxc_container, ip_netns,
and capabilities.



* Add changelog fragment for PR #11779



---------


(cherry picked from commit d6909578b9)

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:28:52 +02:00
patchback[bot]
582807ea3a [PR #11780/5c6a5999 backport][stable-12] Ensure standard locale in run_command (group5-batch9) (#11803)
Ensure standard locale in run_command (group5-batch9) (#11780)

* Fix locale env vars in run_command() calls for group5 batch9 modules

Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in beadm, pkg5, pkg5_publisher,
and swdepot.



* Add changelog fragment for PR #11780



---------


(cherry picked from commit 5c6a599940)

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:28:44 +02:00
patchback[bot]
bdcd10ca2c [PR #11781/5f0a9bba backport][stable-12] Ensure standard locale in run_command (group5-batch10) (#11802)
Ensure standard locale in run_command (group5-batch10) (#11781)

* Fix locale env vars in run_command() calls for group5 batch10 modules

Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in imgadm, smartos_image_info,
syspatch, portage, portinstall, xbps, and lbu.



* Add changelog fragment for PR #11781



---------


(cherry picked from commit 5f0a9bba01)

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:28:35 +02:00
patchback[bot]
42e88c56b6 [PR #11782/fe9e7284 backport][stable-12] Ensure standard locale in run_command (group5-batch11) (#11801)
Ensure standard locale in run_command (group5-batch11) (#11782)

* Fix locale env vars in run_command() calls for group5 batch11 modules

Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in apt_repo, easy_install, pear,
and zypper_repository_info.



* Add changelog fragment for PR #11782



---------


(cherry picked from commit fe9e728401)

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:28:26 +02:00
patchback[bot]
d858cfa8a8 [PR #11783/9cadc947 backport][stable-12] Ensure standard locale in run_command (group5-batch12) (#11800)
Ensure standard locale in run_command (group5-batch12) (#11783)

* Fix locale env vars in run_command() calls for group5 batch12 modules

Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in bower, bundler, homebrew_tap,
and kibana_plugin.



* Add changelog fragment for PR #11783



---------


(cherry picked from commit 9cadc94793)

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:28:19 +02:00
patchback[bot]
15d5670065 [PR #11784/3f7ae199 backport][stable-12] Ensure standard locale in run_command (group5-batch13) (#11799)
Ensure standard locale in run_command (group5-batch13) (#11784)

* Fix locale env vars in run_command() calls for group5 batch13 modules

Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in awall, openwrt_init, and
pip_package_info.



* Add changelog fragment for PR #11784



---------


(cherry picked from commit 3f7ae1999e)

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:28:12 +02:00
patchback[bot]
e5f55149c6 [PR #11785/269a5ed8 backport][stable-12] Ensure standard locale in run_command (group5-batch14) (#11797)
Ensure standard locale in run_command (group5-batch14) (#11785)

* Fix locale env vars in run_command() calls for group5 batch14 modules

Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in bzr, lldp, and ohai.



* Add changelog fragment for PR #11785



---------


(cherry picked from commit 269a5ed85e)

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:28:00 +02:00
patchback[bot]
50d22c9f70 [PR #11786/37653bc7 backport][stable-12] Ensure standard locale in run_command (group5-batch15) (#11796)
Ensure standard locale in run_command (group5-batch15) (#11786)

* Fix locale env vars in run_command() calls for group5 batch15 modules

Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in keyring_info, onepassword_info,
and riak.



* Add changelog fragment for PR #11786



---------


(cherry picked from commit 37653bc7f9)

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:27:47 +02:00
patchback[bot]
671ce86565 [PR #11787/95e2b771 backport][stable-12] Ensure standard locale in run_command (group5-batch16) (#11798)
Ensure standard locale in run_command (group5-batch16) (#11787)

* Fix locale env vars in run_command() calls for group5 batch16 (btrfs module_utils)



* Add changelog fragment for PR #11787



---------


(cherry picked from commit 95e2b7716a)

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:27:35 +02:00
patchback[bot]
0fc99ae2d8 [PR #11774/6d5644ac backport][stable-12] Ensure standard locale in run_command (group5-batch3) (#11807)
Ensure standard locale in run_command (group5-batch3) (#11774)

* Fix locale env vars in run_command() calls for group5 batch3 modules

Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in homectl, java_cert, keyring,
launchd, and listen_ports_facts.



* Add changelog fragment for PR #11774



---------


(cherry picked from commit 6d5644ac34)

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:27:28 +02:00
patchback[bot]
dfa9f77b7a [PR #11775/7c52f1c4 backport][stable-12] Ensure standard locale in run_command (group5-batch4) (#11808)
Ensure standard locale in run_command (group5-batch4) (#11775)

* Fix locale env vars in run_command() calls for group5 batch4 modules

Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in logstash_plugin, lvg, mas,
osx_defaults, and pkgutil.



* Add changelog fragment for PR #11775



---------


(cherry picked from commit 7c52f1c41d)

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:27:16 +02:00
patchback[bot]
cfa712f30e [PR #11776/e45e6cbb backport][stable-12] Ensure standard locale in run_command (group5-batch5) (#11809)
Ensure standard locale in run_command (group5-batch5) (#11776)

* Fix locale env vars in run_command() calls for group5 batch5 modules

Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in pnpm, sysrc, timezone, xattr,
and yarn.



* Add changelog fragment for PR #11776



---------


(cherry picked from commit e45e6cbb5d)

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:27:07 +02:00
patchback[bot]
c65a675a52 [PR #11777/a9d6bb2a backport][stable-12] Ensure standard locale in run_command (group5-batch6) (#11810)
Ensure standard locale in run_command (group5-batch6) (#11777)

* Fix locale env vars in run_command() calls for group5 batch6 modules

Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in yum_versionlock and zypper_repository.



* Add changelog fragment for PR #11777



---------


(cherry picked from commit a9d6bb2a15)

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:27:00 +02:00
patchback[bot]
e757ff30b3 [PR #11778/42a1998b backport][stable-12] Ensure standard locale in run_command (group5-batch7) (#11805)
Ensure standard locale in run_command (group5-batch7) (#11778)

* Fix locale env vars in run_command() calls for group5 batch7 modules

Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in zfs, zfs_delegate_admin,
zfs_facts, and zpool_facts.



* Add changelog fragment for PR #11778



---------


(cherry picked from commit 42a1998bde)

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:26:47 +02:00
patchback[bot]
d74e553f4b [PR #11767/f4f2bfe8 backport][stable-12] openbsd_pkg, sorcery: ensure standard locale in run_command (group4-batch2) (#11793)
openbsd_pkg, sorcery: ensure standard locale in run_command (group4-batch2) (#11767)

* ensure standard locale in run_command (group4-batch2)

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

Modules updated: openbsd_pkg, sorcery.



* add changelog fragment for group4-batch2



* add changelog fragment for group4-batch2



---------


(cherry picked from commit f4f2bfe847)

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:43:30 +02:00