1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00
Commit graph

2287 commits

Author SHA1 Message Date
Felix Fontein
99b9680ea2
Announce making all module utils, plugin utils, and doc fragments private (#11320)
Announce making all module utils, plugin utils, and doc fragments private.
2025-12-23 22:59:38 +01:00
nwintering
a55884c921
Add support for missing validations in keycloak_userprofile (#11285)
* add missing validations-parameters as config options and add documentation for them; fixes https://github.com/ansible-collections/community.general/issues/9048

* fix parameter names

* extend unit tests

* support for camel casing for new validations and add changelog fragment

* Fix fragment format

* add 'version_added' documentation

* Update changelogs/fragments/11285-extended-keycloak-user-profile-validations.yml

mention fixed issue in fragment

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

* fix ruff formatting

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-12-22 09:40:26 +01:00
s-hamann
d424907172
apk: fix packages return value for apk-tools >= 3 (fix #11264) (#11265)
* apk: fix packages return value for apk-tools >= 3 (fix #11264)

* Add changelog fragment
2025-12-10 13:29:41 +01:00
Alexei Znamensky
ac37544c53
monit: investigating tests again - using copilot on this one (#11255)
* add monit version to successful exit

* install the standard monit - if 5.34, then bail out

* add 3sec wait after service restart

- that restart happens exactly before the task receiving the SIGTERM, so maybe, just maybe, it just needs time to get ready for the party

* wait for monit initialisation after restart

* monit tests: check service-specific status in readiness wait

The wait task was checking 'monit status' (general), but the actual
failing command is 'monit status -B httpd_echo' (service-specific).
This causes a race where general status succeeds but service queries
fail. Update to check the exact command format that will be used.

* monit tests: remove 5.34.x version restriction

The version restriction was based on incorrect diagnosis. The actual
issue was the readiness check validating general status instead of
service-specific queries. Now that we check the correct command
format, the tests should work across all monit versions.

* monit tests: add stabilization delay after readiness check

After the readiness check succeeds, add a 1-second pause before
running actual tests. Monit 5.34.x and 5.35 appear to have a
concurrency issue where rapid successive 'monit status -B' calls
can cause hangs even though the first call succeeds.

* monit tests: add retry logic for state changes to handle monit daemon hangs

Monit daemon has an intermittent concurrency bug across versions 5.27-5.35
where 'monit status -B' commands can hang (receiving SIGTERM) even after
the daemon has successfully responded to previous queries. This appears
to be a monit daemon issue, not a timing problem.

Add retry logic with 2-second delays to the state change task to work
around these intermittent hangs. Skip retries if the failure is not
SIGTERM (rc=-15) to avoid masking real errors.

* monit tests: capture and display monit.log for debugging

Add tasks in the always block to capture and display the monit log file.
This will help diagnose the intermittent hanging issues by showing what
monit daemon was doing when 'monit status -B' commands hang.

* monit tests: enable verbose logging (-v flag)

Modify the monit systemd service to start with -v flag for verbose
logging. This should provide more detailed information in the monit
log about what's happening when status commands hang.

* monit: add 0.5s delay after state change command

After extensive testing and analysis with verbose logging enabled, identified
that monit's HTTP interface can become temporarily unresponsive immediately
after processing state change commands (stop, start, restart, etc.).

This manifests as intermittent SIGTERM (rc=-15) failures when the module
calls 'monit status -B <service>' to verify the state change. The issue
affects all monit versions tested (5.27-5.35) and is intermittent, suggesting
a race condition or brief lock in monit's HTTP request handling.

Verbose logging confirmed:
- State change commands complete successfully
- HTTP server reports as 'started'
- But subsequent status checks can hang without any log entry

Adding a 0.5 second sleep after sending state change commands gives the
monit daemon time to fully process the command and become responsive again
before the first status verification check.

This complements the existing readiness check after daemon restart and
the retry logic for SIGTERM failures in the tests.

* tests(monit): remove workarounds after module race condition fix

After 10+ successful CI runs with no SIGTERM failures, removing test-level
workarounds that are now redundant due to the 0.5s delay fix in the module:

- Remove 1-second stabilization pause after daemon restart
  The module's built-in 0.5s delay after state changes makes this unnecessary

- Remove retry logic for SIGTERM failures in state change tests
  The race condition is now prevented at the module level

- Remove verbose logging setup and log capture
  Verbose mode didn't log HTTP requests, so it didn't help diagnose the issue
  and adds unnecessary overhead

Kept the readiness check with retries after daemon restart - still needed
to validate daemon is responsive after service restart (different scenario
than the state change race condition).

* restore tasks/main.yml

* monit tests: reduce readiness check retries from 60 to 10

After successful CI runs, observed that monit daemon becomes responsive
within 1-2 seconds after restart. The readiness check typically passes
on the first attempt.

Reducing from 60 retries (30s timeout) to 10 retries (5s timeout) is
more appropriate and allows tests to fail faster if something is
genuinely broken.

* add changelog frag

* Update changelogs/fragments/11255-monit-integrationtests.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-12-10 13:29:32 +01:00
Guillaume Dorschner
a977c6f7c1
fix(sanitize_cr): avoid crash when realmrep is empty (#11260)
* fix(docs): missing info on id when creating realms

* fix(sanitize_cr): avoid crash when realmrep is empty

* remove unrelated change

* remove unrelated change

* added changlog

* correct: changelogs

* Update changelogs

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

---------

Co-authored-by: Guillaume Dorschner <guillaume.dorschner@thalesgroup.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-12-08 22:51:02 +01:00
Guillaume Dorschner
a9540f93d2
keycloak_user_rolemapping: fix: failling to assign role to user (#11256)
* docs: clarify keycloak documentation example section with uid

* fix: allow assign role to user

* Add changelog frag

* Update changelogs/fragments/11256-fix-keycloak-roles-mapping.yml

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

---------

Co-authored-by: Guillaume Dorschner <guillaume.dorschner@thalesgroup.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-12-06 13:41:40 +01:00
Felix Fontein
0ef3eac0f4
iptables_state: get rid of temporary files (#11258)
Get rid of temporary files.
2025-12-06 13:40:59 +01:00
Alexei Znamensky
3d25aac978
monit: use enum (#11245)
* monit: use enum

* make mypy happy about the var type

* add changelog frag

* typo - this is getting frequent
2025-12-02 21:54:50 +01:00
Tiziano Müller
76589bd97a
nmcli: allow VxLan multicast and bridge port (#11182)
VxLan virtual devices can be added to bridge ports, like any other
devices. And when using multicast remote addresses,
NetworkManager need to know the parent device as well.

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-12-02 21:34:34 +01:00
Alexei Znamensky
8d51c5f666
btrfs module utils: pass command as list to run_command() (#11240)
* btrfs module utils: pass command as list to run_command()

* add changelog frag
2025-12-03 00:08:41 +13:00
Alexei Znamensky
0a802ecdcb
deps module util: use Enum to represent states (#11242)
* deps module util: use Enum to represent states

* add changelog frag
2025-12-03 00:07:46 +13:00
Felix Fontein
c7f6a28d89
Add basic typing for module_utils (#11222)
* Add basic typing for module_utils.

* Apply some suggestions.

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

* Make pass again.

* Add more types as suggested.

* Normalize extra imports.

* Add more type hints.

* Improve typing.

* Add changelog fragment.

* Reduce changelog.

* Apply suggestions from code review.

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

* Fix typo.

* Cleanup.

* Improve types and make type checking happy.

* Let's see whether older Pythons barf on this.

* Revert "Let's see whether older Pythons barf on this."

This reverts commit 9973af3dbe.

* Add noqa.

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-12-01 20:40:06 +01:00
Alexei Znamensky
16d51a8233
remove % templating (#11231)
* remove % templating

* add changelog frag

* suggestions from review

* remove unused import
2025-12-01 06:46:50 +01:00
Felix Fontein
d30428ac71
Remove no longer needed _mount module util (#11232)
Remove no longer needed _mount module util.
2025-12-01 06:42:13 +01:00
Paul Mercier-Handisyde
ebcad7e6d1
zfs: mark change correctly when updating properties whose current value differs, even if they already have a non-default value (Fixes #11019) (#11172)
* zfs - mark change correctly when updating properties whose current value differs, even if they already have a non-default value (https://github.com/ansible-collections/community.general/issues/11019).

Signed-off-by: handisyde <github@handisyde.com>

* changelog: rename fragment to match PR number

Signed-off-by: handisyde <github@handisyde.com>

* Update changelogs/fragments/11172-zfs-changed-extra-props.yml

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

---------

Signed-off-by: handisyde <github@handisyde.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-30 14:51:14 +01:00
Alexei Znamensky
f27839673c
fix couple of f-string mishaps (#11229)
* fix couple of f-string mishaps

* add changelog frag

* fix insanity
2025-11-30 08:27:13 +01:00
Christer Warén
379db770c5
keycloak_realm: add webAuthnPolicyPasswordlessPasskeysEnabled param (#11197)
* keycloak_realm: add webAuthnPolicyPasswordlessPasskeysEnabled param

* Changelog Fragment - 11197

* Apply suggestions from code review

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

* Fix typo in changelog fragment filename

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-29 15:20:34 +01:00
Marc Olivier Bergeron
22a4f8e272
Added support for Windows VM with Incus connection. (#11199)
* Added support for Windows VM with Incus connection.

* Update changelogs/fragments/11199-incus-windows.yml

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

* Attempt to fix the argument splitting.

* Only split on the first occurrence of the command argument

* Applying nox

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-29 15:18:02 +01:00
Alexei Znamensky
d550baacfa
fix ruff case UP031 (#11223)
* fix ruff case UP031

* refactor backslashout of f-string for the sake of old Pythons

* add changelog frag

* Update plugins/modules/imc_rest.py

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

* scaleway_user_data: fix bug and make it an f-string

* reformat

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-29 08:28:22 +01:00
Alexei Znamensky
1ab9be152f
pushbullet: deprecation (#11224)
* pushbullet: deprecation

* add changelog frag
2025-11-27 21:49:28 +13:00
colin93
86d6ef8d0e
Allow None value maximum_timeout for gitlab_runner (#11174)
* change maximum_timeout type to raw

* allow None value for maximum_timeout in update_runner

* add changelog

* update changelog fragment formatting

* convert maximum_timeout value of 0 to None

* fix sanity check errors

* add suggested doc changes

* Note version required for timeout disable

---------

Co-authored-by: colin <cosulli3@jaguarlandrover.com>
2025-11-25 21:58:14 +01:00
Alexei Znamensky
862fe79a22
fix ruff case SIM110 (#11215)
* fix ruff case SIM110

* Update plugins/module_utils/xenserver.py

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

* add changelog frag

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-26 09:47:50 +13:00
Felix Fontein
d364e35423
Deprecate unused module utils (#11205)
Deprecate unused module utils.
2025-11-25 06:50:06 +01:00
Felix Fontein
cbf13ab6c9
Fix crash in module_utils.datetime.fromtimestamp() (#11206)
Fix crash in module_utils.datetime.fromtimestamp().
2025-11-25 06:49:32 +01:00
Michael Galati
ebb534166e
mas: Fix parsing on mas 3.0.0+. (#11179)
* mas: Fix parsing on mas 3.0.0+.

`mas` changed the formatting of `mas list` with version 3, which breaks
the parsing this module uses to determine which apps are installed.  In
particular, app IDs may now have leading space, which causes us to split
the string too early.

* Changelog fragment.

* Better format examples and changlog fragment.
2025-11-24 21:32:16 +01:00
Alexei Znamensky
f2731e1dac
onepassword_info: replace subprocess.Popen() with run_command() (#11193)
* onepassword_info: replace subprocess.Popen() with run_command()

* add changelog frag

* Update plugins/modules/onepassword_info.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-25 09:11:24 +13:00
Alexei Znamensky
64dc009ea7
solaris_zone: replace os.system() with run_command() (#11192)
* solaris_zone: replace os.system() with run_command()

* add changelog frag
2025-11-25 09:07:25 +13:00
Alexei Znamensky
7321ba4990
snmp_facts: improvements (#11148)
* snmp_facts: improvements

* require level if vesion=v3
2025-11-23 13:17:11 +01:00
Alexei Znamensky
1c678f5c07
fix ruff case UP030 (#11189)
* fix ruff case UP030

* add changelog frag

* formatting

* suggestion from review
2025-11-23 08:37:41 +01:00
Alexei Znamensky
9a3e26ad98
fix ruff case SIM112 (#11190) 2025-11-23 08:37:12 +01:00
Felix Fontein
19757b3a4c
Add type hints to action and test plugins and to plugin utils; fix some bugs, and improve input validation (#11167)
* Add type hints to action and test plugins and to plugin utils. Also fix some bugs and add proper input validation.

* Combine lines.

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

* Extend changelog fragment.

* Move task_vars initialization up.

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-11-22 22:52:21 +01:00
Felix Fontein
e57de70c2a
Address UP014: use NamedTuple class syntax (#11168)
* Address UP014: use NamedTuple class syntax.

* Convert type comments to type hints.
2025-11-21 18:19:36 +01:00
Alexei Znamensky
79b16d9ca5
fix return value exception (#11149)
* fix return value `exception`

* add changelog frag

* adjustments after review

* typo

* adjust changelog frag

* vmadm: send rc, stdout, and stderr to fail_json()

* rundeck: pass tracebacks

* Update changelogs/fragments/11149-rv-exception.yml

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

* Update changelogs/fragments/11149-rv-exception.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-18 20:07:26 +13:00
Roy Lenferink
e20e32bb87
Extend failure message for merge_variables type detection (#11107)
merge_variables: extend type detection failure message

Update the error message for the merge_variables lookup plugin in case an unsupported type is passed.
2025-11-16 13:31:07 +01:00
Alexei Znamensky
23e81b8d30
replace redundant to_native()/to_text() occurrences, batch 8 (#11143)
* replace redundant to_native()/to_text() occurrences, batch 8

* add changelog frag

* Update plugins/modules/jira.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-16 11:18:17 +13:00
Alexei Znamensky
98aca27a8b
locale_gen: search for available locales in /usr/local as well (#11046)
* locale_gen: search for available locales in /usr/local as well

* better var name

* add test for /usr/local

* Apply suggestions from code review

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

* skip /usr/local/ for Archlinux

* improve/update documentation

* add license file for the custom locale

* add changelog frag

* Update plugins/modules/locale_gen.py

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

* Update changelogs/fragments/11046-locale-gen-usrlocal.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-16 11:17:08 +13:00
Alexei Znamensky
5617d57c8c
xcc_redfish_command: fix messages showing dict keys (#11144)
* xcc_redfish_command: fix messages showing dict keys

* add changelog frag

* Update plugins/modules/xcc_redfish_command.py

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

* Update plugins/modules/xcc_redfish_command.py

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

* Apply suggestions from code review

* Update plugins/modules/xcc_redfish_command.py

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-16 11:07:56 +13:00
Alexei Znamensky
255059f7b3
fix ruff case B015 (#11145)
* fix ruff case B015

* add changelog frag
2025-11-13 06:23:30 +01:00
Alexei Znamensky
f5c2c8b9a2
replace redundant to_native()/to_text() occurrences, batch 7 (#11112)
* replace redundant to_native()/to_text() occurrences, batch 7

* add changelog frag

* made changes per review
2025-11-13 10:38:29 +13:00
Alexei Znamensky
996d9a7f63
replace batch 6 of redundant to_native()/to_text() occurrences (#11110)
* replace batch 6 of redundant to_native()/to_text() occurrences

* add changelog frag
2025-11-12 21:43:39 +01:00
Alexei Znamensky
f785e9c780
replace batch of redundant to_native()/to_text() occurrences (#11106)
* replace batch of redundant to_native()/to_text() occurrences

* add changelog frag

* snap sanity

* rolling back snap for now

* more cases in redhat_subscription
2025-11-12 21:43:14 +01:00
Alexei Znamensky
9b8867399e
replace batch of redundant to_native()/to_text() occurrences (#11105)
* replace batch of redundant to_native()/to_text() occurrences

* add changelog frag
2025-11-12 21:42:52 +01:00
Alexei Znamensky
4171b8a9ab
replace batch of redundant to_native()/to_text() occurrences (#11104)
* replace batch of redundant to_native()/to_text() occurrences

* add changelog frag
2025-11-12 21:42:37 +01:00
Alexei Znamensky
e5ee3eb88b
replace batch of redundant to_native() occurrences (#11102)
* replace batch of redundant to_native() occurrences

* add changelog frag

* Update plugins/modules/idrac_redfish_config.py

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

* reformat

* Apply suggestions from code review

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

* Update plugins/modules/dimensiondata_network.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-12 21:42:19 +01:00
Alexei Znamensky
2dfb46a4a6
remove ignore lines for Python 2 (#11122)
* remove ignore lines for Python 2

* use yield from

* add changelog frag

* Update changelogs/fragments/11122-yield-from-ignore.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-12 21:14:51 +01:00
Alexei Znamensky
c45fba549f
fix ruff case E721 (#11121)
* fix ruff case E721

* add changelog frag
2025-11-12 21:14:04 +01:00
Alexei Znamensky
41923e43bd
fix ruff case SIM103 (#11119)
* fix ruff case SIM103

* add changelog frag
2025-11-12 21:12:47 +01:00
Alexei Znamensky
58bb1e7c04
fix ruff case B007 (#11115)
* fix ruff case B007

* rollback inventory/iocage

* re-do the fix in inventory/iocage

* add cases in tests/unit/plugins

* rollback plugins/module_utils/memset.py

* rollback extraneous changes in plugins/modules/xcc_redfish_command.py

* add changelog frag
2025-11-12 21:06:14 +01:00
Felix Fontein
40aea793ee
Use raise from in modules (#11097)
* Use raise from.

* Add changelog fragment.

* Add comment.
2025-11-12 21:00:17 +01:00
Felix Fontein
2b4333a033
Use raise from in plugins (#11095)
* Use raise from.

* Add changelog fragment.
2025-11-12 20:34:26 +01:00