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

2552 commits

Author SHA1 Message Date
Olivier Raggi
54518baed2
Merge 313dfef134 into 877f20f278 2026-06-07 13:52:48 -04:00
Hirofumi Arimoto
213581bef8
fix: treat chdev execution failures as module errors in aix_devices (#12185)
* fix: treat chdev execution failures as module errors in aix_devices

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

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

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

##### ISSUE TYPE
- Bugfix Pull Request

##### COMPONENT NAME
aix_devices

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

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

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

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

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

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

---------

Co-authored-by: Hirofumi Arimoto <harimoto@jp.ibm.com>
2026-06-05 13:02:06 +02:00
Sam Doran
4d66b3dae8
opkg - path_prefix needs to be a list (#12182)
* opkg - path_prefix needs to be a list

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

* Add changelog
2026-06-05 06:37:23 +02:00
amPrimeSign
7b01bcbadf
keycloak_realm - add `max_secondary_auth_failures` parameter to configure brute force detection for secondary authentication mechanisms. (#12087)
* minor_changes:
  - keycloak_realm - add ``max_secondary_auth_failures`` parameter to configure brute force detection for secondary authentication mechanisms.

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

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-06-02 18:27:11 +02:00
Yoann Gauthier-Colin
1e3da48d70
portage: include msg in depclean failure fail_json (#12168)
cleanup_packages() called module.fail_json(cmd=, rc=, stdout=, stderr=)
without the mandatory msg= argument. When the underlying emerge --depclean
exited non-zero, AnsibleModule.fail_json() itself crashed with
"AnsibleModule.fail_json() missing 1 required positional argument: 'msg'"
before the real failure could reach the controller, leaving users with no
diagnostic about why depclean actually failed.

Same wording style as the sibling install_packages() failure branch
("Packages not installed.").
2026-06-02 18:25:44 +02:00
Alexei Znamensky
49ca175f01
htpasswd: fix hash_scheme aliases and Apache-compatible bcrypt (#12123)
* fix(htpasswd): support HtpasswdFile aliases and Apache-compatible bcrypt

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

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

Fixes #6135

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

* feat(changelog): add fragment for PR 12123

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

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

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

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

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

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

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

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

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

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

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

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

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 22:01:51 +12:00
Alexei Znamensky
6e6199ae3d
parted: ignore MBR partition type codes in flags on SUSE systems (#12121)
* parted: ignore MBR partition type codes reported as flags by SUSE parted

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

Fixes #6292

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

* feat(changelog): add fragment for PR 12121

* Update changelogs/fragments/12121-parted-suse-msdos-type-code.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-05-31 10:37:26 +12:00
Alexei Znamensky
5d62edc673
pamd: handle non-PAM lines in authselect profile files (#12137)
* fix(pamd): handle non-PAM lines in authselect profile files

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

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

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

* feat(changelog): add fragment for PR 12137

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 09:44:49 +12:00
Shreyash
9208cbfd43
xenserver_guest_info: add VDI uuid and vdi_type to disk info (#12119)
* xenserver_guest_info: add VDI uuid and vdi_type to disk info

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

  Fixes #11998

* changelog: add PR URL to changelog fragment

* xenserver_guest_info: add uuid and vdi_type to RETURN example output
2026-05-30 19:43:30 +02:00
ONODERA Masaru
e41e76fdf5
new module: gitlab_project_approvals configures GitLab project approval rules (#12096)
* Add gitlab_project_approvals module

* Update BOTMETA info

* Add lisence info to tests
2026-05-30 13:55:15 +02:00
Raphaël Droz
8468fea3b0
composer: config file hash to evaluate whether a change occurred (#12084)
* composer: Use config file hash to evaluate whether a change occurred (instead of unreliable output). Ensure `--working-dir` option consistently comes first (sudo-friendly)

* Update plugins/modules/composer.py

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

* whitespace fixes + changelog fragment

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

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

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

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

* Update plugins/modules/composer.py

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

* fragment

* ruff format  plugins/modules/composer.py

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-30 13:47:09 +02:00
felix-grzelka
20a07fc973
new module: keycloak_clientscope_rolemappings (#11841)
* init

* stuff

* this should work

* helper functions

* fix docstrings

* s/client scope/clientscope/

* fix docstrings

* add type hints

* fix old function

* nox -Re formatters

* fix clientscope_id

* fix blank line contains whitespace

* add BOTMETA info

* set version_added

* Apply suggestions from code review to prepare for 13.0.0

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

* fix yaml indent in doc string

* add keycloak_clientscope_rolemappings to keycloak action group

* original author credit

* Apply suggestions from code review

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

* init tests

* Update plugins/modules/keycloak_clientscope_rolemappings.py

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

* fix integration tests

* use [] instead of .get()

* fix typo

* Update plugins/modules/keycloak_clientscope_rolemappings.py

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

* update fedora version

* fix --docker fedora

* revert

* Apply suggestions from code review

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

* remove unnecessary docstring

* change something

* change it back

* Apply suggestions from code review

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

* Update plugins/modules/keycloak_clientscope_rolemappings.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-05-30 13:45:37 +02:00
felix-grzelka
2d89fb1c15
keycloak_user: fix email_verified is not idempotent (#11749)
* fix: email_verified is not idempotent

* autopep8

* fix import-before-documentation

* address reviewer comments

* rever formatting

* revert more stuff

* fix whitespace

* clean up

* fix diff mode

* nox -Re formatters

* Update plugins/modules/keycloak_user.py

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

* add deprecation warning

* keycloak_default_behavior

* Apply suggestions from code review

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

* Update plugins/modules/keycloak_user.py

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

* fix is_struct_included

* ignore keycloak_default_behavior and fix is_struct_included

* fix diff for groups

* fix changed flag in check mode

* nox -Re formatters

* fix group diff

* nox -Re formatters

* fix comment logic

* add todos

* fix user_profile_metadata in diff

* refactor diff

* rm default for required_actions

* update required_actions docstring

* fix before_user group handling

* nox -Re formatters

* fix yaml indent in doc strings

* use f-strings

* fix tests

* fix test_add_new_user

* rename keycloak_default_behavior to email_verified_behavior

* fix stupid

* nox -Re formatters

* remove typing from docstring

* remove user_profile_metadata parameter

* Update plugins/module_utils/_keycloak.py

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

* improve docs

* precompute ignored_arguments list

* nox -Re formatters

* simplify diff logic

* add more tests

* nox -Re formatters

* fix docs

* clean up more

* fix endstate when user does not change

* finalize integrationtest

* fail if group is not found

* fix tests

* nox -Re formatters

* fix docstring

* add integration tests for required_actions

* fix diff logic and fail early

* nox -Re formatters

* fix boolean logic error

* Apply suggestions from code review

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

* Apply suggestions from code review

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-30 13:44:08 +02:00
munchtoast
d4031f36e4
kopia: Add kopia_repository module (#11752)
* Add kopia module util

* fix pipeline suggestions

* add kopia repository module

* apply code review changes

* remove kopia_runner instance unit test

* update botmeta with kopia

* refactor docs and redundant state

* add kopia_info module and fix kopia_repository check mode support

- Add kopia_info module for read-only repository information gathering
  (kopia repository status, kopia repository throttle get) following
  the pacemaker_info pattern with ModuleHelper and info_module fragment
- Add _fmt_throttle to _kopia.py and register throttle format in
  kopia_runner; remove throttle_operation get option from
  kopia_repository per Ansible best practices (info ops belong in
  _info modules)
- Add throttle suboption dict to kopia_repository with all seven
  kopia repository throttle set flags
- Fix check_mode: support from full to actually full by implementing
  _predict_value() in kopia_repository; previously check_mode_skip
  caused changed to always be false in check mode
- Add check mode test cases to test_kopia_repository.yaml covering
  created and disconnected states for both connected and disconnected
  initial conditions
- Add BOTMETA.yml entry and full test fixture for kopia_info

* apply code review suggestions
2026-05-30 13:38:30 +02:00
Maxim Bakurevych
580e8ad3f9
slack: support file upload (#12032)
* slack: add support for file uploads and threading

* slack: add support for file uploads and threading

* docs: rename fragment to match PR #12032

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

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* chore: fix nox sanity issues

* style: add author copyright

* style: fix examples

* build: trigger CI due to infrastructure timeout

* Update plugins/modules/slack.py

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

* doc: address reviewer feedback on changelog and token placeholder

* doc: address reviewer feedback on changelog and token placeholder

* fix: address maintainer feedback

* fix: pipeline status, rm continue

* fix: fix unit tests

* fix: linter fix

* fix: fix comments

* Update plugins/modules/slack.py

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

* Update plugins/modules/slack.py

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

* docs: remove outdated comment about failing logic

* Update plugins/modules/slack.py

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

* Update plugins/modules/slack.py

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

* fix: handle missing files via fail_on_file_error

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* fix: adjust options syntax and formatting

---------

Co-authored-by: Максим Бакуревич <maksimbakurevic@MacBook-Air-Maksim.local>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-30 13:37:04 +02:00
Olivier Raggi
ca332c6c90 nmcli: preserve existing bond mode when omitted on existing connections
Remove hardcoded bond mode default from nmcli module and preserve the existing bond mode during updates when mode is not explicitly supplied.

Include regression coverage and a changelog fragment for issue #9201.

Co-Authored-By: GitHub Copilot <copilot@github.com>
2026-05-28 14:07:04 +00:00
Alexei Znamensky
cbc6f6eed3
multiple: replace namedtuple with dataclass (#12094)
* refactor(multiple): replace namedtuple with dataclass

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

* chore(changelog): add fragment for PR 12094

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

* Update comment.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-25 15:50:34 +02:00
Alexei Znamensky
850ef03fe7
snap: enforce hold when installing at a specific revision (#12097)
* snap: enforce hold when installing at a specific revision

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

Fixes #12088

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

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

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

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

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

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

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

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 15:34:48 +02:00
Asif Draxi
fdace38501
nmcli: fix check/diff for bond arp_interval and arp_ip_target (#11588) (#12085)
* nmcli: bond ARP options stop lying in check/diff (#11588)

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

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

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

---------

Co-authored-by: Asif Draxi <asif.draxi@blackline.com>
2026-05-23 13:35:40 +02:00
Gerben Welter
3558e3c74a
Fix flatpak id check (#12063)
* Fix flatpak id check

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

Fixes #12062

* Add changelog fragment

* Update plugins/modules/flatpak.py

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

* Update changelog fragment.

---------

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

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

Fixes #8730

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

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

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

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

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

Fixes #8730
2026-05-17 10:48:56 +02:00
Alexei Znamensky
9cba458e3e
cargo: fix version parsing when state=latest (#12064)
* fix(cargo): fix greedy regex in get_latest_published_version

Fixes #8949

* docs(cargo): add changelog fragment for #12064
2026-05-17 20:24:03 +12:00
bne1hm
c2485ea57b
apt_rpm: fix upgrade of local RPM not present in repository (#9161) (#12039) 2026-05-17 09:48:08 +02:00
Mariam Ahhttouche
c1c389e684
Add module to manage Python versions using uv (#11537)
* Add minimal uv_python module

uv_python module: add integration tests

* uv_python module: handle absent state

uv_python module: add integration tests

* uv_python module: restrict accepted version formats to X.Y and  X.Y.Z

uv_python module: add integration tests for version format

* uv_python module: add _list_python and _get_latest_patch_release methods

* uv_python module: add support for latest state

uv_python module: add integration tests for latest state

* uv_python module: add integration tests for check mode

* uv_python module: improve latest state check mode to show version that will be installed

* uv_python module: make latest state more deterministic by using install with explicite version

* uv_python module: improve absent state check mode and add corresponding integration test

* uv_python module: update latest state handling to sort versions without relying on uv behavior

uv_python module: improve integration tests

uv_python module: improve module return values

* uv_python module: add integration test for when uv executable does not exist

uv_python module: improve exception handling

* uv_python module: add integration test for case when specified version does not exist

* uv_python module: handle case when provided python version does not exist in latest state

uv_python module: improve methods' return values and add docstrings

uv_python module: improve integration tests

* uv_python module: improve check mode for present state to fail when no patch version is available

* uv_python module: return commands' stderr and return code as a variable of stdout

* uv_python module: add python version to module return values for present state

* uv_python module: add python version to module return values for absent state

* uv_python module: add python version to module return values for latest state

uv_python module: fix integration tests

* uv_python module: add installation paths to return values for present state

* uv_python module: add installation paths to return values for absent state

* uv_python module: add installation paths to return values for latest state

* uv_python module: update present, absent and latest state to only include versions managed by uv in return values

uv_python module: improve integration tests

uv_python module: update module documentation

* uv_python module: use LooseVersion  instead of StrictVersion to allow specifying threaded and major python versions

* uv_python module: fail module if used uv version is less than the minimal supported version

uv_python module: update documentation

* uv_python module: add uv command options to executed commands to disable unneeded features

* uv_python module: use packaging.version to only accept canonical python versions

uv_python module: update integration tests

uv_python module: improve error messages

* uv_python module: pin uv version used in tests

Improve module documentation

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

Add integration tests' aliases file for uv_python module

* Use StrictVersion instead of packaging Version

* make integration tests more deterministic

Update attributes field in documentation

Save uv bin path in an attribute

Add another example in documentation

Apply PR feedback and refactor code

Fix typing to be compatible with python versions <= 3.8

Update example to use quotes for major.minor example and update documentation

Update test aliases

Use documentation fragment for uv_python attributes

* Add aliases to skip running tests on freebsd and rhel

Make uv_python tests more deterministic

Clean uv_python documentation

* Handle case when version given is an empty string in uv_python module

* Apply linguistic guidelines for plugins/modules/uv_python.py

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

Add Python version requirement in uv_python documentation

* Update tests to install uv using pip and fix some tests

Add typing to plugins/modules/uv_python.py

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

Update plugins/modules/uv_python.py documentation

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

* Add task to uv_python tests to add uv installation directory to PATH

* Update uv_python to log unparsed versions in debug mode

Refactor uv_python code

Remove uv python label in .github/BOTMETA.yml

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

Add typing to plugins/modules/uv_python.py

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

Fix uv python documentation

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

* Allow testing using Python versions lower or equal to 3.8

skip running ci tests in macos

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

* Make uv version check more resilient to cli output format change in uv_python module

Improve tests/integration/targets/uv_python/tasks/main.yaml

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

fix mypy union attr error

* update uv_python tests to run on rhel and freebsd

Update uv_python tests to use generic packge manager to install uv

Install uv with curl for freebsd in uv python tests

Install rust needed by uv in freebsd for uv python tests

Update up_python tests to fix uv installation path in RHEL

skip testing uv_python on freebsd as it only has tier 3 support by uv

Fix fragment name in uv_python.py

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

Update version_added in plugins/modules/uv_python.py

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

Update tests/integration/targets/uv_python/tasks/main.yaml

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

Make version shown on debug message more precise in uv_python module

* Handle case when uv python returns relative paths instead of absolute in uv_python module

Add more typing to uv_python module

* uv_python module: update debug message fo unsupported versions to be more clear

---------

Co-authored-by: Mariam Ahhttouche <mariam.ahhttouche@etu.univ-grenoble-alpes.fr>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-17 09:46:59 +02:00
abma
f97ff78c20
Allow hourly logrotate (#11939)
* Allow hourly logrotate

logrotate 3.8.5 supports hourly:

https://github.com/logrotate/logrotate/blob/main/ChangeLog.md#385---2013-06-10

* style

* add changelog fragment

* Update plugins/modules/logrotate.py

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

* adjust changelog

* Update changelogs/fragments/11939-logrotate-hourly.yml

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-16 14:57:21 +02:00
Felix Fontein
a15d9a3510
packet_project and packet_sshkey: fix broken example plays (#12055)
Fix example plays.
2026-05-16 10:47:25 +02:00
Bronislav
47a19fad1b
telegram: add ability to specify a custom URL for the API (#12040)
* feat: Custom telegram api host

* fix: default param  telegram api host

* fix:  default api_host for DOCUMENTATION

* fix: Documentation and example

* changelog: add bugfix fragment for telegram api_host

* fix:  use [] for module.params access
2026-05-15 23:30:13 +02:00
Francisco Pereira
eb69d25e45
apk: document non-interactive mode requirement (#12047)
* apk: document non-interactive mode requirement

* apk: fix file path markup in documentation

Change file path markup from E() to C() in the notes section.

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-15 07:39:59 +12:00
Alexei Znamensky
803b79b1da
nsupdate: add configurable timeout parameter (#12012)
* feat(nsupdate): add configurable timeout parameter

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

* changelog: add fragment for PR 12012

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

* Apply suggestions from code review

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-14 22:03:23 +12:00
Alexei Znamensky
862d7d7aaf
snap: support system as a configuration target (#12025)
* feat(snap): support snap system configuration via name=system

Treat `system` as a virtual snap that is always considered installed,
bypassing snap info lookup and install/refresh logic, while still
allowing snap set/get operations via the options parameter.

Fixes #11266

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

* docs(snap): note version_added for system support; add changelog fragment

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 22:02:28 +12:00
keachi
fba7da4394
Remove as maintainer (#11911)
Remove ownership

I do not maintain those modules anymore since years. I think the time
has come to remove at least my name from them.
2026-05-14 10:20:10 +02:00
Fulvius
2cb4a5d4e7
gitlab_user: update SSH keys when key material changes (#11996)
* gitlab_user: update SSH keys when key material changes

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

Fixes #6516

* gitlab_user: add SSH key update modes

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

Refs: #6516

* Apply suggestions from code review

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-05-12 21:19:15 +12:00
Alexei Znamensky
00060263a5
bundler: replace deprecated CLI flags with BUNDLE_* env vars (#12024)
* fix(bundler): replace deprecated CLI flags with BUNDLE_* env vars

Bundler 2.1 deprecated --deployment, --without, --path, --clean, and
--binstubs; Bundler 4 has removed --clean entirely. Pass these options
as BUNDLE_* environment variables instead, which have been supported
since Bundler 1.0.0 and are scoped to the process (no persistent
.bundle/config written).

Fixes #4583, fixes #11380

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

* fix(bundler): add changelog fragment for PR #12024

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 21:00:45 +12:00
Alexei Znamensky
171feb5a2c
datadog_downtime: handle uuid.UUID type in API response (#12019)
* fix(datadog_downtime): convert uuid field to str for datadog-api-client>=2.28.0

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

* changelog: add fragment for PR 12019

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 20:59:14 +12:00
Alexei Znamensky
6e48c5fc4e
xml: adjust example doc (#12030) 2026-05-11 10:48:46 +12:00
Alexei Znamensky
abef8f2aed
xml: fix print_match not populating matches return value (#12013)
* fix(xml): populate matches when print_match is set, fix returned doc

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

* test(xml): add integration tests for print_match

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

* changelog: add fragment for PR 12013

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 11:41:37 +12:00
Alexei Znamensky
b8659f5c61
pam_limits: only create backup file when content actually changes (#12014)
* fix(pam_limits): only create backup when file is actually changed

Fixes #12011

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

* changelog: add fragment for PR 12014

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 11:41:06 +12:00
RealCharlesChia
798439f1fe
Fix gitlab_hook: add default value for releases_events parameter (#11917)
* Fix gitlab_hook: only pass releases_events to API when specified

The releases_events parameter now only gets passed to the GitLab API:
- On create: always passed (fixes 500 error when not specified)
- On update: only passed when explicitly specified by user

This avoids forcing the releases_events value during updates when not
intended by the user.

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

* Add changelog fragment for gitlab_hook releases_events fix

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

* Add PR link to changelog fragment

* Use .get() for safer dict access in releases_events handling

* Update plugins/modules/gitlab_hook.py

remove `.get()`

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

* Update plugins/modules/gitlab_hook.py

Remove the null check for `options[“releases_events”]`

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

---------

Co-authored-by: Charles Chia <charleschia@email.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-09 21:52:48 +02:00
Sonal Karmakar
cdd0d2521e
jenkins_credential: improve example and description in documentation (#11922)
* Fixes and improvements for better undestanding of the module

- Fixed token generation syntax to use `name` instead of `id`.
- Changed `token: {{ token }}` to `token: {{ token_result.token }}` to show accessing token from the registered variable, essentially making the entire Example section a playbook capable of full execution.
- Added notes in the Example section about the intended approach for storing and accessing tokens.
- Mentioned about not using `id` for token generation in the parameter's description.

* Applying FQCN for the `ansible.builtin.copy` module

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

* Shortened the notes about storing and accessing Jenkins token.

* Added line breaks to reduce width of the shortened notes

- Added line breaks to reduce the width of the shortened note from commit #5bc225b.
- Numbered and indented the notes for clear distinction.

* Changed token storage example to use INI instead of CSV format

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-09 21:51:33 +02:00
Alexei Znamensky
15a8444751
nomad modules: extract common connection logic into _nomad module utils (#11957)
* refactor(nomad): extract common connection logic into _nomad module_utils

Fixes #7688

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

* changelog: add fragment for PR 11957

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

* refactor(nomad): use direct param access instead of params.get()

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

* fix(nomad): fix mypy errors in _nomad module utils

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 23:25:26 +12:00
Alexei Znamensky
5e98a45f8a
iso_create: add bootable ISO support via boot_options (#11991)
* feat(iso_create): add bootable ISO support via El Torito boot_options

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

* feat(changelogs): add fragment for iso_create bootable ISO support #11991

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

* Update plugins/modules/iso_create.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-07 21:29:27 +12:00
Tobias Jaehnel
4aa38ea336
ssh_config: Add AddressFamily (#11968)
* Add support for AddressFamily parameter in ssh_config.

* Added changelog fragment.

* Update changelog fragment with PR link placeholder

* Fixed formatting.

* Fixed format of changelog fragment.

* Add PR number to changelog fragment.

* Incorporated review findings.

* Typo fix.

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

* Limit to allowed values.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-07 07:32:43 +02:00
Alexei Znamensky
645dd2d448
ldap_attrs: fix case-insensitive attribute lookup in state=exact (#11990)
* fix(ldap_attrs): case-insensitive attribute lookup in _get_all_values_of

LDAP attribute names are case-insensitive (RFC 4512), but the previous
code used a case-sensitive dict lookup on the server's response. When
the server returns an attribute with different casing than requested,
the lookup returns [] causing state=exact to issue MOD_ADD instead of
MOD_REPLACE, which fails on single-valued attributes that already have
a value.

Fixes #1624

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

* feat(changelogs): add fragment for ldap_attrs fix #11990

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 07:38:56 +12:00
Alexei Znamensky
a43006c7cb
seport: fix idempotency when port is covered by an existing range (#11994)
* fix(seport): handle port overlap with existing ranges

Fixes idempotency when a requested port is already covered by an
existing range registered for the same setype/proto. Also improves
the error message when libsemanage raises FileNotFoundError on a
port overlap validation failure.

Fixes #10105

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

* chore(seport): add changelog fragment for #11994

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 07:36:02 +12:00
Alexei Znamensky
02b969ee4d
cobbler_system: fix KeyError when adding new interface to existing system (#11995)
* fix(cobbler_system): handle missing interface device on existing system

When adding a new interface to an existing Cobbler system that does not
yet have that interface defined, the module raised a KeyError. Use .get()
with a fallback empty dict to safely handle that case. Also add a
continue after the unknown-property warning to prevent a secondary
KeyError on IFPROPS_MAPPING lookup.

Fixes: #7007

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

* chore(cobbler_system): add changelog fragment for #11995

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 19:29:23 +02:00
Alexei Znamensky
38d49d240e
yarn: add Alpine Linux support in integration tests (#11943)
* test(yarn): add Alpine Linux support via apk

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

Fixes #4270

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* prefix yarn output line

* Update changelogs/fragments/11943-yarn-nodejs-runtime-warnings.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-05-06 19:25:10 +02:00
Alexei Znamensky
d87a8a167f
xml: fail for non-string values (#11959)
* fix(xml): coerce boolean values to string with a warning

Fixes #7171

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

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

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

* changelog: add fragment for PR 11959

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

* adjustments from review

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

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

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

* adjustments from review

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

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 19:23:58 +02:00
Alexei Znamensky
60cb5cd679
uptimerobot: deprecate module (#11993)
feat(uptimerobot): deprecate module, API v1 is retired

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 17:54:18 +12:00
Alexei Znamensky
41b8d4e40f
datadog_monitor: deprecate mute and unmute states (#11988)
* feat(datadog_monitor): deprecate mute and unmute states

The Datadog mute/unmute monitor API is deprecated upstream, and the
module's silenced parameter was never correctly wired to the mute
endpoint. Direct users to community.general.datadog_downtime instead.
Planned removal in 15.0.0.

Fixes #1535

* feat(datadog_monitor): add changelog fragment for #11988
2026-05-06 17:50:49 +12:00
Alexei Znamensky
1047f45bec
multiple module utils: flatten directories (#11974)
* multiple module utils: flatten directories

* adjust pritunl tests

* adjust lxca and keycloak tests

* adjust botmeta

* rename test files correctly

* and an import fix

* rename pritunl api mod utils test

* fix typo in test filename

* rename references to pritunl api test

* rename keycloak mod utils test
2026-05-06 07:07:51 +02:00