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

500 commits

Author SHA1 Message Date
patchback[bot]
1670f8693a
[PR #11322/7a18af80 backport][stable-12] Handle @Redfish.Settings when setting ComputerSystem boot attributes (#11441)
Handle @Redfish.Settings  when setting ComputerSystem boot attributes (#11322)

* set_boot_override function now uses Redfish Settings URI if available in ComputerSystem resource

* Follows code formatting rules

* Add changelogs fragments file

* Update changelogs/fragments/11322-handle-redfish-settings-in-setbootoverride.yml



* Explicit rewriting as a workaround to keep the "good" path clean.

* Adjust changelog fragment.

---------




(cherry picked from commit 7a18af80ce)

Co-authored-by: Pierre-yves Fontaniere <pyfontan@cc.in2p3.fr>
Co-authored-by: Pierre-yves FONTANIERE <pyf@cc.in2p3.fr>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-01-23 06:44:37 +01:00
patchback[bot]
b769b0bc01
[PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409)
Sort imports with ruff check --fix (#11400)

Sort imports with ruff check --fix.

(cherry picked from commit 236b9c0e04)

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-01-09 19:36:52 +01:00
patchback[bot]
2d07481e64
[PR #11341/5b5f7e9e backport][stable-12] batch 1 - update Python idiom to 3.7 using pyupgrade (#11349)
batch 1 - update Python idiom to 3.7 using pyupgrade (#11341)

* batch 1 - update Python idiom to 3.7 using pyupgrade

* add changelog frag

* add changelog frag

(cherry picked from commit 5b5f7e9e64)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-12-30 16:47:11 +01:00
patchback[bot]
59b6126320
[PR #11204/6ae47590 backport][stable-12] lxc_container: replace subprocess.Popen() with run_command() (#11339)
lxc_container: replace subprocess.Popen() with run_command() (#11204)

* lxc_container: replace subprocess.Popen() with run_command()

* Update plugins/modules/lxc_container.py



* add changelog frag

* retain Popen logic in module_utils

* Update plugins/module_utils/_lxc.py



---------


(cherry picked from commit 6ae47590cd)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-12-29 12:00:12 +01:00
patchback[bot]
39a49e4d98
[PR #11314/b3c066b9 backport][stable-12] Adding scw_profile parameter to Scaleway module utilities. (#11337)
Adding scw_profile parameter to Scaleway module utilities. (#11314)

* Adding scw_profile parameter to Scaleway module utilities.

* Setting param name to profile for consistency and adding scw_profile as an alias.

* Adding changelog fragment.

* Forgot to import 'os' library.

* Type in variable type for Scaleway profile.

* Also forgot to include the yaml library, code taking from plugins/inventory/scaleway.py.

* Adding default 'profile' value of empty string and changing check to a length check.

* Treated wrong variable, checking XDG_CONFIG_HOME is a string.

* Explicitly setting default of environment path vars to empty strings instead of None.

* Letting ruff reformat the dict for 'profile'.

* Changes from code review.

* Fixing ruff formatting issue with error message.

* Properly catching PyYAML import issues.

* Adding PyYAML requirement when 'profile' is used.

* Ruff wants an extra line after the PyYAML import code.

* Fixing PyYAML dependency code as per review.

* Removing extraneous var declaration.

* Moving SCW_CONFIG loading to a function.

* Fixing type errors with os.getenv calls.

* Cannot send None to os.path.exists() or open().

* Oops, inversed logic!

* Setting os.getenv() default to empty string so it is never None.



* None check no longer needed as scw_config_path is never None.



---------


(cherry picked from commit b3c066b99f)

Co-authored-by: Greg Harvey <greg.harvey@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-12-28 21:24:54 +01:00
patchback[bot]
21aa086ca6
[PR #11283/ef632145 backport][stable-12] Add more module_utils typing (#11289)
Add more module_utils typing (#11283)

Add more module_utils typing.

(cherry picked from commit ef632145e9)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-12-17 21:24:55 +01:00
patchback[bot]
469ba26c8f
[PR #11240/8d51c5f6 backport][stable-12] btrfs module utils: pass command as list to run_command() (#11248)
btrfs module utils: pass command as list to `run_command()` (#11240)

* btrfs module utils: pass command as list to run_command()

* add changelog frag

(cherry picked from commit 8d51c5f666)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-12-02 21:17:59 +01:00
patchback[bot]
5cb24c2599
[PR #11242/0a802ecd backport][stable-12] deps module util: use Enum to represent states (#11247)
deps module util: use Enum to represent states (#11242)

* deps module util: use Enum to represent states

* add changelog frag

(cherry picked from commit 0a802ecdcb)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-12-02 21:17:43 +01:00
patchback[bot]
377a599372
[PR #11222/c7f6a28d backport][stable-12] Add basic typing for module_utils (#11243)
Add basic typing for module_utils (#11222)

* Add basic typing for module_utils.

* Apply some suggestions.



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



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

---------


(cherry picked from commit c7f6a28d89)

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-12-01 21:16:37 +01:00
Felix Fontein
42e2b5147f
[stable-12] Remove no longer needed _mount module util (#11232) (#11236)
Remove no longer needed _mount module util (#11232)

Remove no longer needed _mount module util.

(cherry picked from commit d30428ac71)
2025-12-01 07:20:47 +01:00
patchback[bot]
8ae47d3a8d
[PR #11223/d550baac backport][stable-12] fix ruff case UP031 (#11226)
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



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

* reformat

---------


(cherry picked from commit d550baacfa)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-29 14:16:53 +01:00
patchback[bot]
8930d03c7c
[PR #11215/862fe79a backport][stable-12] fix ruff case SIM110 (#11217)
fix ruff case SIM110 (#11215)

* fix ruff case SIM110

* Update plugins/module_utils/xenserver.py



* add changelog frag

---------


(cherry picked from commit 862fe79a22)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-25 21:59:06 +01:00
patchback[bot]
e741e22ec4
[PR #11206/cbf13ab6 backport][stable-12] Fix crash in module_utils.datetime.fromtimestamp() (#11212)
Fix crash in module_utils.datetime.fromtimestamp() (#11206)

Fix crash in module_utils.datetime.fromtimestamp().

(cherry picked from commit cbf13ab6c9)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-25 21:42:22 +01:00
patchback[bot]
1e9217197f
[PR #11205/d364e354 backport][stable-12] Deprecate unused module utils (#11213)
Deprecate unused module utils (#11205)

Deprecate unused module utils.

(cherry picked from commit d364e35423)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-25 21:41:56 +01:00
patchback[bot]
f648dca84a
[PR #11189/1c678f5c backport][stable-12] fix ruff case UP030 (#11195)
fix ruff case UP030 (#11189)

* fix ruff case UP030

* add changelog frag

* formatting

* suggestion from review

(cherry picked from commit 1c678f5c07)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-11-23 08:58:57 +01:00
patchback[bot]
9d7855b844
[PR #11149/79b16d9c backport][stable-12] fix return value exception (#11173)
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



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



---------


(cherry picked from commit 79b16d9ca5)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-18 17:57:16 +01:00
patchback[bot]
04fb53e8a3
[PR #11112/f5c2c8b9 backport][stable-12] replace redundant to_native()/to_text() occurrences, batch 7 (#11142)
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

(cherry picked from commit f5c2c8b9a2)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-11-13 06:09:17 +01:00
patchback[bot]
b72e38c909
[PR #11115/58bb1e7c backport][stable-12] fix ruff case B007 (#11131)
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

(cherry picked from commit 58bb1e7c04)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-11-12 21:58:36 +01:00
patchback[bot]
6df72406c5
[PR #11122/2dfb46a4 backport][stable-12] remove ignore lines for Python 2 (#11134)
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



---------


(cherry picked from commit 2dfb46a4a6)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-12 21:36:26 +01:00
patchback[bot]
93d23cfef6
[PR #11119/41923e43 backport][stable-12] fix ruff case SIM103 (#11132)
fix ruff case SIM103 (#11119)

* fix ruff case SIM103

* add changelog frag

(cherry picked from commit 41923e43bd)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-11-12 21:32:10 +01:00
patchback[bot]
1d28e48d85
[PR #11097/40aea793 backport][stable-12] Use raise from in modules (#11130)
Use raise from in modules (#11097)

* Use raise from.

* Add changelog fragment.

* Add comment.

(cherry picked from commit 40aea793ee)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-12 21:31:11 +01:00
patchback[bot]
8cd80d94a0
[PR #11049/396f467b backport][stable-12] Improve Python code: address unused variables (#11058)
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.

(cherry picked from commit 396f467bbb)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-09 09:59:42 +01:00
patchback[bot]
caebf65948
[PR #11048/ebf45260 backport][stable-12] remove conditional code for old snakes (#11050)
remove conditional code for old snakes (#11048)

* remove conditional code for old snakes

* remove conditional code for old snakes

* reformat

* add changelog frag

(cherry picked from commit ebf45260ce)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-11-08 20:55:09 +01:00
patchback[bot]
16f1d07509
[PR #11043/3478863e backport][stable-12] Address issues reported by ruff check (#11047)
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.

(cherry picked from commit 3478863ef0)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-11-08 09:49:52 +01:00
Felix Fontein
340ff8586d Reformat everything. 2025-11-01 13:46:53 +01:00
Felix Fontein
3f2213791a
Cleanup: use f-strings instead of str.format() (#11017)
Address UP032: use f-strings instead of str.format().
2025-11-01 12:04:33 +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
Alexei Znamensky
c889a4cb6d
deprecate oneandone modules (#10994)
* deprecate oneandone modules

* add mod util to runtime.yml

* add changelog frag

* change deprecation version to 13.0.0

* change deprecation version to 13.0.0 in readme.yml as well

* Update changelogs/fragments/10994-oneandone-deprecation.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-10-29 08:13:55 +13:00
Alexei Znamensky
6829a064a5
dimensiondata: deprecation (#10986)
* dimensiondata: deprecation

* add changelog frag

* typo

* Update changelogs/fragments/10986-deprecation-dimensiondata.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-10-28 10:50:56 +13:00
Alexei Znamensky
032d398c0a
module utils: use f-strings (#10979)
* module utils: use f-strings

* add changelog frag
2025-10-26 08:01:38 +01:00
Alexei Znamensky
d86340b9d3
modules a*: use f-strings (#10942)
* modules a*: use f-strings

* add changelog frag

* add changelog frag

* rename chglof frag file
2025-10-23 06:50:32 +02:00
Alexei Znamensky
0feabaa7da
keycloak: use f-strings (#10941)
* keycloak: use f-strings

* remove nested f-str

* add changelog frag
2025-10-22 23:17:06 +02:00
Alexei Znamensky
728856f611
redfish_utils module utils: use f-strings (#10939)
* redfish_utils: use f-strings

* add changelog frag

* remove nested f-str
2025-10-22 23:15:41 +02:00
Marius Bertram
c850e209ab
Add support for client auth in Keycloak cllient secrets module (#10933)
* keycloak: add client authentication support for client_secret

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

* readd ['token', 'auth_realm']

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

---------

Signed-off-by: Marius Bertram <marius@brtrm.de>
2025-10-19 21:12:41 +02:00
Alexei Znamensky
d4dfc217d8
xenserver: use f-strings (#10940)
* xenserver: use f-strings

* add changelog frag
2025-10-19 17:40:28 +02:00
Felix Fontein
9dedd77459
Add __init__.py to work around ansible-test/pylint bug (#10926)
Add __init__.py to work around ansible-test/pylint bug.
2025-10-15 21:42:55 +02:00
Alexei Znamensky
07cfd6c4b4
update code to python3 (#10903)
* update code to python3

* add changelog frag

* rollback adjustment for plugins/lookup/lmdb_kv.py

* accept PR suggestion for plugins/module_utils/utm_utils.py

* accept PR suggestion for plugins/module_utils/vexata.py

* Apply suggestions from code review

* Update changelogs/fragments/10903-2to3.yml

* Update changelogs/fragments/10903-2to3.yml
2025-10-12 11:05:57 +02:00
Alexei Znamensky
85053728ce
linode module utils: update import to recent Ansible level (#10906)
* linode module utils: update import to recent Ansible level

* add changelog frag
2025-10-11 13:42:19 +02:00
Alexei Znamensky
cc83188594
module utils: update code to python3 (#10907)
* module utils: update code to python3

* add changelog frag
2025-10-11 13:42:11 +02:00
Alexei Znamensky
b85e263466
use f-strings in module utils (#10901)
* use f-strings in module utils

* Apply suggestions from code review

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

* remove unused imports

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-10-11 11:43:43 +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
Alexei Znamensky
5f471b8e5b
refactor dict from literal list (#10891)
* refactor dict from literal list

* add changelog frag
2025-10-10 19:09:10 +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
Alexei Znamensky
750adb431a
pipx: adjustments for pipx 1.8.0 (#10874)
* pipx: adjustments for pipx 1.8.0

* add changelog frag

* typo
2025-10-05 07:06:01 +02:00
Jakub Danek
b865bf5751
Fix keycloak sub-group search (#10840)
* fix bug in missing realm argument when searching for groups

* MR change fragment

* 39+1=40
2025-09-21 20:27:42 +02:00