1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-21 20:59:10 +00:00
Commit graph

601 commits

Author SHA1 Message Date
Alexei Znamensky
ce5d5622b9
replace list(map(...)) with comprehension (#11590)
* replace `list(map(...))` with comprehension

* add changelog frag
2026-03-14 08:43:23 +01:00
Aleksandr Gabidullin
f0e3edc892
New module: logrotate (#11424)
* add module logrotate

* add values for start

* fix docs

* version 12.5.0 and fix test

---------

Co-authored-by: Александр Габидуллин <agabidullin@astralinux.ru>
2026-03-13 07:44:21 +01:00
Felix Fontein
9b72d95452
Add missing __future__ imports (#11567)
Add missing __future__ imports.
2026-03-11 06:42:08 +01:00
Roland Sommer
71f8c15d2e
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.
2026-03-07 14:15:07 +01:00
Christoph Fiehe
ce7cb4e914
New module icinga2_downtime (#11462)
* feat: Icinga 2 downtime module added allowing to schedule and remove downtimes through its REST API.

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* ensure compatibility with ModuleTestCase

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

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* revised module

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

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* revert change regarding changed flag in MH

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* refactoring and set changed flag explicitly on error

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

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

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

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

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* Update plugins/module_utils/icinga2.py

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

* Update plugins/module_utils/icinga2.py

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

* Update plugins/modules/icinga2_downtime.py

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

* ref: make module helper private

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

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

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

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

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* Update plugins/modules/icinga2_downtime.py

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

* fix: documentation updated

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* ref: documentation updated
ref: doc fragment added

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* Update plugins/doc_fragments/icinga2_api.py

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

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

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

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

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>

* Update plugins/modules/icinga2_downtime.py

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

* Update plugins/modules/icinga2_downtime.py

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

* Update plugins/modules/icinga2_downtime.py

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

---------

Signed-off-by: Fiehe Christoph  <c.fiehe@eurodata.de>
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 05:38:54 +01:00
wtcline-intc
38f93c80f1
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

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

* 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

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-02-20 19:11:08 +01:00
Jakub Danek
986118c0af
keycloak_realm_localization: new module - realm localization control (#10841)
* add support for management of keycloak localizations

* unit test for keycloak localization support

* keycloak_realm_localization botmeta record

* rev: improvements after code review
2026-02-18 07:05:34 +01:00
Adam R.
ed7ccbe3d4
maven_artifact: resolve SNAPSHOT to latest using snapshot metadata block (#11501)
* fix(maven_artifact): resolve SNAPSHOT to latest using snapshot metadata block

Prefer the <snapshot> block (timestamp + buildNumber) from maven-metadata.xml
which always points to the latest build, instead of scanning <snapshotVersions>
and returning on the first match. Repositories like GitHub Packages keep all
historical entries in <snapshotVersions> (oldest first), causing the module to
resolve to the oldest snapshot instead of the latest.

Fixes #5117
Fixes #11489

* fix(maven_artifact): address review feedback

- Check both timestamp and buildNumber before using snapshot block,
  preventing IndexError when buildNumber is missing
- Remove unreliable snapshotVersions scanning fallback; use literal
  -SNAPSHOT version for non-unique snapshot repos instead
- Add tests for incomplete snapshot block and non-SNAPSHOT versions

* fix(maven_artifact): restore snapshotVersions scanning with last-match

Restore <snapshotVersions> scanning as primary resolution (needed for
per-extension accuracy per MNG-5459), but collect the last match instead
of returning on the first. Fall back to <snapshot> block when no
<snapshotVersions> match is found, then to literal -SNAPSHOT version.

* docs: update changelog fragment to match final implementation

* fix(maven_artifact): use updated timestamp for snapshot resolution

Use the <updated> attribute to select the newest snapshotVersion entry
instead of relying on list order. This works independently of how the
repository manager sorts entries in maven-metadata.xml.

Also fix test docstring and update changelog fragment per reviewer
feedback.

* test(maven_artifact): shuffle entries to verify updated timestamp sorting

Reorder snapshotVersion entries so the newest JAR is in the middle,
not at the end. This ensures the test actually validates that resolution
uses the <updated> timestamp rather than relying on list position.
2026-02-14 21:03:00 +01:00
fizmat
4b67afc2b0
Add option for wsl_shell_type, protect wsl.exe arguments if SSH shell is Powershell (#11308)
* feat(wsl): add option for wsl_shell_type, protect wsl arguments if SSH shell is Powershell

* docs(wsl): add changelog fragment

* docs(wsl): fix changelog fragment syntax, add issue link

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

* feat(wsl): improve new option documentation

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

* refactor(wsl): put integrasion test flag into a variable for convenience

* feat(wsl): rename option to wsl_remote_ssh_shell_type

* feat(wsl): escape "%" if shell is cmd, raise AnsibleError if powershell

* test(wsl): fix unit tests for wsl

- remove redundant check - moved to a separate function
- fix check for cmd escaping of "%"
- fix formatting / whitespace

* test(wsl): fix expected error message

* test(wsl): fix test - position of stop-parsing token changed

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-01-16 21:07:11 +01:00
Rémy Jacquin
4b0aeede69
feat(nmcli): Add support for IPv6 routing rules (#11413)
* feat(nmcli): Add support for IPv6 routing rules

Closes #7094

Signed-off-by: Rémy Jacquin <remy@remyj.fr>

* Add changelog fragment

Signed-off-by: Rémy Jacquin <remy@remyj.fr>

* Fixing doc

Signed-off-by: Rémy Jacquin <remy@remyj.fr>

* Add issue link to changelog fragment

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

* Fix version

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

---------

Signed-off-by: Rémy Jacquin <remy@remyj.fr>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-01-16 21:05:43 +01:00
Felix Fontein
76d51db8d0 Order imports. 2026-01-09 21:12:38 +01:00
Alexei Znamensky
e790b95067
incus connection: fix regex (#11347)
* incus connection: fix regex

* updates

* Apply suggestions from code review

* expand regexp capture

* add changelog frag

* Update plugins/connection/incus.py

* split arguments after command option

* Update plugins/connection/incus.py

* remove *() and split from the last command

* add tests, make small adjustments

* remove redundant strip()

* add more tests

* adjusted changelog fragment
2026-01-09 21:07:31 +01:00
Felix Fontein
236b9c0e04
Sort imports with ruff check --fix (#11400)
Sort imports with ruff check --fix.
2026-01-09 07:40:58 +01:00
Alexei Znamensky
b67c94fc3f
fix ruff cases UP024,UP041 (#11391)
* fix ruff cases UP024,UP041

* add changelog frag
2026-01-06 17:29:44 +01:00
Alexei Znamensky
e8f2b135ba
batch 3 - update Python idiom to 3.7 using pyupgrade (#11343)
* batch 3 - update Python idiom to 3.7 using pyupgrade

* add changelog frag

* bring back sanity

* adjust test

* Apply suggestions from code review
2025-12-30 22:18:52 +01:00
Alexei Znamensky
266d9d3fb0
batch 2 - update Python idiom to 3.7 using pyupgrade (#11342)
* batch 2 - update Python idiom to 3.7 using pyupgrade

* Apply suggestions from code review
2025-12-30 22:50:16 +13:00
Aleksandr Gabidullin
61b559c4fd
add sssd_info module (#11120)
* add sssd_info module

* fix f-stings and remove support python2

* fix imports custom lib

* fix whitespace and add missing_required_lib

* fix str and add version

* try add mock test

* fix module and mock tests check

* fix required in main module

* fix spaces

* fix linters

* add final newline

* fix version of module

* fix description and error handling

* swap literal to dict

* fix str

* remove comment in methods

* remove _get in methods

* fix name method in test

* add botmeta

* fix description of server_type

* fix name of maintainer

* remove choices

* fix author

* fix type hint

* fix result

* fix spaces

* fix choices and empty returns

* fix mypy test result

* fix result

* run andebox yaml-doc

* remake simple try/exc for result

* fix tests

* add any type for testing mypy

* ruff formated

* fix docs

* remove unittest.main

* rename acc on git for official name

---------

Co-authored-by: Александр Габидуллин <agabidullin@astralinux.ru>
2025-12-22 15:55:28 +01:00
Felix Fontein
02b185932c
Remove unittest.main() calls (#11304)
Remove unittest.main() calls.
2025-12-22 15:47:42 +01:00
IP2Location
2c6746ffa0
ip2location_info: New Module - ip2location.io for IP geolocation lookup (#11170)
* Added ip2location.io for IP geolocation lookup.

* Removed tab in last line.

* Added "ip2location" as maintainer.

* Update plugins/modules/ip2locationio_facts.py

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

* Update plugins/modules/ip2locationio_facts.py

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

* Update plugins/modules/ip2locationio_facts.py

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

* Update plugins/modules/ip2locationio_facts.py

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

* Update plugins/modules/ip2locationio_facts.py

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

* Update plugins/modules/ip2locationio_facts.py

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

* Update plugins/modules/ip2locationio_facts.py

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

* Added "typing" library.

* Updated import position.

* Reformatted.

* Added unit test.

* Updated documentation to add "ip" parameter.

* Renamed module from "ip2location_facts" to "ip2location_info".

* Updated version number.

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

* Update plugins/modules/ip2location_info.py

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

* Update plugins/modules/ip2location_info.py

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

* Updated return definition.

* Update BOTMETA.yml to latest module name.

* Update plugins/modules/ip2location_info.py

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

* Update plugins/modules/ip2location_info.py

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

* Removed extra parameter from "fetch_url".

* Fixed "test_ip2location_info.py" with formatter.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-12-22 09:41:28 +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
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
Felix Fontein
fb2f34ba85
Stop re-defining the argument spec in unit tests (#11235)
* Stop re-defining the argument spec in unit tests.

* Shut up linter.
2025-12-01 06:59:23 +01:00
Sean McAvoy
6365b5a981
lxd_storage_pool_info, lxd_storage_volume_info: new modules (#11198)
* Fix mistaken rebase

* plugins/modules/lxd_storage_: include error codes, clean up notes

* plugins/modules/lxd_storage_: snap_url, ruff fix

* plugins/modules/lxd_storage_volume_info.py: remove checks on expected api returned bits

* plugins/modules/lxd_storage_volume_info.py: required: true

* tests/integration/targets/lxd_storage_volume_info/tasks/main.yaml: add Test fetching specific volume by name

* tests/unit/plugins/modules/test_lxd_storage_: add unit tests

* tests/integration/targets/lxd_storage_pool_info/tasks/main.yaml: add integratio tests

* tests/integration/targets/lxd_storage_: not required

* tests/integration/targets/lxd_storage_: not required perhaps, lxd_project has them

* tests/unit/plugins/modules/test_lxd_storage_volume_info.py: fix python3.8 tests

* tests/unit/plugins/modules/test_lxd_storage_pool_info.py: fix python3.8

* tests/integration/targets/lxd_storage_: correct paths for aliases

* tests/unit/plugins/modules/test_lxd_storage_volume_info.py: remove backticks

* tests/unit/plugins/modules/test_lxd_storage_volume_info.py: remove blank line

* tests/unit/plugins/modules/test_lxd_storage_: python3.8 changes

* tests/unit/plugins/modules/test_lxd_storage_: python3.8 changes

* tests/unit/plugins/lookup/test_github_app_access_token.py: restore

* tests/unit/plugins/connection/test_wsl.py: restore

* plugins/modules/lxd_storage_: use ANSIBLE_LXD_DEFAULT_SNAP_URL and put API version into const

* lxd_storage_volume_info: use recursion to gather all volume details

* tests/integration/targets/lxd_storage_volume_info/tasks/main.yaml: fix silet skipped failures

* tests/integration/targets/lxd_storage_pool_info/tasks/main.yaml: fix silet failures

* lxd_storage_pool_info: update to use recursion to gather all details in one shot

* Remove unnecessary change.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-12-01 06:58:45 +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
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
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
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
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
2b4333a033
Use raise from in plugins (#11095)
* Use raise from.

* Add changelog fragment.
2025-11-12 20:34:26 +01:00
Felix Fontein
5ea1dee3ea
oneview: remove superfluous parts from unit test (#11066)
Remove superfluous parts from unit test.
2025-11-09 09:53:12 +01:00
Felix Fontein
396f467bbb
Improve Python code: address unused variables (#11049)
* Address F841 (unused variable).

* Reformat.

* Add changelog fragment.

* More cleanup.

* Remove trailing whitespace.

* Readd removed code as a comment with TODO.
2025-11-09 08:14:35 +01:00
Alexei Znamensky
ebf45260ce
remove conditional code for old snakes (#11048)
* remove conditional code for old snakes

* remove conditional code for old snakes

* reformat

* add changelog frag
2025-11-08 17:21:46 +01:00
Felix Fontein
3478863ef0
Address issues reported by ruff check (#11043)
* Resolve E713 and E714 (not in/is tests).

* Address UP018 (unnecessary str call).

* UP045 requires Python 3.10+.

* Address UP007 (X | Y for type annotations).

* Address UP035 (import Callable from collections.abc).

* Address UP006 (t.Dict -> dict).

* Address UP009 (UTF-8 encoding comment).

* Address UP034 (extraneous parantheses).

* Address SIM910 (dict.get() with None default).

* Address F401 (unused import).

* Address UP020 (use builtin open).

* Address B009 and B010 (getattr/setattr with constant name).

* Address SIM300 (Yoda conditions).

* UP029 isn't in use anyway.

* Address FLY002 (static join).

* Address B034 (re.sub positional args).

* Address B020 (loop variable overrides input).

* Address B017 (assert raise Exception).

* Address SIM211 (if expression with false/true).

* Address SIM113 (enumerate for loop).

* Address UP036 (sys.version_info checks).

* Remove unnecessary UP039.

* Address SIM201 (not ==).

* Address SIM212 (if expr with twisted arms).

* Add changelog fragment.

* Reformat.
2025-11-08 17:05:21 +13:00
Alexei Znamensky
b28ac655fc
xfconf: fix existing empty array case (#11026)
* xfconf: fix existing empty array case

* fix xfconf_info as well

* add changelog frag
2025-11-02 20:20:31 +01:00
Felix Fontein
340ff8586d Reformat everything. 2025-11-01 13:46:53 +01:00
Marius Bertram
5d5392786c
Add Keycloak module to send execute-actions email to users (#10950)
* Add Keycloak module to send execute-actions email to users

Signed-off-by: Marius Bertram <marius@brtrm.de>

* Fix Example Typo

Signed-off-by: Marius Bertram <marius@brtrm.de>

* Break if argument_speck() is broken

Signed-off-by: Marius Bertram <marius@brtrm.de>

* Adjust to new tests in main.

* Remove unnecessary version_added.

---------

Signed-off-by: Marius Bertram <marius@brtrm.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-10-30 20:55:31 +01:00
Felix Fontein
74c2c804e5
Cleanup: use super() instead of super(__class__, self) (#11016)
* Address UP008: Use super() instead of super(__class__, self).

* Linting.
2025-10-30 20:17:26 +01:00
Felix Fontein
0c5466de47
Cleanup: remove unicode prefix, remove explicit inheritance from object (#11015)
* Address UP025: remove unicode literals from strings.

* Address UP004: class inherits from 'object'.
2025-10-30 20:17:10 +01:00
Felix Fontein
6088b0cff5
CI: add type checking (#10997)
* Set up type checking with mypy.

* Make mypy pass.

* Use list() instead of sorted().
2025-10-29 17:13:38 +00:00
Stéphane Graber
a1bf2fc44a
Add Incus inventory plugin (#10972)
* BOTMETA: Add Incus inventory plugin

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>

* plugins/inventory: Implement basic Incus support

This is a simple inventory plugin leveraging the local `incus` command
line tool. It supports accessing multiple remotes and projects, builds a
simple group hierarchy based on the remotes and projects and exposes
most properties as variable. It also supports basic filtering using the
server-side filtering syntax supported by the Incus CLI.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>

* plugins/inventory/incus: Add support for constructable groups

This allows the use of constructable groups and also allows disabling
the default group structure.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>

* plugins/inventory/incus: Add unit tests

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>

---------

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-10-28 21:24:09 +01:00
Alexei Znamensky
efad7a0d38
unit tests: use f-strings (#10993) 2025-10-27 12:32:33 +13:00
Alexei Znamensky
e177d1e61a
unit tests (modules): use f-strings (#10992)
* unit tests (modules): use f-strings

* Apply suggestions from code review
2025-10-27 11:08:33 +13:00
Alexei Znamensky
32dd5f04c5
uthelper: make str and repr generic in base class (#10985)
* uthelper: make str and repr generic in base class

* Update tests/unit/plugins/modules/uthelper.py
2025-10-26 09:40:47 +01:00
Alexei Znamensky
10bdd9c56b
tests/unit/plugins/modules/test_composer.yaml: remove redundant lines (#10910) 2025-10-12 17:36:50 +13:00
Felix Fontein
74b6a0294a
Unit tests: clean up compat imports (#10902)
Clean up compat imports.
2025-10-11 10:03:37 +02:00
Felix Fontein
a8977afb04
Remove all usage of ansible.module_utils.six from main branch (#10888)
* Get rid of all six.moves imports.

* Get rid of iteritems.

* Get rid of *_type(s) aliases.

* Replace StringIO import.

* Get rid of PY2/PY3 constants.

* Get rid of raise_from.

* Get rid of python_2_unicode_compatible.

* Clean up global six imports.

* Remove all usage of ansible.module_utils.six.

* Linting.

* Fix xml module.

* Docs adjustments.
2025-10-11 08:21:57 +02:00
Felix Fontein
8f8a0e1d7c
Fix __future__ imports, __metaclass__ = type, and remove explicit UTF-8 encoding statement for Python files (#10886)
* Adjust all __future__ imports:

for i in $(grep -REl "__future__.*absolute_import" plugins/ tests/); do
  sed -e 's/from __future__ import .*/from __future__ import annotations/g' -i $i;
done

* Remove all UTF-8 encoding specifications for Python source files:

for i in $(grep -REl '[-][*]- coding: utf-8 -[*]-' plugins/ tests/); do
  sed -e '/^# -\*- coding: utf-8 -\*-/d' -i $i;
done

* Remove __metaclass__ = type:

for i in $(grep -REl '__metaclass__ = type' plugins/ tests/); do
  sed -e '/^__metaclass__ = type/d' -i $i;
done
2025-10-10 19:52:04 +02:00
Alexei Znamensky
633bd6133a
remove Python2 some constructs/docs/comments (#10892)
* remove Python2 some constructs/docs/comments

* add changelog frag
2025-10-10 19:15:01 +02:00
Felix Fontein
0b72737cab
Bump version of main to 12.0.0; execute announced deprecations (#10883)
* Bump version to 12.0.0.

* Remove deprecated modules and plugins.

* state is now required.

* Change default of prepend_hash from auto to never.

* Remove support for force=''.

* Always delegate 'debug'.

* Remove ignore_value_none and ctx_ignore_none parameters.

* Remove parameters on_success and on_failure.

* Update BOTMETA.

* Adjust docs reference.

* Forgot required=True.

* Fix changelog fragment.

* Adjust unit tests.

* Fix changelog.

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-10-09 13:50:07 +02:00