Commit Graph

3231 Commits

Author SHA1 Message Date
Felix Fontein
de42aec78b Improve module docs (#11981)
* Fix _facts module documentation.

* Get rid of some more 'type: complex'.
2026-05-03 12:01:08 +02:00
Felix Fontein
88c13b8108 Rename lldp to lldp_facts; add support for check mode (#11980)
Rename lldp to lldp_facts; add support for check mode.
2026-05-03 11:58:09 +02:00
Alexei Znamensky
0ebd32373d gandi_livedns: implement diff mode support (#11934)
* feat(gandi_livedns): implement diff mode support

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

* fix(gandi_livedns): add changelog fragment for PR 11934

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

* Update plugins/modules/gandi_livedns.py

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-03 12:49:39 +12:00
Alexei Znamensky
d7f248fb01 odbc: fetch rows before commit to fix HY010 function sequence error (#11972)
* fix(odbc): fetch rows before committing to fix HY010 function sequence error

Fixes #5395

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

* chore(odbc): add changelog fragment for PR #11972

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 12:47:49 +12:00
Felix Fontein
2e29b3204d Docs: ohai examples are not YAML (#11975)
ohai examples are not YAML.
2026-05-02 20:58:58 +02:00
Alexei Znamensky
dd5bd733fc apt_rpm: handle update-kernel rc=1 when no new kernel is available (#11949)
* fix(apt_rpm): do not fail when update-kernel finds no new kernel

update-kernel exits with rc=1 when the kernel is already at the latest
version. Handle this case gracefully by checking for the known
"There are no available kernels" message in stderr and returning
changed=False instead of raising an error.

Fixes #10055

* fix(apt_rpm): add changelog fragment for #11949

* Apply suggestion from review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-02 10:09:54 +02:00
Alexei Znamensky
e751412914 snap: add devmode parameter to support --devmode flag (#11952)
* feat(snap): add devmode parameter to support --devmode flag

Closes #8155

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

* feat(changelog): add fragment for PR 11952

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 10:46:23 +12:00
Alexei Znamensky
881f64c93b logstash_plugin: fix proxy support and improve error reporting (#11951)
* fix(logstash_plugin): use env vars for proxy, expose stderr on failure

Replace broken -DproxyHost/-DproxyPort JVM flags with http_proxy/https_proxy
environment variables, which are respected by modern Logstash bundled JDK.
Also include stderr in fail_json so the actual error output is visible.

Fixes #8650

* feat(changelog): add fragment for PR 11951
2026-05-02 10:45:27 +12:00
Alexei Znamensky
2becfe45b5 zypper_repository: allow state=absent when .repo URL/file is unreachable (#11947)
* fix(zypper_repository): allow state=absent when .repo URL/file is unreachable

When removing a repository by .repo URL, a download failure used to cause
an unconditional fail_json. Now, for state=absent, the module warns and
falls back to deriving the alias from the .repo filename basename.

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

* feat(changelog): add fragment for PR 11947

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 10:44:12 +12:00
Alexei Znamensky
edcc906cc6 xml: add huge_tree option to support large XML files (#11940)
* feat(xml): add huge_tree option to support large XML files

Add the huge_tree parameter (bool, default false) which passes huge_tree=True
to lxml's XMLParser, disabling libxml2's internal size restrictions on text
nodes and document depth.

Fixes #4897

* fix(xml): add changelog fragment for PR 11940
2026-05-02 10:42:13 +12:00
Alexei Znamensky
a6dd7ce58c supervisorctl: use parallel bulk commands when name=all (#11953)
* feat(supervisorctl): use parallel bulk commands for name=all

When name=all, dispatch a single `supervisorctl start/stop/restart all`
instead of iterating per process, matching the CLI's parallel behaviour.
Also extract inline status-filter lambdas into named module-level functions.

Fixes #8159

* feat(changelog): add fragment for PR 11953
2026-05-02 10:35:57 +12:00
Alexei Znamensky
89e0d07071 puppet: fix TypeError when writing facts data (#11954)
* fix(puppet): remove erroneous encode() call in _write_structured_data()

Fixes #7932

* changelog: add fragment for puppet facts TypeError fix (#11954)
2026-05-02 10:35:08 +12:00
Alexei Znamensky
72bc48fed4 iso_customize: remove note about pycdlib constraints (#11946) 2026-04-30 23:18:22 +12:00
Alexei Znamensky
9941604089 lmdb_kv lookup, guide_alicloud: fix deprecated list-format vars: in examples and docs (#11942)
docs: fix deprecated list-format vars: in examples and docs

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-30 12:36:13 +12:00
Alexei Znamensky
41f2b5dec5 selective callback plugin: route output through display to honour ANSIBLE_LOG_PATH (#11927)
* fix(selective): route output through display to honour ANSIBLE_LOG_PATH

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

* fix(selective): add changelog fragment for PR 11927

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 21:25:43 +02:00
Alexei Znamensky
00cff7feb4 lmdb_kv lookup: fix docs (#11932) 2026-04-29 23:42:45 +12:00
Alexei Znamensky
dab3fa36de lldp: fix docs (#11931)
* lldp: fix docs

* wording

* remove check mode
2026-04-29 23:04:06 +12:00
Alexei Znamensky
1f2e60f65d lxc_container: use LVM runners from _lvm module utils (#11920)
* lxc_container: use LVM runners from _lvm module utils

Replace direct run_command calls for lvs, vgdisplay, lvdisplay,
lvcreate, and lvremove with the shared CmdRunner-based runners from
module_utils/_lvm.py. Switches from human-readable text parsing to
machine-readable --noheadings/--nosuffix/--separator output.

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

* lxc_container: add changelog fragment for PR 11920

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

* generate run_info information for commands

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 21:56:30 +12:00
Alexei Znamensky
d0f0e9d00f lvol: fix thin-pool creation with percentage size (#11925)
* fix(lvol): use --extents (-l) for thin-pool creation with percentage size

Fixes #11923

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

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

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

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

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

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

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

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

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

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

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

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

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 21:55:47 +12:00
Alexei Znamensky
c0d3464fa7 crypttab: fix option parsing when value contains multiple equal signs (#11926)
* fix(crypttab): preserve option values containing multiple equal signs

Fixes #4963

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

* fix(crypttab): add changelog fragment for PR 11926

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 21:14:44 +02:00
RealCharlesChia
89d82ab9df scaleway: fix NoneType error in get_resources() (#11918)
* scaleway: fix NoneType error in get_resources() when API returns empty or non-JSON response

* add changelog fragment for #11918

* Update changelogs/fragments/11361-scaleway-get-resources-none-type.yml

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

---------

Co-authored-by: RealCharlesChia <RealCharlesChia@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-27 20:44:52 +02:00
Mike Aldred
aeb8d3f656 pfexec become plugin: fix broken defaults for illumos/SmartOS (#11623)
* pfexec become plugin: fix broken defaults for illumos/SmartOS

The pfexec become plugin has had incorrect defaults since it was
migrated from Ansible core, making it unusable on illumos without
manual workarounds:

1. become_flags defaulted to '-H -S -n' which are sudo flags.
   pfexec does not accept any of these options, causing:
   'exec: illegal option -- H'

2. wrap_exe defaulted to false. Unlike sudo, pfexec does not
   interpret shell constructs internally. Since Ansible generates
   compound commands (echo BECOME-SUCCESS-xxx ; python3), these
   must be wrapped in /bin/sh -c for pfexec to execute them.

These issues were originally reported in 2016 (ansible/ansible#15642),
migrated to community.general as #3671, and partially fixed by PR #3889
in 2022 (which corrected quoting but not the defaults). Users have had
to work around this with explicit inventory settings ever since.

Changes:
- become_flags default: '-H -S -n' -> '' (empty)
- wrap_exe default: false -> true
- build_become_command: handle empty flags cleanly
- Updated tests to match corrected defaults
- Added test for custom flags
- Improved wrap_exe description to explain why it should be enabled

* Update changelog fragment with PR number

* Fix ruff formatting in test_pfexec.py

* Address review feedback from russoz

Remove redundant 'should generally be left enabled' description line
and simplify become command return by removing unnecessary flags
conditional.

* Fix unit test regexes for empty default flags

Match double space in test assertions when become_flags defaults to
empty string, consistent with doas, dzdo, and pbrun test patterns.

* pfexec become plugin: deprecate wrap_exe default rather than flipping

Changing the wrap_exe default from false to true is a breaking change
for the narrow case (e.g. ansible.builtin.raw) where the current default
does work, so deprecate instead: remove the default, emit a deprecation
warning when the option is unset, and treat that as false for now.

Build the become command with " ".join() so an empty become_flags no
longer produces a stray double space.

Tests set wrap_exe explicitly so the deprecation warning does not fire
during unit runs.

* pfexec become plugin: target 14.0.0 for wrap_exe deprecation

Per felixfontein's review, switch the deprecation target for the wrap_exe
default from community.general 15.0.0 to 14.0.0, and reword the option
description to mark the current default as deprecated rather than just
"changing in a future release".
2026-04-25 21:12:36 +02:00
RealCharlesChia
18a8791ece Fix nmap inventory plugin: skip setting reserved 'name' variable (#11893)
* Fix nmap inventory plugin: skip setting reserved 'name' variable

Skip setting 'name' as a host variable to avoid Ansible warning:
'[WARNING]: Found variable using reserved name name'

The 'name' is already used as the hostname, so it's redundant as a
separate host variable. This fixes the warning that appears when using
the nmap inventory plugin.

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

* nmap inventory plugin: add set_name_variable option to control name variable
Add a new 'set_name_variable' option to control whether the 'name' variable
is set for each host. When true (default), maintains backward compatibility.
When false, skips setting the 'name' variable to avoid the 'Found variable
using reserved name' warning.
Fixes: https://github.com/ansible-collections/community.general/issues/11766

* Address review feedback: fix changelog category and version number

- Change 'bugfixes' to 'minor_changes' in changelog fragment
- Add PR and issue links to changelog description
- Update version_added from 10.6.0 to 13.0.0

Reviewed-by: felixfontein

---------

Co-authored-by: jiaza <jiaza@nscc-tj.cn>
2026-04-25 21:07:19 +02:00
Alexei Znamensky
e2b0d39d14 installp: deprecate in favor of ibm.power_aix.installp (#11910)
* installp: deprecation

* changelog: add installp deprecation fragment for PR 11910

* Update changelogs/fragments/11910-installp-deprecation.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-23 19:55:54 +12:00
Lars Krahl
d57a667274 Replace default favicon URL again (#11909)
* replace default favicon URL

* add changelog fragment for PR 11909

* fix syntax for change fragment

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* use higher res favicon by default

---------

Co-authored-by: Lars Krahl <lars.krahl@telekom.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-04-22 20:09:41 +02:00
Alexei Znamensky
53397c081a Replace % string formatting with f-strings across multiple plugins (#11908)
* Replace % string formatting with f-strings across multiple plugins

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* Add changelog fragment for PR 11908

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 07:06:27 +12:00
Felix Fontein
4fa82b9617 Make all doc fragments, module utils, and plugin utils private (#11896)
* Make all doc fragments private.

* Make all plugin utils private.

* Make all module utils private.

* Reformat.

* Changelog fragment.

* Update configs and ignores.

* Adjust unit test names.
2026-04-20 20:16:26 +02:00
Felix Fontein
bbf98ea141 Use FQCN for core doc fragments (#11897)
Use FQCN for core doc fragments.
2026-04-20 15:12:51 +02:00
Felix Fontein
6b5bf0a0bc Fix FQCNs in examples (#11898)
Fix FQCNs in examples.
2026-04-20 15:11:03 +02:00
Felix Fontein
72c13c85ad Prepare main for 13.0.0 (#11834)
* Bump version to 13.0.0.

* Remove deprecated modules and plugins.

* Remove deprecated module utils.

* Remove leftovers.

* Remove mode=compatibility.

* Change default of is_pre740 from true to false.

* Change default of force_defaults from true to false.

* Remove support for ubuntu_legacy mechanism.

* Remove cpanm compatibility tests.
2026-04-20 12:35:43 +02:00
Ivan Kokalovic
7ce198f0e7 keycloak modules: add missing author credit (#11840)
keycloak modules: add missing author credit for contributions

Added myself (@koke1997) to the author list of three modules
I contributed to in PRs #11468, #11470, #11471, and #11473 but forgot
to include at the time. Also signing up as maintainer for these modules
in .github/BOTMETA.yml so the bot can route related issues and PRs.
2026-04-20 12:09:26 +02:00
Matt Williams
3325b854ee Fix typo (#11892) 2026-04-20 21:46:49 +12:00
vladi-k
3e9689b13d jira - resolve Cloud assignee email to account ID via user search (#11735)
* jira - resolve Cloud assignee email to account ID via user search

When cloud=true and assignee contains '@', look up a unique user with
GET /rest/api/2/user/search and use accountId for create, transition,
and edit. Document Jira Cloud vs Server/Data Center assignee behavior.

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

Assisted-by AI: Claude 4.6 Opus (Anthropic) via Cursor IDE

Signed-off-by: Vladimir Vasilev <vvasilev@redhat.com>

* * Using urllib.parse.quote for URL encoding
* Adding "added in version" note for assignee when resolving account_id from email

Signed-off-by: Vladimir Vasilev <vvasilev@redhat.com>

* * Added cached variable 'user_email'
* Changed comparison to handle missing email safely
* Updated error message formatting to use repr-style values

Signed-off-by: Vladimir Vasilev <vvasilev@redhat.com>

* jira - adjust assignee and cloud descriptions (#11734)

Signed-off-by: Vladimir Vasilev <vvasilev@redhat.com>

* jira - resolve user-type field emails to account IDs on Jira Cloud (#11734)

When cloud=true, user-type fields (assignee, reporter, and any listed
in the new custom_user_fields parameter) that contain '@' are resolved
from email to Jira Cloud account ID via the user search API. Strings
without '@' are assumed to be account IDs. Add custom_user_fields
parameter for user to declare additional custom fields of user type.

Signed-off-by: Vladimir Vasilev <vvasilev@redhat.com>

* jira - address PR 11735 review (docs, assignee path, errors, naming)

- Clarify O(custom_user_fields): built-ins stay automatic; list extra
  user-typed fields without implying they are only custom-field IDs.
- On Jira Cloud, set assignee from the module param as a plain string and
  let resolve_user_fields() map it to accountId (including email lookup).
- Drop redundant ``or []`` when merging O(custom_user_fields) with the
  built-in user field list.
- Use public names USER_FIELDS, resolve_user_fields, and resolve_account_id
  (no leading underscore) per reviewer preference.
- Quote field name and email in resolution errors with explicit "…" text
  instead of repr-style !r, keeping values readable in failure messages.

Refs: https://github.com/ansible-collections/community.general/pull/11735

AI-assisted: Composer 2 (Anthropic) via Cursor IDE

Signed-off-by: Vladimir Vasilev <vvasilev@redhat.com>

* Changing fail_json formatting

Signed-off-by: Vladimir Vasilev <vvasilev@redhat.com>

* formatting fixes

Signed-off-by: Vladimir Vasilev <vvasilev@redhat.com>

* jira - fixing assignee as module option in description

Signed-off-by: Vladimir Vasilev <vvasilev@redhat.com>

---------

Signed-off-by: Vladimir Vasilev <vvasilev@redhat.com>
2026-04-20 09:28:01 +02:00
Alexei Znamensky
9f80d89fc3 lvol - migrate to CmdRunner (#11887)
* lvol - migrate to CmdRunner

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

* lvol - add changelog fragment for #11887

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

* adjust the changelog fragment

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 09:26:41 +02:00
Alexei Znamensky
5b409facbe filesystem - migrate LVM.get_fs_size() to use CmdRunner (#11888)
* filesystem - migrate LVM.get_fs_size() to use CmdRunner

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* filesystem - add changelog fragment for #11888

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 09:26:27 +02:00
Alexei Znamensky
180da98a7c 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.

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

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

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

* 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).

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

* Update plugins/modules/ipa_dnsrecord.py

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

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

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-19 22:50:59 +02:00
Alexei Znamensky
25b21183bb 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

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

* Add changelog fragment for PR 11860

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

* 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

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

* Add BOTMETA entry for _crypt module utils

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

* _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.

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

* adjsutments from review

* Update plugins/modules/homectl.py

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

* Update plugins/modules/udm_user.py

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-20 07:53:44 +12:00
Alexei Znamensky
39f4cda6b5 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.

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

* locale_gen: add changelog fragment for issue 2399

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 22:43:24 +12:00
Alexei Znamensky
1b0b8d5cc1 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.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* Add changelog fragment for PR 11878

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* minor adjustment in f-string

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 22:42:37 +12:00
Alexei Znamensky
77509be2aa Replace .format() calls with f-strings across multiple plugins (#11879)
* Replace .format() calls with f-strings across multiple plugins

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* Add changelog fragment for PR 11879

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 22:37:32 +12:00
Alexei Znamensky
d0d213a41d 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

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

* homebrew_cask: add changelog fragment for #11838

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

* Fix changelog fragment

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 22:28:06 +12:00
munchtoast
6c809dd9db 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

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-18 22:45:58 +02:00
Alexei Znamensky
afe9de7562 homebrew_service: remove redundant code (#11839)
* homebrew_service: remove redundant code

* homebrew_services: add changelog fragment for #11839

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 22:45:21 +02:00
Alexei Znamensky
edf8f24959 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

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

* parted: add changelog fragment for PR #11813

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

* adjustments from review

* Comment 15.0.0 deprecation in option decription.

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

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

* 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).

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

* Update plugins/modules/parted.py

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

* Update plugins/modules/parted.py

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-18 22:38:09 +02:00
Bojan Vitnik
314863e3a7 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
2026-04-17 18:33:34 +02:00
Alexei Znamensky
076bc4e03b 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

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

* Add changelog fragment for PR 11861

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 13:56:57 +02:00
Alexei Znamensky
f8869af65f 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

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

* homebrew_cask: add changelog fragment for #11850

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

* homebrew_cask: fix sudo_password example and clarify ansible_become_password

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

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

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 23:51:45 +12:00
Alexei Znamensky
c4ed3467b6 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

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

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

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

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

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

* homebrew_tap: add changelog fragment for #11848

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

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 23:49:46 +12:00
Alexei Znamensky
1db3d4f441 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

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

* gitlab_project_members: improve code formatting

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

* gitlab_project_members: add changelog fragment for #11851

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 23:48:49 +12:00
Alexei Znamensky
dad84dd36d 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

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

* Add changelog fragment for PR 11859

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 13:46:48 +02:00