Commit Graph

1624 Commits

Author SHA1 Message Date
patchback[bot]
c8f2219fb0 [PR #11733/6f12d930 backport][stable-12] gem: use CmdRunner (#11791)
gem: use `CmdRunner` (#11733)

* gem: use `CmdRunner`

* add changelog frag

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



---------


(cherry picked from commit 6f12d93057)

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

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

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



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

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



* add changelog fragment for PR #11742



---------


(cherry picked from commit bdd3174563)

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

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



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



* fix changelog fragment: correct PR number (11741)



---------


(cherry picked from commit e59888dd7e)

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

Add stable-2.21 to CI.

(cherry picked from commit 849a7ee899)

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

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

* adjustments from review

(cherry picked from commit 66886d08f5)

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

* test(integration): remove CentOS references

* further simplification

* more removals

* rollback systemd_info for now

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

* remove tasks for setup_epel where unused

* adjustments from review

(cherry picked from commit 79431c36b5)

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

* consul integration tests: re-enable on macOS

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

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



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



* remove changelog fragment (test-only PR)



---------


(cherry picked from commit 8b114e999e)

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

* snap_connect: new module to manage snap interface connections

Fixes #7722



* simplify _get_connections()

---------


(cherry picked from commit b79a45753f)

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

(cherry picked from commit 982f9472c5)

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

* re-enable monit tests in rhel

* enable EPEL for RHEL<11

* rollback EPEL setup, skip only specific versions

* remove skip entirely

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

* claude tries to install virtualenv, round 1

* claude tries python3 -m venv instead

* remove outdated centos6 file

(cherry picked from commit f4e5fc09d7)

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

* add scripts to clean aliases' skips

* remove legacy skips

* code cosmetics

* add license to ALIASES.md

* Fix typos in ALIASES.md documentation

* rolling back freebsd14.2 and 14.3 in iso_extract

* fix versions and re-run

(cherry picked from commit 68ae04a95a)

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

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

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

Fixes #725.



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



---------


(cherry picked from commit a4bba99203)

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

* nsupdate: add unit tests



* fix var name to regain sanity

* remove unneeded typing from test file

* formatting

---------


(cherry picked from commit ef700b116a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 21:47:56 +01:00
patchback[bot]
f739035d1f [PR #11681/e2c06f2d backport][stable-12] pacman: add root, cachedir, and config options (#11684)
pacman: add root, cachedir, and config options (#11681)

* pacman: add root, cachedir, and config options

Add three dedicated options -- O(root), O(cachedir), and O(config) --
so that all pacman commands get the corresponding global flags
(--root, --cachedir, --config) prepended, enabling use cases such as
installing packages into a chroot or alternative root directory
(similar to pacstrap).



* add changelog frag

---------


(cherry picked from commit e2c06f2d12)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 06:47:20 +01:00
patchback[bot]
17e02f87c9 [PR #11678/d06c83eb backport][stable-12] etcd3: re-enable and fix tests, add unit tests (#11680)
etcd3: re-enable and fix tests, add unit tests (#11678)

* etcd3: re-enable and fix tests, add unit tests

- Add unit tests for community.general.etcd3 module (12 tests covering
  state=present/absent, idempotency, check mode, and error paths)
- Fix integration test setup: update etcd binary to v3.6.9 (from v3.2.14),
  download from GitHub releases, add health-check retry loop after start
- Work around etcd3 Python library incompatibility with protobuf >= 4.x
  by setting PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
- Update to FQCNs throughout integration tests
- Re-enable both etcd3 and lookup_etcd3 integration targets

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



* improve use of multiple context managers

---------


(cherry picked from commit d06c83eb68)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 07:05:05 +01:00
patchback[bot]
555d7b9038 [PR #11658/25a4f568 backport][stable-12] puppet: deprecate param timeout (#11665)
puppet: deprecate param timeout (#11658)

* puppet: deprecate param timeout

* add changelog frag

* Update changelogs/fragments/11658-puppet-timeout-deprecation.yml



---------


(cherry picked from commit 25a4f568f9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-23 20:35:09 +01:00
patchback[bot]
9d7097ef4d [PR #11635/3c21ac96 backport][stable-12] nmcli: fix setting_types() to properly handle routing_rules as a list type (#11668)
nmcli: fix setting_types() to properly handle routing_rules as a list type (#11635)

* Fix setting_types() to properly handle routing_rules as a list type

* Add changelog fragment for ipv6.routing-rules bugfix

* Update changelogs/fragments/11630-nmcli-ipv6-routing-rules.yml



* Add PR URL to changelog fragment

---------


(cherry picked from commit 3c21ac961b)

Co-authored-by: Ted W. <ted.l.wood@gmail.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-23 20:34:36 +01:00
patchback[bot]
8e4581c0e6 [PR #11659/d6cb56c0 backport][stable-12] osx_defaults: add dict support (#11671)
osx_defaults: add dict support (#11659)

* osx_defaults: add dict support

* add changelog frag

* osx_defaults: fix dict idempotency by using plutil -extract for type-preserving read

The previous approach piped `defaults read` output (old-style plist text)
through `plutil -convert json`. Old-style plist loses boolean type info
(booleans appear as 1/0, indistinguishable from integers), causing the
comparison to fail and reporting changed=True on every run.

Fix by exporting the domain binary plist to a temp file and using
`plutil -extract key json` which correctly preserves all plist types
(booleans stay true/false, integers stay integers, etc.).



* change param from bool to str

* Apply suggestion from review

* Update plugins/modules/osx_defaults.py



---------



(cherry picked from commit d6cb56c022)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-23 20:34:28 +01:00
patchback[bot]
28b50a1e45 [PR #11657/d48e767e backport][stable-12] open_iscsi: support IPv6 portals (#11663)
open_iscsi: support IPv6 portals (#11657)

* fix(modules/open_iscsi): support IPv6 portals

* add changelog frag

(cherry picked from commit d48e767e1e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-23 07:04:44 +01:00
patchback[bot]
414f0541a5 [PR #11654/b85a1687 backport][stable-12] test: remove redundant unit test requirements (#11662)
test: remove redundant unit test requirements (#11654)

(cherry picked from commit b85a168716)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-23 07:04:31 +01:00
patchback[bot]
c4da6e4202 [PR #11660/b1ac989c backport][stable-12] remove skip/aix from aliases files (#11661)
remove skip/aix from aliases files (#11660)

(cherry picked from commit b1ac989c70)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-23 07:04:20 +01:00
patchback[bot]
a425d16e7c [PR #11646/8d403dde backport][stable-12] ansible_galaxy_install: new param executable (#11651)
ansible_galaxy_install: new param executable (#11646)

* ansible_galaxy_install: new param executable

* add changelog frag

(cherry picked from commit 8d403dde5b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-22 20:33:41 +01:00
patchback[bot]
12808f67d5 [PR #11645/a09e879f backport][stable-12] xfconf: fix boolean return values (#11650)
xfconf: fix boolean return values (#11645)

* xfconf: fix boolean return values

* add changelog frag

(cherry picked from commit a09e879ff2)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-22 20:33:31 +01:00
patchback[bot]
268b31b53d [PR #11639/758a445d backport][stable-12] npm: use uthelper for tests (#11644)
npm: use uthelper for tests (#11639)

(cherry picked from commit 758a445d97)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-22 11:17:30 +01:00
patchback[bot]
fa682e8b40 [PR #11638/4f5e5c9b backport][stable-12] python_runner: add integration tests (#11643)
test(python_runner): add integration tests (#11638)

* test(python_runner): add integration tests

* simplify the test

* add missing quotes

* use setup_remote_tmp_dir

* build venv manually first

(cherry picked from commit 4f5e5c9bb6)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-22 11:17:12 +01:00
patchback[bot]
0f7d508344 [PR #11637/3aa4a298 backport][stable-12] cmd_runner_fmt tests: assert that unpack_* functions can handle _ArgFormat objects (#11642)
test(cmd_runner_fmt): assert that `unpack_*` functions can handle `_ArgFormat` objects (#11637)

test(cmd_runner_fmt): assert that unpack functions can handle _ArgFormat objects

(cherry picked from commit 3aa4a29842)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-22 11:13:50 +01:00
patchback[bot]
ac771079db [PR #11636/1dfc4fed backport][stable-12] test: uthelper now generates one test function per test case (#11641)
test: uthelper now generates one test function per test case (#11636)

(cherry picked from commit 1dfc4fed40)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-22 11:05:28 +01:00
patchback[bot]
96852b7032 [PR #11631/b4336659 backport][stable-12] CI: Remove FreeBSD 14.3 for devel, and replace macOS 15.3 with 26.3 (#11634)
CI: Remove FreeBSD 14.3 for devel, and replace macOS 15.3 with 26.3 (#11631)

* Replace FreeBSD 14.3 with 14.4, and macOS 15.3 with 26.3.

* FreeBSD 14.4 seems to have the same problem as FreeBSD 15.0, disabling for now.

(cherry picked from commit b4336659f6)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-21 21:13:57 +01:00
patchback[bot]
08bb917d59 [PR #11625/bc22fbca backport][stable-12] CI: Replace apt_repository and apt_key with deb822_repository (#11627)
CI: Replace apt_repository and apt_key with deb822_repository (#11625)

Replace apt_repository and apt_key with deb822_repository.

(cherry picked from commit bc22fbcaa0)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-20 08:06:18 +01:00
patchback[bot]
e7e9cf97e5 [PR #11536/dae2157b backport][stable-12] merge_variables: extended merge capabilities added (#11626)
merge_variables: extended merge capabilities added (#11536)

* merge_variables: extended merge capabilities added

This extension gives you more control over the variable merging process of the lookup plugin `merge_variables`. It closes the gap between Puppet's Hiera merging capabilities and the limitations of Ansible's default variable plugin `host_group_vars` regarding fragment-based value definition. You can now decide which merge strategy should be applied to dicts, lists, and other types. Furthermore, you can specify a merge strategy that should be applied in case of type conflicts.

The default behavior of the plugin has been preserved so that it is fully backward-compatible with the already implemented state.



* Update changelogs/fragments/11536-merge-variables-extended-merging-capabilities.yml



* Update plugins/lookup/merge_variables.py



* Periods added at the end of each choice description



* Update plugins/lookup/merge_variables.py



* ref: follow project standard for choice descriptions



* ref: more examples added and refactoring



* Update plugins/lookup/merge_variables.py



* ref: some more comments to examples added



* fix: unused import removed



* ref: re-add "merge" to strategy map



* Update comments



* Specification of transformations solely as string



* Comments updated



* ref: `append_rp` and `prepend_rp` removed
feat: options dict for list transformations re-added
feat: allow setting `keep` for dedup transformation with possible values: `first` (default) and `last`



* ref: improve options documentation



* ref: documentation improved, avoiding words like newer or older in merge description



* Update plugins/lookup/merge_variables.py



* ref: "prio" replaced by "dict"



* feat: two integration tests added



---------





(cherry picked from commit dae2157bb7)

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>
Co-authored-by: Christoph Fiehe <cfiehe@users.noreply.github.com>
Co-authored-by: Fiehe Christoph <c.fiehe@eurodata.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Mark <40321020+m-a-r-k-e@users.noreply.github.com>
2026-03-19 22:59:56 +01:00
patchback[bot]
deb9d63783 [PR #11585/25b5655b backport][stable-12] keycloak_authentication_v2: verify providerIds (fix 11583) (#11619)
keycloak_authentication_v2: verify providerIds (fix 11583) (#11585)

* 11583 verify providerIds in keycloak_authentication_v2

* 11583 code cleanup

---------


(cherry picked from commit 25b5655be7)

Co-authored-by: thomasbargetz <thomas.bargetz@gmail.com>
Co-authored-by: Thomas Bargetz <thomas.bargetz@rise-world.com>
2026-03-18 18:14:37 +01:00
patchback[bot]
f06bcabeed [PR #11601/e7a253b4 backport][stable-12] keycloak_authentication_v2: covers idp flow overrides in safe swap (fix 11582) (#11617)
keycloak_authentication_v2: covers idp flow overrides in safe swap (fix 11582) (#11601)

* 11582 keycloak_authentication_v2 covers idp flow overrides in safe swap

* 11583 update documentation and comments

(cherry picked from commit e7a253b4c9)

Co-authored-by: thomasbargetz <thomas.bargetz@gmail.com>
2026-03-18 07:05:10 +01:00
patchback[bot]
a8bd4c750b [PR #11586/df9b3044 backport][stable-12] github_secrets_info: new module (#11610)
github_secrets_info: new module (#11586)

* github_secrets_info: new module



* clean tests



* remove pynacl dep



* fqcn



* remove excess output



* just return result as sample



* only print secrets, adapt tests



* Update plugins/modules/github_secrets_info.py



* Update plugins/modules/github_secrets_info.py



* Update plugins/modules/github_secrets_info.py



* t is for typing, and typing is what we did



* add info_module attributes



---------



(cherry picked from commit df9b30448a)

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Co-authored-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-16 20:28:22 +01:00
patchback[bot]
000b92a425 [PR #11254/cc24e573 backport][stable-12] monit: deprecate support for monit <= 5.18 (#11609)
monit: deprecate support for monit <= 5.18 (#11254)

* monit: deprecate support for monit <= 5.18

* add additional runs for checking version

* add changelog frag

* bump deprecation for 14.0.0

(cherry picked from commit cc24e57307)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-16 20:16:41 +01:00
patchback[bot]
c6ddff0dad [PR #11514/46ffec6f backport][stable-12] github_secrets: new module (#11602)
github_secrets: new module (#11514)

* add support for managing GitHub secrets



* fix tab



* update for sanity



* more sanity fixes



* update botmeta



* formating



* remove list function



* remove docstring, format text strings and return codes



* switch to deps



* black and ruff doesnt get along



* initial unit tests



* update non-existing secret test



* update description and details



* handle when a secret cant be deleted



* fail if not acceptable error codes



* add test for non-acceptable status codes



* remove local ruff config



* allow empty strings



* set required_



* extend tests



* cleanup



* cover all, got a git urlopen error



* cover all, got a git urlopen error



* ensure value cant be None



* check_mode



* bump to 12.5.0



* Update plugins/modules/github_secrets.py



* extend check_mode and related tests



* split constants and return dict when checking secret



* switch to HTTPStatus



* replace DELETE and UPDATE with NO_CONTENT



* Update plugins/modules/github_secrets.py



* Update plugins/modules/github_secrets.py



* update tests



* Update plugins/modules/github_secrets.py



* Update plugins/modules/github_secrets.py



* Update plugins/modules/github_secrets.py



* Update plugins/modules/github_secrets.py



* Update plugins/modules/github_secrets.py



---------



(cherry picked from commit 46ffec6f0e)

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Co-authored-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-15 16:38:30 +01:00
patchback[bot]
86616b1559 [PR #11592/2d685e7a backport][stable-12] test(monit): use uthelper (#11593)
test(monit): use uthelper (#11592)

(cherry picked from commit 2d685e7a85)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-14 22:34:22 +01:00
patchback[bot]
99ebbbdf49 [PR #11590/ce5d5622 backport][stable-12] replace list(map(...)) with comprehension (#11591)
replace `list(map(...))` with comprehension (#11590)

* replace `list(map(...))` with comprehension

* add changelog frag

(cherry picked from commit ce5d5622b9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-14 17:14:18 +01:00
patchback[bot]
79d8c9bd6e [PR #11424/f0e3edc8 backport][stable-12] New module: logrotate (#11581)
New module: `logrotate` (#11424)

* add module logrotate

* add values for start

* fix docs

* version 12.5.0 and fix test

---------


(cherry picked from commit f0e3edc892)

Co-authored-by: Aleksandr Gabidullin <101321307+a-gabidullin@users.noreply.github.com>
Co-authored-by: Александр Габидуллин <agabidullin@astralinux.ru>
2026-03-13 08:01:39 +01:00
patchback[bot]
5106aa8065 [PR #11557/a69f7e60 backport][stable-12] add module keycloak_authentication_v2 (#11579)
add module keycloak_authentication_v2 (#11557)

* add module keycloak_authentication_v2

* skip sanity checks, because the run into a recursion

* 11556 fix documentation

* 11556 limit the depth of nested flows to 4

* 11556 code cleanup

* 11556 code cleanup - add type hints

* 11556 add keycloak_authentication_v2 to meta/runtime.yml

* 11556 code cleanup - remove custom type hints

* 11556 code cleanup - none checks

* Update plugins/modules/keycloak_authentication_v2.py



* Update plugins/modules/keycloak_authentication_v2.py



* 11556 code cleanup - remove document starts

* 11556 cleanup

* 11556 cleanup

---------




(cherry picked from commit a69f7e60b4)

Co-authored-by: thomasbargetz <thomas.bargetz@gmail.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Thomas Bargetz <thomas.bargetz@rise-world.com>
2026-03-13 07:41:56 +01:00
patchback[bot]
7f8bc6f99d [PR #11541/4cd91ba4 backport][stable-12] Fix templating bug in iptables_state tests (#11572)
Fix templating bug in iptables_state tests (#11541)

* Fix templating bug in iptables_state tests.

* Try to install older packages on RHEL.

(cherry picked from commit 4cd91ba4d4)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-11 22:15:52 +01:00
patchback[bot]
b5846a3d05 [PR #11567/9b72d954 backport][stable-12] Add missing __future__ imports (#11569)
Add missing __future__ imports (#11567)

Add missing __future__ imports.

(cherry picked from commit 9b72d95452)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-03-11 07:10:34 +01:00
patchback[bot]
80184b6fd4 [PR #11562/93112d23 backport][stable-12] monit: remove unstable tag from integration tests (#11563)
monit: remove unstable tag from integration tests (#11562)

(cherry picked from commit 93112d23e5)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-03-10 06:57:40 +01:00
patchback[bot]
be7dc5f37d [PR #11555/71f8c15d backport][stable-12] Allow setting of independent custom domain for incus inventory (#11560)
Allow setting of independent custom domain for incus inventory (#11555)

Allowing the domain suffix to be appended independent of the `host_fqdn`
setting enables the inventory plugin to construct proper FQDNs if a
network has the `dns.domain` property set. Otherwise you would always
end up with something like `host01.project.local.example.net` despite
`host01.example.net` being the expected result.

(cherry picked from commit 71f8c15d2e)

Co-authored-by: Roland Sommer <rol@ndsommer.de>
2026-03-07 19:12:30 +01:00
patchback[bot]
eae5987be1 [PR #11544/9b9d8eac backport][stable-12] Update tests to pass on macOS arm64 (#11545)
Update tests to pass on macOS arm64 (#11544)

(cherry picked from commit 9b9d8eac09)

Co-authored-by: Matt Clay <matt@mystile.com>
2026-02-27 19:29:47 +01:00
patchback[bot]
6385fbe038 [PR #11534/e118b23b backport][stable-12] Simplify and extend from_ini tests (#11535)
Simplify and extend from_ini tests (#11534)

Simplify and extend from_ini tests.

(cherry picked from commit e118b23ba0)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-02-23 06:30:35 +01:00
patchback[bot]
4b6cd41512 [PR #11462/ce7cb4e9 backport][stable-12] New module icinga2_downtime (#11532)
New module icinga2_downtime (#11462)

* feat: Icinga 2 downtime module added allowing to schedule and remove downtimes through its REST API.



* ensure compatibility with ModuleTestCase

feat: errors raised from MH now contain the changed flag
ref: move module exit out of the decorated run method



* revised module

ref: module refactored using StateModuleHelper now
ref: suggested changes by reviewer added



* revert change regarding changed flag in MH



* refactoring and set changed flag explicitly on error



* Check whether there was a state change on module failure removed.



* ref: test cases migrated to the new feature that allows passing through exceptions



* Update plugins/module_utils/icinga2.py



* Update plugins/module_utils/icinga2.py



* Update plugins/modules/icinga2_downtime.py



* ref: make module helper private



* fix: ensure that all non-null values are added to the request otherwise a `false` value is dropped



* ref: module description extended with the note that check mode is not supported



* Update plugins/modules/icinga2_downtime.py



* fix: documentation updated



* ref: documentation updated
ref: doc fragment added



* Update plugins/doc_fragments/icinga2_api.py



* ref: doc fragment renamed to `_icinga2_api.py`



* ref: maintainer to doc fragment in BOTMETA.yml added



* Update plugins/modules/icinga2_downtime.py



* Update plugins/modules/icinga2_downtime.py



* Update plugins/modules/icinga2_downtime.py



---------





(cherry picked from commit ce7cb4e914)

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>
Co-authored-by: Christoph Fiehe <cfiehe@users.noreply.github.com>
Co-authored-by: Fiehe Christoph <c.fiehe@eurodata.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-02-23 06:17:51 +01:00
patchback[bot]
30eb35cb95 [PR #11512/aec0e61b backport][stable-12] adds parameter delimiters to from_ini filter (#11533)
adds parameter delimiters to from_ini filter (#11512)

* adds parameter delimiters to from_ini filter

fixes issue #11506

* adds changelog fragment

* fixes pylint dangerous-default-value / W0102

* does not assume default delimiters

let that be decided in the super class

* Update plugins/filter/from_ini.py

verbose description



* Update changelogs/fragments/11512-from_ini-delimiters.yaml



* adds input validation

* adss check for delimiters not None

* adds missing import

* removes the negation

* adds suggestions from russoz

* adds ruff format suggestion

---------


(cherry picked from commit aec0e61ba1)

Co-authored-by: Robert Sander <github@gurubert.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-02-23 06:17:00 +01:00
patchback[bot]
45d16053ee [PR #10306/38f93c80 backport][stable-12] New Callback plugin: loganalytics_ingestion adding Azure Log Analytics Ingestion (#11527)
New Callback plugin: `loganalytics_ingestion` adding Azure Log Analytics Ingestion (#10306)

* Add Azure Log Analytics Ingestion API plugin

The Ingestion API allows sending data to a Log Analytics workspace in
Azure Monitor.

* Fix LogAnalytics Ingestion shebang

* Fix Log Analytics Ingestion pep8 tests

* Fix Log Analytics Ingestion pylint tests

* Fix Log Analytics Ingestion import tests

* Fix Log Analytics Ingestion pylint test

* Add Log Analytics Ingestion auth timeout

Previous behavior was to use the 'request' module's default timeout;
this makes auth timeout value consistent with the task submission
timeout value.

* Display Log Analytics Ingestion event data as JSON

Previous behavior was to display the data as a Python dictionary.
The new behavior makes it easier to generate a sample JSON file in order
to import into Azure when creating the table.

* Add Azure Log Analytics Ingestion timeout param

This parameter controls how long the plugin will wait for an HTTP response
from the Azure Log Analytics API before considering the request a failure.
Previous behavior was hardcoded to 2 seconds.

* Fix Azure Log Ingestion unit test

The class instantiation was missing an additional argument that was added
in a previous patch; add it.  Converting to JSON also caused the Mock
TaskResult object to throw a serialization error; override the function
for JSON conversion to just return bogus data instead.

* Fix loganalytics_ingestion linter errors

* Fix LogAnalytics Ingestion env vars

Prefix the LogAnalytics Ingestion plugin's environment variable names
with 'ANSIBLE_' in order to align with plugin best practices.

* Remove LogAnalytics 'requests' dep from docs

The LogAnalytics callback plugin does not actually require 'requests',
so remove it from the documented dependencies.

* Refactor LogAnalytics Ingestion to use URL utils

This replaces the previous behavior of depending on the external
'requests' library.

* Simplify LogAnalytics Ingestion token valid check



* Remove LogAnalytics Ingestion extra arg validation

Argument validation should be handled by ansible-core, so remove the
extra argument validation in the plugin itself.

* Update LogAnalytics Ingestion version added

* Remove LogAnalytics Ingestion coding marker

The marker is no longer needed as Python2 is no longer supported.

* Fix some LogAnalytics Ingestion grammar errors

* Refactor LogAnalytics Ingestion plugin messages

Consistently use "plugin" instead of module, and refer to the module by
its FQCN instead of its prose name.

* Remove LogAnalytics Ingestion extra logic

A few unused vars were being set; stop setting them.

* Fix LogAnalytics Ingestion nox sanity tests

* Fix LogAnalytics Ingestion unit tests

The refactor to move away from the 'requests' dependency to use
module_utils broke the plugin's unit tests; re-write the plugin's unit
tests for module_utils.

* Add nox formatting to LogAnalytics Ingestion

* Fix Log Analytics Ingestion urllib import

Remove the compatibility import via 'six' for 'urllib' since Python 2
support is no longer supported.

* Bump LogAnalytics Ingestion plugin version added

* Remove LogAnalytics Ingestion required: false docs

Required being false is the default, so no need to explicitly add it.

* Simplify LogAnalytics Ingestion role name logic

* Clean LogAnalytics Ingestion redundant comments

* Clean LogAnalytics Ingestion unit test code

Rename all Mock objects to use snake_case and consistently use '_mock'
as a suffix instead of sometimes using it as a prefix and sometimes
using it as a suffix.

* Refactor LogAnalytics Ingestion unit tests

Move all of the tests outside of the 'setUp' method.

* Refactor LogAnalytics Ingestion test

Add a test to validate that part of the contents sent match what was
supposed to be sent.

* Refactor LogAnalytics Ingestion test

Make the names consistent again.

* Add LogAnalytics Ingestion sample data docs

* Apply suggestions from code review



---------


(cherry picked from commit 38f93c80f1)

Co-authored-by: wtcline-intc <wade.cline@intel.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-02-21 11:43:16 +01:00
patchback[bot]
1d4fd21702 [PR #11471/34938ca1 backport][stable-12] keycloak_user_rolemapping: handle None response for client role lookup (#11522)
keycloak_user_rolemapping: handle None response for client role lookup (#11471)

* fix(keycloak_user_rolemapping): handle None response for client role lookup

When adding a client role to a user who has no existing roles for that
client, get_client_user_rolemapping_by_id() returns None. The existing
code indexed directly into the result causing a TypeError. Add the same
None check that already existed for realm roles since PR #11256.

Fixes #10960

* fix(tests): use dict format for task vars in keycloak_user_rolemapping tests

Task-level vars requires a YAML mapping, not a sequence. The leading
dash (- roles:) produced a list instead of a dict, which ansible-core
2.20 rejects with "Vars in a Task must be specified as a dictionary".

* Update changelogs/fragments/keycloak-user-rolemapping-client-none-check.yml



---------


(cherry picked from commit 34938ca1ef)

Co-authored-by: Ivan Kokalovic <67540157+koke1997@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-02-18 20:50:15 +01:00
patchback[bot]
bfcdeeab91 [PR #11468/80d21f2a backport][stable-12] keycloak_realm_key: add full support for all Keycloak key providers (#11519)
keycloak_realm_key: add full support for all Keycloak key providers (#11468)

* feat(keycloak_realm_key): add support for auto-generated key providers

Add support for Keycloak's auto-generated key providers where Keycloak
manages the key material automatically:

- rsa-generated: Auto-generates RSA signing keys
- hmac-generated: Auto-generates HMAC signing keys
- aes-generated: Auto-generates AES encryption keys
- ecdsa-generated: Auto-generates ECDSA signing keys

New algorithms:
- HMAC: HS256, HS384, HS512
- ECDSA: ES256, ES384, ES512
- AES: AES (no algorithm parameter needed)

New config options:
- secret_size: For HMAC/AES providers (key size in bytes)
- key_size: For RSA-generated provider (key size in bits)
- elliptic_curve: For ECDSA-generated provider (P-256, P-384, P-521)

Changes:
- Make private_key/certificate optional (only required for rsa/rsa-enc)
- Add provider-algorithm validation with clear error messages
- Fix KeyError when managing default realm keys (issue #11459)
- Maintain backward compatibility: RS256 default works for rsa/rsa-generated

Fixes: #11459

* fix: address sanity test failures

- Add 'default: RS256' to algorithm documentation to match spec
- Add no_log=True to secret_size parameter per sanity check

* feat(keycloak_realm_key): extend support for all Keycloak key providers

Add support for remaining auto-generated key providers:
- rsa-enc-generated (RSA encryption keys with RSA1_5, RSA-OAEP, RSA-OAEP-256)
- ecdh-generated (ECDH key exchange with ECDH_ES, ECDH_ES_A128KW/A192KW/A256KW)
- eddsa-generated (EdDSA signing with Ed25519, Ed448 curves)

Changes:
- Add provider-specific elliptic curve config key mapping
  (ecdsaEllipticCurveKey, ecdhEllipticCurveKey, eddsaEllipticCurveKey)
- Add PROVIDERS_WITHOUT_ALGORITHM constant for providers that don't need algorithm
- Add elliptic curve validation per provider type
- Update documentation with all supported algorithms and examples
- Add comprehensive integration tests for all new providers

This completes full coverage of all Keycloak key provider types.

* style: apply ruff formatting

* feat(keycloak_realm_key): add java-keystore provider and update_password

Add support for java-keystore provider to import keys from Java
Keystore (JKS or PKCS12) files on the Keycloak server filesystem.

Add update_password parameter to control password handling for
java-keystore provider:
- always (default): Always send passwords to Keycloak
- on_create: Only send passwords when creating, preserve existing
  passwords when updating (enables idempotent playbooks)

The on_create mode sends the masked value ("**********") that Keycloak
recognizes as "preserve existing password", matching the behavior when
re-importing an exported realm.

Replace password_checksum with update_password - the checksum approach
was complex and error-prone. The update_password parameter is simpler
and follows the pattern used by ansible.builtin.user module.

Also adds key_info return value containing kid, certificate fingerprint,
status, and expiration for java-keystore keys.

* address PR review feedback

- Remove no_log=True from secret_size (just an int, not sensitive)
- Add version_added: 12.4.0 to new parameters and return values
- Remove "Added in community.general 12.4.0" from description text
- Consolidate changelog entries into 4 focused entries
- Remove bugfix from changelog (now in separate PR #11470)

* address review feedback from russoz and felixfontein

- remove docstrings from module-local helpers
- remove line-by-line comments and unnecessary null guard
- use specific exceptions instead of bare except Exception
- use module.params["key"] instead of .get("key")
- consolidate changelog into single entry
- avoid "complete set" claim, reference Keycloak 26 instead

* address round 2 review feedback

- Extract remove_sensitive_config_keys() helper (DRY refactor)
- Simplify RS256 validation to single code path
- Add TypeError to inner except in compute_certificate_fingerprint()
- Remove redundant comments (L812, L1031)
- Switch .get() to direct dict access for module.params

(cherry picked from commit 80d21f2a0d)

Co-authored-by: Ivan Kokalovic <67540157+koke1997@users.noreply.github.com>
2026-02-18 18:36:48 +01:00