1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-21 19:29:05 +00:00
Commit graph

2415 commits

Author SHA1 Message Date
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
Alexei Znamensky
3416efa5bf
lvg - migrate to CmdRunner (#11835)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 08:54:11 +02:00
Alexei Znamensky
87ecfa3432
iso_extract: retry umount on busy filesystem before cleanup (#11837)
* iso_extract: retry umount on busy filesystem before cleanup

Fixes #5333

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

* iso_extract: add changelog fragment for #11837

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

* make chglog more concise

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 08:49:26 +02:00
tigattack
e911081102
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

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

* 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

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

* fix(logrotate): clean up temp file

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

* fix(logrotate): remove redundant temp file cleanup

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

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

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

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

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

* 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

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

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

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

* 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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-17 08:44:29 +02:00
Alexei Znamensky
74c096b00c
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

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

* homebrew_cask: add changelog fragment for #11849

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 08:42:00 +02:00
Alexei Znamensky
e2a7dc467d
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

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

* update changelog fragment with PR number and URL

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 08:41:16 +02:00
Alexei Znamensky
175808d997
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.

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

* consul_kv: add changelog fragment for PR #11817

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

* 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

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 08:40:59 +02:00
Felix Fontein
ef656cb9b6
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.
2026-04-16 21:41:19 +02:00
Felix Fontein
644ffd2fb3
Remove changelog fragments of deprecations that are already removed in 13.0.0 (#11653)
Remove changelog fragments of deprecations that are already removed in 13.0.0.

These changelog fragments would otherwise show up in the 13.0.0 changelog
together with fragments that announce the actual removal.
2026-04-15 21:36:38 +02:00
Alexei Znamensky
ff5c34c4a7
lvm_pv - use CmdRunner (#11811)
* lvm_pv - migrate to CmdRunner using shared runners from module_utils/_lvm

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

* lvm_pv - add changelog fragment for #11811

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

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

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-15 20:03:16 +02:00
Alexei Znamensky
d1448b76c1
iso_extract: strip leading path separator from file entries (#11825)
* iso_extract: strip leading path separator from file entries

Fixes #5283

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

* iso_extract: add changelog fragment for issue 5283

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 19:54:46 +02:00
Alexei Znamensky
7172326868
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

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

* lvol: add changelog fragment for issue 5445

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 19:32:19 +02:00
Martin Schürrer
df252e5fab
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.

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

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

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

---------

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 17:47:09 +02:00
Alexei Znamensky
24ca79658a
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

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

* dconf: add changelog fragment for dbus-broker support

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

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

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 21:49:09 +02:00
Alexei Znamensky
972bed66f4
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

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

* flatpak: add changelog fragment for PR #11748

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

* flatpak: remove deprecation, adjust docs tone

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

* flatpak: add integration tests for from_url parameter

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 21:12:35 +02:00
Alexei Znamensky
a9d6bb2a15
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.

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

* Add changelog fragment for PR #11777

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 08:03:08 +12:00
Alexei Znamensky
e45e6cbb5d
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.

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

* Add changelog fragment for PR #11776

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 08:02:18 +12:00
Alexei Znamensky
7c52f1c41d
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.

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

* Add changelog fragment for PR #11775

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 08:01:51 +12:00
Alexei Znamensky
6d5644ac34
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.

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

* Add changelog fragment for PR #11774

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 08:01:20 +12:00
Alexei Znamensky
8fbb43e660
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.

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

* add changelog fragment for group5-batch2

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 08:00:52 +12:00
Alexei Znamensky
42a1998bde
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.

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

* Add changelog fragment for PR #11778

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 08:00:16 +12:00
Alexei Znamensky
d6909578b9
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.

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

* Add changelog fragment for PR #11779

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 07:59:38 +12:00
Alexei Znamensky
5c6a599940
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.

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

* Add changelog fragment for PR #11780

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 07:59:11 +12:00
Alexei Znamensky
5f0a9bba01
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.

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

* Add changelog fragment for PR #11781

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 07:58:52 +12:00
Alexei Znamensky
fe9e728401
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.

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

* Add changelog fragment for PR #11782

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 07:58:18 +12:00
Alexei Znamensky
9cadc94793
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.

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

* Add changelog fragment for PR #11783

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 07:57:52 +12:00
Alexei Znamensky
3f7ae1999e
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.

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

* Add changelog fragment for PR #11784

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 07:57:21 +12:00
Alexei Znamensky
95e2b7716a
Ensure standard locale in run_command (group5-batch16) (#11787)
* Fix locale env vars in run_command() calls for group5 batch16 (btrfs module_utils)

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

* Add changelog fragment for PR #11787

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 07:56:51 +12:00
Alexei Znamensky
269a5ed85e
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.

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

* Add changelog fragment for PR #11785

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 07:56:14 +12:00
Alexei Znamensky
37653bc7f9
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.

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

* Add changelog fragment for PR #11786

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 07:55:43 +12:00
Alexei Znamensky
b40608a39d
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.

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

* add changelog fragment for group5-batch1

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

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

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 07:50:25 +12:00
Alexei Znamensky
f4f2bfe847
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.

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

* add changelog fragment for group4-batch2

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

* add changelog fragment for group4-batch2

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 23:37:35 +12:00
Alexei Znamensky
2297a5c876
Ensure standard locale in run_command (group4-batch1) (#11765)
* ensure standard locale in run_command (group4)

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: dconf, pkgng, terraform.

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

* add changelog fragment for group4

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

* add PR link to group4 changelog fragment

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

* fix changelog fragment: rename with PR prefix, fix URL order

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 13:20:51 +02:00
Alexei Znamensky
6f12d93057
gem: use CmdRunner (#11733)
* gem: use `CmdRunner`

* add changelog frag

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

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 13:12:26 +02:00
David Härdeman
bd7b361db1
nsupdate: fix GSS-TSIG support (#11712)
The fix for missing keyring initialization without TSIG auth in
PR #11461 put the initialization of "self.keyring" and "self.keyname"
in an else clause after checking if "key_name" is set.

The problem is that for "key_algorithm" == "gss-tsig":
a) "key_name" isn't set
b) self.keyring and self.keyname have already been initialized and
   will be discarded

This means that gss-tsig support is broken. Fix it by moving the
initialization of "self.keyring" and "self.keyname" to the top.
2026-04-12 13:09:31 +02:00
quasd
5eaa22b067
ipa_host: fix errors when disabling host (#11487)
* fix errors when disabling host

- Fix the logic to actually allow disabling hosts
- Fix the dict != string error when error does happen
- Add has_keytab to returned dicts to allow users see if host is disabled or not

* Add changelog-fragments

* Run formatters

* More formatting

* Remove feature, only fix the logic

* Update changelogs/fragments/11487-ipa-host-fix-disable.yml

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

* Update changelogs/fragments/11487-ipa-host-fix-disable.yml

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

* Back to fstring

* Update plugins/modules/ipa_host.py

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

* Use more Pythonic way to for if

* Nox

* Revert back to working if

* Simplify if

* Remove extra get

---------

Co-authored-by: quasd <1747330+quasd@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-04-12 13:08:28 +02:00
Alexei Znamensky
c7deda2ec7
java_cert: support proxy authentication from https_proxy env var (#11753)
* java_cert: support proxy authentication from https_proxy env var

When https_proxy is set with credentials (USER:PASSWORD@HOST:PORT),
pass the corresponding JVM proxy auth flags to keytool and clear the
JDK 8u111+ Basic auth tunneling restriction.

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

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

* java_cert: add changelog fragment for PR #11753

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

* java_cert: fix changelog fragment type to minor_changes

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 10:55:02 +12:00
Alexei Znamensky
b780224d6d
mssql_script: only pass params to cursor.execute() when provided (#11754)
* mssql_script: only pass params to cursor.execute() when provided

Fixes #11699

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

* mssql_script: add changelog fragment for PR #11754

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 19:36:39 +02:00
Alexei Znamensky
bdd3174563
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.

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

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

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

* add changelog fragment for PR #11742

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 15:32:39 +02:00
Alexei Znamensky
e59888dd7e
Ensure standard locale in run_command (group3-batch3) (#11741)
* run_command locale group3 batch3: normalise to LANGUAGE=C, LC_ALL=C

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

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

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

* fix changelog fragment: correct PR number (11741)

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 15:21:58 +02:00
Alexei Znamensky
936ab2ea56
Ensure standard locale in run_command (group3-batch2) (#11740)
* run_command locale group3 batch2: normalise to LANGUAGE=C, LC_ALL=C

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

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

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

* fix changelog fragment: correct PR number (11740)

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

* remove nmcli from batch2 - moved to dedicated branch

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 15:21:37 +02:00
Alexei Znamensky
c90b504626
Ensure standard locale in run_command (group3-batch1) (#11738)
* ensure standard locale in run_command (group3-batch1)

* add changelog frag

* fix changelog fragment: bugfixes, not minor_changes

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

* fix changelog fragment: American English, separate code spans per variable

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 19:16:56 +12:00
sedrubal
b2cd1b555e
Fix KeyError for 'dnsttl' (#11717)
* Fix KeyError for 'dnsttl'

I did not further dig into the code. However, since upgrading to the latest version of `community.general`, ansible fails with a weird error message "dnsttl" at a task where `community.general.ipa_dnsrecord` is called. After digging into the code a bit, I found out that it is a KeyError and caused by this line of code. I'm not sure, if it is safe to skip that line and not to set `result["dnsttl"]`.

* Add changelog fragment

* Adopt suggestion for changelogs/fragments/11717-fix-error-dnsttl.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-04 20:33:34 +02:00
Alexei Znamensky
2acb20bec2
opendj_backendprop: use CmdRunner (#11728)
* opendj_backendprop: use CmdRunner

* add changelog frag
2026-04-03 15:11:22 +02:00
Alexei Znamensky
08442186e6
xenserver_guest: fix code style caught by codeqa (#11721)
* xenserver_guest: fix code style caught by codeqa

* add changelog frag
2026-04-03 14:37:48 +13:00
vladi-k
d956fb8197
jira - add cloud option to support Jira Cloud search endpoint (#11701)
* jira - add cloud option to support Jira Cloud search endpoint

Jira Cloud has removed the legacy GET /rest/api/2/search endpoint
(see https://developer.atlassian.com/changelog/#CHANGE-2046).

Add a new boolean `cloud` option (default false). When set to true,
the search operation uses the replacement /rest/api/2/search/jql
endpoint. The default remains false to preserve backward compatibility
for Jira Data Center / Server users.

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

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

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

* Adding PR link to changelogs/fragments/10786-jira-cloud-search.yml

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

* Adding note about future usage of cloud parameter

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

---------

Signed-off-by: Vladimir Vasilev <vvasilev@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-01 06:57:27 +02:00
Alexei Znamensky
bc98b2aa3b
pipx, pipx_info: refactor (#11640)
* pipx, pipx_info: refactor

* add changelog frag
2026-03-31 07:08:50 +02:00