Compare commits

...

294 Commits

Author SHA1 Message Date
Felix Fontein
7f63f47efc Release 10.7.6. 2025-11-02 13:02:24 +01:00
patchback[bot]
be65a9f345 [PR #11001/eb6337c0 backport][stable-10] omapi_host: fix bytes vs. str confusion (#11021)
omapi_host: fix bytes vs. str confusion (#11001)

* omapi_host: fix bytes vs. str confusion

After an update of the control node from Debian
bookworm to trixie, the omapi_host module fails to
work with the error message:

Key of type 'bytes' is not JSON serializable by the
'module_legacy_m2c' profile.

https://github.com/ansible/ansible/issues/85937 had the
same error, but the fix is a bit more intricate here
because the result dict is dynamically generated from
an API response object.

This also fixes unpacking the MAC and IP address and
hardware type, which were broken for Python3.

* Merge suggestion for changelog fragment



* do not unpack_ip twice

Noticed by Felix Fontein <felix@fontein.de>

* mention py3k in changelog fragment, too

---------


(cherry picked from commit eb6337c0c9)

Co-authored-by: mirabilos <tg@mirbsd.org>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-10-30 20:27:54 +01:00
patchback[bot]
044831904c [PR #11005/54af64ad backport][stable-10] keycloak_user: mark credentials[].value as no_log=True (#11011)
keycloak_user: mark credentials[].value as no_log=True (#11005)

Mark credentials[].value as no_log=True.

(cherry picked from commit 54af64ad36)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-10-29 17:15:33 +00:00
patchback[bot]
0ed510a050 [PR #10955/e84f59a6 backport][stable-10] fix(pritunl_user): improve resilience to null or missing user parameters (#11013)
fix(pritunl_user): improve resilience to null or missing user parameters (#10955)

* fix(pritunl_user): improve resilience to null or missing user parameters

* added changelog fragment - 10955

* standardize 10955 changelog fragment content



* simplify user params comparison



* simplify list fetch



* simplify remote value retrieval



---------



(cherry picked from commit e84f59a62d)

Co-authored-by: David Jenkins <david.jenkins@twosixtech.com>
Co-authored-by: djenkins <djenkins@twosix.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-10-29 17:15:21 +00:00
patchback[bot]
103bde7764 [PR #10965/ce0d06b3 backport][stable-10] onepassword: extend CLI class initialization with additional parameters (#11006)
onepassword: extend CLI class initialization with additional parameters (#10965)

* onepassword: extend CLI class initialization with additional parameters

* add changelog fragment 10965-onepassword-bugfix.yml

* Update changelogs/fragments/10965-onepassword-bugfix.yml



---------


(cherry picked from commit ce0d06b306)

Co-authored-by: Matthew <mjmjelde@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-10-28 21:38:27 +01:00
patchback[bot]
b8f55cccdf [PR #11003/9cb619ff backport][stable-10] [stable-11] terraform: Fix bug when None values aren't processed correctly (#10961) (#11004)
[stable-11] terraform: Fix bug when None values aren't processed correctly (#10961) (#11003)

terraform: Fix bug when None values aren't processed correctly (#10961)

* terraform: Fix bug when None values aren't processed correctly

Just found that i can't pass null values as complex variables into terraform using this module, while i can do that with terraform itself. Fixed undesired behavior.

* chore: changelog fragment 10961-terraform-complexvars-null-bugfix.yaml

* Update changelogs/fragments/10961-terraform-complexvars-null-bugfix.yaml

* Update plugins/modules/terraform.py

* Update plugins/modules/terraform.py

* Fix condition to check for None type in terraform.py

---------

(cherry picked from commit af8c4fb95e)


(cherry picked from commit 9cb619ff6c)

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: nbragin4 <139489942+nbragin4@users.noreply.github.com>
2025-10-28 21:23:35 +01:00
Felix Fontein
b5abccfe31 Prepare 10.7.6. 2025-10-27 19:40:44 +01:00
Felix Fontein
335f6606fe [stable-10] Move ansible-core 2.16 to EOL CI (#10995)
Remove ansible-core 2.16 to EOL CI.
2025-10-27 19:16:21 +01:00
patchback[bot]
5bdbbd1f4f [PR #10988/f6781f65 backport][stable-10] CI: temporarily disable tests for copr (#10990)
CI: temporarily disable tests for copr (#10988)

Temporarily disable tests for copr.

(cherry picked from commit f6781f654e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-10-26 21:57:02 +01:00
patchback[bot]
3f67766bac [PR #10948/7572b46c backport][stable-10] filesystem: docs adjustments (#10951)
filesystem: docs adjustments (#10948)

(cherry picked from commit 7572b46c7b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-10-21 06:45:32 +02:00
patchback[bot]
6848d6a302 [PR #10918/7e666a9c backport][stable-10] fix(modules/gitlab_runner): Fix exception in check mode on new runners (#10943)
fix(modules/gitlab_runner): Fix exception in check mode on new runners (#10918)

* fix(modules/gitlab_runner): Fix exception in check mode on new runners

When a new runner is added in check mode, the role used to throw an
exception. Fix this by returning a valid runner object instead of a
boolean.

Fixes #8854

* docs: Add changelog fragment

(cherry picked from commit 7e666a9c31)

Co-authored-by: carlfriedrich <carlfriedrich@posteo.de>
2025-10-19 09:31:21 +02:00
patchback[bot]
0f8dd60627 [PR #10926/9dedd774 backport][stable-10] Add __init__.py to work around ansible-test/pylint bug (#10927)
Add __init__.py to work around ansible-test/pylint bug (#10926)

Add __init__.py to work around ansible-test/pylint bug.

(cherry picked from commit 9dedd77459)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-10-15 21:55:29 +02:00
Felix Fontein
4190629e61 [stable-10] Replace devel with stable-2.20 (#10925)
Replace devel with stable-2.20.
2025-10-15 13:36:06 +02:00
patchback[bot]
38d719da07 [PR #10914/c5253c50 backport][stable-10] build(deps): bump github/codeql-action from 3 to 4 in the ci group (#10916)
build(deps): bump github/codeql-action from 3 to 4 in the ci group (#10914)

Bumps the ci group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).

Updates `github/codeql-action` from 3 to 4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
...



(cherry picked from commit c5253c5007)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-13 09:57:46 +02:00
Felix Fontein
ea40a39a09 [stable-10] random_string: replace random.SystemRandom() with secrets.SystemRandom() (#10896)
random_string: replace random.SystemRandom() with secrets.SystemRandom() (#10893)

* random_string: replace random.SystemRandom() with secrets.SystemRandom()



* add the forgotten blank line



* Update changelogs/fragments/replace-random-with-secrets.yml



* readd the description



* Update changelogs/fragments/replace-random-with-secrets.yml



---------



(cherry picked from commit 14a858fd9c)

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Co-authored-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
2025-10-10 19:55:47 +02:00
patchback[bot]
67562860e2 [PR #10887/68b83451 backport][stable-10] pacman: link to yay bug report (#10889)
pacman: link to yay bug report (#10887)

Link to yay bug report.

(cherry picked from commit 68b8345199)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-10-10 08:10:26 +02:00
Felix Fontein
0ece2053f8 The next release will be 10.7.6. 2025-10-06 18:56:05 +02:00
Felix Fontein
3653dff68c Release 10.7.5. 2025-10-06 18:20:18 +02:00
Felix Fontein
171a028ef8 [stable-10] Avoid six in plugin code (#10873) (#10877)
Avoid six in plugin code (#10873)

Avoid six in plugin code.

(cherry picked from commit 6cd4665412)
2025-10-05 07:42:27 +02:00
Felix Fontein
4ab8f79eae [stable-10] Fix typos: s/the the/the/ (#10867) (#10869)
Fix typos: s/the the/the/ (#10867)

(cherry picked from commit 41b65161bd)

Co-authored-by: Pierre Riteau <pierre@stackhpc.com>
2025-09-30 21:58:26 +02:00
Felix Fontein
871e2809ed Add repository configuration to antsibull-nox.toml.
(cherry picked from commit e9b1788bb9)
2025-09-26 07:04:22 +02:00
patchback[bot]
ebf5dd9007 [PR #10857/68684a7a backport][stable-10] github_deploy_key: make sure variable exists before use (#10859)
github_deploy_key: make sure variable exists before use (#10857)

Make sure variable exists before use.

(cherry picked from commit 68684a7a4c)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-09-25 20:49:00 +02:00
patchback[bot]
054b369740 [PR #10852/648ff7db backport][stable-10] yaml cache plugin: make compatible with ansible-core 2.19 (#10855)
yaml cache plugin: make compatible with ansible-core 2.19 (#10852)

Make compatible with ansible-core 2.19.

(cherry picked from commit 648ff7db02)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-09-25 20:34:40 +02:00
Felix Fontein
f9598c8586 Prepare 10.7.5. 2025-09-21 20:45:23 +02:00
patchback[bot]
0b116fa1dc [PR #10840/b865bf57 backport][stable-10] Fix keycloak sub-group search (#10845)
Fix keycloak sub-group search (#10840)

* fix bug in missing realm argument when searching for groups

* MR change fragment

* 39+1=40

(cherry picked from commit b865bf5751)

Co-authored-by: Jakub Danek <danekja@users.noreply.github.com>
2025-09-21 20:44:25 +02:00
patchback[bot]
01d0f3ccb7 [PR #10832/0f23b9e3 backport][stable-10] Force Content-type header to application/json if is_pre740 is false (#10847)
Force Content-type header to application/json if is_pre740 is false (#10832)

* Force Content-type header to application/json if is_pre740 is false

* Remove response variable from fail_json module

* Add a missing blank line to match pep8 requirement

* Add changelog fragment of issue #10796

* Rename fragment section

* Improve fragment readability



---------



(cherry picked from commit 0f23b9e391)

Co-authored-by: X <2465124+broferek@users.noreply.github.com>
Co-authored-by: ludovic <ludovic.petetin@aleph-networks.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-09-21 20:44:08 +02:00
patchback[bot]
7a8c3346ff [PR #10829/7c40c6b6 backport][stable-10] Keycloak role fix changed status (#10838)
Keycloak role fix changed status (#10829)

* Exclude aliases before comparison

* add test

* fragment

* Update changelogs/fragments/10829-fix-keycloak-role-changed-status.yml



---------



(cherry picked from commit 7c40c6b6b5)

Co-authored-by: desand01 <desrosiers.a@hotmail.com>
Co-authored-by: Andre Desrosiers <andre.desrosiers@ssss.gouv.qc.ca>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-09-18 22:15:06 +02:00
patchback[bot]
f8acda70d2 [PR #10830/2bf8ae88 backport][stable-10] timezone: mention that Debian 13 also needs util-linux-extra (#10836)
timezone: mention that Debian 13 also needs util-linux-extra (#10830)

Mention that Debian 13 also needs util-linux-extra.

(cherry picked from commit 2bf8ae88be)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-09-18 22:14:54 +02:00
patchback[bot]
2eedbdc928 [PR #10822/0911db45 backport][stable-10] pipx: review tests (#10825)
pipx: review tests (#10822)

(cherry picked from commit 0911db457e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-09-13 10:30:45 +02:00
patchback[bot]
c251868e55 [PR #10818/d2e2395a backport][stable-10] Speed up tests in android_sdk module (#10820)
Speed up tests in android_sdk module (#10818)

changed the dependency that is used to test the functionality in android_sdk module. The previous dependency was ~100MB, the current one is ~6MB. This should speed up the tests a bit and reduce the traffic.

(cherry picked from commit d2e2395ae3)

Co-authored-by: Stanislav Shamilov <shamilovstas@protonmail.com>
2025-09-12 19:36:21 +02:00
patchback[bot]
e501974a9e [PR #10813/a7e4cee4 backport][stable-10] Remove obsolete test conditions (#10814)
Remove obsolete test conditions (#10813)

* Fedora 31 and 32 are EOL, remove conditions related


(cherry picked from commit a7e4cee47d)

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-09-12 06:41:17 +02:00
Felix Fontein
25a17e7b6e Release 10.7.4. 2025-09-08 18:57:25 +02:00
Felix Fontein
dc92cda736 Prepare 10.7.4. 2025-09-04 07:10:29 +02:00
patchback[bot]
ee895080fb [PR #10638/07ce0041 backport][stable-10] CI: Add Debian 13 Trixie (#10780)
CI: Add Debian 13 Trixie (#10638)

* Add Debian 13 Trixie to CI.

* Add adjustments.

* Disable one apache2_module test for Debian 13.

* Disable ejabberd_user test on Debian 13.

* Fix paramiko install.

* Skip cloud_init_data_facts on Debian 13.

* Fix postgresql setup.

* Fix timezone tests.

(cherry picked from commit 07ce00417d)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-31 16:49:56 +02:00
patchback[bot]
5436a0c602 [PR #10770/3cc4f28f backport][stable-10] minor fixes in doc guides (#10776)
minor fixes in doc guides (#10770)

(cherry picked from commit 3cc4f28fd7)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-08-31 12:10:44 +02:00
patchback[bot]
6b59a3c1f6 [PR #10752/f6003f61 backport][stable-10] selective: don't hard code ansible_loop_var 'item' (#10763)
selective: don't hard code ansible_loop_var 'item' (#10752)

* selective: don't hard code ansible_loop_var 'item'

* Add changelog fragment

* Update changelog message



---------


(cherry picked from commit f6003f61cc)

Co-authored-by: Hoang Nguyen <folliekazetani@protonmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-29 07:06:42 +02:00
patchback[bot]
02fa9106c6 [PR #10751/d6ad9beb backport][stable-10] kdeconfig: add support for kwriteconfig6 (#10761)
kdeconfig: add support for kwriteconfig6 (#10751)

* kdeconfig: add support for kwriteconfig6

Rationale:
With a minimal install of KDE Plasma 6, the kdeconfig module would systematically fail with the following error: `kwriteconfig is not installed.`
In this configuration, kwriteconfig6 is the only version of kwriteconfig installed, and the kdeconfig module did not not find it.

Fixes #10746

* Add changelog fragment

* Update changelogs/fragments/10751-kdeconfig-support-kwriteconfig6.yml



---------


(cherry picked from commit d6ad9beb58)

Co-authored-by: Thibault Geoffroy <33561374+nebularnoise@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-29 07:00:00 +02:00
patchback[bot]
94699318e2 [PR #10743/469e557b backport][stable-10] monit: handle arbitrary error status (#10759)
monit: handle arbitrary error status (#10743)

* handle arbitrary error status

* add changelog fragment

* mock module in test

* Update changelogs/fragments/10743-monit-handle-unknown-status.yml



---------


(cherry picked from commit 469e557b95)

Co-authored-by: Simon Kelly <skelly@dimagi.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-28 22:18:02 +02:00
patchback[bot]
0dab7c8f3b [PR #10755/9d0866bf backport][stable-10] Add ignores necessary for ansible-core 2.20 (#10756)
* Add ignores necessary for ansible-core 2.20 (#10755)

Add ignores necessary for ansible-core 2.20 if Python 2.7 is still supported by the collection.

(cherry picked from commit 9d0866bfb8)

* Add missing ignore.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-28 21:56:44 +02:00
patchback[bot]
e29c1fe51f [PR #10732/5ee02297 backport][stable-10] ssh_config tests: remove paramiko version restriction (#10734)
ssh_config tests: remove paramiko version restriction (#10732)

Remove paramiko version restriction for ssh_config tests.

(cherry picked from commit 5ee02297b0)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-25 07:26:00 +02:00
patchback[bot]
196f9b1bac [PR #10728/82b37bdb backport][stable-10] pacman: re-enable yay test (#10730)
pacman: re-enable yay test (#10728)

Re-enable yay test.

(cherry picked from commit 82b37bdb56)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-25 06:57:37 +02:00
patchback[bot]
4f6f4b343f [PR #10706/5eab0f24 backport][stable-10] CI: Remove no longer necessary constraints (#10722)
CI: Remove no longer necessary constraints (#10706)

Remove no longer necessary constraints.

(cherry picked from commit 5eab0f2419)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-23 19:24:19 +02:00
patchback[bot]
6d75ac4fb3 [PR #10701/3b9acafc backport][stable-10] update requirements for Python versions currently used (#10702)
update requirements for Python versions currently used (#10701)

(cherry picked from commit 3b9acafc72)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-08-19 07:14:03 +02:00
patchback[bot]
eca2094831 [PR #10695/6827680c backport][stable-10] build(deps): bump actions/checkout from 4 to 5 in the ci group (#10697)
build(deps): bump actions/checkout from 4 to 5 in the ci group (#10695)

Bumps the ci group with 1 update: [actions/checkout](https://github.com/actions/checkout).

Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
...



(cherry picked from commit 6827680cda)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-18 18:27:59 +02:00
Felix Fontein
8a6fb28296 [stable-10] ansible-core 2.20: avoid deprecated functionality (#10687) (#10694)
ansible-core 2.20: avoid deprecated functionality (#10687)

Avoid deprecated functionality.

(cherry picked from commit 47e8a3c193)
2025-08-18 05:18:40 +00:00
patchback[bot]
6d94f0acbe [PR #10688/ceba0cbe backport][stable-10] pids: avoid type error if name is empty (#10691)
pids: avoid type error if name is empty (#10688)

Avoid type error if name is empty.

(cherry picked from commit ceba0cbedb)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-18 06:41:22 +02:00
patchback[bot]
ce05de750e [PR #10617/c84f16c5 backport][stable-10] scaleway_lb: fix RETURN docs (#10685)
scaleway_lb: fix RETURN docs (#10617)

* scaleway_lb: fix RETURN docs

* remove outer dict from sample content

(cherry picked from commit c84f16c5e9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-08-17 17:28:37 +02:00
patchback[bot]
31f1b9a7c7 [PR #10423/735a066d backport][stable-10] apache2_module: updated cgi action conditions (#10681)
apache2_module: updated cgi action conditions (#10423)

* apache2_module: updated cgi action conditions

Only the activation of the cgi module in threaded mode should be a
restriction due to apache2 limitations, not the deactivation.
Especially when the cgi module isn't enabled yet at all. Fixes #9140

* bug(fix): apache2_module fails to disable cgi module

* Update changelog fragment.

---------


(cherry picked from commit 735a066d92)

Co-authored-by: Daniel Hoffend <dh@dotlan.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-17 13:12:52 +02:00
patchback[bot]
46790b3dcb [PR #10674/dfc2a54d backport][stable-10] pacman: temporary disable yay test (#10677)
pacman: temporary disable yay test (#10674)

Temporary disable pacman yay test.

(cherry picked from commit dfc2a54d16)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-15 21:03:32 +02:00
patchback[bot]
41aa6bc450 [PR #10668/d84d2397 backport][stable-10] ipa_*: adjust common connection notes to modules (#10670)
ipa_*: adjust common connection notes to modules (#10668)

(cherry picked from commit d84d2397b9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-08-15 20:14:12 +02:00
patchback[bot]
15b0eb155b [PR #10657/3c0d6074 backport][stable-10] jc filter: remove skips for FreeBSD (#10658)
jc filter: remove skips for FreeBSD (#10657)

(cherry picked from commit 3c0d60740c)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-08-12 09:58:14 +02:00
patchback[bot]
169b65b43e [PR #10653/eb5708a1 backport][stable-10] CI: Make sure to install Java in Debian Bullseye (#10655)
CI: Make sure to install Java in Debian Bullseye (#10653)

Make sure to install Java in Debian Bullseye.

(cherry picked from commit eb5708a125)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-12 01:21:32 +02:00
Felix Fontein
f71f8e608d The next release will be 10.7.4. 2025-08-11 22:25:36 +02:00
Felix Fontein
fb6f4760ae Release 10.7.3. 2025-08-11 21:36:00 +02:00
patchback[bot]
ae041e56c6 [PR #10649/bc90635e backport][stable-10] pipx examples and tests: fix terminology (#10650)
pipx examples and tests: fix terminology (#10649)

Fix terminology.

(cherry picked from commit bc90635e66)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-11 21:17:21 +02:00
patchback[bot]
b3fecf0b6f [PR #10615/993e3a73 backport][stable-10] ipa_*: add common connection notes to modules (#10640)
ipa_*: add common connection notes to modules (#10615)

* ipa_*: add common connection notes to modules

* Update plugins/doc_fragments/ipa.py



* Update plugins/doc_fragments/ipa.py



---------


(cherry picked from commit 993e3a736e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-11 07:18:04 +02:00
patchback[bot]
59e8eca4c8 [PR #10618/4e8a6c03 backport][stable-10] infinity: improve RV descriptions (#10623)
infinity: improve RV descriptions (#10618)

(cherry picked from commit 4e8a6c03dd)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-08-10 13:48:12 +02:00
patchback[bot]
e95a3b5215 [PR #10570/c7e18306 backport][stable-10] CI: python-jenkins 1.8.3 fails to import on Python 2.7 (#10571)
CI: python-jenkins 1.8.3 fails to import on Python 2.7 (#10570)

python-jenkins 1.8.3 fails to import on Python 2.7.

(cherry picked from commit c7e18306fb)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-03 14:13:20 +02:00
patchback[bot]
235a851350 [PR #10566/14f706c5 backport][stable-10] merge_variables lookup: avoid deprecated Templar.set_temporary_context (#10568)
merge_variables lookup: avoid deprecated Templar.set_temporary_context (#10566)

Avoid deprecated Templar.set_temporary_context.

(cherry picked from commit 14f706c5dd)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-03 13:08:48 +02:00
patchback[bot]
5584998e0e [PR #10550/ac4aca20 backport][stable-10] diy callback: add test for on_any_msg (#10551)
diy callback: add test for on_any_msg (#10550)

Add test for on_any_msg.

(cherry picked from commit ac4aca2004)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-02 17:30:47 +02:00
patchback[bot]
8b259f8bc1 [PR #10539/3de073fb backport][stable-10] json_query: extend list of type aliases for compatibility with ansible-core 2.19 (#10559)
json_query: extend list of type aliases for compatibility with ansible-core 2.19 (#10539)

* Extend list of type aliases for json_query.

* Improve tests.



---------


(cherry picked from commit 3de073fb6f)

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-08-02 17:30:26 +02:00
patchback[bot]
24789f86fa [PR #10532/abfe1e61 backport][stable-10] apk: fix empty/whitespace-only package name check (#10555)
apk: fix empty/whitespace-only package name check (#10532)

* Fix empty/whitespace-only package name check.

* Adjust test.

(cherry picked from commit abfe1e6180)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-02 17:30:19 +02:00
patchback[bot]
ddbfbcb47e [PR #10455/bd84f654 backport][stable-10] Improve capabilities module by detecting /sbin/getcap error message and stop early with a meaningful error message (#10562)
Improve capabilities module by detecting /sbin/getcap error message and stop early with a meaningful error message (#10455)

* modules/capabilities.py: fail & propagate if getcap command error

* Fix comment spacing (pep8)

* Add changelogs fragment for PR 10455

* Update changelogs/fragments/10455-capabilities-improve-error-detection.yml



---------



(cherry picked from commit bd84f65456)

Co-authored-by: hakril <github@hakril.net>
Co-authored-by: clement rouault <clement.rouault@exatrack.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-02 17:30:10 +02:00
Felix Fontein
69563766ec [stable-10] Disable pipelining for doas and machinectl on ansible-core 2.19+ (#10537) (#10561)
Disable pipelining for doas and machinectl on ansible-core 2.19+ (#10537)

Disable pipelining for doas and machinectl.

(cherry picked from commit 9a29622584)
2025-08-02 17:29:52 +02:00
Felix Fontein
4c7f64b121 [stable-10] Backport fixes from community.proxmox (#10553)
* Import paramiko directly.

8f90ab075c

* Remove deprecated disable_lookups parameter.

c0fc31241b
2025-08-02 17:29:42 +02:00
patchback[bot]
1e397ace75 [PR #10543/7298f25f backport][stable-10] Fix no longer valid constructs in tests (#10546)
Fix no longer valid constructs in tests (#10543)

Fix no longer valid constructs in tests.

(cherry picked from commit 7298f25fe0)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-02 09:04:34 +02:00
patchback[bot]
71349d7e1d [PR #10531/d0b0aff5 backport][stable-10] wsl connection: import paramiko directly (#10533)
wsl connection: import paramiko directly (#10531)

Import paramiko directly.

(cherry picked from commit d0b0aff5bc)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-01 11:18:47 +02:00
patchback[bot]
19de563a1d [PR #10506/84b5d38c backport][stable-10] Change description of nopasswd parameter for sudoers to be more clear (#10518)
Change description of nopasswd parameter for sudoers to be more clear (#10506)

Update sudoers.py

Made the description of nopasswd more clear

(cherry picked from commit 84b5d38c51)

Co-authored-by: freyja <github.com.tidy739@passinbox.com>
2025-07-30 06:54:00 +02:00
Felix Fontein
e550a0f58f [stable-10] CI: Add Python 3.14 unit tests (#10511) (#10517)
* CI: Add Python 3.14 unit tests (#10511)

* Add Python 3.14 unit tests.

* Skip test if github cannot be imported.

It currently cannot be imported because nacl isn't compatible with Python 3.14 yet,
and importing github indirectly tries to import nacl, which fails as it uses a
type from typing that got removed in 3.14.

* Skip test if paramiko cannot be imported.

(cherry picked from commit 6ce9f805a8)

* Skip proxmox connection test if paramiko cannot be imported.
2025-07-30 06:53:42 +02:00
patchback[bot]
eaa1f7c841 [PR #10508/69bcb88e backport][stable-10] Update Python versions for CI (#10509)
Update Python versions for CI (#10508)

* Update Python versions for CI.

* Disable Python 3.14 temporarily.

(cherry picked from commit 69bcb88efe)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-29 17:38:34 +02:00
patchback[bot]
7a653bff94 [PR #10485/15d3ea12 backport][stable-10] remove common return values from docs (#10502)
remove common return values from docs (#10485)

* remove common return values from docs

* pacman: add note about version added of RV

(cherry picked from commit 15d3ea123d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-07-28 18:59:39 +02:00
patchback[bot]
c8360e7d1a [PR #10445/1f8b5eea backport][stable-10] cronvar: Handle empty value string properly (#10495)
cronvar: Handle empty value string properly (#10445)

* Fix empty  value issue  in cronvar

* Update changelog

* Update plugins/modules/cronvar.py



* Update changelogs/fragments/10445-cronvar-reject-empty-values.yml



* Update tests/integration/targets/cronvar/tasks/main.yml



* Update tests/integration/targets/cronvar/tasks/main.yml



* Accept empty strings on cronvar

* Update plugins/modules/cronvar.py



* Update main.yml



---------


(cherry picked from commit 1f8b5eea4c)

Co-authored-by: Giorgos Drosos <56369797+gdrosos@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-28 06:47:10 +02:00
patchback[bot]
94d33854b3 [PR #10491/de0618b8 backport][stable-10] irc: fix wrap_socket() call when validate_certs=true and use_tls=true (#10498)
irc: fix wrap_socket() call when validate_certs=true and use_tls=true (#10491)

Fix wrap_socket() call when validate_certs=true and use_tls=true.

(cherry picked from commit de0618b843)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-28 06:46:56 +02:00
Felix Fontein
3d088b68ec Normalize changelog configs.
(cherry picked from commit a692888478)
2025-07-27 16:37:03 +02:00
patchback[bot]
7b8fa38878 [PR #10466/7b05484d backport][stable-10] doc style adjustments: modules [rtuvx]* (#10488)
doc style adjustments: modules [rtuvx]* (#10466)

* doc style adjustments: modules r*

* doc style adjustments: modules t*

* doc style adjustments: modules u*

* doc style adjustments: modules v*

* doc style adjustments: modules x*

* Update plugins/modules/redis_data.py



---------


(cherry picked from commit 7b05484d8f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-27 16:27:18 +02:00
Felix Fontein
6bf1eead47 Prepare 10.7.3. 2025-07-27 12:15:21 +02:00
patchback[bot]
478100011b [PR #10463/d288555f backport][stable-10] doc style adjustments: modules p* (#10467)
doc style adjustments: modules p* (#10463)

* doc style adjustments: modules p*

* Update plugins/modules/pacemaker_resource.py

* Update plugins/modules/pagerduty_alert.py

* Update plugins/modules/pear.py

* Update plugins/modules/portage.py

* reformat

* adjustment from review

* Update plugins/modules/pkg5_publisher.py



---------


(cherry picked from commit d288555fd9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Peter Oliver <github.com@mavit.org.uk>
2025-07-27 12:13:49 +02:00
patchback[bot]
7ac342e237 [PR #10459/ee783066 backport][stable-10] Fix ansible-core 2.19 deprecations (#10470)
Fix ansible-core 2.19 deprecations (#10459)

Do not return warnings.

(cherry picked from commit ee7830667a)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-27 12:13:38 +02:00
patchback[bot]
e2573de08d [PR #10461/cc13f42b backport][stable-10] Fix cronvar crash when parent dir of cron_file is missing (#10473)
Fix cronvar crash when parent dir of cron_file is missing (#10461)

* Fix cronvar crash on non existent directories

* Update changelog

* Fix small variable bug

* Fix trailing witespace

* Fix CI issues

* Update changelogs/fragments/10461-cronvar-non-existent-dir-crash-fix.yml



* Update plugins/modules/cronvar.py



---------


(cherry picked from commit cc13f42be4)

Co-authored-by: Giorgos Drosos <56369797+gdrosos@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-27 12:13:23 +02:00
patchback[bot]
4412bdba9b [PR #10458/fe59c6d2 backport][stable-10] listen_ports_facts: Avoid crash when required commands are missing (#10475)
listen_ports_facts: Avoid crash when required commands are missing (#10458)

* Fix listen-port-facts crash

* Update changelog

* Update tests/integration/targets/listen_ports_facts/tasks/main.yml



* Fix sanity tests

* Update changelogs/fragments/10458-listen_port_facts-prevent-type-error.yml



---------


(cherry picked from commit fe59c6d29e)

Co-authored-by: Giorgos Drosos <56369797+gdrosos@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-27 12:13:07 +02:00
patchback[bot]
374270d242 [PR #10442/3ad57ffa backport][stable-10] Ensure apk handles empty name strings properly (#10477)
Ensure apk handles empty name strings properly (#10442)

* Ensure apk handles empty name strings

* Update changelog

* Update tests/integration/targets/apk/tasks/main.yml



* Update changelogs/fragments/10442-apk-fix-empty-names.yml



* Remove redundant conditional

* Remove redundant ignore errors

* Reject apk with update cache for empty package names

---------


(cherry picked from commit 3ad57ffa67)

Co-authored-by: Giorgos Drosos <56369797+gdrosos@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-27 12:12:58 +02:00
patchback[bot]
4c1077b2a0 [PR #10462/b458ee85 backport][stable-10] CI: Bump Alpine 3.21 to 3.22, Fedora 41 to 42, and FreeBSD 14.2 to 14.3 (#10464)
CI: Bump Alpine 3.21 to 3.22, Fedora 41 to 42, and FreeBSD 14.2 to 14.3 (#10462)

* Bump Alpine 3.21 to 3.22, Fedora 41 to 42, RHEL 9.5 to 9.6, and FreeBSD 14.2 to 14.3.

Add old versions to stable-2.19 if not present yet.

* Add some expected skips.

* Add more restrictions.

* Another try for Android tests.

* Another try.

* Another try.

(cherry picked from commit b458ee85ce)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-26 14:59:32 +02:00
patchback[bot]
a4f4a25b16 [PR #10446/01f3248a backport][stable-10] CI: Replace FreeBSD 13.3 with 13.5 (#10448)
CI: Replace FreeBSD 13.3 with 13.5 (#10446)

Replace FreeBSD 13.3 with 13.5.

(cherry picked from commit 01f3248a12)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-24 22:13:38 +02:00
patchback[bot]
17f5a5b575 [PR #10433/69d479f0 backport][stable-10] doc style adjustments: modules [lm]* (#10437)
doc style adjustments: modules [lm]* (#10433)

* doc style adjustments: modules l*

* doc style adjustments: modules m*

* Apply suggestions from code review



* Update plugins/modules/logstash_plugin.py



---------


(cherry picked from commit 69d479f06c)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-21 22:35:21 +02:00
Vladimir Botka
0be6e61b31 [stable-10] sysrc: Use shlex (#10400)
* Fix #10394 Use configparser.

* Fix #10394 configparser is in Python3 only.

* Fix #10394 return condition.

* Fix #10394 Use ConfigParser with Python2.

* Fix #10394 import configparser from ansible.module_utils.six.moves

* Add changelog fragment.

* Update changelogs/fragments/10400-sysrc.yml

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

* Fix #10394 use shlex instead of configparser.

* Update fragment.

* Update changelogs/fragments/10400-sysrc.yml

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

* Update plugins/modules/sysrc.py

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

* Apply suggestions from code review.

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

* Copy tests from #10417.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-07-21 22:07:30 +02:00
patchback[bot]
36978d71e1 [PR #10428/bc4d06ef backport][stable-10] Fix dnf_versionlock examples (#10430)
Fix dnf_versionlock examples (#10428)

Fix dnf_versionlock examples.

(cherry picked from commit bc4d06ef34)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-18 23:23:47 +02:00
Felix Fontein
3cc62e3827 The next release will be 10.7.3. 2025-07-14 16:28:21 +02:00
Felix Fontein
e5f290e885 Release 10.7.2. 2025-07-14 15:39:20 +02:00
patchback[bot]
003f9e498e [PR #10409/a36ad54b backport][stable-10] doc style adjustments: modules i* (#10410)
doc style adjustments: modules i* (#10409)

(cherry picked from commit a36ad54b53)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-07-14 15:34:36 +02:00
patchback[bot]
700bb27d51 [PR #10399/4801b0fc backport][stable-10] manageiq_provider: fix docs markup (#10406)
manageiq_provider: fix docs markup (#10399)

* Fix docs markup.

* Add one more.



* Update plugins/modules/manageiq_provider.py



* More fixes.

---------



(cherry picked from commit 4801b0fc00)

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-07-14 07:47:50 +02:00
patchback[bot]
07c68cb7f1 [PR #10397/5e2ffb84 backport][stable-10] doc style adjustments: modules [cd]* (#10404)
doc style adjustments: modules [cd]* (#10397)

* doc style adjustments: modules c*

* doc style adjustments: modules d*

* Update plugins/modules/consul_agent_check.py



---------


(cherry picked from commit 5e2ffb845f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-14 07:23:05 +02:00
patchback[bot]
e9f0fcac0d [PR #10398/717ef511 backport][stable-10] doc style adjustments: modules [efgh]* (#10402)
doc style adjustments: modules [efgh]* (#10398)

* doc style adjustments: modules e*

* doc style adjustments: modules f*

* doc style adjustments: modules g*

* doc style adjustments: modules h*

* Update plugins/modules/easy_install.py



---------


(cherry picked from commit 717ef51137)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-13 15:50:28 +00:00
patchback[bot]
a2e198d8a7 [PR #10333/731f0be3 backport][stable-10] Configure LUKS encrypted volume using crypttab (#10389)
Configure LUKS encrypted volume using crypttab (#10333)

(cherry picked from commit 731f0be3f4)

Co-authored-by: Aditya Putta <puttaa@yahoo.com>
2025-07-12 12:50:11 +02:00
patchback[bot]
9ccb6e029d [PR #10385/baf1cdec backport][stable-10] Enable hg integration test (#10391)
Enable hg integration test (#10385)

Fixes: #10044


(cherry picked from commit baf1cdec09)

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-07-12 12:43:02 +02:00
patchback[bot]
adf0f41b4b [PR #10380/20e9ef87 backport][stable-10] community.general.easy_install : use of the virtualenv_command parameter (#10387)
community.general.easy_install :  use of the virtualenv_command parameter (#10380)

* community.general.easy_install :  use of the virtualenv_command parameter

* Apply suggestions from code review

---------


(cherry picked from commit 20e9ef877f)

Co-authored-by: Aditya Putta <puttaa@yahoo.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-07-12 12:33:12 +02:00
patchback[bot]
63a8f1e89f [PR #10363/1a7aafc0 backport][stable-10] lvg examples: use YAML lists (#10381)
lvg examples: use YAML lists (#10363)

Use YAML lists.

(cherry picked from commit 1a7aafc037)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-11 07:26:07 +02:00
patchback[bot]
76de353377 [PR #10374/a0200d11 backport][stable-10] Disable lmdb_kv integration tests (#10377)
Disable lmdb_kv integration tests (#10374)

Disable lmdb_kv integration tests.

(cherry picked from commit a0200d1130)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-10 22:07:31 +02:00
patchback[bot]
960ed5acfd [PR #10345/096fa388 backport][stable-10] logstash: Remove reference to Python 2 library (#10373)
logstash: Remove reference to Python 2 library (#10345)

* logstash: Remove reference to Python 2 library



* Review requests



* Apply suggestions from code review



---------



(cherry picked from commit 096fa388ac)

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-09 06:31:19 +02:00
patchback[bot]
f636201450 [PR #10339/e5b37c3f backport][stable-10] github_release - support multiple type of tokens (#10372)
github_release - support multiple type of tokens (#10339)

* Support multiple type of tokens

* Add missing spaces around operator.

* Add changelog fragments.

* fix logic, missing NOT

* Update changelogs/fragments/10339-github_app_access_token.yml



---------


(cherry picked from commit e5b37c3ffd)

Co-authored-by: Bruno Lavoie <bl@brunol.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-08 22:30:00 +02:00
Felix Fontein
fb01bf6ff7 Prepare 10.7.2. 2025-07-08 21:11:22 +02:00
patchback[bot]
8569e7eb58 [PR #10359/16d6e4a8 backport][stable-10] dependent lookup: avoid deprecated ansible-core 2.19 functionality (#10365)
dependent lookup: avoid deprecated ansible-core 2.19 functionality (#10359)

* Avoid deprecated ansible-core 2.19 functionality.

* Adjust unit tests.

(cherry picked from commit 16d6e4a8e5)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-08 06:52:54 +02:00
patchback[bot]
c100ecda2c [PR #10349/4195cbb3 backport][stable-10] incus_connection: Improve error handling (#10361)
incus_connection: Improve error handling (#10349)

Related to #10344

This tweaks the error handling logic to work with more versions of Incus
as well as catching some of the project and instance access errors.

The full context (instance name, project name and remote name) is now
included so that the user can easily diagnose access problems.


(cherry picked from commit 4195cbb364)

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Co-authored-by: Stéphane Graber <stgraber@stgraber.org>
2025-07-07 21:06:09 +02:00
patchback[bot]
f33f50cf2c [PR #10334/79509a53 backport][stable-10] flatpak: add docs example for install using custom executable path (#10358)
flatpak: add docs example for install using custom executable path (#10334)

(cherry picked from commit 79509a533d)

Co-authored-by: Aditya Putta <puttaa@yahoo.com>
2025-07-06 13:34:42 +02:00
patchback[bot]
452d6f2fa7 [PR #10336/dd135920 backport][stable-10] lvg: add docs example for preserving existing PVs in a volume group using remove_extra_pvs: false (#10355)
lvg: add docs example for preserving existing PVs in a volume group using `remove_extra_pvs: false` (#10336)

(cherry picked from commit dd13592034)

Co-authored-by: Aditya Putta <puttaa@yahoo.com>
2025-07-06 13:34:27 +02:00
patchback[bot]
f3828ba9ca [PR #10335/2ec3d022 backport][stable-10] jenkins_build: docs example for trigger with custom polling interval (#10354)
jenkins_build: docs example for trigger with custom polling interval (#10335)

(cherry picked from commit 2ec3d02215)

Co-authored-by: Aditya Putta <puttaa@yahoo.com>
2025-07-06 13:34:18 +02:00
patchback[bot]
b4eb8e5e22 [PR #10337/5ef1cad6 backport][stable-10] Using add_keys_to_agent in ssh_config module (#10351)
Using add_keys_to_agent in ssh_config module (#10337)

* Using add_keys_to_agent in ssh_config module

* removed white space

* Apply suggestion

---------


(cherry picked from commit 5ef1cad64f)

Co-authored-by: Aditya Putta <puttaa@yahoo.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-07-06 13:34:05 +02:00
Felix Fontein
8c02531c56 Adjust README.
(cherry picked from commit 4323058809)
2025-07-01 22:37:19 +02:00
patchback[bot]
41171a02b7 [PR #10319/dd3c253b backport][stable-10] CI: Add stable-2.19 (#10320)
CI: Add stable-2.19 (#10319)

* Add ignore-2.20.txt.

* Add stable-2.19 to CI.

(cherry picked from commit dd3c253b78)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-01 21:31:29 +02:00
patchback[bot]
84a6f610f7 [PR #10313/cc2e0679 backport][stable-10] htpasswd: doc adjustment (#10316)
htpasswd: doc adjustment (#10313)

(cherry picked from commit cc2e067907)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-06-30 20:33:01 +02:00
patchback[bot]
2f623b7398 [PR #10304/7d06be1c backport][stable-10] fix typo in ipa_dnsrecord module examples (#10307)
fix typo in ipa_dnsrecord module examples (#10304)

[FIX] Typo in ipa_dnsrecord example

Simple comma instead of a period, easy mistake.

(cherry picked from commit 7d06be1c20)

Co-authored-by: alice seaborn <seaborn@lavabit.com>
2025-06-26 22:10:58 +02:00
patchback[bot]
4e73ae1a86 [PR #10297/af8c586e backport][stable-10] Docs: use :anscollection: (#10300)
Docs: use :anscollection: (#10297)

Use :anscollection:.
(cherry picked from commit af8c586e29)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-25 22:03:51 +02:00
patchback[bot]
392f5b4702 [PR #10282/d4f2b2fb backport][stable-10] sl_vm: update docs about requirements (#10283)
sl_vm: update docs about requirements (#10282)

* sl_vm: update docs about requirements

* Update plugins/modules/sl_vm.py

(cherry picked from commit d4f2b2fb55)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-06-19 21:33:48 +02:00
patchback[bot]
d5d8e1d188 [PR #10271/40fb0f0c backport][stable-10] Inventory plugins: remove deprecated disable_lookups parameter (which was set to its default anyway) (#10277)
Inventory plugins: remove deprecated disable_lookups parameter (which was set to its default anyway) (#10271)

* Remove default value for keyword argument that is deprecated since ansible-core 2.19.

* Add changelog fragment.

(cherry picked from commit 40fb0f0c75)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-18 21:52:53 +02:00
patchback[bot]
fbd0a80439 [PR #10272/5b14129c backport][stable-10] sysrc jail tests: FreeBSD 14.1 stopped working (#10274)
sysrc jail tests: FreeBSD 14.1 stopped working (#10272)

FreeBSD 14.1 stopped working.

(cherry picked from commit 5b14129c8f)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-18 21:52:39 +02:00
patchback[bot]
c55df29ec9 [PR #10264/74ed0fc4 backport][stable-10] import mocks from community.internal_test_tools (#10265)
import mocks from community.internal_test_tools (#10264)

(cherry picked from commit 74ed0fc438)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-06-17 21:24:11 +02:00
patchback[bot]
2405857338 [PR #10261/38ab1fbb backport][stable-10] Extra docs: normalize code block language (#10262)
Extra docs: normalize code block language (#10261)

Extra docs: normalize code block language.

(cherry picked from commit 38ab1fbb88)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-17 07:03:07 +02:00
Felix Fontein
1c6b9507bc Update CI schedule.
(cherry picked from commit 49d84e7b97)
2025-06-16 20:12:13 +02:00
Felix Fontein
9363356941 The next expected release will be 10.7.2. 2025-06-16 20:10:50 +02:00
Felix Fontein
7b92d84878 Release 10.7.1. 2025-06-16 19:38:21 +02:00
Felix Fontein
c8fe77c359 Fix .git-blame-ignore-revs. 2025-06-16 18:24:51 +02:00
patchback[bot]
d5465ff471 [PR #10189/24056110 backport][stable-10] pipx: Add example for installing package with dependency group (#10258)
pipx: Add example for installing package with dependency group (#10189)

* Add example for installing package with dependency group

* add tests

(cherry picked from commit 2405611092)

Co-authored-by: Robin <robin@rkslot.nl>
2025-06-16 18:16:49 +02:00
patchback[bot]
7cd8f6edff [PR #9692/e820f8f4 backport][stable-10] fix(keycloak): update more than 10 sub-groups (#9690) (#10259)
fix(keycloak): update more than 10 sub-groups (#9690) (#9692)

* fix(keycloak): update more than 10 sub-groups (#9690)

* Mention issue in changelog.

---------


(cherry picked from commit e820f8f43d)

Co-authored-by: Fabien Salles <contact@fabiensalles.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-16 18:07:02 +02:00
Felix Fontein
125cafb371 Ignore YAML reformatting commits. 2025-06-16 18:06:29 +02:00
Felix Fontein
9e11cd0813 Ignore YAML reformatting commits. 2025-06-16 18:05:55 +02:00
Felix Fontein
2b48825499 [stable-10] Adjust YAML in module docs (#10240) (#10257)
Adjust YAML in module docs (#10240)

* Adjust YAML in module docs.

* adjust modules

---------


(cherry picked from commit e8f965fbf8)

Co-authored-by: Alexei Znamensky <russoz@gmail.com>
2025-06-16 18:02:09 +02:00
patchback[bot]
8196cacff8 [PR #10234/d032de3b backport][stable-10] Adjust YAML in plugin docs (#10256)
Adjust YAML in plugin docs (#10234)

* Adjust YAML in plugin docs.

* Update ignore.txt.

* Forgot two indents.

* adjust connection plugins
adjust filter plugins
adjust inventory plugins
adjust lookup plugins

* Re-add YAML document start.

---------


(cherry picked from commit d032de3b16)

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <russoz@gmail.com>
2025-06-16 18:01:25 +02:00
patchback[bot]
bd4f1a3e5c [PR #10252/e938ca5f backport][stable-10] Adjust YAML in extra docs (#10255)
Adjust YAML in extra docs (#10252)

Adjust YAML in extra docs.

(cherry picked from commit e938ca5f20)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-16 17:50:43 +02:00
patchback[bot]
cfee3284cd [PR #10225/0aeb1b7b backport][stable-10] zypper_repository: handle repositories without <url/> element (#10251)
zypper_repository: handle repositories without <url/> element (#10225)

* zypper_repository: handle repositories without <url/> element

zypper_repository identifies repos using a combination of "alias"
and "url". Recently, openSUE has begun using "metalink" attributes
instead of "url" elements, causing errors like this:

  File "/tmp/ansible_zypper_repository_payload_euim_nod/ansible_zypper_repository_payload.zip/ansible_collections/community/general/plugins/modules/zypper_repository.py", line 475, in <module>
  File "/tmp/ansible_zypper_repository_payload_euim_nod/ansible_zypper_repository_payload.zip/ansible_collections/community/general/plugins/modules/zypper_repository.py", line 448, in main
  File "/tmp/ansible_zypper_repository_payload_euim_nod/ansible_zypper_repository_payload.zip/ansible_collections/community/general/plugins/modules/zypper_repository.py", line 223, in repo_exists
  File "/tmp/ansible_zypper_repository_payload_euim_nod/ansible_zypper_repository_payload.zip/ansible_collections/community/general/plugins/modules/zypper_repository.py", line 177, in _parse_repos
IndexError: list index out of range

Fix this by using the "metalink" attribute instead of the value
of the "url" element if the latter is missing.

* Update changelogs/fragments/10224-zypper_repository-metalink.yml



---------


(cherry picked from commit 0aeb1b7bb2)

Co-authored-by: Martin Wilck <mwilck@suse.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-15 13:17:58 +02:00
patchback[bot]
9c3e14701b [PR #10238/19568158 backport][stable-10] docs: add notes that dnf_* modules do not work with dnf5 (#10247)
docs: add notes that dnf_* modules do not work with dnf5 (#10238)

* Add notes that dnf_* modules do not work with dnf5.

* Apply suggestions from code review.



---------


(cherry picked from commit 1956815884)

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-06-15 11:39:37 +02:00
patchback[bot]
cae0457e0e [PR #10242/66cb9aef backport][stable-10] yaml callback: use new util introduced in ansible-core 2.19.0b2 (#10245)
yaml callback: use new util introduced in ansible-core 2.19.0b2 (#10242)

* Avoid repeating some code.

* Use new utility added for ansible-core 2.19.0b2.

* Lint.

* Add changelog fragment.

* transform_to_native_types() does not convert map keys.

To catch all tagged strings, we have to recursively walk the data structure then.

* Add test with vaulted string.

(cherry picked from commit 66cb9aefb5)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-15 11:12:08 +02:00
Felix Fontein
a9e892952d [stable-10] Adjust YAML files (#10233) (#10244)
Adjust YAML files (#10233)

Adjust YAML files.

(cherry picked from commit eaa5e07b28)
2025-06-15 10:02:03 +02:00
patchback[bot]
e8ff74f077 [PR #10223/bc99432f backport][stable-10] zypper_repository: fix usage of removed method ConfigParser.readfp() (#10236)
zypper_repository: fix usage of removed method ConfigParser.readfp() (#10223)

* zypper_repository: fix usage of removed method ConfigParser.readfp()

ConfigParser.readfp() has been removed in python 3.12.
See similar fix e.g. in https://github.com/ansible/ansible/pull/81657

This fixes the error message:
AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

* Update changelogs/fragments/10222-zypper_repository-readfp.yml



---------


(cherry picked from commit bc99432f89)

Co-authored-by: Martin Wilck <mwilck@suse.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-12 22:23:03 +02:00
patchback[bot]
0478b0c5a1 [PR #10228/a95448ca backport][stable-10] Update auto-generated .gitignore parts (#10230)
Update auto-generated .gitignore parts (#10228)

Update auto-generated .gitignore parts.

(cherry picked from commit a95448ca55)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-11 07:09:11 +02:00
patchback[bot]
4a642c247c [PR #10176/41f8e0ba backport][stable-10] Properly handle proxmox_snap timeout parameter (#10220)
Properly handle proxmox_snap timeout parameter (#10176)

* fix: issue #10175

There is some code to handle timeout, but due to an erroneous while
test, it was never called. Use timeout >= 0 instead of timeout, so the
timeout code can be called, and properly handle timeout.

* add changelog

* Adjust changelog fragment.

---------


(cherry picked from commit 41f8e0bad6)

Co-authored-by: GuillaumeV-cemea <101114641+GuillaumeV-cemea@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-07 17:30:02 +02:00
patchback[bot]
8bffd757ce [PR #10213/c9cd54a8 backport][stable-10] YAML callback: remove 12.0.0 already (#10219)
YAML callback: remove 12.0.0 already (#10213)

Remove YAML callback from 12.0.0 already.

(cherry picked from commit c9cd54a845)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-07 09:35:51 +02:00
patchback[bot]
eb294ae86e [PR #10212/996ffc8f backport][stable-10] Fix YAML callback (#10218)
Fix YAML callback (#10212)

Fix YAML callback.

(cherry picked from commit 996ffc8f8c)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-07 08:27:14 +02:00
patchback[bot]
cea886562a [PR #10214/f7f2db36 backport][stable-10] Fix module_helper tests (#10216)
Fix module_helper tests (#10214)

Fix module_helper tests.

(cherry picked from commit f7f2db365e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-06 22:29:56 +02:00
patchback[bot]
30c5de00e9 [PR #10209/63add288 backport][stable-10] Tests: adjust to ansible-core devel changes (#10211)
Tests: adjust to ansible-core devel changes (#10209)

Apparently the error message returned by AnsibleModule.run_command() when trying to execute a non-existing executable changed.

Ref: 600c1e67b4
(cherry picked from commit 63add288dc)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-06 21:58:44 +02:00
patchback[bot]
ae3236389e [PR #10196/b86e4af1 backport][stable-10] gitlab_*_access_token: handle revoked field in group and project access tokens (#10205)
gitlab_*_access_token: handle `revoked` field in group and project access tokens (#10196)

fix(gitlab): handle `revoked` field in group and project access tokens

(cherry picked from commit b86e4af103)

Co-authored-by: Massimo Gengarelli <massimo.gengarelli@proton.me>
2025-06-06 06:27:22 +02:00
umiruka
9717bac816 Use StrictVersion class to avoid wrong version comparisons that happen in some cases using LooseVersion class which results in TypeError (#10178)
* Use StrictVersion class to avoid wrong version comparisons that happen in some cases using LooseVersion class

* Refactor code

* Add changelog for PR number 10178

* Update changelog to be more precise

* Use LooseVersion instead of StrictVersion to check cobbler's version in cobbler system module

* Update PR 10178 changelog description to be more accurate
2025-06-02 20:42:33 +02:00
Felix Fontein
6b5b051c3d Prepare 10.7.1. 2025-06-02 06:33:08 +02:00
Felix Fontein
5d7ff825de Fix typo.
(cherry picked from commit 0dc1d9045b)
2025-05-30 14:52:22 +02:00
patchback[bot]
f58ab1b642 [PR #10177/35d736f7 backport][stable-10] git_config: remove required=false from arg spec (#10184)
git_config: remove required=false from arg spec (#10177)

* git_config: remove required=false from arg spec

* add changelog frag

(cherry picked from commit 35d736f78b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-05-27 23:23:18 +02:00
patchback[bot]
f644720c74 [PR #10174/13e3aed8 backport][stable-10] apache2_mod_proxy: adjust docs (fix) (#10183)
apache2_mod_proxy: adjust docs (fix) (#10174)

(cherry picked from commit 13e3aed86d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-05-27 23:23:12 +02:00
patchback[bot]
7a0428d7e6 [PR #10172/9e317089 backport][stable-10] apache2_mod_proxy: adjust docs (#10173)
apache2_mod_proxy: adjust docs (#10172)

(cherry picked from commit 9e317089a8)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-05-25 10:23:42 +02:00
patchback[bot]
b3eadab36a [PR #10164/2a18a07b backport][stable-10] Add RHEL 10.0 to CI (#10165)
Add RHEL 10.0 to CI (#10164)

Add RHEL 10.0 to CI.

(cherry picked from commit 2a18a07bdc)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-22 19:54:56 +02:00
Felix Fontein
17280ed73e The next expected release will be 10.7.1. 2025-05-19 19:07:33 +02:00
Felix Fontein
207ea056a7 Release 10.7.0. 2025-05-19 18:10:29 +02:00
patchback[bot]
f7189a55c6 [PR #10087/b861850e backport][stable-10] Feat: Add callback plugin print_task (#10159)
Feat: Add callback plugin print_task (#10087)

* Feat: Add callback plugin print_task

Prints task snippet to job output.

* Fix for failing tests

* Fix some pep8 formatting issues

* Updating DOCUMENTATION variable with version_added

* Set correct CALLBACK_NAME and fix warning with gather_facts

* Fix formatting again

* Update plugins/callback/print_task.py



* Update plugins/callback/print_task.py



* Add entry to BOTMETA.yml

* Use CSafeLoader and fallback to SafeLoader

* Change output function to self._display.display()

* Adding tests for community.general.print_task

* Adding EXAMPLES

* Apply suggestions from code review



---------


(cherry picked from commit b861850e1a)

Co-authored-by: Max Mitschke <demonpig@fastmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-19 07:05:21 +02:00
patchback[bot]
edb0d5f6ca [PR #10145/3daa1dec backport][stable-10] Fix TypeError caused by giving more than 2 positional arguments to CobblerXMLRPCInterface.get_system_handle() (#10158)
Fix TypeError caused by giving more than 2 positional arguments to CobblerXMLRPCInterface.get_system_handle()  (#10145)

* Update cobbler system module to also use new get_system_handle method definition

* Add changelog for bug fix for cobbler system module

(cherry picked from commit 3daa1dec0c)

Co-authored-by: umiruka <211638667+umiruka@users.noreply.github.com>
2025-05-18 22:45:39 +02:00
Felix Fontein
4c6f77cbc5 Prepare 10.7.0. 2025-05-18 22:24:29 +02:00
patchback[bot]
3b812e64ff [PR #10155/786be88f backport][stable-10] proxmox: fix: cannot access local variable 'identifier' where it is not associated with a value (#10156)
proxmox: fix: cannot access local variable 'identifier' where it is not associated with a value (#10155)

* fix: cannot access local variable 'identifier' where it is not associated with a value

* Add changelog fragment.

---------


(cherry picked from commit 786be88f43)

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Louis Jannett <louisjannett@icloud.com>
2025-05-18 22:23:13 +02:00
Felix Fontein
3856c184d2 [stable-10] Announce deprecation of proxmox content (#10109)
* Announce deprecation of proxmox content.

* community.proxmox 1.0.0 likely won't be ready for the next Ansible 11 release, so adjust wording.
2025-05-18 20:15:43 +02:00
patchback[bot]
facdfb9519 [PR #10104/6008e6e1 backport][stable-10] Allow running sanity and unit tests with antsibull-nox; impove testing documentation (#10153)
Allow running sanity and unit tests with antsibull-nox; impove testing documentation (#10104)

* Whitespace fixes.

* Allow to run unit and sanity tests with antsibull-nox.

* Document installation of needed collections for tests.

* Also mention other sanity tests.

(cherry picked from commit 6008e6e1a7)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-17 08:24:34 +02:00
patchback[bot]
1f90168f37 [PR #10097/ff0ed6f9 backport][stable-10] rundeck_acl_policy: fix project acls are put/posted to the wrong endpoint (#10151)
rundeck_acl_policy: fix project acls are put/posted to the wrong endpoint (#10097)

* Fix project acls are put/posted to the wrong endpoint

* Add changelog fragment.

* Fix 2.7 sanity errors in github

* Fix fragment extension and use 2.7 syntax in test

* Update changelogs/fragments/10097-fix-rundeck_acl_policy-project-endpoint.yml



* Fix pep8 formatting

* Add licensing to unit test

---------


(cherry picked from commit ff0ed6f912)

Co-authored-by: kjoyce77 <kevin.joyce@outlook.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-17 08:24:28 +02:00
patchback[bot]
f238b90fcf [PR #10128/626ee311 backport][stable-10] kdeconfig: mark end of options before sending value (#10148)
kdeconfig: mark end of options before sending value (#10128)

* mark end of options before sending value

* fix linting issue

* fragment update

(cherry picked from commit 626ee3115d)

Co-authored-by: Bob Mroczka <bob@mroczka.com>
2025-05-17 08:24:18 +02:00
patchback[bot]
9d245287b2 [PR #10031/2b4cb6da backport][stable-10] pipx: accept python version specs in parameter name (#10149)
pipx: accept python version specs in parameter `name` (#10031)

* pipx: accept python version specs in parameter "name"

* pipx_info: adjustment for backward compatibility

* remove unnecessary comprehension

* remove f-str

* no shebang for module utils

* remove f-str

* fix syntax error

* fix pipx_info

* rollback adjustments in existing tests

* docs & test update

* add debugging tasks to int test

* integration test checks for version of packaging

* move assertion to block

* fix idempotency when using version specifier

* add changelog frag

* fix docs

* dial down the version of tox used in tests

To accommodate old Pythons

* Update plugins/modules/pipx.py

* Apply suggestions from code review

* refactor/rename package requirements code

* fix filename in BOTMETA

* Update plugins/modules/pipx.py



* Update plugins/modules/pipx.py



* pipx mod utils: create make_process_dict and deprecate make_process_list

* pkg_req: make method private

* make_process_dict is simpler and more specialized

* ensure version specifiers are honored when state=install

* fix insanity

* pipx: reformat yaml blocks

* pipx: doc wordsmithing

---------


(cherry picked from commit 2b4cb6dabc)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-17 08:24:12 +02:00
patchback[bot]
8c8e755369 [PR #10136/937d92ee backport][stable-10] pickle cache plugin, avoid extra steps in DT (#10144)
pickle cache plugin, avoid extra steps in DT (#10136)

* pickle cache plugin, avoid extra steps in DT

* clog

* Update changelogs/fragments/10136-cache-pickle-json.yml



---------


(cherry picked from commit 937d92ee25)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-16 22:37:55 +02:00
patchback[bot]
946727309f [PR #10140/94eb385c backport][stable-10] sysrc - add integration test. value contains equals sign. (#10142)
sysrc - add integration test. value contains equals sign. (#10140)

(cherry picked from commit 94eb385c21)

Co-authored-by: Vladimir Botka <vbotka@gmail.com>
2025-05-16 22:37:43 +02:00
patchback[bot]
bc716b7ab4 [PR #10129/e853a6f3 backport][stable-10] redis_info: adjust tests for Arch Linux (#10131)
redis_info: adjust tests for Arch Linux (#10129)

(cherry picked from commit e853a6f39b)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-14 07:34:34 +02:00
patchback[bot]
8ab0591e85 [PR #10121/de60ea1d backport][stable-10] Fix #10120. Split key=value where value may comprise = (#10125)
Fix #10120. Split key=value where value may comprise = (#10121)

* Fix #10120. Split key=value where value may comprise =

* Added fragment.

* Update plugins/modules/sysrc.py



* Update changelogs/fragments/10121-sysrc-fix-split-first-separator.yml



---------


(cherry picked from commit de60ea1da4)

Co-authored-by: Vladimir Botka <vbotka@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-12 22:10:12 +02:00
patchback[bot]
d557997242 [PR #10102/43eb342b backport][stable-10] ini_file: fix unmatched whitespace before comment (#10116)
ini_file: fix unmatched whitespace before comment (#10102)

* ini_file: fix unmatched whitespace before comment

* Add changelog fragment

* Update changelog fragment: bugfixes to minor_changes



---------

Co-authored-by: sibebleuze <>

(cherry picked from commit 43eb342b18)

Co-authored-by: Sibe Bleuzé <sibebleuze@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-10 15:12:54 +02:00
patchback[bot]
e116cccb82 [PR #10115/86507e8a backport][stable-10] lxc: fix unit tests (#10118)
lxc: fix unit tests (#10115)

Don't compare strings passed through set_option()/get_option() with 'is'.

(cherry picked from commit 86507e8aca)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-10 15:12:38 +02:00
patchback[bot]
301483a7f3 [PR #10111/fcd2d8b7 backport][stable-10] Fix deprecation test (#10113)
Fix deprecation test (#10111)

Fix deprecation test.

(cherry picked from commit fcd2d8b7b7)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-06 23:13:45 +02:00
patchback[bot]
61c326ce81 [PR #10106/94acd180 backport][stable-10] antsibull-nox: use community.crypto 2.x.y for ansible-core < 2.17 (#10108)
antsibull-nox: use community.crypto 2.x.y for ansible-core < 2.17 (#10106)

Use community.crypto 2.x.y for ansible-core < 2.17.

(cherry picked from commit 94acd18052)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-06 21:54:55 +02:00
patchback[bot]
4e35837063 [PR #10027/299172d2 backport][stable-10] fixed hidden warnings from extra tests - batch 2 (#10101)
fixed hidden warnings from extra tests - batch 2 (#10027)

* fixed hidden warnings from extra tests - batch 2

* remove multiple yaml doc markers from EXAMPLE blocks

* Apply suggestions from code review

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

* Apply suggestions from code review

* Apply suggestions from code review

* dig: adjust markup for return suboptions

* Update plugins/lookup/dig.py

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 299172d27b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-05-04 21:40:28 +02:00
patchback[bot]
0dc63be643 [PR #10096/a042721c backport][stable-10] pipx/pipx_info: fix scheduled tests (#10100)
pipx/pipx_info: fix scheduled tests (#10096)

(cherry picked from commit a042721c82)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-05-04 14:02:23 +02:00
patchback[bot]
14e2dd4cea [PR #10063/6a40d459 backport][stable-10] Add connection_timeout option to cobbler inventory (#10095)
Add connection_timeout option to cobbler inventory (#10063)

Signed-off-by: Orion Poplawski <orion@nwra.com>
(cherry picked from commit 6a40d459b5)

Co-authored-by: Orion Poplawski <orion@nwra.com>
2025-05-02 10:34:25 +02:00
patchback[bot]
3e5d58129d [PR #9954/7e4d6aa5 backport][stable-10] Add new filter plugin: 'to_prettytable' (#10094)
Add new filter plugin: 'to_prettytable' (#9954)

* Add new action plugin 'prettytable'

* Add integration tests for 'prettytable' plugin

* Added BOTMETA details

* Add COPYRIGHT details

* Add 'to_prettytable' filter plugin and tests

* fix: 🐛 Fix add_rows method

* Add changelog fragment

* Remove changelog fragments

* Apply code review suggestions

* Correct BOTMETA and lint

* refactor: 🔥 Remove unnecessary code parts

* fix: Fix contact details

* Correct kwargs.pop and column_alignments description

* Remove 'trim' filter from conditionals in tests

* Add additional validations and tests

* fix: Apply corrections after review

* refactor: Optimize code and make some refactoring

* fix: Add some minor corrections

* fix: add column_alignments validation and tests

* Update version_added to "10.7.0"

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

* refactor: Use TypeValidationError class for type checking

* refactor: Apply suggestions

* fix: documentation indent

* Apply suggestion

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

* style: Adjust indentation

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

* style: Correction of examples

* fix: Commit suggestion

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

* fix: Commit suggestion

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

* feat: Add correct parameters validation for empty data

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 7e4d6aa541)

Co-authored-by: Timur Gadiev <Timur_Gadiev@epam.com>
2025-05-02 10:34:06 +02:00
patchback[bot]
79241e672f [PR #10076/f3ea40db backport][stable-10] keycloak_user_rolemapping: fix diff mode (#10093)
keycloak_user_rolemapping: fix diff mode (#10076)

(cherry picked from commit f3ea40db3d)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-02 06:15:41 +02:00
patchback[bot]
12415f3e2f [PR #10086/60f1169d backport][stable-10] CI: Use community.crypto 2.x.y for ansible-core 2.16 and before (#10089)
CI: Use community.crypto 2.x.y for ansible-core 2.16 and before (#10086)

* Use community.crypto 2.x.y for ansible-core 2.16 and before.

* Also use stable-2 for ubuntu2004 tests.

(cherry picked from commit 60f1169d42)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-05-01 09:18:01 +02:00
patchback[bot]
ca478eb38d [PR #10075/d89a0bbc backport][stable-10] nmcli: fix misspelled option in example (#10084)
nmcli: fix misspelled option in example (#10075)

Fix misspelled option.

(cherry picked from commit d89a0bbc0e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-30 22:32:06 +02:00
Felix Fontein
aeb668a645 Use community.crypto's stable-2 branch in EOL CI. 2025-04-30 07:50:30 +02:00
patchback[bot]
7b83b7f7bb [PR #10079/1936fe51 backport][stable-10] crypttab: removes jijna delimiters from example using when (#10080)
crypttab: removes jijna delimiters from example using when (#10079)

The current example includes extra jinja delimiters which
result in double-interpretation of the statement.

Fixes: #10078


(cherry picked from commit 1936fe5181)

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-04-29 23:14:28 +02:00
Felix Fontein
0e1c4a20c2 Fix info on blanket license statement for changelog fragments.
(cherry picked from commit 8fa357e74b)
2025-04-29 22:22:06 +02:00
patchback[bot]
70bf4e449c [PR #10071/3249a041 backport][stable-10] Improve MH doc (#10074)
Improve MH doc (#10071)

(cherry picked from commit 3249a041c0)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-04-27 09:50:24 +02:00
patchback[bot]
ac8942979b [PR #9975/7524e74b backport][stable-10] cobbler.inventory: Allow collecting fully rendered facts (#10073)
cobbler.inventory: Allow collecting fully rendered facts (#9975)

Add facts_level option to cobbler inventory plugin, cleanpu

Initialize connection in parse()
Handle rendered system data in _get_systems() so it can be cached



(cherry picked from commit 7524e74bb7)

Signed-off-by: Orion Poplawski <orion@nwra.com>
Co-authored-by: Orion Poplawski <orion@nwra.com>
Co-authored-by: Tyler Phillippe <tylerphillippe@tutamail.com>
2025-04-26 12:44:02 +02:00
patchback[bot]
28fb1e3eac [PR #10007/373334d6 backport][stable-10] Add xdg_mime module (#10072)
Add xdg_mime module (#10007)

* Add version of xdg_mime module

* Fix xdg_mime_get since the command is different

* Add query parameter

* Fix order of parameters

* Add myself to BOTMETA

* Add unit tests

* Fix the way we deal when there is no handler set

* Improve documentation

* Remove unused import

* Fix documentation

* Strip xdg-mime from version string

* Fix information about version

* Add error message sample

* Add test to invalid handler

* Add support to multiple mime-types

* Change the output parameter from handlers to handler

* Change tests related to multiple mime-type support

* Small fixes

* Stop using constant to enable changed state

* Add before_handlers and after_handlers

* Change tests to use before and after structures

* Add a stronger message about using a non-installed handler

* Manage some edge cases

* Change error message to match the new value

* Add some fixes

* Change some tests

* Update plugins/modules/xdg_mime.py



* Remove a blank line

* Remove single quote

* Add xdg-mime to the version in the mocks

* Remove after_handlers and make code simpler

* Update tests to work without after_handlers

* Remove diff_params and clean output_params

* Make mime_type plural since it supports multiple items

* Move the handler check to module init

* Use anchors in the test to make yaml simpler

* Update plugins/modules/xdg_mime.py



* Update plugins/modules/xdg_mime.py



* Update plugins/modules/xdg_mime.py



* Update plugins/modules/xdg_mime.py



* Update plugins/modules/xdg_mime.py



* Update plugins/modules/xdg_mime.py



* Update plugins/modules/xdg_mime.py



* Update plugins/modules/xdg_mime.py



* Update plugins/modules/xdg_mime.py



* Update plugins/modules/xdg_mime.py



* Add blank line to separe examples

* Update plugins/modules/xdg_mime.py



* Add a small homage to my late grandma

* Update plugins/modules/xdg_mime.py



* Fix pep8 problem with the homage

* Remove trailing whitespace

* Update plugins/modules/xdg_mime.py



---------



(cherry picked from commit 373334d668)

Co-authored-by: Marcos Alano <mhalano@users.noreply.github.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-26 12:43:22 +02:00
patchback[bot]
2fabb55a4d [PR #10025/a3b8eed0 backport][stable-10] fixed hidden warnings from extra tests - batch 1 (#10062)
fixed hidden warnings from extra tests - batch 1 (#10025)

(cherry picked from commit a3b8eed0c4)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-04-23 22:25:51 +02:00
patchback[bot]
41b624ffaf [PR #10057/a720e994 backport][stable-10] Mark supervisorctl tests as unstable (#10060)
Mark supervisorctl tests as unstable (#10057)

Mark supervisorctl tests as unstable.

(cherry picked from commit a720e99482)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-23 07:07:58 +02:00
patchback[bot]
e2283faf98 [PR #10051/4a2920b0 backport][stable-10] Remove FreeBSD 14.0 from CI (#10054)
Remove FreeBSD 14.0 from CI (#10051)

Remove FreeBSD 14.0 from CI.

In ansible-core it has been replaced with 14.1, but we're already testing against that.
Ref: 3546111f2d

(cherry picked from commit 4a2920b0fd)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-22 19:07:58 +02:00
Felix Fontein
af276713aa The next release is expected to be 10.7.0. 2025-04-21 21:46:55 +02:00
Felix Fontein
68c3c9b7ba Release 10.6.0. 2025-04-21 21:09:23 +02:00
patchback[bot]
7bb291864e [PR #9898/6e384a1c backport][stable-10] Add support for addressing subgroups by paths to the keycloak_user module (#10049)
Add support for addressing subgroups by paths to the keycloak_user module (#9898)

* Add support for addressing subgroups by paths to the keycloak_user module (issue #9647)

* Apply suggestions from code review.

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 6e384a1c6a)

Co-authored-by: Christian Schlichtherle <christian@schlichtherle.de>
2025-04-21 16:52:30 +02:00
patchback[bot]
0090af8cfb [PR #10043/2a5abab7 backport][stable-10] Remove blanket skips for Python 3 in CI (#10048)
Remove blanket skips for Python 3 in CI (#10043)

* Remove blanket skips for Python 3 in CI.

* Try to fix hg tests.

* Disable hg tests.

* Drop restriction of supervisor to <4.0.0.

This was introduced in https://github.com/ansible/ansible/pull/54935.

* Make tests work with supervisorctl 4.0.0.

According to https://supervisord.org/changes.html#id12,
"supervisorctl will now set its exit code to a non-zero value when an error condition occurs."
I'm not sure why a stopped service in 'status' constitutes an error condition,
but whatever 🤷...

* Use correct Python executable.

* Skip RHEL/macOS; diff on config write.

* Skip CentOS 7 and OpenSuSE on ansible-core 2.16.

(cherry picked from commit 2a5abab738)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-21 16:34:52 +02:00
patchback[bot]
42aeeb975b [PR #10029/73178e3d backport][stable-10] fixed hidden warnings from extra tests - batch 3 (#10045)
fixed hidden warnings from extra tests - batch 3 (#10029)

* fixed hidden warnings from extra tests - batch 3

* add empty lines to separate sections of the EXAMPLE block

* Apply suggestions from code review

* Update plugins/modules/nmcli.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 73178e3d33)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-04-21 13:53:51 +00:00
Felix Fontein
9dd7be05dc [stable-10] Use antsibull-nox instead of extra sanity test runner and extra workfows (#10042)
Use antsibull-nox instead of extra sanity test runner and extra workflows (#10022)

* Use antsibull-nox instead of extra sanity test runner and extra workflows.

* Avoid sys.argv[0].

(cherry picked from commit 3ee55c6828)
2025-04-21 14:21:00 +02:00
patchback[bot]
11a847a7b5 [PR #10024/ce421dbd backport][stable-10] Allowing uppercase tags in proxmox & proxmox_kvm (#10039)
Allowing uppercase tags in proxmox & proxmox_kvm (#10024)

* Allowing uppercase tags in proxmox & proxmox_kvm

* Fix #9895 : fixes the 'not a valid tag' error message when the VM or container tag contains uppercase characters

* Add PR URL to changelog fragment.

---------

Co-authored-by: s1githug <sgithug@free.fr>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit ce421dbd7d)

Co-authored-by: s1github <sgithub@free.fr>
2025-04-21 13:21:21 +02:00
patchback[bot]
ebcceafdb7 [PR #10028/e9997e08 backport][stable-10] deprecation: manifold (#10038)
deprecation: manifold (#10028)

* deprecation: manifold

* add changelog frag

* restore test file

(cherry picked from commit e9997e08ed)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-04-21 13:21:10 +02:00
patchback[bot]
79b3521547 [PR #10011/c2480730 backport][stable-10] fix: github_deploy_key check key exists on 422 (#10036)
fix: github_deploy_key check key exists on 422 (#10011)

* fix: github_deploy_key check key exists on 422

If we get a 422 response code as we add a key, check if it's because the key already exists or for another reason.

fixes: #6718

* chore: add changelog 10011-github_deploy_key-check-key-present

* chore: fix changelog fragment

* chore: fix changelog fragment

* Update changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c248073079)

Co-authored-by: Alex Garel <alex@garel.org>
2025-04-21 13:21:02 +02:00
patchback[bot]
7aae8a94f2 [PR #10005/e0a283bb backport][stable-10] Fix method exists in sysrc (#10034)
Fix method exists in sysrc (#10005)

* Fix method exists.

* Add changelog fragment.

* Update the exists method to pass the present method tests.

* Replace f-string formatting.

* Update changelogs/fragments/10005-fix-method-exists-in-sysrc.yml

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

* Add comment to the method exists.

* Update plugins/modules/sysrc.py

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

* Update changelogs/fragments/10005-fix-method-exists-in-sysrc.yml

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

* The improved comment formatting fixed.

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e0a283bb36)

Co-authored-by: Vladimir Botka <vbotka@gmail.com>
2025-04-21 13:20:53 +02:00
patchback[bot]
acde075b5f [PR #10026/63cb8f0a backport][stable-10] deprecation: stackpath_compute (#10037)
deprecation: stackpath_compute (#10026)

* deprecation: stackpath_compute

* add changelog frag

* restore test file

(cherry picked from commit 63cb8f0ace)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-04-21 13:20:40 +02:00
patchback[bot]
0310c7875d [PR #10013/4b9373f6 backport][stable-10] Homebrew: Emit a useful error message if brew info reports a package tap is null. (#10040)
Homebrew: Emit a useful error message if brew info reports a package tap is null. (#10013)

* Fix #10012.

Homebrew: Emit a useful error message if a package tap is null.  This can happen if an installed package is subsequently removed from the tap (e.g. it is withdrawn by homebrew).

* Added changelogs fragment for PR 10013

* Do not raise error when tap is null in package_detail
pylint: remove trailing whitespace

* Minor: Update plugins/modules/homebrew.py

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

* Minor: Update changelogs/fragments/10012-improve-error-handling-homebrew-missing-tap.yml

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

* Update plugins/modules/homebrew.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 4b9373f694)

Co-authored-by: brad2014 <brad2014@users.noreply.github.com>
2025-04-21 13:20:30 +02:00
patchback[bot]
8bce7601bc [PR #10014/89105559 backport][stable-10] puppet: use better CmdRunner param formatting (#10021)
puppet: use better CmdRunner param formatting (#10014)

* puppet: use better CmdRunner param formatting

* ignore none

* add changelog frag

(cherry picked from commit 8910555983)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-04-19 09:34:26 +02:00
patchback[bot]
ab5c4b186b [PR #9959/5ef6f1eb backport][stable-10] Update one_vm.py (#10020)
Update one_vm.py (#9959)

* Update one_vm.py

Update updateconf attributes to match latest acceptable values.

* Add changelog fragment

* Update plugins/modules/one_vm.py

Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>

* Update plugins/modules/one_vm.py

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

* Update changelogs/fragments/9959-update-opennebula-onevm-updateconf-params.yml

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

* Update one_vm.py

Add updateconf values to documentation

* Update one_vm.py

* Update one_vm.py

* Update one_vm.py

* Update one_vm.py

Fix doc formatting

* Update plugins/modules/one_vm.py

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

* Update one_vm.py

Colon causing test failure

* Add colon.

---------

Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 5ef6f1ebd2)

Co-authored-by: Tom Paine <github@aioue.net>
2025-04-19 09:34:18 +02:00
patchback[bot]
ee2779e6c1 [PR #9795/96b49300 backport][stable-10] add the wsl connection plugin (#10019)
add the wsl connection plugin (#9795)

* add the wsl connection plugin

* move the banner_timeout required paramiko version to its own line

* document the proxy_command required paramiko version

* document the timeout required paramiko version

* simplify the sending of the become_pass value

* add Connection.__init__ type hints

* add MyAddPolicy.missing_host_key type hints

* normalize the Connection._parse_proxy_command replacers dict values to the str type

* add the user_known_hosts_file option

* modify the private_key_file option type to path

(cherry picked from commit 96b493002c)

Co-authored-by: Rui Lopes <rgl@ruilopes.com>
2025-04-19 09:34:11 +02:00
patchback[bot]
91ac9f84b8 [PR #9973/80252b29 backport][stable-10] Add zypper skip post errors feature (#10016)
Add zypper skip post errors feature (#9973)

* Add zypper skip post errors feature

* Add feature to handle zypper return code 107 with skip_post_errors (default: false).
* Add integration test to verify the skip_post_errors flag.
* Add changelog fragment

Issue: #9972
Issue-Ref: https://github.com/ansible-collections/community.general/issues/9972

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

* Update plugins/modules/zypper.py

* Update changelogs/fragments/9972-zypper-skip-post-errors.yml

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

* Update tests/integration/targets/zypper/tasks/zypper.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 80252b29f8)

Co-authored-by: mk2km <205020320+mk2km@users.noreply.github.com>
2025-04-19 09:34:06 +02:00
patchback[bot]
1c1d58482c [PR #9987/a8b97732 backport][stable-10] Fix Keycloak authentication flow configuration issues (#10018)
Fix Keycloak authentication flow configuration issues (#9987)

* Add delete_authentication_config method and integrate it into create_or_update_executions

* typo

* Sanity

* Add integration tests for keycloak_authentication module with README, tasks, and variables

* Add copyright and license information to access_token.yml

* Sanity

* Refactor Keycloak integration tests: streamline README, update access token task, and enhance variable management

* Maj changelogs fragments

---------

Co-authored-by: Andre Desrosiers <andre.desrosiers@ssss.gouv.qc.ca>
(cherry picked from commit a8b977320c)

Co-authored-by: desand01 <desrosiers.a@hotmail.com>
2025-04-19 09:33:56 +02:00
patchback[bot]
138740127a [PR #9970/42a161ab backport][stable-10] param pkcs12_alias and cert_alias to be optional in java_cert module (#10001)
param pkcs12_alias and cert_alias to be optional in java_cert module  (#9970)

* changed pkcs12_alias and cert_alias to be optional when importing pkcs12 certificate in keystore

* Add changelog fragment

* Update changelogs/fragments/9970-pkcs12_alias_cert_alias_optional.yml

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

* Update changelogs/fragments/9970-pkcs12_alias_cert_alias_optional.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 42a161abf5)

Co-authored-by: Emanuele Bernardi <e.berna@gmail.com>
2025-04-16 21:14:31 +02:00
patchback[bot]
1d7aad9b46 [PR #9952/1243846c backport][stable-10] improve ansible_host in proxmox inventory plugin (#10003)
improve ansible_host in proxmox inventory plugin (#9952)

* improve ansible_host in proxmox inventory plugin

I had this issue myself and found out there was already an issue thread:

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

this fixes the issue for hope we can all benefit after this gets merged

* f string styling

* add log line for the successful address selection

* remove white space

* add changelog: 9952-proxmox-inventory-plugin-improve-ansible_host.yml

* Update changelogs/fragments/9952-proxmox-inventory-plugin-improve-ansible_host.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1243846c3a)

Co-authored-by: Stein van Broekhoven <stein@aapjeisbaas.nl>
2025-04-16 21:06:04 +02:00
patchback[bot]
f3a12a9e78 [PR #9999/216e7dc0 backport][stable-10] Fix typo in rpm_ostree_pkg documentation example (#10000)
Fix typo in rpm_ostree_pkg documentation example (#9999)

Fix typo in rpm_ostree_pkg examples

The example showing use of a delay to improve resiliency misspelled 'delay'

(cherry picked from commit 216e7dc06b)

Co-authored-by: Jeffrey Borcean <jjborcean@gmail.com>
2025-04-15 20:43:43 +02:00
patchback[bot]
0e818c4812 [PR #9976/04137746 backport][stable-10] keycloak_client: fix idempotency regression (#9997)
keycloak_client: fix idempotency regression (#9976)

* add function to normalize kc responses

* add changelog fragment

* Update changelogs/fragments/9976-keycloak_client-fix-idempotency-regression.yml

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

* add newline to changelog fragment

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 0413774641)

Co-authored-by: gruenbauer@b1-systems.de <gruenbauer@b1-systems.de>
2025-04-14 22:51:23 +02:00
patchback[bot]
8751f0feea [PR #9960/ab6e18b6 backport][stable-10] gitlab_project: add build_timeout option (#9995)
gitlab_project: add `build_timeout` option (#9960)

* gitlab_project: add `build_timeout` option

* gitlab_project: document unspecified build_timeout on creation

(cherry picked from commit ab6e18b6cf)

Co-authored-by: David Phillips <phillid@users.noreply.github.com>
2025-04-14 22:51:12 +02:00
patchback[bot]
5dd4cc5148 [PR #9962/a7ab7e92 backport][stable-10] Feat: Add infiniband mac address support in nmcli module (#9998)
Feat: Add infiniband mac address support in nmcli module (#9962)

* Feat: Add infiniband mac address support in nmcli module

* Add changelog fragment

* Tentative to fix the error

* Update changelogs/fragments/9962-nmcli-add-infiniband-mac-support.yml

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

* Update plugins/modules/nmcli.py

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

* Fix: fix test_bond_connection_unchanged module check

* Update plugins/modules/nmcli.py

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

* Update changelogs/fragments/9962-nmcli-add-infiniband-mac-support.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit a7ab7e9247)

Co-authored-by: Benoît Leveugle <oxedions@gmail.com>
2025-04-14 22:51:01 +02:00
Felix Fontein
39f27d7d43 Prepare 10.6.0. 2025-04-14 22:11:48 +02:00
patchback[bot]
4dec46778c [PR #9992/8525e420 backport][stable-10] Avoid deprecated AnsibleFilterTypeError (#9994)
Avoid deprecated AnsibleFilterTypeError (#9992)

Avoid deprecated AnsibleFilterTypeError.

(cherry picked from commit 8525e420bc)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-14 21:23:21 +02:00
patchback[bot]
d5e0d36e48 [PR #9833/04cfce78 backport][stable-10] Make ready for data tagging (#9990)
Make ready for data tagging (#9833)

* Fix dependent lookup.

* Fix ansible_type plugin utils and adjust documentation of reveal_ansible_type filter and ansible_type test.

* Fix diy callback plugin.

* Adjust to Data Tagging.

* Vendor and use internal code from ansible-core to fix YAML callback.

Ref: https://github.com/ansible/ansible/issues/84781
(cherry picked from commit 04cfce78ea)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-14 21:23:00 +02:00
patchback[bot]
fb45b908dd [PR #9951/02ffb6e7 backport][stable-10] update PHP apache module workaround (#9979)
update PHP apache module workaround (#9951)

* update php apache module workaround

* Update apache2_module.py

* Update apache2_module.py

* Update apache2_module.py

* add changelog fragment

* Update changelogs/fragments/9951-mod-php-identifier.yml

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

* Update 9951-mod-php-identifier.yml

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 02ffb6e7e3)

Co-authored-by: simonLeary42 <71396965+simonLeary42@users.noreply.github.com>
2025-04-10 07:27:14 +02:00
patchback[bot]
6e16c6c649 [PR #9953/1157b710 backport][stable-10] allow gitlab-project-members module to handle user level "owner" (#9980)
allow gitlab-project-members module to handle user level "owner" (#9953)

* fix(modules/gitlab-project-members): fix ...

... module not being able to handle owner access level

* add changelog fragment for this pr

* fix and extend integration tests

* extend parameter docu as requested by review

* also add docu for other parameters

* remove pip install break-packages flag from ...

... integration tests

---------

Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
(cherry picked from commit 1157b7102f)

Co-authored-by: morco <thegreatwiper@web.de>
2025-04-10 07:27:06 +02:00
patchback[bot]
033d5f23f8 [PR #9646/d7edd34b backport][stable-10] hpilo_boot: fix module failing when trying to power on an already powered-on server (#9981)
hpilo_boot: fix module failing when trying to power on an already powered-on server (#9646)

* fix: fix hpilo_boot.py module failing when trying to power on an already powered-on server

For this module to be idempotent, it should be successful when trying to reach a power state which is already there.

It was already the case for "poweroff", however when running the module with "boot_once" state, it was failing if the server was already powered_on, which is not an idempotent behavior

* doc: Add changelog fragment

* fix: add flag to run boot_once idempotently without breaking the previous behavior and add deprecation warning

* doc: fix documentation fragment description

* fix unwanted format changes

seems like I had an older version of this module formatted differently or that I had a formatter that automatically ran on this file

* fix linting errors

Removed trailing whitespace line 164

* add missing dash in idempotent_boot_once parameter description

* fix doc issue

* Update changelogs/fragments/9646-hpilo-fix-idempotency.yml

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

* Update plugins/modules/hpilo_boot.py

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

* Update changelogs/fragments/9646-hpilo-fix-idempotency.yml

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

* comment out module deprecation and change idempotent boot_once parameter description

* Update plugins/modules/hpilo_boot.py

* Update plugins/modules/hpilo_boot.py

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ryan BADAÏ <ryan.badai@dbi-services.com>
(cherry picked from commit d7edd34ba4)

Co-authored-by: Ryan Badaï <43403063+ryanb74@users.noreply.github.com>
2025-04-10 07:26:57 +02:00
patchback[bot]
6367bb853d [PR #9964/1375cb65 backport][stable-10] Unify TLS/SSL config for Redfish modules with new common argument spec and docs fragment; add validate_certs and ca_path options (#9982)
Unify TLS/SSL config for Redfish modules with new common argument spec and docs fragment; add validate_certs and ca_path options (#9964)

Unify TLS/SSL config for Redfish modules with new common argument spec and docs fragment.

(cherry picked from commit 1375cb65d6)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-10 07:26:48 +02:00
patchback[bot]
8e6941ed5d [PR #9965/d923e326 backport][stable-10] fix duplicate json conversion for rocketchat pre740 (#9969)
fix duplicate json conversion for rocketchat pre740 (#9965)

* fix duplicate json conversion for rocketchat pre740

* add changelog

* Update changelogs/fragments/9965-fix-duplicate-jsonify-payload-for-rocketchat-pre740.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit d923e326f6)

Co-authored-by: pandrieux <31440210+pandrieux@users.noreply.github.com>
2025-04-06 14:43:41 +02:00
patchback[bot]
2d730da8a7 [PR #9963/34b6fb74 backport][stable-10] proxmox_disk: fail gracefully if storage hasn't been provided by the user (#9968)
proxmox_disk: fail gracefully if storage hasn't been provided by the user (#9963)

Fail gracefully if storage hasn't been provided by the user.

(cherry picked from commit 34b6fb74eb)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-04-06 14:24:07 +02:00
Felix Fontein
88f5100657 Migrate .reuse/dep5 to REUSE.toml.
(cherry picked from commit 70b5e362f9)
2025-03-29 13:46:13 +01:00
patchback[bot]
0293f84b3e [PR #9945/e5e33534 backport][stable-10] Simplify YAML callback tests (#9948)
Simplify YAML callback tests (#9945)

Simplify YAML callback tests.

(cherry picked from commit e5e335348a)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-29 11:02:00 +01:00
Felix Fontein
8333c881d3 Next expected release will be 10.6.0. 2025-03-24 22:28:48 +01:00
Felix Fontein
4a394088b3 Release 10.5.0. 2025-03-24 21:03:09 +01:00
patchback[bot]
d72d9b3e45 [PR #9910/1fbf5d8e backport][stable-10] proxmox_vm_info: don't expect key 'template' exists in dictionary (#9935)
proxmox_vm_info: don't expect key 'template' exists in dictionary (#9910)

* don't expect key 'template' exists

* add changelog fragment

* Update changelogs/fragments/9875-proxmox-dont-expect-key-template-to-exist.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1fbf5d8eb4)

Co-authored-by: florianfischer91 <72799603+florianfischer91@users.noreply.github.com>
2025-03-24 18:10:09 +01:00
patchback[bot]
e44bbbdcba [PR #9882/c3b0354d backport][stable-10] Fix payload to match Rocket Chat 7.4.1 API (#9933)
Fix payload to match Rocket Chat 7.4.1 API (#9882)

* Fix payload to match Rocket Chat 7.4 API

* Add a fallback to send payload argument in case the user still interacts with a Rocket Chat version < 7.4.0

* Fix sanity checks

* Add changelog fragment of PR #9882

* Add argument option_is_pre740 to keep backward compatibility of the payload

* Add new argument doc

* Rename new parameter, add missing pieces of information in parameter doc

* Use appropriate change label and fix change description. Description about future plans for the parameter is now set at the parameter doc level

* Fix missing punctuation in the new parameter doc block

* Improve documentation.

* Fix line length.

---------

Co-authored-by: ludovic <ludovic.petetin@aleph-networks.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c3b0354da0)

Co-authored-by: X <2465124+broferek@users.noreply.github.com>
2025-03-24 05:52:10 +01:00
patchback[bot]
eca7c1a00b [PR #9926/cb776e7c backport][stable-10] The yarn module is Yarn Classic only at the moment (#9927)
The yarn module is Yarn Classic only at the moment (#9926)

The yarn module is Yarn Classic only.

(cherry picked from commit cb776e7cd5)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-23 14:59:00 +01:00
patchback[bot]
b1ff713c41 [PR #9867/ec38a82e backport][stable-10] tests: enable copr tests (#9931)
tests: enable copr tests (#9867)

[WIP] tests: enable copr tests

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit ec38a82ef1)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-03-23 14:58:51 +01:00
patchback[bot]
c95a8b6540 [PR #9921/410cf72a backport][stable-10] Unit tests: replace mock and compat with code from community.internal_test_tools (#9922)
Unit tests: replace mock and compat with code from community.internal_test_tools (#9921)

* Replace compat with equivalent from community.internal_test_tools.

* Replace mock with equivalent from community.internal_test_tools.

(cherry picked from commit 410cf72aec)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-22 14:20:45 +01:00
patchback[bot]
57dcd31c82 [PR #9918/8ab8010b backport][stable-10] Use more unit test utils from community.internal_test_tools (#9919)
Use more unit test utils from community.internal_test_tools (#9918)

* Make conftest's patch_ansible_module use the context manager from .utils.

* Fix test dependencies.

* Use module mock utils from community.internal_test_tools.

* Use DataDictLoader from community.internal_test_tools.

* Use trust util from community.internal_test_tools.

(cherry picked from commit 8ab8010b6d)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-22 13:52:39 +01:00
patchback[bot]
7ba3d84004 [PR #9880/3922b82a backport][stable-10] nmcli: fix reordering of DNS nameservers and search suffixes (#9912)
nmcli: fix reordering of DNS nameservers and search suffixes (#9880)

* nmcli: fix reordering of DNS nameservers and search suffixes

- Fixes #8724

* Update changelog fragment index in line with PR number

- Now I understand what that number is for

* Use correct changelog format for nmcli PR #9880

(cherry picked from commit 3922b82a57)

Co-authored-by: ashleyghooper <ashleyghooper@gmail.com>
2025-03-21 21:50:53 +01:00
patchback[bot]
837c1289d0 [PR #9892/579f369e backport][stable-10] vmadm - Add new options (#9913)
vmadm - Add new options (#9892)

* Add flexible_disk_size and owner_uuid options

* vmadm - add changelog fragment

* Improve descriptions for options

(cherry picked from commit 579f369ef3)

Co-authored-by: stratacast <courtney@courtnix.systems>
2025-03-21 21:50:47 +01:00
patchback[bot]
3c7c946297 [PR #9904/e3d92491 backport][stable-10] Add caddy example to copr module (#9916)
Add caddy example to copr module (#9904)

Add caddy example to copr.py

(cherry picked from commit e3d92491a3)

Co-authored-by: Elijah Lopez <elijahllopezz@gmail.com>
2025-03-21 21:50:39 +01:00
patchback[bot]
f0f5035ba2 [PR #9893/9286b601 backport][stable-10] cmd_runner_fmt.as_fixed() now accepts list of args (#9915)
cmd_runner_fmt.as_fixed() now accepts list of args (#9893)

* cmd_runner_fmt.as_fixed() now accepts list of args

* update CmdRunner guide

* add changelog frag

* Update changelogs/fragments/9893-cmdrunner-as-fixed-args.yml

* fix overdoing in as_fixed()

(cherry picked from commit 9286b60182)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-03-21 21:50:30 +01:00
Felix Fontein
3955a6be0f Prepare 10.5.0. 2025-03-21 21:07:44 +01:00
patchback[bot]
bc5b4bdef3 [PR #9900/6a2d9ccd backport][stable-10] sysrc: extend the list of FreeBSD releases where the jail test fails (#9903)
sysrc: extend the list of FreeBSD releases where the jail test fails (#9900)

Extend the list of FreeBSD releases where the jail test fails.

(cherry picked from commit 6a2d9ccd99)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-18 22:14:23 +01:00
patchback[bot]
8f8b1ee4ce [PR #9891/4a2cc711 backport][stable-10] systemd_info - extend support to timer unit (#9894)
systemd_info - extend support to timer unit (#9891)

* systemd_info - extend support to timer unit

* systemd_info - add changelogs fragments

* systemd_info - fix description and base_props

(cherry picked from commit 4a2cc71141)

Co-authored-by: Nocchia <133043574+NomakCooper@users.noreply.github.com>
2025-03-16 21:33:28 +01:00
patchback[bot]
6534db4942 [PR #9881/e5eac9fe backport][stable-10] homebrew_cask: Handle unusual brew version strings (#9889)
homebrew_cask: Handle unusual brew version strings (#9881)

* Use regex to parse unusual brew version strings

Fixes: #8432

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit e5eac9fed1)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-03-15 09:22:45 +01:00
patchback[bot]
7a55295798 [PR #9847/96b003f9 backport][stable-10] Adding Audio device support to proxmox_kvm (#9887)
Adding Audio device support to proxmox_kvm (#9847)

* Add Audio device support to proxmox_kvm.py

Audio device was unsupported with message :
`FAILED! => {"changed": false, "msg": "Unsupported parameters for (community.general.proxmox_kvm) module: audio. Supported parameters include: acpi, agent, api_host, api_password, api_port, api_token_id, api_token_secret, api_user, archive, args, autostart, balloon, bios, boot, bootdisk, cicustom, cipassword, citype, ciupgrade, ciuser, clone, cores, cpu, cpulimit, cpuunits, delete, description, digest, efidisk0, force, format, freeze, full, hookscript, hostpci, hotplug, hugepages, ide, ipconfig, keyboard, kvm, localtime, lock, machine, memory, migrate, migrate_downtime, migrate_speed, name, nameservers, net, newid, node, numa, numa_enabled, onboot, ostype, parallel, pool, protection, reboot, revert, sata, scsi, scsihw, searchdomains, serial, shares, skiplock, smbios, snapname, sockets, sshkeys, startdate, startup, state, storage, tablet, tags, target, tdf, template, timeout, tpmstate0, update, update_unsafe, usb, validate_certs, vcpus, vga, virtio, vmid, watchdog."}`

With this patch it is possible to update proxmox VM config with an audio device.

```yaml
- name: Add Spice compatible audio device
  community.general.proxmox_kvm:
    api_user: "{{ api_user }}"
    api_password: "{{ api_password }}"
    api_host: "{{ api_host }}"
    node: "{{ node_name }}"
    vmid: "{{ proxmox_vmid }}"
    audio: '{"audio0":"device=ich9-intel-hda,driver=spice"}'
    update: true
  delegate_to: localhost
```

* Update plugins/modules/proxmox_kvm.py

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

* Update plugins/modules/proxmox_kvm.py

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

* Update plugins/modules/proxmox_kvm.py

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

* Create changelog fragment 9847-Adding_audio_device-support_to_proxmox_kvm.yml

* Update 9847-Adding_audio_device-support_to_proxmox_kvm.yml

Update following recommandations, thanks

* Update changelogs/fragments/9847-Adding_audio_device-support_to_proxmox_kvm.yml

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 96b003f9af)

Co-authored-by: Croko-fr <62189784+Croko-fr@users.noreply.github.com>
2025-03-15 08:04:40 +01:00
patchback[bot]
0fd7cfd2d6 [PR #9821/3bd0ab4a backport][stable-10] systemd_info - add wildcards support (#9883)
systemd_info - add wildcards support (#9821)

* systemd_info - add wildcards support

* systemd_info - add wildcards fragments

* systemd_info - improved dedicated functions

* systemd_info - improved code and functions for better maintenance and timing

* fix unitname description

* removed redundancies and keys() in lists, replaced fnmatch with filter and run_command with cmdrunner

* systemd_info - add new cmdrunner

* systemd_info - fix runner

* systemd_info - fix env in runner

* systemd_info - rename runner and get_version

* systemd_info - change args runner, fix fragment, add botmeta

* systemd_info - merge type args

(cherry picked from commit 3bd0ab4a49)

Co-authored-by: Nocchia <133043574+NomakCooper@users.noreply.github.com>
2025-03-15 07:46:34 +01:00
patchback[bot]
68ca28b69a [PR #9849/add892aa backport][stable-10] NMAP Inventory Plugin: Added option for specifying DNS servers for name resolution (#9886)
NMAP Inventory Plugin: Added option for specifying DNS servers for name resolution (#9849)

* Added option for specifying DNS servers for name resolution in NMAP inventory plugin.

* Added option for specifying DNS servers for name resolution in NMAP inventory plugin.

* NMAP Inventory Plugin: Added option for specifying DNS servers for name resolution.

* Update plugins/inventory/nmap.py

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

* NMAP Inventory Plugin: Added option for specifying DNS servers for name resolution.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit add892aa45)

Co-authored-by: Jim Anderson <thesemicolons@protonmail.com>
2025-03-15 07:46:25 +01:00
patchback[bot]
c91e7b4c03 [PR #9871/dd0a2cbf backport][stable-10] sudoers: display stderr raised while validation (#9885)
sudoers: display stderr raised while validation (#9871)

* sudoers: display stderr raised while validation

* Print stdout and stderr raised from sudoers validation

Fixes: #9674

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>

* Apply suggestions from code review

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

---------

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit dd0a2cbff9)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-03-15 07:46:14 +01:00
patchback[bot]
2583152512 [PR #9837/abe4e5ce backport][stable-10] Redfish: implement setting PowerRestorePolicy (#9878)
Redfish: implement setting PowerRestorePolicy (#9837)

This property ("The desired power state of the system when power is
restored after a power loss.") was added in ComputerSystem.v1_6_0 which
became part of 2018.3 Redfish release.

Tested against an OpenBMC system running bmcweb Redfish server making sure the
policy is updated only when needed and that errors and messages are propogated
properly.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
(cherry picked from commit abe4e5ce95)

Co-authored-by: Paul Fertser <fercerpav@gmail.com>
2025-03-12 20:06:02 +01:00
patchback[bot]
cee6c98d2a [PR #9872/fdbc06c7 backport][stable-10] CI: Add FreeBSD 13.5 (#9874)
CI: Add FreeBSD 13.5 (#9872)

Add FreeBSD 13.5.

(cherry picked from commit fdbc06c714)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-12 17:58:32 +01:00
patchback[bot]
8859379bed [PR #9858/710dc5df backport][stable-10] pacemaker unit test: passing null with UTHelper (#9868)
pacemaker unit test: passing null with UTHelper (#9858)

(cherry picked from commit 710dc5df86)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-03-11 07:14:08 +01:00
patchback[bot]
e899631137 [PR #9836/941df094 backport][stable-10] Adds option for http agent for user in slack callback (#9866)
Adds option for http agent for user in slack callback (#9836)

* Adds option for http agent for user in slack callback

* Adds changelog fragment for 9836 issue

* Apply suggestions from code review

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

* Fix typo.

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 941df094ca)

Co-authored-by: Anwesha Das <anwesha@das.community>
2025-03-10 18:12:18 +01:00
patchback[bot]
e99dcaa729 [PR #9846/86dea88c backport][stable-10] dnf_versionlock: add support for Fedora 41 and dnf5 (#9865)
dnf_versionlock: add support for Fedora 41 and dnf5 (#9846)

Fixes: #9556

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit 86dea88cb6)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-03-10 06:31:08 +01:00
patchback[bot]
c12dd2f9c7 [PR #9845/7d5357d7 backport][stable-10] Fix roles/policies normalization in consul_token. (#9863)
Fix roles/policies normalization in consul_token. (#9845)

* Fix roles/policies normalization in consul_token.

* Update changelogs/fragments/9845-consul_token_idempotency.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 7d5357d74c)

Co-authored-by: Florian Apolloner <florian@apolloner.eu>
2025-03-10 06:30:54 +01:00
patchback[bot]
8253fb171d [PR #9859/eff25c8a backport][stable-10] Fix/improve tests (#9860)
Fix/improve tests (#9859)

* Fix tests.

* Improve callback tests.

(cherry picked from commit eff25c8a6e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-09 17:01:54 +01:00
patchback[bot]
5f1f76b8f4 [PR #9853/4727fb77 backport][stable-10] cmd_runner tests: fix reliance on unspecified behavior (#9857)
cmd_runner tests: fix reliance on unspecified behavior (#9853)

Fix reliance on unspecified behavior.

(cherry picked from commit 4727fb77b3)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-09 09:01:13 +01:00
patchback[bot]
e3793e09e8 [PR #9850/9df84654 backport][stable-10] Improve/fix unit tests (#9852)
Improve/fix unit tests (#9850)

* Improve/fix tests.

* Fix cargo test.

(cherry picked from commit 9df8465476)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-08 16:42:05 +01:00
patchback[bot]
a800a6dbad [PR #9842/c46575cf backport][stable-10] Simplify module_utils unit tests (#9844)
Simplify module_utils unit tests (#9842)

Simplify module_utils unit tests.

(cherry picked from commit c46575cf06)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-07 18:33:20 +01:00
patchback[bot]
7d45b678e4 [PR #9838/a1781d09 backport][stable-10] Unit tests: make set_module_args() a context manager, and remove copies of it in some tests (#9839)
Unit tests: make set_module_args() a context manager, and remove copies of it in some tests (#9838)

Make set_module_args() a context manager, and remove copies of set_module_args().

Prepares for Data Tagging.

(cherry picked from commit a1781d09dd)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-07 07:27:55 +01:00
patchback[bot]
cd0ca389ed [PR #9803/c43289b8 backport][stable-10] homebrew: Do not crash when package names include tap prefix. (#9834)
homebrew:  Do not crash when package names include tap prefix. (#9803)

* homebrew:  Do not crash when package names include tap prefix.

Fixes #9777

* homebrew: PR #9803 minor update: removed trailing whitespace

* Update changelogs/fragments/9777-homebrew-fix-crash-when-packages-include-tap.yml

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

* Apply suggestions from code review

Co-authored-by: Thibaut Decombe <68703331+UnknownPlatypus@users.noreply.github.com>

* Update plugins/modules/homebrew.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Thibaut Decombe <68703331+UnknownPlatypus@users.noreply.github.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit c43289b8f1)

Co-authored-by: brad2014 <brad2014@users.noreply.github.com>
2025-03-05 21:37:08 +01:00
patchback[bot]
9ebf72d560 [PR #9531/402f7254 backport][stable-10] add pacemaker_resource plugin (#9835)
add pacemaker_resource plugin (#9531)

* Add initial pacemaker resource

* Additional fixes on pacemaker_resource

* Fix up module parameters

* fix doc and lint

* fix group command build

* Apply suggestions for removing status and improve descriptions

* fix cmd builder list

* Apply suggestions and add initial unit tests

* Fix unit tests expected output

* Initial refactor on pacemaker resource

Refactorization on pacemaker_resource to utilize module helpers.

* Apply suggestions and fix up initial unit test

* Apply suggestions from code review

* Fix pep8 format for utils

* Fix unit tests for pacemaker resource

* Add botmeta maintainers for new moduules

* Apply suggestions from code review

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

* Apply unit test suggestion

* Add disable and enable states for pacemaker_resource

* Fix state names and add cli_action for runner

* Remove unnecessary variables

* Fix documentation example playbook

* Fix IP Address for resource_option

* Refactor and remove unnecessary facts

* Apply suggestions from code review

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 402f725424)

Co-authored-by: Dexter <45038532+munchtoast@users.noreply.github.com>
2025-03-05 21:36:56 +01:00
patchback[bot]
d6a4fab8ea [PR #9819/5f48f2ca backport][stable-10] Example typo in homebrew_services.py (#9827)
Example typo in homebrew_services.py (#9819)

Maybe this was mixed up with the _brew_service_state() function? I get this error as-written:
```
fatal: [eahmm3]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (community.general.homebrew_services) module: service
_state. Supported parameters include: name, path, state (formula)."}
```

(cherry picked from commit 5f48f2ca0d)

Co-authored-by: Ernie Hershey <github@ernie.org>
2025-03-03 21:32:19 +01:00
patchback[bot]
4e43b124cd [PR #9828/77dc0868 backport][stable-10] homebrew_services: skip tests on macOS 13.2 and 14.3 (#9830)
homebrew_services: skip tests on macOS 13.2 and 14.3 (#9828)

Skip tests on macOS 13.2 and 14.3.

(cherry picked from commit 77dc086896)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-03 21:32:00 +01:00
patchback[bot]
9bcf61d153 [PR #9824/129f51cf backport][stable-10] Redfish: implement obtaining PowerRestorePolicy (#9824) (#9825)
Redfish: implement obtaining PowerRestorePolicy (#9824) (#9824)

This property ("The desired power state of the system when power is
restored after a power loss.") was added in ComputerSystem.v1_6_0 which
became part of 2018.3 Redfish release.

Example result from querying OpenBMC's bmcweb Redfish server:
```
    entries:
    -   -   system_uri: /redfish/v1/Systems/system
        - AlwaysOff
    ret: true
```

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
(cherry picked from commit 129f51cf9d)

Co-authored-by: Paul Fertser <fercerpav@gmail.com>
2025-03-03 21:15:22 +01:00
patchback[bot]
7f5305fb80 [PR #9818/3b6efd5c backport][stable-10] cloudflare_dns: handle exhausted response stream in case of http error (#9823)
cloudflare_dns: handle exhausted response stream in case of http error (#9818)

* cloudflare_dns: handle exhausted response stream in case of http error

* Update changelogs/fragments/9818-cloudflare-dns-exhausted-response.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3b6efd5cbc)

Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com>
2025-03-03 07:24:12 +01:00
patchback[bot]
aea60a8dd6 [PR #9812/cf147b9f backport][stable-10] misc typo fix (#9816)
misc typo fix (#9812)

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit cf147b9fca)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-03-01 11:31:08 +01:00
patchback[bot]
195ac4d7e6 [PR #9809/e39320c3 backport][stable-10] proxmox: fix status getter (#9817)
proxmox: fix status getter (#9809)

* proxmox: fix status getter

get_lxc_status was missing a selection of the 'status' key

* proxmox: add changelog fragment

* proxmox: fix changelog fragment

(cherry picked from commit e39320c354)

Co-authored-by: JL Euler <Lithimlin@users.noreply.github.com>
2025-03-01 11:30:52 +01:00
patchback[bot]
91d515bd1e [PR #9768/4c11902f backport][stable-10] keycloak_realm: remove realm id requirement (#9810)
keycloak_realm: remove realm id requirement (#9768)

* remove realm id requirement

* replace id with realm

* replace id with realm in documentation

* add changelog fragment

* Update changelogs/fragments/9768-keycloak_realm-remove-id-requirement.yaml

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

* Update changelogs/fragments/9768-keycloak_realm-remove-id-requirement.yaml

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

* add comment to get_realm_by_id

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 4c11902fdc)

Co-authored-by: gruenbauer@b1-systems.de <gruenbauer@b1-systems.de>
2025-02-27 21:59:36 +01:00
patchback[bot]
7d8f5559e2 [PR #9457/98b328c5 backport][stable-10] apache2_mod_proxy: big revamp (#9806)
apache2_mod_proxy: big revamp (#9457)

* apache2_mod_proxy: big revamp

* fix case when state=null

* fix logic for change detection

(cherry picked from commit 98b328c539)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-26 22:05:03 +01:00
patchback[bot]
9e68816db9 [PR #9805/dd4268e0 backport][stable-10] CI: Add macOS 15.3 (#9808)
CI: Add macOS 15.3 (#9805)

* Add macOS 15.3.

* Install setuptools on macOS 15.

(cherry picked from commit dd4268e0d9)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-26 22:04:52 +01:00
Felix Fontein
fc1ba5152c Next expected release will be 10.5.0. 2025-02-24 07:15:53 +01:00
Felix Fontein
205e28d2fe Release 10.4.0. 2025-02-24 06:47:35 +01:00
patchback[bot]
27629b6497 [PR #9787/e8e3e5c2 backport][stable-10] Allow Xen Host and/or Xen VM names instead of their UUIDs (#9801)
Allow Xen Host and/or Xen VM names instead of their UUIDs (#9787)

* Allow using Xen Host and/or Xen VM names instead of their UUIDs for inventory

* xen_orchestra inventory plugin allow using vm and host names instead of UUID inventory

* Update changelog fragment with correct PR number

* Set missing inventory attributes in unit test

* Add version_added suggestion as per github comments

* Description update.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e8e3e5c2b0)

Co-authored-by: rt-vnx <riordan.toms@vonex.com.au>
2025-02-24 06:18:09 +01:00
patchback[bot]
5735c5a045 [PR #9764/8425464c backport][stable-10] Add new systemd_info module (#9800)
Add new systemd_info module (#9764)

* add systemd_info module

* fix object results

* apply review changes

* apply module change and add doc_fragments

* removed use_unsafe_shell and doc_fragments/systemd

* fix unitname description doc

* fixed doc, replaced systemctl show syntax, added base prop result doc

* fix documentation

* fix RV values in description

* fix RV() description values

* add get_bin_path try/fail and remove list()

* fix doc, removed try block

* add Archlinux in integration test

(cherry picked from commit 8425464c0a)

Co-authored-by: Nocchia <133043574+NomakCooper@users.noreply.github.com>
2025-02-23 17:52:07 +01:00
patchback[bot]
ceb051851e [PR #9796/217a1883 backport][stable-10] locale_gen: enable tests for Arch Linux, make sure they don't even try to run on RHEL and Fedora VMs (#9798)
locale_gen: enable tests for Arch Linux, make sure they don't even try to run on RHEL and Fedora VMs (#9796)

Enable locale_gen tests for Arch Linux, make sure they don't even try to run on RHEL and Fedora VMs.

(cherry picked from commit 217a18839d)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-23 15:27:08 +01:00
patchback[bot]
a17083ea84 [PR #9657/2b6f4ba2 backport][stable-10] lldp: Handling attributes that are defined multiple times (#9799)
lldp: Handling attributes that are defined multiple times (#9657)

* lldp: Ignoring values for keys already defined

This fixes crashes when the lldpctl output has lines for unknown tlvs that
redefine a key in the middle of the nested dict data structure.

* lldp: handling attributes that are defined multiple times

- Fix crash caused by certain lldpctl output where an attribute is defined as branch and leaf
- Adds multivalues parameter to control behavior when lldpctl outputs an attribute multiple times

* lldp: using isinstance instead of type

* Link to Github PR

Apply suggestions from code review

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

* lldp: only push value to subkey in multivalues mode

To provide backwards compatibility values that are defined as a
attribute and also as a path element are only pushed to the 'value'
subkey when using the new multivalues mode.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2b6f4ba299)

Co-authored-by: Julian Wecke <julian@net23.de>
2025-02-23 15:26:57 +01:00
patchback[bot]
d03fdc8093 [PR #9684/961c9b7f backport][stable-10] Ssh config other options (#9794)
Ssh config other options (#9684)

* Add other_options support to ssh_config module

* Changelog fragment

* Fix missing and modified stuff

* Minor changes

* Update fragment with PR URL

* Fix PEP8 issue

* Fix idempotency issue

* Update changelogs/fragments/ssh_config_add_other_options.yml

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

* Update plugins/modules/ssh_config.py

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

* Update plugins/modules/ssh_config.py

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

* Incorporate suggestions

* Missed removing str conversion

* PEP8

* Update plugins/modules/ssh_config.py

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

* Add fail condition, fix codestyle

* Force lower case key values only

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 961c9b7f4c)

Co-authored-by: Stephen Bradshaw <stephen.mark.bradshaw@gmail.com>
2025-02-22 09:20:31 +01:00
patchback[bot]
469209a17f [PR #9788/bb2c45b5 backport][stable-10] json_query filter docs: fix typo cluster2 when cluster1 is mentioned (#9793)
json_query filter docs: fix typo cluster2 when cluster1 is mentioned (#9788)

Typo cluster2 but cluster1 is mentioned

(cherry picked from commit bb2c45b5bb)

Co-authored-by: Kloppi313 <36038231+Kloppi313@users.noreply.github.com>
2025-02-21 20:50:45 +01:00
patchback[bot]
72ea96cc74 [PR #9774/ddc1ea6a backport][stable-10] Fix proxy settings for elasticsearch_plugin.py (#9786)
Fix proxy settings for elasticsearch_plugin.py (#9774)

elasticsearch_plugin: fix error when setting proxy settings

Co-authored-by: Tim Hovius <w.hovius@rechtspraak.nl>
(cherry picked from commit ddc1ea6ae4)

Co-authored-by: Tim Hovius <timhovius@gmail.com>
2025-02-20 22:27:16 +01:00
patchback[bot]
b2c34d1afe [PR #9778/203c1ecf backport][stable-10] redhat_registration: use 'enable_content' D-Bus option when available (#9784)
redhat_registration: use 'enable_content' D-Bus option when available (#9778)

This makes sure that subscription-manager always enables the content for
the system right after the registration.

This is particular important on EL 10+ and Fedora 41+.

(cherry picked from commit 203c1ecfec)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2025-02-20 22:27:03 +01:00
patchback[bot]
f4fca86f82 [PR #9106/105ae056 backport][stable-10] bugfix - Prevent passwordstore lookup to create subkey when create == false (#9780)
bugfix - Prevent passwordstore lookup to create subkey when create == false (#9106)

Fixes #9105

Apply suggestion

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 105ae0566a)

Co-authored-by: Manuel Luzarreta <mluzarreta.pro@pm.me>
2025-02-19 22:30:24 +01:00
patchback[bot]
78c8fa0d49 [PR #9775/8e36fd48 backport][stable-10] apache2_mod_proxy: follow-up for #9762, forgot one place with find_all/findAll (#9776)
apache2_mod_proxy: follow-up for #9762, forgot one place with find_all/findAll (#9775)

Follow-up for #9762, forgot one place.

(cherry picked from commit 8e36fd4847)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-18 21:53:16 +01:00
patchback[bot]
d3650f27b0 [PR #9762/a3fd357d backport][stable-10] Make apache2_mod_proxy work with Python 3, half-way modern Apache 2 versions, and add basic tests (#9771)
Make apache2_mod_proxy work with Python 3, half-way modern Apache 2 versions, and add basic tests (#9762)

* Move Apache 2 installation to setup role.

* Make module work with Python 3.

* Add basic tests.

* Add changelog fragment.

* Simplify change.

* Pass referer.

(cherry picked from commit a3fd357d81)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-18 20:30:09 +01:00
patchback[bot]
7b901f9caa [PR #9760/d696bb7b backport][stable-10] proxmox inventory: proposal for #9710 (caching) (#9770)
proxmox inventory: proposal for #9710 (caching) (#9760)

* Proposal for #9710

* Fixed comments

* Fixed trailing whitespace

* Fixed changelog fragment

(cherry picked from commit d696bb7b89)

Co-authored-by: Dirk S. <iqt4@users.noreply.github.com>
2025-02-17 19:26:05 +01:00
patchback[bot]
35d6ab10bb [PR #9743/94e15110 backport][stable-10] incus_connection: Allow non-root users to connect to an instance (#9765)
incus_connection: Allow non-root users to connect to an instance (#9743)

* feat: add remote_user option to incus connection

* feat: add changelog fragment

* fix: formatting

(cherry picked from commit 94e1511005)

Co-authored-by: Peter Siegel <33677897+yeetypete@users.noreply.github.com>
2025-02-17 07:55:37 +01:00
patchback[bot]
d811807e1f [PR #9753/fa7876bb backport][stable-10] Jira: add SSL client certificate support for authentication (#9763)
Jira: add SSL client certificate support for authentication (#9753)

* jira: add ssl client certificate support for authentification

* fix code bugs from first CI run

* fix fstring not compatible with older python and chhange urlopen module call

* removed duplicated post,put,get method

* fix urllib module detection Python2/ Python3

* edit HTTP Request back to fetch_url

* add changelog fragment

* fix python line spacing

* Update plugins/modules/jira.py

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

* Update plugins/modules/jira.py

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

* edit documentation certificate auth not mutually exclusive

* Update changelogs/fragments/9753-jira-add-client-certificate-auth.yml

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

* edit documentation for client certificate auth and token

* add no_log for client_cert and client_key

* removed no_log for client_cert and client_key

---------

Co-authored-by: domin <domin@MacBookPro.fritz.box>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit fa7876bb40)

Co-authored-by: Dominik <47948163+weristdominik@users.noreply.github.com>
2025-02-16 21:37:34 +01:00
Felix Fontein
dedd625700 Prepare 10.4.0 release. 2025-02-16 20:27:32 +01:00
patchback[bot]
10e41862cb [PR #9754/b80fa80c backport][stable-10] clc_*: deprecation (#9761)
clc_*: deprecation (#9754)

* clc_*: deprecation

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b80fa80c90)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-16 20:06:48 +01:00
patchback[bot]
3d418d9ede [PR #9739/b2e2d2d3 backport][stable-10] keycloak_client: compare desired and before dicts directly in checkmode (#9759)
keycloak_client: compare desired and before dicts directly in checkmode (#9739)

* compare desired and before dicts directly in checkmode

* fix authorizationServicesEnabled being dropped by kc if unset

* only add authorizationsServicesEnabled=false if before_client exists

* add changelog fragment

* Update changelog.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b2e2d2d37b)

Co-authored-by: gruenbauer@b1-systems.de <gruenbauer@b1-systems.de>
2025-02-16 12:38:04 +01:00
patchback[bot]
ebb150c3f9 [PR #9728/410999df backport][stable-10] bitwarden lookup: add options to filter by collection_name and validate number of results (#9757)
bitwarden lookup: add options to filter by collection_name and validate number of results (#9728)

* feat(lookups/bitwarden): add collection_name filter

* feat(lookups/bitwarden): add result_count check

* docs(lookups/bitwarden): add changelog fragment

* Update changelogs/fragments/9728-bitwarden-collection-name-filter.yml

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

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

* fix(lookups/bitwarden): fix result_count check for multiple terms

* fix(lookups/bitwarden): Enforce mutual exclusion of 'collection_name' and 'collection_id'

* formatting(lookups/bitwarden): remove trailing whitespace

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

* formatting(lookups/bitwarden): remove trailing whitespace

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 410999dffa)

Co-authored-by: Jonas <jonas.switala@frequentis.com>
2025-02-16 12:24:57 +01:00
patchback[bot]
df28c80946 [PR #9755/ba252294 backport][stable-10] profitbricks: fix typo in deprecation text (#9756)
profitbricks: fix typo in deprecation text (#9755)

(cherry picked from commit ba25229482)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-16 11:32:54 +01:00
patchback[bot]
403152d91a [PR #9653/64d78585 backport][stable-10] proxmox_kvm Allow vm hibernation (#9752)
proxmox_kvm Allow vm hibernation (#9653)

* Allow vm hibernation

* add changelog fragment

* pylint and pep8 tests failed

* forgot period

* added introducing version number to module description

(cherry picked from commit 64d785858e)

Co-authored-by: ff05 <71757437+ff05@users.noreply.github.com>
2025-02-15 13:41:32 +01:00
patchback[bot]
75e35bfa6c [PR #9659/06df717b backport][stable-10] lxd_connection: Allow non-root users to connect to an instance (#9751)
lxd_connection: Allow non-root users to connect to an instance (#9659)

* fix: add support for non-root user

* fix: show correct info for connection

* fix: use build_exec_command to execute as nonroot

* unset default user

* feat: add options for setting remote user and become method

* fix: add root as default remote_user

* fix: remove ansible_ssh_user from remote_user vars

* fix: use single quotes inside f-string

* fix: ensure lxc exec comes first

* fix: line length

* fix: use -c flag with su

* Update plugins/connection/lxd.py

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

* Update plugins/connection/lxd.py

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

* Update plugins/connection/lxd.py

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

* doc: add changelog fragment

* fix: use underscore for module name in fragment

* Update 9659-lxd_connection-nonroot-user.yml

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

* fix: add put command

* feat: add get_remote_uid_gid placeholder function

* feat: complete placeholder _get_remote_uid_gid function

* fix: better logging

* fix: ensure default values are of type str

* fix: use ints for uid and gid

* fix: print put command

* fix: format

* fix: display msg for PUT

* fix: add comment about defaults

* fix: format

* fix: use os module to get uid and gid

* Revert "fix: use os module to get uid and gid"

This reverts commit bb2ba14b8f.

* Update plugins/connection/lxd.py

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

* fix: omit uid, gid args in lxd file push if root

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 06df717bc6)

Co-authored-by: Peter Siegel <33677897+yeetypete@users.noreply.github.com>
2025-02-15 13:41:24 +01:00
patchback[bot]
fa846e9677 [PR #9727/910c57aa backport][stable-10] keycloak: repair integration tests by removing jinja2 templating from conditionals (#9726) (#9748)
keycloak: repair integration tests by removing jinja2 templating from conditionals (#9726) (#9727)

* fix: remove jinja2 templating from conditionals in keycloak_role module integration tests (#9726)

* fix: remove jinja2 templating in conditional in keycloak clientsecret info integration test (#9726)

This test needs a further fix; see #9744. Left for a future PR for now.

* fix: remove jinja2 templating in conditional in keycloak clientsecret regenerate integration test (#9726)

* chore: remove jinja2 templating in conditional in keycloak user federation integration test (#9726)

These instances of templating were not causing failures,
but this removes the warnings.

* chore: remove jinja2 templating in conditional in keycloak user rolemapping integration test (#9726)

These instances of templating were not causing failures,
but this removes the warnings.

* docs: add changelog fragment (#9726)

* docs: repair changelog fragment yaml (#9726)

* docs: actually repair changelog fragment yaml (#9726)

* chore: remove changelog fragment for test only pr (#9726)

(cherry picked from commit 910c57aaa0)

Co-authored-by: Mark Armstrong <markparmstrong@gmail.com>
2025-02-15 12:31:44 +01:00
patchback[bot]
db62a36d6e [PR #9676/9d0bd1d4 backport][stable-10] Test helper guide (#9749)
Test helper guide (#9676)

(cherry picked from commit 9d0bd1d4d9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-15 12:30:54 +01:00
patchback[bot]
e3dae0b646 [PR #9736/8e324881 backport][stable-10] rename test helper (#9745)
rename test helper (#9736)

* rename test helper

* update ignore lines

(cherry picked from commit 8e324881a6)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-15 08:25:27 +01:00
patchback[bot]
9aaf8e4825 [PR #9733/085bcb22 backport][stable-10] profitbricks: deprecation (#9740)
profitbricks: deprecation (#9733)

* profitbricks: deprecation

* add changelog frag

(cherry picked from commit 085bcb22a2)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-13 20:39:51 +01:00
patchback[bot]
cf0a233d7b [PR #9729/7af5e158 backport][stable-10] Add FullPowerCycle to Power commands (#9730)
Add `FullPowerCycle` to Power commands (#9729)

* Add `FullPowerCycle` to Power commands

* Add changelog fragment

* Rename command

* Fix line length for redfish_command options

(cherry picked from commit 7af5e158b8)

Co-authored-by: Scott Seekamp <sseekamp@coreweave.com>
2025-02-11 22:23:51 +01:00
patchback[bot]
cebd5bb3c8 [PR #9651/fdd1331e backport][stable-10] Implement #9650 Add parameter hooks to inventory plugin iocage (#9731)
Implement #9650 Add parameter hooks to inventory plugin iocage (#9651)

* Add parameter hooks to inventory plugin iocage.

* Add changelog fragment.

* Update plugins/inventory/iocage.py

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

* Parameter renamed to hooks_results

* Fix DOCUMENTATION YAML 4-space indentation.

* Fix DOCUMENTATION YAML 2-space indentation.

* Update changelogs/fragments/9651-iocage-inventory-hooks.yml

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

* Add note about activated pool mountpoint.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit fdd1331e4a)

Co-authored-by: Vladimir Botka <vbotka@gmail.com>
2025-02-11 22:23:42 +01:00
patchback[bot]
d452e903f8 [PR #9722/d756aeb6 backport][stable-10] CI: Cleanup AZP config similarly to ansible-core did some years ago (#9725)
CI: Cleanup AZP config similarly to ansible-core did some years ago (#9722)

Cleanup AZP config similarly to ansible-core did some years ago.

(cherry picked from commit d756aeb6ce)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-10 23:14:00 +01:00
patchback[bot]
c76ef6ba99 [PR #9694/d5add1ed backport][stable-10] ipa_host: Maintain the host certificates (#9721)
ipa_host: Maintain the host certificates (#9694)

* ipa_host: Maintain the host certificates

Fix #9693

* Add changelog fragment

* Fix changelog message

* Fix changelog message again

(cherry picked from commit d5add1ed9f)

Co-authored-by: sedrubal <sedrubal@users.noreply.github.com>
2025-02-10 22:08:17 +01:00
patchback[bot]
52bd7cdb2d [PR #6264/1f92a699 backport][stable-10] zfs: fix multi-line value in user-defined property (#9718)
zfs: fix multi-line value in user-defined property (#6264)

* zfs: fix multi-line value in user-defined property

* zfs: fix multi-line value in user-defined property

* Update changelogs/fragments/6264-zfs-multiline-property-value.yml

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

* Update plugins/modules/zfs.py

Co-authored-by: sam-lunt <samuel.j.lunt@gmail.com>

* rename self.properties -> self.extra_zfs_properties

---------

Co-authored-by: Vita Batrla <vita.batrla@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: sam-lunt <samuel.j.lunt@gmail.com>
(cherry picked from commit 1f92a69992)

Co-authored-by: Vita Batrla <34657903+batrla@users.noreply.github.com>
2025-02-10 22:05:04 +01:00
patchback[bot]
da3ba1e7be [PR #9698/1beee879 backport][stable-10] lvg: Add parameter to disable removal of extra physical volumes (#9717)
lvg: Add parameter to disable removal of extra physical volumes (#9698)

* Add parameter to disable removal of extra physical volumes

Signed-off-by: Massl123 <Massl123@users.noreply.github.com>

* Set PR number in changelog fragment

Signed-off-by: Massl123 <Massl123@users.noreply.github.com>

* Fix tests

Signed-off-by: Massl123 <Massl123@users.noreply.github.com>

* Apply suggestions from code review

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

* Add comment in pvs

Signed-off-by: Massl123 <Massl123@users.noreply.github.com>

---------

Signed-off-by: Massl123 <Massl123@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1beee87961)

Co-authored-by: Marcel Freundl <Massl123@users.noreply.github.com>
2025-02-10 22:04:51 +01:00
patchback[bot]
cb46453b78 [PR #9697/165106d2 backport][stable-10] zfs_facts: set parameter "type" as a list (#9716)
zfs_facts: set parameter "type" as a list (#9697)

* zfs_facts: set parameter "type" as a list

Plus minor readability improvements

* add changelog frag

* Update plugins/modules/zfs_facts.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 165106d2bd)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-02-10 22:04:41 +01:00
patchback[bot]
a784e66a2c [PR #9658/a842a268 backport][stable-10] Update nmcli.py to support VRF commands (#9715)
Update nmcli.py to support VRF commands (#9658)

Adding VRF support and documentation to the nmcli module

Signed-off-by: Andreas Karis <ak.karis@gmail.com>
(cherry picked from commit a842a26849)

Co-authored-by: Andreas Karis <akaris@redhat.com>
2025-02-10 22:04:32 +01:00
patchback[bot]
52cc1881d8 [PR #9625/4e0de41a backport][stable-10] onepassword_doc: fix 1Password Connect support (#9719)
onepassword_doc: fix 1Password Connect support (#9625)

Fix 1Password Connect support for onepassword_doc.

(cherry picked from commit 4e0de41a85)

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-02-10 22:04:24 +01:00
Felix Fontein
5c7076e0bc The next expected release will be 10.4.0. 2025-02-10 21:49:34 +01:00
1092 changed files with 30789 additions and 21543 deletions

View File

@@ -29,22 +29,20 @@ schedules:
always: true
branches:
include:
- stable-11
- stable-10
- stable-9
- cron: 0 11 * * 0
displayName: Weekly (old stable branches)
always: true
branches:
include:
- stable-8
- stable-9
variables:
- name: checkoutPath
value: ansible_collections/community/general
- name: coverageBranches
value: main
- name: pipelinesCoverage
value: coverage
- name: entryPoint
value: tests/utils/shippable/shippable.sh
- name: fetchDepth
@@ -53,26 +51,38 @@ variables:
resources:
containers:
- container: default
image: quay.io/ansible/azure-pipelines-test-container:6.0.0
image: quay.io/ansible/azure-pipelines-test-container:7.0.0
pool: Standard
stages:
### Sanity
- stage: Sanity_devel
displayName: Sanity devel
- stage: Sanity_2_20
displayName: Sanity 2.20
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Test {0}
testFormat: devel/sanity/{0}
testFormat: 2.20/sanity/{0}
targets:
- test: 1
- test: 2
- test: 3
- test: 4
- stage: Sanity_2_19
displayName: Sanity 2.19
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Test {0}
testFormat: 2.19/sanity/{0}
targets:
- test: 1
- test: 2
- test: 3
- test: 4
- test: extra
- stage: Sanity_2_18
displayName: Sanity 2.18
dependsOn: []
@@ -99,35 +109,34 @@ stages:
- test: 2
- test: 3
- test: 4
- stage: Sanity_2_16
displayName: Sanity 2.16
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Test {0}
testFormat: 2.16/sanity/{0}
targets:
- test: 1
- test: 2
- test: 3
- test: 4
### Units
- stage: Units_devel
displayName: Units devel
- stage: Units_2_20
displayName: Units 2.20
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: devel/units/{0}/1
testFormat: 2.20/units/{0}/1
targets:
- test: 3.8
- test: 3.9
- test: '3.10'
- test: '3.11'
- test: '3.12'
- test: '3.13'
- test: '3.14'
- stage: Units_2_19
displayName: Units 2.19
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: 2.19/units/{0}/1
targets:
- test: 3.8
- test: "3.11"
- test: "3.13"
- stage: Units_2_18
displayName: Units 2.18
dependsOn: []
@@ -138,6 +147,7 @@ stages:
testFormat: 2.18/units/{0}/1
targets:
- test: 3.8
- test: "3.11"
- test: "3.13"
- stage: Units_2_17
displayName: Units 2.17
@@ -149,55 +159,64 @@ stages:
testFormat: 2.17/units/{0}/1
targets:
- test: 3.7
- test: "3.10"
- test: "3.12"
- stage: Units_2_16
displayName: Units 2.16
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: 2.16/units/{0}/1
targets:
- test: 2.7
- test: 3.6
- test: "3.11"
## Remote
- stage: Remote_devel_extra_vms
displayName: Remote devel extra VMs
- stage: Remote_2_20_extra_vms
displayName: Remote 2.20 extra VMs
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: devel/{0}
testFormat: 2.20/{0}
targets:
- name: Alpine 3.21
test: alpine/3.21
# - name: Fedora 41
# test: fedora/41
- name: Alpine 3.22
test: alpine/3.22
# - name: Fedora 42
# test: fedora/42
- name: Ubuntu 22.04
test: ubuntu/22.04
- name: Ubuntu 24.04
test: ubuntu/24.04
groups:
- vm
- stage: Remote_devel
displayName: Remote devel
- stage: Remote_2_20
displayName: Remote 2.20
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: devel/{0}
testFormat: 2.20/{0}
targets:
- name: macOS 15.3
test: macos/15.3
- name: RHEL 10.0
test: rhel/10.0
- name: RHEL 9.6
test: rhel/9.6
- name: FreeBSD 14.3
test: freebsd/14.3
- name: FreeBSD 13.5
test: freebsd/13.5
groups:
- 1
- 2
- 3
- stage: Remote_2_19
displayName: Remote 2.19
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: 2.19/{0}
targets:
- name: macOS 14.3
test: macos/14.3
- name: RHEL 9.5
test: rhel/9.5
- name: RHEL 10.0
test: rhel/10.0
- name: FreeBSD 14.2
test: freebsd/14.2
- name: FreeBSD 13.4
test: freebsd/13.4
groups:
- 1
- 2
@@ -210,6 +229,8 @@ stages:
parameters:
testFormat: 2.18/{0}
targets:
- name: macOS 14.3
test: macos/14.3
- name: RHEL 9.4
test: rhel/9.4
- name: FreeBSD 14.1
@@ -226,56 +247,48 @@ stages:
parameters:
testFormat: 2.17/{0}
targets:
- name: FreeBSD 13.3
test: freebsd/13.3
- name: FreeBSD 13.5
test: freebsd/13.5
- name: RHEL 9.3
test: rhel/9.3
- name: FreeBSD 14.0
test: freebsd/14.0
groups:
- 1
- 2
- 3
- stage: Remote_2_16
displayName: Remote 2.16
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: 2.16/{0}
targets:
- name: macOS 13.2
test: macos/13.2
- name: RHEL 9.2
test: rhel/9.2
- name: RHEL 8.8
test: rhel/8.8
- name: RHEL 7.9
test: rhel/7.9
# - name: FreeBSD 13.2
# test: freebsd/13.2
groups:
- 1
- 2
- 3
### Docker
- stage: Docker_devel
displayName: Docker devel
- stage: Docker_2_20
displayName: Docker 2.20
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: devel/linux/{0}
testFormat: 2.20/linux/{0}
targets:
- name: Fedora 42
test: fedora42
- name: Alpine 3.22
test: alpine322
- name: Ubuntu 22.04
test: ubuntu2204
- name: Ubuntu 24.04
test: ubuntu2404
groups:
- 1
- 2
- 3
- stage: Docker_2_19
displayName: Docker 2.19
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: 2.19/linux/{0}
targets:
- name: Fedora 41
test: fedora41
- name: Alpine 3.21
test: alpine321
- name: Ubuntu 22.04
test: ubuntu2204
- name: Ubuntu 24.04
test: ubuntu2404
groups:
- 1
- 2
@@ -316,40 +329,22 @@ stages:
- 1
- 2
- 3
- stage: Docker_2_16
displayName: Docker 2.16
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: 2.16/linux/{0}
targets:
- name: Fedora 38
test: fedora38
- name: openSUSE 15
test: opensuse15
- name: Alpine 3
test: alpine3
- name: CentOS 7
test: centos7
groups:
- 1
- 2
- 3
### Community Docker
- stage: Docker_community_devel
displayName: Docker (community images) devel
- stage: Docker_community_2_20
displayName: Docker (community images) 2.20
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: devel/linux-community/{0}
testFormat: 2.20/linux-community/{0}
targets:
- name: Debian Bullseye
- name: Debian 11 Bullseye
test: debian-bullseye/3.9
- name: Debian Bookworm
- name: Debian 12 Bookworm
test: debian-bookworm/3.11
- name: Debian 13 Trixie
test: debian-13-trixie/3.13
- name: ArchLinux
test: archlinux/3.13
groups:
@@ -359,17 +354,28 @@ stages:
### Generic
# Right now all generic tests are disabled. Uncomment when at least one of them is re-enabled.
# - stage: Generic_devel
# displayName: Generic devel
# - stage: Generic_2_20
# displayName: Generic 2.20
# dependsOn: []
# jobs:
# - template: templates/matrix.yml
# parameters:
# nameFormat: Python {0}
# testFormat: devel/generic/{0}/1
# testFormat: 2.20/generic/{0}/1
# targets:
# - test: '3.8'
# - test: '3.11'
# - test: '3.9'
# - test: '3.12'
# - test: '3.14'
# - stage: Generic_2_19
# displayName: Generic 2.19
# dependsOn: []
# jobs:
# - template: templates/matrix.yml
# parameters:
# nameFormat: Python {0}
# testFormat: 2.19/generic/{0}/1
# targets:
# - test: '3.9'
# - test: '3.13'
# - stage: Generic_2_18
# displayName: Generic 2.18
@@ -393,44 +399,32 @@ stages:
# targets:
# - test: '3.7'
# - test: '3.12'
# - stage: Generic_2_16
# displayName: Generic 2.16
# dependsOn: []
# jobs:
# - template: templates/matrix.yml
# parameters:
# nameFormat: Python {0}
# testFormat: 2.16/generic/{0}/1
# targets:
# - test: '2.7'
# - test: '3.6'
# - test: '3.11'
- stage: Summary
condition: succeededOrFailed()
dependsOn:
- Sanity_devel
- Sanity_2_20
- Sanity_2_19
- Sanity_2_18
- Sanity_2_17
- Sanity_2_16
- Units_devel
- Units_2_20
- Units_2_19
- Units_2_18
- Units_2_17
- Units_2_16
- Remote_devel_extra_vms
- Remote_devel
- Remote_2_20_extra_vms
- Remote_2_20
- Remote_2_19
- Remote_2_18
- Remote_2_17
- Remote_2_16
- Docker_devel
- Docker_2_20
- Docker_2_19
- Docker_2_18
- Docker_2_17
- Docker_2_16
- Docker_community_devel
- Docker_community_2_20
# Right now all generic tests are disabled. Uncomment when at least one of them is re-enabled.
# - Generic_devel
# - Generic_2_20
# - Generic_2_19
# - Generic_2_18
# - Generic_2_17
# - Generic_2_16
jobs:
- template: templates/coverage.yml

View File

@@ -28,16 +28,6 @@ jobs:
- bash: .azure-pipelines/scripts/report-coverage.sh
displayName: Generate Coverage Report
condition: gt(variables.coverageFileCount, 0)
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
# Azure Pipelines only accepts a single coverage data file.
# That means only Python or PowerShell coverage can be uploaded, but not both.
# Set the "pipelinesCoverage" variable to determine which type is uploaded.
# Use "coverage" for Python and "coverage-powershell" for PowerShell.
summaryFileLocation: "$(outputPath)/reports/$(pipelinesCoverage).xml"
displayName: Publish to Azure Pipelines
condition: gt(variables.coverageFileCount, 0)
- bash: .azure-pipelines/scripts/publish-codecov.py "$(outputPath)"
displayName: Publish to codecov.io
condition: gt(variables.coverageFileCount, 0)

View File

@@ -50,11 +50,11 @@ jobs:
parameters:
jobs:
- ${{ if eq(length(parameters.groups), 0) }}:
- ${{ each target in parameters.targets }}:
- name: ${{ format(parameters.nameFormat, coalesce(target.name, target.test)) }}
test: ${{ format(parameters.testFormat, coalesce(target.test, target.name)) }}
- ${{ if not(eq(length(parameters.groups), 0)) }}:
- ${{ each group in parameters.groups }}:
- ${{ each target in parameters.targets }}:
- name: ${{ format(format(parameters.nameGroupFormat, parameters.nameFormat), coalesce(target.name, target.test), group) }}
test: ${{ format(format(parameters.testGroupFormat, parameters.testFormat), coalesce(target.test, target.name), group) }}
- name: ${{ format(parameters.nameFormat, coalesce(target.name, target.test)) }}
test: ${{ format(parameters.testFormat, coalesce(target.test, target.name)) }}
- ${{ if not(eq(length(parameters.groups), 0)) }}:
- ${{ each group in parameters.groups }}:
- ${{ each target in parameters.targets }}:
- name: ${{ format(format(parameters.nameGroupFormat, parameters.nameFormat), coalesce(target.name, target.test), group) }}
test: ${{ format(format(parameters.testGroupFormat, parameters.testFormat), coalesce(target.test, target.name), group) }}

View File

@@ -14,37 +14,37 @@ parameters:
jobs:
- ${{ each job in parameters.jobs }}:
- job: test_${{ replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_') }}
displayName: ${{ job.name }}
container: default
workspace:
clean: all
steps:
- checkout: self
fetchDepth: $(fetchDepth)
path: $(checkoutPath)
- bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)"
displayName: Run Tests
- bash: .azure-pipelines/scripts/process-results.sh
condition: succeededOrFailed()
displayName: Process Results
- bash: .azure-pipelines/scripts/aggregate-coverage.sh "$(Agent.TempDirectory)"
condition: eq(variables.haveCoverageData, 'true')
displayName: Aggregate Coverage Data
- task: PublishTestResults@2
condition: eq(variables.haveTestResults, 'true')
inputs:
testResultsFiles: "$(outputPath)/junit/*.xml"
displayName: Publish Test Results
- task: PublishPipelineArtifact@1
condition: eq(variables.haveBotResults, 'true')
displayName: Publish Bot Results
inputs:
targetPath: "$(outputPath)/bot/"
artifactName: "Bot $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
- task: PublishPipelineArtifact@1
condition: eq(variables.haveCoverageData, 'true')
displayName: Publish Coverage Data
inputs:
targetPath: "$(Agent.TempDirectory)/coverage/"
artifactName: "Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
- job: test_${{ replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_') }}
displayName: ${{ job.name }}
container: default
workspace:
clean: all
steps:
- checkout: self
fetchDepth: $(fetchDepth)
path: $(checkoutPath)
- bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)"
displayName: Run Tests
- bash: .azure-pipelines/scripts/process-results.sh
condition: succeededOrFailed()
displayName: Process Results
- bash: .azure-pipelines/scripts/aggregate-coverage.sh "$(Agent.TempDirectory)"
condition: eq(variables.haveCoverageData, 'true')
displayName: Aggregate Coverage Data
- task: PublishTestResults@2
condition: eq(variables.haveTestResults, 'true')
inputs:
testResultsFiles: "$(outputPath)/junit/*.xml"
displayName: Publish Test Results
- task: PublishPipelineArtifact@1
condition: eq(variables.haveBotResults, 'true')
displayName: Publish Bot Results
inputs:
targetPath: "$(outputPath)/bot/"
artifactName: "Bot $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
- task: PublishPipelineArtifact@1
condition: eq(variables.haveCoverageData, 'true')
displayName: Publish Coverage Data
inputs:
targetPath: "$(Agent.TempDirectory)/coverage/"
artifactName: "Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"

9
.git-blame-ignore-revs Normal file
View File

@@ -0,0 +1,9 @@
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# YAML reformatting
2b4882549908b5b1fafe5fa10efb47f613a71f94
8196cacff8e83dc5d7fb88b43ef3cab5d3751c39
bd4f1a3e5ca1af5afc53636c36767e81a4566978
a9e892952deef6f91977d7032dd95237a9867509

26
.github/BOTMETA.yml vendored
View File

@@ -77,6 +77,8 @@ files:
$callbacks/opentelemetry.py:
keywords: opentelemetry observability
maintainers: v1v
$callbacks/print_task.py:
maintainers: demonpig
$callbacks/say.py:
keywords: brew cask darwin homebrew macosx macports osx
labels: macos say
@@ -119,6 +121,8 @@ files:
$connections/saltstack.py:
labels: saltstack
maintainers: mscherer
$connections/wsl.py:
maintainers: rgl
$connections/zone.py:
maintainers: $team_ansible_core
$doc_fragments/:
@@ -208,6 +212,8 @@ files:
maintainers: resmo
$filters/to_months.yml:
maintainers: resmo
$filters/to_prettytable.py:
maintainers: tgadiev
$filters/to_seconds.yml:
maintainers: resmo
$filters/to_time_unit.yml:
@@ -378,9 +384,13 @@ files:
$module_utils/oracle/oci_utils.py:
labels: cloud
maintainers: $team_oracle
$module_utils/pacemaker.py:
maintainers: munchtoast
$module_utils/pipx.py:
labels: pipx
maintainers: russoz
$module_utils/pkg_req.py:
maintainers: russoz
$module_utils/python_runner.py:
maintainers: russoz
$module_utils/puppet.py:
@@ -402,6 +412,8 @@ files:
maintainers: russoz
$module_utils/ssh.py:
maintainers: russoz
$module_utils/systemd.py:
maintainers: NomakCooper
$module_utils/storage/hpe3par/hpe3par.py:
maintainers: farhan7500 gautamphegde
$module_utils/utm_utils.py:
@@ -413,6 +425,8 @@ files:
$module_utils/wdc_redfish_utils.py:
labels: wdc_redfish_utils
maintainers: $team_wdc
$module_utils/xdg_mime.py:
maintainers: mhalano
$module_utils/xenserver.py:
labels: xenserver
maintainers: bvitnik
@@ -1054,6 +1068,8 @@ files:
maintainers: fraff
$modules/pacemaker_cluster.py:
maintainers: matbu
$modules/pacemaker_resource.py:
maintainers: munchtoast
$modules/packet_:
maintainers: nurfet-becirevic t0mk
$modules/packet_device.py:
@@ -1229,9 +1245,9 @@ files:
$modules/scaleway_compute_private_network.py:
maintainers: pastral
$modules/scaleway_container.py:
maintainers: Lunik
maintainers: Lunik
$modules/scaleway_container_info.py:
maintainers: Lunik
maintainers: Lunik
$modules/scaleway_container_namespace.py:
maintainers: Lunik
$modules/scaleway_container_namespace_info.py:
@@ -1364,6 +1380,8 @@ files:
maintainers: konstruktoid
$modules/systemd_creds_encrypt.py:
maintainers: konstruktoid
$modules/systemd_info.py:
maintainers: NomakCooper
$modules/sysupgrade.py:
maintainers: precurse
$modules/taiga_issue.py:
@@ -1437,6 +1455,8 @@ files:
maintainers: dinoocch the-maldridge
$modules/xcc_:
maintainers: panyy3 renxulei
$modules/xdg_mime.py:
maintainers: mhalano
$modules/xenserver_:
maintainers: bvitnik
$modules/xenserver_facts.py:
@@ -1543,6 +1563,8 @@ files:
maintainers: baldwinSPC nurfet-becirevic t0mk teebes
docs/docsite/rst/guide_scaleway.rst:
maintainers: $team_scaleway
docs/docsite/rst/guide_uthelper.rst:
maintainers: russoz
docs/docsite/rst/guide_vardict.rst:
maintainers: russoz
docs/docsite/rst/test_guide.rst:

View File

@@ -7,147 +7,147 @@ name: Bug report
description: Create a report to help us improve
body:
- type: markdown
attributes:
value: |
Verify first that your issue is not [already reported on GitHub][issue search].
Also test if the latest release and devel branch are affected too.
*Complete **all** sections as described, this form is processed automatically.*
- type: markdown
attributes:
value: |
Verify first that your issue is not [already reported on GitHub][issue search].
Also test if the latest release and devel branch are affected too.
*Complete **all** sections as described, this form is processed automatically.*
[issue search]: https://github.com/ansible-collections/community.general/search?q=is%3Aissue&type=issues
[issue search]: https://github.com/ansible-collections/community.general/search?q=is%3Aissue&type=issues
- type: textarea
attributes:
label: Summary
description: Explain the problem briefly below.
placeholder: >-
When I try to do X with the collection from the main branch on GitHub, Y
breaks in a way Z under the env E. Here are all the details I know
about this problem...
validations:
required: true
- type: dropdown
attributes:
label: Issue Type
# FIXME: Once GitHub allows defining the default choice, update this
options:
- Bug Report
validations:
required: true
- type: textarea
attributes:
# For smaller collections we could use a multi-select and hardcode the list
# May generate this list via GitHub action and walking files under https://github.com/ansible-collections/community.general/tree/main/plugins
# Select from list, filter as you type (`mysql` would only show the 3 mysql components)
# OR freeform - doesn't seem to be supported in adaptivecards
label: Component Name
description: >-
Write the short name of the module, plugin, task or feature below,
*use your best guess if unsure*. Do not include `community.general.`!
placeholder: dnf, apt, yum, pip, user etc.
validations:
required: true
- type: textarea
attributes:
label: Ansible Version
description: >-
Paste verbatim output from `ansible --version` between
tripple backticks.
value: |
```console (paste below)
$ ansible --version
```
validations:
required: true
- type: textarea
attributes:
label: Community.general Version
description: >-
Paste verbatim output from "ansible-galaxy collection list community.general"
between tripple backticks.
value: |
```console (paste below)
$ ansible-galaxy collection list community.general
```
validations:
required: true
- type: textarea
attributes:
label: Configuration
description: >-
If this issue has an example piece of YAML that can help to reproduce this problem, please provide it.
This can be a piece of YAML from, e.g., an automation, script, scene or configuration.
Paste verbatim output from `ansible-config dump --only-changed` between quotes
value: |
```console (paste below)
$ ansible-config dump --only-changed
```
- type: textarea
attributes:
label: OS / Environment
description: >-
Provide all relevant information below, e.g. target OS versions,
network device firmware, etc.
placeholder: RHEL 8, CentOS Stream etc.
validations:
required: false
- type: textarea
attributes:
label: Steps to Reproduce
description: |
Describe exactly how to reproduce the problem, using a minimal test-case. It would *really* help us understand your problem if you could also passed any playbooks, configs and commands you used.
**HINT:** You can paste https://gist.github.com links for larger files.
value: |
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
```
validations:
required: true
- type: textarea
attributes:
label: Expected Results
description: >-
Describe what you expected to happen when running the steps above.
placeholder: >-
I expected X to happen because I assumed Y.
that it did not.
validations:
required: true
- type: textarea
attributes:
label: Actual Results
description: |
Describe what actually happened. If possible run with extra verbosity (`-vvvv`).
Paste verbatim command output between quotes.
value: |
```console (paste below)
```
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--ansible-collections) first.
options:
- label: I agree to follow the Ansible Code of Conduct
- type: textarea
attributes:
label: Summary
description: Explain the problem briefly below.
placeholder: >-
When I try to do X with the collection from the main branch on GitHub, Y
breaks in a way Z under the env E. Here are all the details I know
about this problem...
validations:
required: true
- type: dropdown
attributes:
label: Issue Type
# FIXME: Once GitHub allows defining the default choice, update this
options:
- Bug Report
validations:
required: true
- type: textarea
attributes:
# For smaller collections we could use a multi-select and hardcode the list
# May generate this list via GitHub action and walking files under https://github.com/ansible-collections/community.general/tree/main/plugins
# Select from list, filter as you type (`mysql` would only show the 3 mysql components)
# OR freeform - doesn't seem to be supported in adaptivecards
label: Component Name
description: >-
Write the short name of the module, plugin, task or feature below,
*use your best guess if unsure*. Do not include `community.general.`!
placeholder: dnf, apt, yum, pip, user etc.
validations:
required: true
- type: textarea
attributes:
label: Ansible Version
description: >-
Paste verbatim output from `ansible --version` between
tripple backticks.
value: |
```console (paste below)
$ ansible --version
```
validations:
required: true
- type: textarea
attributes:
label: Community.general Version
description: >-
Paste verbatim output from "ansible-galaxy collection list community.general"
between tripple backticks.
value: |
```console (paste below)
$ ansible-galaxy collection list community.general
```
validations:
required: true
- type: textarea
attributes:
label: Configuration
description: >-
If this issue has an example piece of YAML that can help to reproduce this problem, please provide it.
This can be a piece of YAML from, e.g., an automation, script, scene or configuration.
Paste verbatim output from `ansible-config dump --only-changed` between quotes
value: |
```console (paste below)
$ ansible-config dump --only-changed
```
- type: textarea
attributes:
label: OS / Environment
description: >-
Provide all relevant information below, e.g. target OS versions,
network device firmware, etc.
placeholder: RHEL 8, CentOS Stream etc.
validations:
required: false
- type: textarea
attributes:
label: Steps to Reproduce
description: |
Describe exactly how to reproduce the problem, using a minimal test-case. It would *really* help us understand your problem if you could also passed any playbooks, configs and commands you used.
**HINT:** You can paste https://gist.github.com links for larger files.
value: |
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
```
validations:
required: true
- type: textarea
attributes:
label: Expected Results
description: >-
Describe what you expected to happen when running the steps above.
placeholder: >-
I expected X to happen because I assumed Y.
that it did not.
validations:
required: true
- type: textarea
attributes:
label: Actual Results
description: |
Describe what actually happened. If possible run with extra verbosity (`-vvvv`).
Paste verbatim command output between quotes.
value: |
```console (paste below)
```
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--ansible-collections) first.
options:
- label: I agree to follow the Ansible Code of Conduct
required: true
...

View File

@@ -6,26 +6,26 @@
# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
blank_issues_enabled: false # default: true
contact_links:
- name: Security bug report
url: https://docs.ansible.com/ansible-core/devel/community/reporting_bugs_and_features.html?utm_medium=github&utm_source=issue_template_chooser_ansible_collections
about: |
Please learn how to report security vulnerabilities here.
- name: Security bug report
url: https://docs.ansible.com/ansible-core/devel/community/reporting_bugs_and_features.html?utm_medium=github&utm_source=issue_template_chooser_ansible_collections
about: |
Please learn how to report security vulnerabilities here.
For all security related bugs, email security@ansible.com
instead of using this issue tracker and you will receive
a prompt response.
For all security related bugs, email security@ansible.com
instead of using this issue tracker and you will receive
a prompt response.
For more information, see
https://docs.ansible.com/ansible/latest/community/reporting_bugs_and_features.html
- name: Ansible Code of Conduct
url: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_template_chooser_ansible_collections
about: Be nice to other members of the community.
- name: Talks to the community
url: https://docs.ansible.com/ansible/latest/community/communication.html?utm_medium=github&utm_source=issue_template_chooser#mailing-list-information
about: Please ask and answer usage questions here
- name: Working groups
url: https://github.com/ansible/community/wiki
about: Interested in improving a specific area? Become a part of a working group!
- name: For Enterprise
url: https://www.ansible.com/products/engine?utm_medium=github&utm_source=issue_template_chooser_ansible_collections
about: Red Hat offers support for the Ansible Automation Platform
For more information, see
https://docs.ansible.com/ansible/latest/community/reporting_bugs_and_features.html
- name: Ansible Code of Conduct
url: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_template_chooser_ansible_collections
about: Be nice to other members of the community.
- name: Talks to the community
url: https://docs.ansible.com/ansible/latest/community/communication.html?utm_medium=github&utm_source=issue_template_chooser#mailing-list-information
about: Please ask and answer usage questions here
- name: Working groups
url: https://github.com/ansible/community/wiki
about: Interested in improving a specific area? Become a part of a working group!
- name: For Enterprise
url: https://www.ansible.com/products/engine?utm_medium=github&utm_source=issue_template_chooser_ansible_collections
about: Red Hat offers support for the Ansible Automation Platform

View File

@@ -8,122 +8,122 @@ description: Ask us about docs
# NOTE: issue body is enabled to allow screenshots
body:
- type: markdown
attributes:
value: |
Verify first that your issue is not [already reported on GitHub][issue search].
Also test if the latest release and devel branch are affected too.
*Complete **all** sections as described, this form is processed automatically.*
- type: markdown
attributes:
value: |
Verify first that your issue is not [already reported on GitHub][issue search].
Also test if the latest release and devel branch are affected too.
*Complete **all** sections as described, this form is processed automatically.*
[issue search]: https://github.com/ansible-collections/community.general/search?q=is%3Aissue&type=issues
[issue search]: https://github.com/ansible-collections/community.general/search?q=is%3Aissue&type=issues
- type: textarea
attributes:
label: Summary
description: |
Explain the problem briefly below, add suggestions to wording or structure.
- type: textarea
attributes:
label: Summary
description: |
Explain the problem briefly below, add suggestions to wording or structure.
**HINT:** Did you know the documentation has an `Edit on GitHub` link on every page?
placeholder: >-
I was reading the Collection documentation of version X and I'm having
problems understanding Y. It would be very helpful if that got
rephrased as Z.
validations:
required: true
- type: dropdown
attributes:
label: Issue Type
# FIXME: Once GitHub allows defining the default choice, update this
options:
- Documentation Report
validations:
required: true
- type: input
attributes:
label: Component Name
description: >-
Write the short name of the file, module, plugin, task or feature below,
*use your best guess if unsure*. Do not include `community.general.`!
placeholder: mysql_user
validations:
required: true
- type: textarea
attributes:
label: Ansible Version
description: >-
Paste verbatim output from `ansible --version` between
tripple backticks.
value: |
```console (paste below)
$ ansible --version
```
validations:
required: false
- type: textarea
attributes:
label: Community.general Version
description: >-
Paste verbatim output from "ansible-galaxy collection list community.general"
between tripple backticks.
value: |
```console (paste below)
$ ansible-galaxy collection list community.general
```
validations:
required: true
- type: textarea
attributes:
label: Configuration
description: >-
Paste verbatim output from `ansible-config dump --only-changed` between quotes.
value: |
```console (paste below)
$ ansible-config dump --only-changed
```
validations:
required: false
- type: textarea
attributes:
label: OS / Environment
description: >-
Provide all relevant information below, e.g. OS version,
browser, etc.
placeholder: Fedora 33, Firefox etc.
validations:
required: false
- type: textarea
attributes:
label: Additional Information
description: |
Describe how this improves the documentation, e.g. before/after situation or screenshots.
**Tip:** It's not possible to upload the screenshot via this field directly but you can use the last textarea in this form to attach them.
**HINT:** You can paste https://gist.github.com links for larger files.
placeholder: >-
When the improvement is applied, it makes it more straightforward
to understand X.
validations:
required: false
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--ansible-collections) first.
options:
- label: I agree to follow the Ansible Code of Conduct
**HINT:** Did you know the documentation has an `Edit on GitHub` link on every page?
placeholder: >-
I was reading the Collection documentation of version X and I'm having
problems understanding Y. It would be very helpful if that got
rephrased as Z.
validations:
required: true
- type: dropdown
attributes:
label: Issue Type
# FIXME: Once GitHub allows defining the default choice, update this
options:
- Documentation Report
validations:
required: true
- type: input
attributes:
label: Component Name
description: >-
Write the short name of the file, module, plugin, task or feature below,
*use your best guess if unsure*. Do not include `community.general.`!
placeholder: mysql_user
validations:
required: true
- type: textarea
attributes:
label: Ansible Version
description: >-
Paste verbatim output from `ansible --version` between
tripple backticks.
value: |
```console (paste below)
$ ansible --version
```
validations:
required: false
- type: textarea
attributes:
label: Community.general Version
description: >-
Paste verbatim output from "ansible-galaxy collection list community.general"
between tripple backticks.
value: |
```console (paste below)
$ ansible-galaxy collection list community.general
```
validations:
required: true
- type: textarea
attributes:
label: Configuration
description: >-
Paste verbatim output from `ansible-config dump --only-changed` between quotes.
value: |
```console (paste below)
$ ansible-config dump --only-changed
```
validations:
required: false
- type: textarea
attributes:
label: OS / Environment
description: >-
Provide all relevant information below, e.g. OS version,
browser, etc.
placeholder: Fedora 33, Firefox etc.
validations:
required: false
- type: textarea
attributes:
label: Additional Information
description: |
Describe how this improves the documentation, e.g. before/after situation or screenshots.
**Tip:** It's not possible to upload the screenshot via this field directly but you can use the last textarea in this form to attach them.
**HINT:** You can paste https://gist.github.com links for larger files.
placeholder: >-
When the improvement is applied, it makes it more straightforward
to understand X.
validations:
required: false
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--ansible-collections) first.
options:
- label: I agree to follow the Ansible Code of Conduct
required: true
...

View File

@@ -7,67 +7,67 @@ name: Feature request
description: Suggest an idea for this project
body:
- type: markdown
attributes:
value: |
Verify first that your issue is not [already reported on GitHub][issue search].
Also test if the latest release and devel branch are affected too.
*Complete **all** sections as described, this form is processed automatically.*
- type: markdown
attributes:
value: |
Verify first that your issue is not [already reported on GitHub][issue search].
Also test if the latest release and devel branch are affected too.
*Complete **all** sections as described, this form is processed automatically.*
[issue search]: https://github.com/ansible-collections/community.general/search?q=is%3Aissue&type=issues
[issue search]: https://github.com/ansible-collections/community.general/search?q=is%3Aissue&type=issues
- type: textarea
attributes:
label: Summary
description: Describe the new feature/improvement briefly below.
placeholder: >-
I am trying to do X with the collection from the main branch on GitHub and
I think that implementing a feature Y would be very helpful for me and
every other user of community.general because of Z.
validations:
required: true
- type: dropdown
attributes:
label: Issue Type
# FIXME: Once GitHub allows defining the default choice, update this
options:
- Feature Idea
validations:
required: true
- type: input
attributes:
label: Component Name
description: >-
Write the short name of the module or plugin, or which other part(s) of the collection this feature affects.
*use your best guess if unsure*. Do not include `community.general.`!
placeholder: dnf, apt, yum, pip, user etc.
validations:
required: true
- type: textarea
attributes:
label: Additional Information
description: |
Describe how the feature would be used, why it is needed and what it would solve.
**HINT:** You can paste https://gist.github.com links for larger files.
value: |
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
```
validations:
required: false
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--ansible-collections) first.
options:
- label: I agree to follow the Ansible Code of Conduct
- type: textarea
attributes:
label: Summary
description: Describe the new feature/improvement briefly below.
placeholder: >-
I am trying to do X with the collection from the main branch on GitHub and
I think that implementing a feature Y would be very helpful for me and
every other user of community.general because of Z.
validations:
required: true
- type: dropdown
attributes:
label: Issue Type
# FIXME: Once GitHub allows defining the default choice, update this
options:
- Feature Idea
validations:
required: true
- type: input
attributes:
label: Component Name
description: >-
Write the short name of the module or plugin, or which other part(s) of the collection this feature affects.
*use your best guess if unsure*. Do not include `community.general.`!
placeholder: dnf, apt, yum, pip, user etc.
validations:
required: true
- type: textarea
attributes:
label: Additional Information
description: |
Describe how the feature would be used, why it is needed and what it would solve.
**HINT:** You can paste https://gist.github.com links for larger files.
value: |
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
```
validations:
required: false
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--ansible-collections) first.
options:
- label: I agree to follow the Ansible Code of Conduct
required: true
...

View File

@@ -7,7 +7,7 @@
# https://github.com/marketplace/actions/ansible-test
name: EOL CI
on:
"on":
# Run EOL CI against all pushes (direct commits, also merged PRs), Pull Requests
push:
branches:
@@ -30,6 +30,7 @@ jobs:
matrix:
ansible:
- '2.15'
- '2.16'
# Ansible-test on various stable branches does not yet work well with cgroups v2.
# Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04
# image for these stable branches. The list of branches where this is necessary will
@@ -45,6 +46,8 @@ jobs:
coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }}
pull-request-change-detection: 'true'
testing-type: sanity
pre-test-cmd: >-
git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ../../community/internal_test_tools
units:
# Ansible-test on various stable branches does not yet work well with cgroups v2.
@@ -71,6 +74,12 @@ jobs:
python: '3.5'
- ansible: '2.15'
python: '3.10'
- ansible: '2.16'
python: '2.7'
- ansible: '2.16'
python: '3.6'
- ansible: '2.16'
python: '3.11'
steps:
- name: >-
@@ -136,19 +145,43 @@ jobs:
docker: fedora37
python: ''
target: azp/posix/3/
# Right now all generic tests are disabled. Uncomment when at least one of them is re-enabled.
# - ansible: '2.13'
# docker: default
# python: '3.9'
# target: azp/generic/1/
# - ansible: '2.14'
# docker: default
# python: '3.10'
# target: azp/generic/1/
# - ansible: '2.15'
# docker: default
# python: '3.9'
# target: azp/generic/1/
# 2.16
- ansible: '2.16'
docker: alpine3
python: ''
target: azp/posix/1/
- ansible: '2.16'
docker: alpine3
python: ''
target: azp/posix/2/
- ansible: '2.16'
docker: alpine3
python: ''
target: azp/posix/3/
- ansible: '2.16'
docker: fedora38
python: ''
target: azp/posix/1/
- ansible: '2.16'
docker: fedora38
python: ''
target: azp/posix/2/
- ansible: '2.16'
docker: fedora38
python: ''
target: azp/posix/3/
- ansible: '2.16'
docker: opensuse15
python: ''
target: azp/posix/1/
- ansible: '2.16'
docker: opensuse15
python: ''
target: azp/posix/2/
- ansible: '2.16'
docker: opensuse15
python: ''
target: azp/posix/3/
steps:
- name: >-
@@ -164,12 +197,15 @@ jobs:
integration-continue-on-error: 'false'
integration-diff: 'false'
integration-retry-on-error: 'true'
# TODO: remove "--branch stable-2" from community.crypto install once we're only using ansible-core 2.17 or newer!
pre-test-cmd: >-
mkdir -p ../../ansible
;
git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.posix.git ../../ansible/posix
;
git clone --depth=1 --single-branch https://github.com/ansible-collections/community.crypto.git ../../community/crypto
git clone --depth=1 --single-branch --branch stable-2 https://github.com/ansible-collections/community.crypto.git ../../community/crypto
;
git clone --depth=1 --single-branch https://github.com/ansible-collections/community.docker.git ../../community/docker
;
git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ../../community/internal_test_tools
pull-request-change-detection: 'true'

View File

@@ -5,7 +5,7 @@
name: "Code scanning - action"
on:
"on":
schedule:
- cron: '26 19 * * 1'
workflow_dispatch:
@@ -23,16 +23,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Checkout repository
uses: actions/checkout@v5
with:
persist-credentials: false
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: python
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: python
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4

View File

@@ -1,20 +0,0 @@
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
name: import-galaxy
'on':
# Run CI against all pushes (direct commits, also merged PRs) to main, and all Pull Requests
push:
branches:
- main
- stable-*
pull_request:
jobs:
import-galaxy:
permissions:
contents: read
name: Test to import built collection artifact with Galaxy importer
uses: ansible-community/github-action-test-galaxy-import/.github/workflows/test-galaxy-import.yml@main

28
.github/workflows/nox.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
name: nox
'on':
push:
branches:
- main
- stable-*
pull_request:
# Run CI once per day (at 08:00 UTC)
schedule:
- cron: '0 8 * * *'
workflow_dispatch:
jobs:
nox:
runs-on: ubuntu-latest
name: "Run extra sanity tests"
steps:
- name: Check out collection
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Run nox
uses: ansible-community/antsibull-nox@main

View File

@@ -1,35 +0,0 @@
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
name: Verify REUSE
on:
push:
branches:
- main
- stable-*
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- stable-*
# Run CI once per day (at 07:30 UTC)
schedule:
- cron: '30 7 * * *'
jobs:
check:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha || '' }}
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v5

14
.gitignore vendored
View File

@@ -383,6 +383,16 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml
# ruff
.ruff_cache/
# LSP config files
pyrightconfig.json
### Vim ###
# Swap
[._]*.s[a-v][a-z]
@@ -482,6 +492,10 @@ tags
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
# Azure Toolkit for IntelliJ plugin
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
.idea/**/azureSettings.xml
### Windows ###
# Windows thumbnail cache files
Thumbs.db

View File

@@ -1,5 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: changelogs/fragments/*
Copyright: Ansible Project
License: GPL-3.0-or-later

View File

@@ -2,69 +2,490 @@
**Topics**
- <a href="#v10-3-1">v10\.3\.1</a>
- <a href="#v10-7-6">v10\.7\.6</a>
- <a href="#release-summary">Release Summary</a>
- <a href="#minor-changes">Minor Changes</a>
- <a href="#bugfixes">Bugfixes</a>
- <a href="#v10-3-0">v10\.3\.0</a>
- <a href="#release-summary-1">Release Summary</a>
- <a href="#minor-changes-1">Minor Changes</a>
- <a href="#deprecated-features">Deprecated Features</a>
- <a href="#security-fixes">Security Fixes</a>
- <a href="#bugfixes">Bugfixes</a>
- <a href="#v10-7-5">v10\.7\.5</a>
- <a href="#release-summary-1">Release Summary</a>
- <a href="#bugfixes-1">Bugfixes</a>
- <a href="#new-plugins">New Plugins</a>
- <a href="#connection">Connection</a>
- <a href="#filter">Filter</a>
- <a href="#lookup">Lookup</a>
- <a href="#new-modules">New Modules</a>
- <a href="#v10-2-0">v10\.2\.0</a>
- <a href="#v10-7-4">v10\.7\.4</a>
- <a href="#release-summary-2">Release Summary</a>
- <a href="#minor-changes-2">Minor Changes</a>
- <a href="#deprecated-features-1">Deprecated Features</a>
- <a href="#security-fixes-1">Security Fixes</a>
- <a href="#bugfixes-2">Bugfixes</a>
- <a href="#new-plugins-1">New Plugins</a>
- <a href="#inventory">Inventory</a>
- <a href="#new-modules-1">New Modules</a>
- <a href="#v10-1-0">v10\.1\.0</a>
- <a href="#v10-7-3">v10\.7\.3</a>
- <a href="#release-summary-3">Release Summary</a>
- <a href="#minor-changes-3">Minor Changes</a>
- <a href="#deprecated-features-2">Deprecated Features</a>
- <a href="#bugfixes-3">Bugfixes</a>
- <a href="#new-plugins-2">New Plugins</a>
- <a href="#filter-1">Filter</a>
- <a href="#new-modules-2">New Modules</a>
- <a href="#v10-0-1">v10\.0\.1</a>
- <a href="#v10-7-2">v10\.7\.2</a>
- <a href="#release-summary-4">Release Summary</a>
- <a href="#bugfixes-4">Bugfixes</a>
- <a href="#v10-0-0">v10\.0\.0</a>
- <a href="#v10-7-1">v10\.7\.1</a>
- <a href="#release-summary-5">Release Summary</a>
- <a href="#minor-changes-4">Minor Changes</a>
- <a href="#breaking-changes--porting-guide">Breaking Changes / Porting Guide</a>
- <a href="#deprecated-features-3">Deprecated Features</a>
- <a href="#removed-features-previously-deprecated">Removed Features \(previously deprecated\)</a>
- <a href="#minor-changes">Minor Changes</a>
- <a href="#deprecated-features">Deprecated Features</a>
- <a href="#bugfixes-5">Bugfixes</a>
- <a href="#v10-7-0">v10\.7\.0</a>
- <a href="#release-summary-6">Release Summary</a>
- <a href="#minor-changes-1">Minor Changes</a>
- <a href="#deprecated-features-1">Deprecated Features</a>
- <a href="#bugfixes-6">Bugfixes</a>
- <a href="#new-plugins">New Plugins</a>
- <a href="#callback">Callback</a>
- <a href="#filter">Filter</a>
- <a href="#new-modules">New Modules</a>
- <a href="#v10-6-0">v10\.6\.0</a>
- <a href="#release-summary-7">Release Summary</a>
- <a href="#minor-changes-2">Minor Changes</a>
- <a href="#deprecated-features-2">Deprecated Features</a>
- <a href="#bugfixes-7">Bugfixes</a>
- <a href="#known-issues">Known Issues</a>
- <a href="#new-plugins-3">New Plugins</a>
- <a href="#filter-2">Filter</a>
- <a href="#test">Test</a>
- <a href="#new-plugins-1">New Plugins</a>
- <a href="#connection">Connection</a>
- <a href="#v10-5-0">v10\.5\.0</a>
- <a href="#release-summary-8">Release Summary</a>
- <a href="#minor-changes-3">Minor Changes</a>
- <a href="#bugfixes-8">Bugfixes</a>
- <a href="#new-modules-1">New Modules</a>
- <a href="#v10-4-0">v10\.4\.0</a>
- <a href="#release-summary-9">Release Summary</a>
- <a href="#minor-changes-4">Minor Changes</a>
- <a href="#deprecated-features-3">Deprecated Features</a>
- <a href="#bugfixes-9">Bugfixes</a>
- <a href="#new-modules-2">New Modules</a>
- <a href="#v10-3-1">v10\.3\.1</a>
- <a href="#release-summary-10">Release Summary</a>
- <a href="#minor-changes-5">Minor Changes</a>
- <a href="#bugfixes-10">Bugfixes</a>
- <a href="#v10-3-0">v10\.3\.0</a>
- <a href="#release-summary-11">Release Summary</a>
- <a href="#minor-changes-6">Minor Changes</a>
- <a href="#deprecated-features-4">Deprecated Features</a>
- <a href="#security-fixes-1">Security Fixes</a>
- <a href="#bugfixes-11">Bugfixes</a>
- <a href="#new-plugins-2">New Plugins</a>
- <a href="#connection-1">Connection</a>
- <a href="#filter-1">Filter</a>
- <a href="#lookup">Lookup</a>
- <a href="#new-modules-3">New Modules</a>
- <a href="#v10-2-0">v10\.2\.0</a>
- <a href="#release-summary-12">Release Summary</a>
- <a href="#minor-changes-7">Minor Changes</a>
- <a href="#deprecated-features-5">Deprecated Features</a>
- <a href="#security-fixes-2">Security Fixes</a>
- <a href="#bugfixes-12">Bugfixes</a>
- <a href="#new-plugins-3">New Plugins</a>
- <a href="#inventory">Inventory</a>
- <a href="#new-modules-4">New Modules</a>
- <a href="#v10-1-0">v10\.1\.0</a>
- <a href="#release-summary-13">Release Summary</a>
- <a href="#minor-changes-8">Minor Changes</a>
- <a href="#deprecated-features-6">Deprecated Features</a>
- <a href="#bugfixes-13">Bugfixes</a>
- <a href="#new-plugins-4">New Plugins</a>
- <a href="#filter-2">Filter</a>
- <a href="#new-modules-5">New Modules</a>
- <a href="#v10-0-1">v10\.0\.1</a>
- <a href="#release-summary-14">Release Summary</a>
- <a href="#bugfixes-14">Bugfixes</a>
- <a href="#v10-0-0">v10\.0\.0</a>
- <a href="#release-summary-15">Release Summary</a>
- <a href="#minor-changes-9">Minor Changes</a>
- <a href="#breaking-changes--porting-guide">Breaking Changes / Porting Guide</a>
- <a href="#deprecated-features-7">Deprecated Features</a>
- <a href="#removed-features-previously-deprecated">Removed Features \(previously deprecated\)</a>
- <a href="#bugfixes-15">Bugfixes</a>
- <a href="#known-issues-1">Known Issues</a>
- <a href="#new-plugins-5">New Plugins</a>
- <a href="#filter-3">Filter</a>
- <a href="#test">Test</a>
- <a href="#new-modules-6">New Modules</a>
This changelog describes changes after version 9\.0\.0\.
<a id="v10-3-1"></a>
## v10\.3\.1
<a id="v10-7-6"></a>
## v10\.7\.6
<a id="release-summary"></a>
### Release Summary
Bugfix release\.
Regular bugfix release\.
<a id="security-fixes"></a>
### Security Fixes
* keycloak\_user \- the parameter <code>credentials\[\]\.value</code> is now marked as <code>no\_log\=true</code>\. Before it was logged by Ansible\, unless the task was marked as <code>no\_log\: true</code>\. Since this parameter can be used for passwords\, this resulted in credential leaking \([https\://github\.com/ansible\-collections/community\.general/issues/11000](https\://github\.com/ansible\-collections/community\.general/issues/11000)\, [https\://github\.com/ansible\-collections/community\.general/pull/11005](https\://github\.com/ansible\-collections/community\.general/pull/11005)\)\.
<a id="bugfixes"></a>
### Bugfixes
* gitlab\_runner \- fix exception in check mode when a new runner is created \([https\://github\.com/ansible\-collections/community\.general/issues/8854](https\://github\.com/ansible\-collections/community\.general/issues/8854)\)\.
* omapi\_host \- make return values compatible with ansible\-core 2\.19 and Python 3 \([https\://github\.com/ansible\-collections/community\.general/pull/11001](https\://github\.com/ansible\-collections/community\.general/pull/11001)\)\.
* onepassword\_doc and onepassword\_ssh\_key lookup plugins \- ensure that all connection parameters are passed to CLI class \([https\://github\.com/ansible\-collections/community\.general/pull/10965](https\://github\.com/ansible\-collections/community\.general/pull/10965)\)\.
* pritunl\_user \- improve resilience when comparing user parameters if remote fields are <code>null</code> or missing\. List parameters \(<code>groups</code>\, <code>mac\_addresses</code>\) now safely default to empty lists for comparison and avoids <code>KeyError</code> issues \([https\://github\.com/ansible\-collections/community\.general/issues/10954](https\://github\.com/ansible\-collections/community\.general/issues/10954)\, [https\://github\.com/ansible\-collections/community\.general/pull/10955](https\://github\.com/ansible\-collections/community\.general/pull/10955)\)\.
* random\_string lookup plugin \- replace <code>random\.SystemRandom\(\)</code> with <code>secrets\.SystemRandom\(\)</code> when generating strings\. This has no practical effect\, as both are the same \([https\://github\.com/ansible\-collections/community\.general/pull/10893](https\://github\.com/ansible\-collections/community\.general/pull/10893)\)\.
* terraform \- fix bug when <code>null</code> values inside complex vars are throwing error instead of being passed to terraform\. Now terraform can handle <code>null\`\`s in \`\`complex\_vars</code> itself \([https\://github\.com/ansible\-collections/community\.general/pull/10961](https\://github\.com/ansible\-collections/community\.general/pull/10961)\)\.
<a id="v10-7-5"></a>
## v10\.7\.5
<a id="release-summary-1"></a>
### Release Summary
Regular bugfix release\.
<a id="bugfixes-1"></a>
### Bugfixes
* Avoid usage of deprecated <code>ansible\.module\_utils\.six</code> in all code that does not have to support Python 2 \([https\://github\.com/ansible\-collections/community\.general/pull/10873](https\://github\.com/ansible\-collections/community\.general/pull/10873)\)\.
* github\_deploy\_key \- fix bug during error handling if no body was present in the result \([https\://github\.com/ansible\-collections/community\.general/issues/10853](https\://github\.com/ansible\-collections/community\.general/issues/10853)\, [https\://github\.com/ansible\-collections/community\.general/pull/10857](https\://github\.com/ansible\-collections/community\.general/pull/10857)\)\.
* keycloak\_group \- fixes an issue where module ignores realm when searching subgroups by name \([https\://github\.com/ansible\-collections/community\.general/pull/10840](https\://github\.com/ansible\-collections/community\.general/pull/10840)\)\.
* keycloak\_role \- fixes an issue where the module incorrectly returns <code>changed\=true</code> when using the alias <code>clientId</code> in composite roles \([https\://github\.com/ansible\-collections/community\.general/pull/10829](https\://github\.com/ansible\-collections/community\.general/pull/10829)\)\.
* rocketchat \- fix message delivery in Rocket Chat \>\= 7\.5\.3 by forcing <code>Content\-Type</code> header to <code>application/json</code> instead of the default <code>application/x\-www\-form\-urlencoded</code> \([https\://github\.com/ansible\-collections/community\.general/issues/10796](https\://github\.com/ansible\-collections/community\.general/issues/10796)\, [https\://github\.com/ansible\-collections/community\.general/pull/10796](https\://github\.com/ansible\-collections/community\.general/pull/10796)\)\.
* yaml cache plugin \- make compatible with ansible\-core 2\.19 \([https\://github\.com/ansible\-collections/community\.general/issues/10849](https\://github\.com/ansible\-collections/community\.general/issues/10849)\, [https\://github\.com/ansible\-collections/community\.general/issues/10852](https\://github\.com/ansible\-collections/community\.general/issues/10852)\)\.
<a id="v10-7-4"></a>
## v10\.7\.4
<a id="release-summary-2"></a>
### Release Summary
Regular bugfix release\.
<a id="bugfixes-2"></a>
### Bugfixes
* Avoid deprecated functionality in ansible\-core 2\.20 \([https\://github\.com/ansible\-collections/community\.general/pull/10687](https\://github\.com/ansible\-collections/community\.general/pull/10687)\)\.
* apache2\_module \- check the <code>cgi</code> module restrictions only during activation \([https\://github\.com/ansible\-collections/community\.general/pull/10423](https\://github\.com/ansible\-collections/community\.general/pull/10423)\)\.
* kdeconfig \- <code>kwriteconfig</code> executable could not be discovered automatically on systems with only <code>kwriteconfig6</code> installed\. <code>kwriteconfig6</code> can now be discovered by Ansible \([https\://github\.com/ansible\-collections/community\.general/issues/10746](https\://github\.com/ansible\-collections/community\.general/issues/10746)\, [https\://github\.com/ansible\-collections/community\.general/pull/10751](https\://github\.com/ansible\-collections/community\.general/pull/10751)\)\.
* monit \- fix crash caused by an unknown status value returned from the monit service \([https\://github\.com/ansible\-collections/community\.general/issues/10742](https\://github\.com/ansible\-collections/community\.general/issues/10742)\, [https\://github\.com/ansible\-collections/community\.general/pull/10743](https\://github\.com/ansible\-collections/community\.general/pull/10743)\)\.
* pids \- prevent error when an empty string is provided for <code>name</code> \([https\://github\.com/ansible\-collections/community\.general/issues/10672](https\://github\.com/ansible\-collections/community\.general/issues/10672)\, [https\://github\.com/ansible\-collections/community\.general/pull/10688](https\://github\.com/ansible\-collections/community\.general/pull/10688)\)\.
* selective callback plugin \- specify <code>ansible\_loop\_var</code> instead of the explicit value <code>item</code> when printing task result \([https\://github\.com/ansible\-collections/community\.general/pull/10752](https\://github\.com/ansible\-collections/community\.general/pull/10752)\)\.
<a id="v10-7-3"></a>
## v10\.7\.3
<a id="release-summary-3"></a>
### Release Summary
Regular bugfix release\.
<a id="bugfixes-3"></a>
### Bugfixes
* apache2\_module \- avoid ansible\-core 2\.19 deprecation \([https\://github\.com/ansible\-collections/community\.general/pull/10459](https\://github\.com/ansible\-collections/community\.general/pull/10459)\)\.
* apk \- fix check for empty/whitespace\-only package names \([https\://github\.com/ansible\-collections/community\.general/pull/10532](https\://github\.com/ansible\-collections/community\.general/pull/10532)\)\.
* apk \- handle empty name strings properly \([https\://github\.com/ansible\-collections/community\.general/issues/10441](https\://github\.com/ansible\-collections/community\.general/issues/10441)\, [https\://github\.com/ansible\-collections/community\.general/pull/10442](https\://github\.com/ansible\-collections/community\.general/pull/10442)\)\.
* capabilities \- using invalid path \(symlink/directory/\.\.\.\) returned unrelated and incoherent error messages \([https\://github\.com/ansible\-collections/community\.general/issues/5649](https\://github\.com/ansible\-collections/community\.general/issues/5649)\, [https\://github\.com/ansible\-collections/community\.general/pull/10455](https\://github\.com/ansible\-collections/community\.general/pull/10455)\)\.
* cronvar \- fix crash on missing <code>cron\_file</code> parent directories \([https\://github\.com/ansible\-collections/community\.general/issues/10460](https\://github\.com/ansible\-collections/community\.general/issues/10460)\, [https\://github\.com/ansible\-collections/community\.general/pull/10461](https\://github\.com/ansible\-collections/community\.general/pull/10461)\)\.
* cronvar \- handle empty strings on <code>value</code> properly \([https\://github\.com/ansible\-collections/community\.general/issues/10439](https\://github\.com/ansible\-collections/community\.general/issues/10439)\, [https\://github\.com/ansible\-collections/community\.general/pull/10445](https\://github\.com/ansible\-collections/community\.general/pull/10445)\)\.
* doas become plugin \- disable pipelining on ansible\-core 2\.19\+\. The plugin does not work with pipelining\, and since ansible\-core 2\.19 become plugins can indicate that they do not work with pipelining \([https\://github\.com/ansible\-collections/community\.general/issues/9977](https\://github\.com/ansible\-collections/community\.general/issues/9977)\, [https\://github\.com/ansible\-collections/community\.general/pull/10537](https\://github\.com/ansible\-collections/community\.general/pull/10537)\)\.
* htpasswd \- avoid ansible\-core 2\.19 deprecation \([https\://github\.com/ansible\-collections/community\.general/pull/10459](https\://github\.com/ansible\-collections/community\.general/pull/10459)\)\.
* irc \- pass hostname to <code>wrap\_socket\(\)</code> if <code>use\_tls\=true</code> and <code>validate\_certs\=true</code> \([https\://github\.com/ansible\-collections/community\.general/issues/10472](https\://github\.com/ansible\-collections/community\.general/issues/10472)\, [https\://github\.com/ansible\-collections/community\.general/pull/10491](https\://github\.com/ansible\-collections/community\.general/pull/10491)\)\.
* json\_query filter plugin \- make compatible with lazy evaluation list and dictionary types of ansible\-core 2\.19 \([https\://github\.com/ansible\-collections/community\.general/pull/10539](https\://github\.com/ansible\-collections/community\.general/pull/10539)\)\.
* listen\_port\_facts \- avoid crash when required commands are missing \([https\://github\.com/ansible\-collections/community\.general/issues/10457](https\://github\.com/ansible\-collections/community\.general/issues/10457)\, [https\://github\.com/ansible\-collections/community\.general/pull/10458](https\://github\.com/ansible\-collections/community\.general/pull/10458)\)\.
* machinectl become plugin \- disable pipelining on ansible\-core 2\.19\+\. The plugin does not work with pipelining\, and since ansible\-core 2\.19 become plugins can indicate that they do not work with pipelining \([https\://github\.com/ansible\-collections/community\.general/pull/10537](https\://github\.com/ansible\-collections/community\.general/pull/10537)\)\.
* merge\_variables lookup plugin \- avoid deprecated functionality from ansible\-core 2\.19 \([https\://github\.com/ansible\-collections/community\.general/pull/10566](https\://github\.com/ansible\-collections/community\.general/pull/10566)\)\.
* proxmox inventory plugin \- avoid using deprecated option when templating options \([https\://github\.com/ansible\-collections/community\.proxmox/pull/108](https\://github\.com/ansible\-collections/community\.proxmox/pull/108)\, [https\://github\.com/ansible\-collections/community\.general/pull/10553](https\://github\.com/ansible\-collections/community\.general/pull/10553)\)\.
* proxmox\_pct\_remote connection plugin \- avoid deprecated ansible\-core paramiko import helper\, import paramiko directly instead \([https\://github\.com/ansible\-collections/community\.proxmox/issues/146](https\://github\.com/ansible\-collections/community\.proxmox/issues/146)\, [https\://github\.com/ansible\-collections/community\.proxmox/pull/151](https\://github\.com/ansible\-collections/community\.proxmox/pull/151)\, [https\://github\.com/ansible\-collections/community\.general/pull/10553](https\://github\.com/ansible\-collections/community\.general/pull/10553)\)\.
* syspatch \- avoid ansible\-core 2\.19 deprecation \([https\://github\.com/ansible\-collections/community\.general/pull/10459](https\://github\.com/ansible\-collections/community\.general/pull/10459)\)\.
* sysrc \- use <code>shlex</code> to improve parsing of <code>sysrc \-e \-a</code> output \([https\://github\.com/ansible\-collections/community\.general/issues/10394](https\://github\.com/ansible\-collections/community\.general/issues/10394)\, [https\://github\.com/ansible\-collections/community\.general/pull/10400](https\://github\.com/ansible\-collections/community\.general/pull/10400)\)\.
* sysupgrade \- avoid ansible\-core 2\.19 deprecation \([https\://github\.com/ansible\-collections/community\.general/pull/10459](https\://github\.com/ansible\-collections/community\.general/pull/10459)\)\.
* wsl connection plugin \- avoid deprecated ansible\-core paramiko import helper\, import paramiko directly instead \([https\://github\.com/ansible\-collections/community\.general/issues/10515](https\://github\.com/ansible\-collections/community\.general/issues/10515)\, [https\://github\.com/ansible\-collections/community\.general/pull/10531](https\://github\.com/ansible\-collections/community\.general/pull/10531)\)\.
* zypper\_repository \- avoid ansible\-core 2\.19 deprecation \([https\://github\.com/ansible\-collections/community\.general/pull/10459](https\://github\.com/ansible\-collections/community\.general/pull/10459)\)\.
<a id="v10-7-2"></a>
## v10\.7\.2
<a id="release-summary-4"></a>
### Release Summary
Regular bugfix release\.
<a id="bugfixes-4"></a>
### Bugfixes
* dependent lookup plugin \- avoid deprecated ansible\-core 2\.19 functionality \([https\://github\.com/ansible\-collections/community\.general/pull/10359](https\://github\.com/ansible\-collections/community\.general/pull/10359)\)\.
* github\_release \- support multiple types of GitHub tokens\; no longer failing when <code>ghs\_</code> token type is provided \([https\://github\.com/ansible\-collections/community\.general/issues/10338](https\://github\.com/ansible\-collections/community\.general/issues/10338)\, [https\://github\.com/ansible\-collections/community\.general/pull/10339](https\://github\.com/ansible\-collections/community\.general/pull/10339)\)\.
* icinga2 inventory plugin \- avoid using deprecated option when templating options \([https\://github\.com/ansible\-collections/community\.general/pull/10271](https\://github\.com/ansible\-collections/community\.general/pull/10271)\)\.
* incus connection plugin \- fix error handling to return more useful Ansible errors to the user \([https\://github\.com/ansible\-collections/community\.general/issues/10344](https\://github\.com/ansible\-collections/community\.general/issues/10344)\, [https\://github\.com/ansible\-collections/community\.general/pull/10349](https\://github\.com/ansible\-collections/community\.general/pull/10349)\)\.
* linode inventory plugin \- avoid using deprecated option when templating options \([https\://github\.com/ansible\-collections/community\.general/pull/10271](https\://github\.com/ansible\-collections/community\.general/pull/10271)\)\.
* logstash callback plugin \- remove reference to Python 2 library \([https\://github\.com/ansible\-collections/community\.general/pull/10345](https\://github\.com/ansible\-collections/community\.general/pull/10345)\)\.
<a id="v10-7-1"></a>
## v10\.7\.1
<a id="release-summary-5"></a>
### Release Summary
Regular bugfix release\.
<a id="minor-changes"></a>
### Minor Changes
* git\_config \- remove redundant <code>required\=False</code> from <code>argument\_spec</code> \([https\://github\.com/ansible\-collections/community\.general/pull/10177](https\://github\.com/ansible\-collections/community\.general/pull/10177)\)\.
* proxmox\_snap \- correctly handle proxmox\_snap timeout parameter \([https\://github\.com/ansible\-collections/community\.proxmox/issues/73](https\://github\.com/ansible\-collections/community\.proxmox/issues/73)\, [https\://github\.com/ansible\-collections/community\.proxmox/issues/95](https\://github\.com/ansible\-collections/community\.proxmox/issues/95)\, [https\://github\.com/ansible\-collections/community\.general/pull/10176](https\://github\.com/ansible\-collections/community\.general/pull/10176)\)\.
<a id="deprecated-features"></a>
### Deprecated Features
* yaml callback plugin \- the YAML callback plugin was deprecated for removal in community\.general 13\.0\.0\. Since it needs to use ansible\-core internals since ansible\-core 2\.19 that are changing a lot\, we will remove this plugin already from community\.general 12\.0\.0 to ease the maintenance burden \([https\://github\.com/ansible\-collections/community\.general/pull/10213](https\://github\.com/ansible\-collections/community\.general/pull/10213)\)\.
<a id="bugfixes-5"></a>
### Bugfixes
* cobbler\_system \- update minimum version number to avoid wrong comparisons that happen in some cases using LooseVersion class which results in TypeError \([https\://github\.com/ansible\-collections/community\.general/issues/8506](https\://github\.com/ansible\-collections/community\.general/issues/8506)\, [https\://github\.com/ansible\-collections/community\.general/pull/10145](https\://github\.com/ansible\-collections/community\.general/pull/10145)\, [https\://github\.com/ansible\-collections/community\.general/pull/10178](https\://github\.com/ansible\-collections/community\.general/pull/10178)\)\.
* gitlab\_group\_access\_token\, gitlab\_project\_access\_token \- fix handling of group and project access tokens for changes in GitLab 17\.10 \([https\://github\.com/ansible\-collections/community\.general/pull/10196](https\://github\.com/ansible\-collections/community\.general/pull/10196)\)\.
* keycloak \- update more than 10 sub\-groups \([https\://github\.com/ansible\-collections/community\.general/issues/9690](https\://github\.com/ansible\-collections/community\.general/issues/9690)\, [https\://github\.com/ansible\-collections/community\.general/pull/9692](https\://github\.com/ansible\-collections/community\.general/pull/9692)\)\.
* yaml callback plugin \- adjust to latest changes in ansible\-core devel \([https\://github\.com/ansible\-collections/community\.general/pull/10212](https\://github\.com/ansible\-collections/community\.general/pull/10212)\)\.
* yaml callback plugin \- when using ansible\-core 2\.19\.0b2 or newer\, uses a new utility provided by ansible\-core\. This allows us to remove all hacks and vendored code that was part of the plugin for ansible\-core versions with Data Tagging so far \([https\://github\.com/ansible\-collections/community\.general/pull/10242](https\://github\.com/ansible\-collections/community\.general/pull/10242)\)\.
* zypper\_repository \- make compatible with Python 3\.12\+ \([https\://github\.com/ansible\-collections/community\.general/issues/10222](https\://github\.com/ansible\-collections/community\.general/issues/10222)\, [https\://github\.com/ansible\-collections/community\.general/pull/10223](https\://github\.com/ansible\-collections/community\.general/pull/10223)\)\.
* zypper\_repository \- use <code>metalink</code> attribute to identify repositories without <code>\<url/\></code> element \([https\://github\.com/ansible\-collections/community\.general/issues/10224](https\://github\.com/ansible\-collections/community\.general/issues/10224)\, [https\://github\.com/ansible\-collections/community\.general/pull/10225](https\://github\.com/ansible\-collections/community\.general/pull/10225)\)\.
<a id="v10-7-0"></a>
## v10\.7\.0
<a id="release-summary-6"></a>
### Release Summary
Bugfix and feature release\.
Note that this is the final minor 10\.x\.0 release\.
The next release with new features will be 11\.0\.0\.
From now on\, there will only be bugfix 10\.7\.x releases for the community\.general 10 release train\.
<a id="minor-changes-1"></a>
### Minor Changes
* cobbler inventory plugin \- add <code>connection\_timeout</code> option to specify the connection timeout to the cobbler server \([https\://github\.com/ansible\-collections/community\.general/pull/11063](https\://github\.com/ansible\-collections/community\.general/pull/11063)\)\.
* cobbler inventory plugin \- add <code>facts\_level</code> option to allow requesting fully rendered variables for Cobbler systems \([https\://github\.com/ansible\-collections/community\.general/issues/9419](https\://github\.com/ansible\-collections/community\.general/issues/9419)\, [https\://github\.com/ansible\-collections/community\.general/pull/9975](https\://github\.com/ansible\-collections/community\.general/pull/9975)\)\.
* ini\_file \- modify an inactive option also when there are spaces in front of the comment symbol \([https\://github\.com/ansible\-collections/community\.general/pull/10102](https\://github\.com/ansible\-collections/community\.general/pull/10102)\, [https\://github\.com/ansible\-collections/community\.general/issues/8539](https\://github\.com/ansible\-collections/community\.general/issues/8539)\)\.
* pipx \- parameter <code>name</code> now accepts Python package specifiers \([https\://github\.com/ansible\-collections/community\.general/issues/7815](https\://github\.com/ansible\-collections/community\.general/issues/7815)\, [https\://github\.com/ansible\-collections/community\.general/pull/10031](https\://github\.com/ansible\-collections/community\.general/pull/10031)\)\.
* pipx module\_utils \- filtering application list by name now happens in the modules \([https\://github\.com/ansible\-collections/community\.general/pull/10031](https\://github\.com/ansible\-collections/community\.general/pull/10031)\)\.
* pipx\_info \- filtering application list by name now happens in the module \([https\://github\.com/ansible\-collections/community\.general/pull/10031](https\://github\.com/ansible\-collections/community\.general/pull/10031)\)\.
<a id="deprecated-features-1"></a>
### Deprecated Features
* The proxmox content \(modules and plugins\) is being moved to the [new collection community\.proxmox](https\://github\.com/ansible\-collections/community\.proxmox)\. In community\.general 11\.0\.0\, these modules and plugins will be replaced by deprecated redirections to community\.proxmox\. You need to explicitly install community\.proxmox\, for example with <code>ansible\-galaxy collection install community\.proxmox</code>\. We suggest to update your roles and playbooks to use the new FQCNs as soon as possible to avoid getting deprecation messages \([https\://github\.com/ansible\-collections/community\.general/pull/10109](https\://github\.com/ansible\-collections/community\.general/pull/10109)\)\.
* pipx module\_utils \- function <code>make\_process\_list\(\)</code> is deprecated and will be removed in community\.general 13\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/10031](https\://github\.com/ansible\-collections/community\.general/pull/10031)\)\.
<a id="bugfixes-6"></a>
### Bugfixes
* cobbler\_system \- fix bug with Cobbler \>\= 3\.4\.0 caused by giving more than 2 positional arguments to <code>CobblerXMLRPCInterface\.get\_system\_handle\(\)</code> \([https\://github\.com/ansible\-collections/community\.general/issues/8506](https\://github\.com/ansible\-collections/community\.general/issues/8506)\, [https\://github\.com/ansible\-collections/community\.general/pull/10145](https\://github\.com/ansible\-collections/community\.general/pull/10145)\)\.
* kdeconfig \- allow option values beginning with a dash \([https\://github\.com/ansible\-collections/community\.general/issues/10127](https\://github\.com/ansible\-collections/community\.general/issues/10127)\, [https\://github\.com/ansible\-collections/community\.general/pull/10128](https\://github\.com/ansible\-collections/community\.general/pull/10128)\)\.
* keycloak\_user\_rolemapping \- fix <code>\-\-diff</code> mode \([https\://github\.com/ansible\-collections/community\.general/issues/10067](https\://github\.com/ansible\-collections/community\.general/issues/10067)\, [https\://github\.com/ansible\-collections/community\.general/pull/10075](https\://github\.com/ansible\-collections/community\.general/pull/10075)\)\.
* pickle cache plugin \- avoid extra JSON serialization with ansible\-core \>\= 2\.19 \([https\://github\.com/ansible\-collections/community\.general/pull/10136](https\://github\.com/ansible\-collections/community\.general/pull/10136)\)\.
* proxmox \- fix crash in module when the used on an existing LXC container with <code>state\=present</code> and <code>force\=true</code> \([https\://github\.com/ansible\-collections/community\.proxmox/pull/91](https\://github\.com/ansible\-collections/community\.proxmox/pull/91)\, [https\://github\.com/ansible\-collections/community\.general/pull/10155](https\://github\.com/ansible\-collections/community\.general/pull/10155)\)\.
* rundeck\_acl\_policy \- ensure that project ACLs are sent to the correct endpoint \([https\://github\.com/ansible\-collections/community\.general/pull/10097](https\://github\.com/ansible\-collections/community\.general/pull/10097)\)\.
* sysrc \- split the output of <code>sysrc \-e \-a</code> on the first <code>\=</code> only \([https\://github\.com/ansible\-collections/community\.general/issues/10120](https\://github\.com/ansible\-collections/community\.general/issues/10120)\, [https\://github\.com/ansible\-collections/community\.general/pull/10121](https\://github\.com/ansible\-collections/community\.general/pull/10121)\)\.
<a id="new-plugins"></a>
### New Plugins
<a id="callback"></a>
#### Callback
* community\.general\.print\_task \- Prints playbook task snippet to job output\.
<a id="filter"></a>
#### Filter
* community\.general\.to\_prettytable \- Format a list of dictionaries as an ASCII table\.
<a id="new-modules"></a>
### New Modules
* community\.general\.xdg\_mime \- Set default handler for MIME types\, for applications using XDG tools\.
<a id="v10-6-0"></a>
## v10\.6\.0
<a id="release-summary-7"></a>
### Release Summary
Regular bugfix and feature release\.
<a id="minor-changes-2"></a>
### Minor Changes
* apache2\_module \- added workaround for new PHP module name\, from <code>php7\_module</code> to <code>php\_module</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9951](https\://github\.com/ansible\-collections/community\.general/pull/9951)\)\.
* gitlab\_project \- add option <code>build\_timeout</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9960](https\://github\.com/ansible\-collections/community\.general/pull/9960)\)\.
* gitlab\_project\_members \- extend choices parameter <code>access\_level</code> by missing upstream valid value <code>owner</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9953](https\://github\.com/ansible\-collections/community\.general/pull/9953)\)\.
* hpilo\_boot \- add option to get an idempotent behavior while powering on server\, resulting in success instead of failure when using <code>state\: boot\_once</code> option \([https\://github\.com/ansible\-collections/community\.general/pull/9646](https\://github\.com/ansible\-collections/community\.general/pull/9646)\)\.
* idrac\_redfish\_command\, idrac\_redfish\_config\, idrac\_redfish\_info \- add <code>validate\_certs</code>\, <code>ca\_path</code>\, and <code>ciphers</code> options to configure TLS/SSL \([https\://github\.com/ansible\-collections/community\.general/issues/3686](https\://github\.com/ansible\-collections/community\.general/issues/3686)\, [https\://github\.com/ansible\-collections/community\.general/pull/9964](https\://github\.com/ansible\-collections/community\.general/pull/9964)\)\.
* ilo\_redfish\_command\, ilo\_redfish\_config\, ilo\_redfish\_info \- add <code>validate\_certs</code>\, <code>ca\_path</code>\, and <code>ciphers</code> options to configure TLS/SSL \([https\://github\.com/ansible\-collections/community\.general/issues/3686](https\://github\.com/ansible\-collections/community\.general/issues/3686)\, [https\://github\.com/ansible\-collections/community\.general/pull/9964](https\://github\.com/ansible\-collections/community\.general/pull/9964)\)\.
* keycloak module\_utils \- user groups can now be referenced by their name\, like <code>staff</code>\, or their path\, like <code>/staff/engineering</code>\. The path syntax allows users to reference subgroups\, which is not possible otherwise \([https\://github\.com/ansible\-collections/community\.general/pull/9898](https\://github\.com/ansible\-collections/community\.general/pull/9898)\)\.
* keycloak\_user module \- user groups can now be referenced by their name\, like <code>staff</code>\, or their path\, like <code>/staff/engineering</code>\. The path syntax allows users to reference subgroups\, which is not possible otherwise \([https\://github\.com/ansible\-collections/community\.general/pull/9898](https\://github\.com/ansible\-collections/community\.general/pull/9898)\)\.
* nmcli \- add support for Infiniband MAC setting when <code>type</code> is <code>infiniband</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9962](https\://github\.com/ansible\-collections/community\.general/pull/9962)\)\.
* one\_vm \- update allowed values for <code>updateconf</code> to include new parameters as per the latest OpenNebula API documentation\.
Added parameters\:
- <code>OS</code>\: <code>FIRMWARE</code>\;
- <code>CPU\_MODEL</code>\: <code>MODEL</code>\, <code>FEATURES</code>\;
- <code>FEATURES</code>\: <code>VIRTIO\_BLK\_QUEUES</code>\, <code>VIRTIO\_SCSI\_QUEUES</code>\, <code>IOTHREADS</code>\;
- <code>GRAPHICS</code>\: <code>PORT</code>\, <code>COMMAND</code>\;
- <code>VIDEO</code>\: <code>ATS</code>\, <code>IOMMU</code>\, <code>RESOLUTION</code>\, <code>TYPE</code>\, <code>VRAM</code>\;
- <code>RAW</code>\: <code>VALIDATE</code>\;
- <code>BACKUP\_CONFIG</code>\: <code>FS\_FREEZE</code>\, <code>KEEP\_LAST</code>\, <code>BACKUP\_VOLATILE</code>\, <code>MODE</code>\, <code>INCREMENT\_MODE</code>\.
\([https\://github\.com/ansible\-collections/community\.general/pull/9959](https\://github\.com/ansible\-collections/community\.general/pull/9959)\)\.
* proxmox and proxmox\_kvm modules \- allow uppercase characters in VM/container tags \([https\://github\.com/ansible\-collections/community\.general/issues/9895](https\://github\.com/ansible\-collections/community\.general/issues/9895)\, [https\://github\.com/ansible\-collections/community\.general/pull/10024](https\://github\.com/ansible\-collections/community\.general/pull/10024)\)\.
* puppet \- improve parameter formatting\, no impact to user \([https\://github\.com/ansible\-collections/community\.general/pull/10014](https\://github\.com/ansible\-collections/community\.general/pull/10014)\)\.
* redfish module utils \- add <code>REDFISH\_COMMON\_ARGUMENT\_SPEC</code>\, a corresponding <code>redfish</code> docs fragment\, and support for its <code>validate\_certs</code>\, <code>ca\_path</code>\, and <code>ciphers</code> options \([https\://github\.com/ansible\-collections/community\.general/issues/3686](https\://github\.com/ansible\-collections/community\.general/issues/3686)\, [https\://github\.com/ansible\-collections/community\.general/pull/9964](https\://github\.com/ansible\-collections/community\.general/pull/9964)\)\.
* redfish\_command\, redfish\_config\, redfish\_info \- add <code>validate\_certs</code> and <code>ca\_path</code> options to configure TLS/SSL \([https\://github\.com/ansible\-collections/community\.general/issues/3686](https\://github\.com/ansible\-collections/community\.general/issues/3686)\, [https\://github\.com/ansible\-collections/community\.general/pull/9964](https\://github\.com/ansible\-collections/community\.general/pull/9964)\)\.
* rocketchat \- fix duplicate JSON conversion for Rocket\.Chat \< 7\.4\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/9965](https\://github\.com/ansible\-collections/community\.general/pull/9965)\)\.
* wdc\_redfish\_command\, wdc\_redfish\_info \- add <code>validate\_certs</code>\, <code>ca\_path</code>\, and <code>ciphers</code> options to configure TLS/SSL \([https\://github\.com/ansible\-collections/community\.general/issues/3686](https\://github\.com/ansible\-collections/community\.general/issues/3686)\, [https\://github\.com/ansible\-collections/community\.general/pull/9964](https\://github\.com/ansible\-collections/community\.general/pull/9964)\)\.
* xcc\_redfish\_command \- add <code>validate\_certs</code>\, <code>ca\_path</code>\, and <code>ciphers</code> options to configure TLS/SSL \([https\://github\.com/ansible\-collections/community\.general/issues/3686](https\://github\.com/ansible\-collections/community\.general/issues/3686)\, [https\://github\.com/ansible\-collections/community\.general/pull/9964](https\://github\.com/ansible\-collections/community\.general/pull/9964)\)\.
* zypper \- adds <code>skip\_post\_errors</code> that allows to skip RPM post\-install errors \(Zypper return code 107\) \([https\://github\.com/ansible\-collections/community\.general/issues/9972](https\://github\.com/ansible\-collections/community\.general/issues/9972)\)\.
<a id="deprecated-features-2"></a>
### Deprecated Features
* manifold lookup plugin \- plugin is deprecated and will be removed in community\.general 11\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/10028](https\://github\.com/ansible\-collections/community\.general/pull/10028)\)\.
* stackpath\_compute inventory plugin \- plugin is deprecated and will be removed in community\.general 11\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/10026](https\://github\.com/ansible\-collections/community\.general/pull/10026)\)\.
<a id="bugfixes-7"></a>
### Bugfixes
* dependent look plugin \- make compatible with ansible\-core\'s Data Tagging feature \([https\://github\.com/ansible\-collections/community\.general/pull/9833](https\://github\.com/ansible\-collections/community\.general/pull/9833)\)\.
* diy callback plugin \- make compatible with ansible\-core\'s Data Tagging feature \([https\://github\.com/ansible\-collections/community\.general/pull/9833](https\://github\.com/ansible\-collections/community\.general/pull/9833)\)\.
* github\_deploy\_key \- check that key really exists on 422 to avoid masking other errors \([https\://github\.com/ansible\-collections/community\.general/issues/6718](https\://github\.com/ansible\-collections/community\.general/issues/6718)\, [https\://github\.com/ansible\-collections/community\.general/pull/10011](https\://github\.com/ansible\-collections/community\.general/pull/10011)\)\.
* hashids and unicode\_normalize filter plugins \- avoid deprecated <code>AnsibleFilterTypeError</code> on ansible\-core 2\.19 \([https\://github\.com/ansible\-collections/community\.general/pull/9992](https\://github\.com/ansible\-collections/community\.general/pull/9992)\)\.
* homebrew \- emit a useful error message if <code>brew info</code> reports a package tap is <code>null</code> \([https\://github\.com/ansible\-collections/community\.general/pull/10013](https\://github\.com/ansible\-collections/community\.general/pull/10013)\, [https\://github\.com/ansible\-collections/community\.general/issues/10012](https\://github\.com/ansible\-collections/community\.general/issues/10012)\)\.
* java\_cert \- the module no longer fails if the optional parameters <code>pkcs12\_alias</code> and <code>cert\_alias</code> are not provided \([https\://github\.com/ansible\-collections/community\.general/pull/9970](https\://github\.com/ansible\-collections/community\.general/pull/9970)\)\.
* keycloak\_authentication \- fix authentification config duplication for Keycloak \< 26\.2\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/9987](https\://github\.com/ansible\-collections/community\.general/pull/9987)\)\.
* keycloak\_client \- fix the idempotency regression by normalizing the Keycloak response for <code>after\_client</code> \([https\://github\.com/ansible\-collections/community\.general/issues/9905](https\://github\.com/ansible\-collections/community\.general/issues/9905)\, [https\://github\.com/ansible\-collections/community\.general/pull/9976](https\://github\.com/ansible\-collections/community\.general/pull/9976)\)\.
* proxmox inventory plugin \- fix <code>ansible\_host</code> staying empty for certain Proxmox nodes \([https\://github\.com/ansible\-collections/community\.general/issues/5906](https\://github\.com/ansible\-collections/community\.general/issues/5906)\, [https\://github\.com/ansible\-collections/community\.general/pull/9952](https\://github\.com/ansible\-collections/community\.general/pull/9952)\)\.
* proxmox\_disk \- fail gracefully if <code>storage</code> is required but not provided by the user \([https\://github\.com/ansible\-collections/community\.general/issues/9941](https\://github\.com/ansible\-collections/community\.general/issues/9941)\, [https\://github\.com/ansible\-collections/community\.general/pull/9963](https\://github\.com/ansible\-collections/community\.general/pull/9963)\)\.
* reveal\_ansible\_type filter plugin and ansible\_type test plugin \- make compatible with ansible\-core\'s Data Tagging feature \([https\://github\.com/ansible\-collections/community\.general/pull/9833](https\://github\.com/ansible\-collections/community\.general/pull/9833)\)\.
* sysrc \- no longer always reporting <code>changed\=true</code> when <code>state\=absent</code>\. This fixes the method <code>exists\(\)</code> \([https\://github\.com/ansible\-collections/community\.general/issues/10004](https\://github\.com/ansible\-collections/community\.general/issues/10004)\, [https\://github\.com/ansible\-collections/community\.general/pull/10005](https\://github\.com/ansible\-collections/community\.general/pull/10005)\)\.
* yaml callback plugin \- use ansible\-core internals to avoid breakage with Data Tagging \([https\://github\.com/ansible\-collections/community\.general/pull/9833](https\://github\.com/ansible\-collections/community\.general/pull/9833)\)\.
<a id="known-issues"></a>
### Known Issues
* reveal\_ansible\_type filter plugin and ansible\_type test plugin \- note that ansible\-core\'s Data Tagging feature implements new aliases\, such as <code>\_AnsibleTaggedStr</code> for <code>str</code>\, <code>\_AnsibleTaggedInt</code> for <code>int</code>\, and <code>\_AnsibleTaggedFloat</code> for <code>float</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9833](https\://github\.com/ansible\-collections/community\.general/pull/9833)\)\.
<a id="new-plugins-1"></a>
### New Plugins
<a id="connection"></a>
#### Connection
* community\.general\.wsl \- Run tasks in WSL distribution using wsl\.exe CLI via SSH\.
<a id="v10-5-0"></a>
## v10\.5\.0
<a id="release-summary-8"></a>
### Release Summary
Regular bugfix and feature release\.
<a id="minor-changes-3"></a>
### Minor Changes
* CmdRunner module utils \- the convenience method <code>cmd\_runner\_fmt\.as\_fixed\(\)</code> now accepts multiple arguments as a list \([https\://github\.com/ansible\-collections/community\.general/pull/9893](https\://github\.com/ansible\-collections/community\.general/pull/9893)\)\.
* apache2\_mod\_proxy \- code simplification\, no change in functionality \([https\://github\.com/ansible\-collections/community\.general/pull/9457](https\://github\.com/ansible\-collections/community\.general/pull/9457)\)\.
* consul\_token \- fix idempotency when <code>policies</code> or <code>roles</code> are supplied by name \([https\://github\.com/ansible\-collections/community\.general/issues/9841](https\://github\.com/ansible\-collections/community\.general/issues/9841)\, [https\://github\.com/ansible\-collections/community\.general/pull/9845](https\://github\.com/ansible\-collections/community\.general/pull/9845)\)\.
* keycloak\_realm \- remove ID requirement when creating a realm to allow Keycloak generating its own realm ID \([https\://github\.com/ansible\-collections/community\.general/pull/9768](https\://github\.com/ansible\-collections/community\.general/pull/9768)\)\.
* nmap inventory plugin \- adds <code>dns\_servers</code> option for specifying DNS servers for name resolution\. Accepts hostnames or IP addresses in the same format as the <code>exclude</code> option \([https\://github\.com/ansible\-collections/community\.general/pull/9849](https\://github\.com/ansible\-collections/community\.general/pull/9849)\)\.
* proxmox\_kvm \- add missing audio hardware device handling \([https\://github\.com/ansible\-collections/community\.general/issues/5192](https\://github\.com/ansible\-collections/community\.general/issues/5192)\, [https\://github\.com/ansible\-collections/community\.general/pull/9847](https\://github\.com/ansible\-collections/community\.general/pull/9847)\)\.
* redfish\_config \- add command <code>SetPowerRestorePolicy</code> to set the desired power state of the system when power is restored \([https\://github\.com/ansible\-collections/community\.general/pull/9837](https\://github\.com/ansible\-collections/community\.general/pull/9837)\)\.
* redfish\_info \- add command <code>GetPowerRestorePolicy</code> to get the desired power state of the system when power is restored \([https\://github\.com/ansible\-collections/community\.general/pull/9824](https\://github\.com/ansible\-collections/community\.general/pull/9824)\)\.
* rocketchat \- option <code>is\_pre740</code> has been added to control the format of the payload\. For Rocket\.Chat 7\.4\.0 or newer\, it must be set to <code>false</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9882](https\://github\.com/ansible\-collections/community\.general/pull/9882)\)\.
* slack callback plugin \- add <code>http\_agent</code> option to enable the user to set a custom user agent for slack callback plugin \([https\://github\.com/ansible\-collections/community\.general/issues/9813](https\://github\.com/ansible\-collections/community\.general/issues/9813)\, [https\://github\.com/ansible\-collections/community\.general/pull/9836](https\://github\.com/ansible\-collections/community\.general/pull/9836)\)\.
* systemd\_info \- add wildcard expression support in <code>unitname</code> option \([https\://github\.com/ansible\-collections/community\.general/pull/9821](https\://github\.com/ansible\-collections/community\.general/pull/9821)\)\.
* systemd\_info \- extend support to timer units \([https\://github\.com/ansible\-collections/community\.general/pull/9891](https\://github\.com/ansible\-collections/community\.general/pull/9891)\)\.
* vmadm \- add new options <code>flexible\_disk\_size</code> and <code>owner\_uuid</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9892](https\://github\.com/ansible\-collections/community\.general/pull/9892)\)\.
<a id="bugfixes-8"></a>
### Bugfixes
* cloudlare\_dns \- handle exhausted response stream in case of HTTP errors to show nice error message to the user \([https\://github\.com/ansible\-collections/community\.general/issues/9782](https\://github\.com/ansible\-collections/community\.general/issues/9782)\, [https\://github\.com/ansible\-collections/community\.general/pull/9818](https\://github\.com/ansible\-collections/community\.general/pull/9818)\)\.
* dnf\_versionlock \- add support for dnf5 \([https\://github\.com/ansible\-collections/community\.general/issues/9556](https\://github\.com/ansible\-collections/community\.general/issues/9556)\)\.
* homebrew \- fix crash when package names include tap \([https\://github\.com/ansible\-collections/community\.general/issues/9777](https\://github\.com/ansible\-collections/community\.general/issues/9777)\, [https\://github\.com/ansible\-collections/community\.general/pull/9803](https\://github\.com/ansible\-collections/community\.general/pull/9803)\)\.
* homebrew\_cask \- handle unusual brew version strings \([https\://github\.com/ansible\-collections/community\.general/issues/8432](https\://github\.com/ansible\-collections/community\.general/issues/8432)\, [https\://github\.com/ansible\-collections/community\.general/pull/9881](https\://github\.com/ansible\-collections/community\.general/pull/9881)\)\.
* nmcli \- enable changing only the order of DNS servers or search suffixes \([https\://github\.com/ansible\-collections/community\.general/issues/8724](https\://github\.com/ansible\-collections/community\.general/issues/8724)\, [https\://github\.com/ansible\-collections/community\.general/pull/9880](https\://github\.com/ansible\-collections/community\.general/pull/9880)\)\.
* proxmox \- add missing key selection of <code>\'status\'</code> key to <code>get\_lxc\_status</code> \([https\://github\.com/ansible\-collections/community\.general/issues/9696](https\://github\.com/ansible\-collections/community\.general/issues/9696)\, [https\://github\.com/ansible\-collections/community\.general/pull/9809](https\://github\.com/ansible\-collections/community\.general/pull/9809)\)\.
* proxmox\_vm\_info \- the module no longer expects that the key <code>template</code> exists in a dictionary returned by Proxmox \([https\://github\.com/ansible\-collections/community\.general/issues/9875](https\://github\.com/ansible\-collections/community\.general/issues/9875)\, [https\://github\.com/ansible\-collections/community\.general/pull/9910](https\://github\.com/ansible\-collections/community\.general/pull/9910)\)\.
* sudoers \- display stdout and stderr raised while failed validation \([https\://github\.com/ansible\-collections/community\.general/issues/9674](https\://github\.com/ansible\-collections/community\.general/issues/9674)\, [https\://github\.com/ansible\-collections/community\.general/pull/9871](https\://github\.com/ansible\-collections/community\.general/pull/9871)\)\.
<a id="new-modules-1"></a>
### New Modules
* community\.general\.pacemaker\_resource \- Manage pacemaker resources\.
<a id="v10-4-0"></a>
## v10\.4\.0
<a id="release-summary-9"></a>
### Release Summary
Regular bugfix and feature release\.
<a id="minor-changes-4"></a>
### Minor Changes
* bitwarden lookup plugin \- add new option <code>collection\_name</code> to filter results by collection name\, and new option <code>result\_count</code> to validate number of results \([https\://github\.com/ansible\-collections/community\.general/pull/9728](https\://github\.com/ansible\-collections/community\.general/pull/9728)\)\.
* incus connection plugin \- adds <code>remote\_user</code> and <code>incus\_become\_method</code> parameters for allowing a non\-root user to connect to an Incus instance \([https\://github\.com/ansible\-collections/community\.general/pull/9743](https\://github\.com/ansible\-collections/community\.general/pull/9743)\)\.
* iocage inventory plugin \- the new parameter <code>hooks\_results</code> of the plugin is a list of files inside a jail that provide configuration parameters for the inventory\. The inventory plugin reads the files from the jails and put the contents into the items of created variable <code>iocage\_hooks</code> \([https\://github\.com/ansible\-collections/community\.general/issues/9650](https\://github\.com/ansible\-collections/community\.general/issues/9650)\, [https\://github\.com/ansible\-collections/community\.general/pull/9651](https\://github\.com/ansible\-collections/community\.general/pull/9651)\)\.
* jira \- adds <code>client\_cert</code> and <code>client\_key</code> parameters for supporting client certificate authentification when connecting to Jira \([https\://github\.com/ansible\-collections/community\.general/pull/9753](https\://github\.com/ansible\-collections/community\.general/pull/9753)\)\.
* lldp \- adds <code>multivalues</code> parameter to control behavior when lldpctl outputs an attribute multiple times \([https\://github\.com/ansible\-collections/community\.general/pull/9657](https\://github\.com/ansible\-collections/community\.general/pull/9657)\)\.
* lvg \- add <code>remove\_extra\_pvs</code> parameter to control if ansible should remove physical volumes which are not in the <code>pvs</code> parameter \([https\://github\.com/ansible\-collections/community\.general/pull/9698](https\://github\.com/ansible\-collections/community\.general/pull/9698)\)\.
* lxd connection plugin \- adds <code>remote\_user</code> and <code>lxd\_become\_method</code> parameters for allowing a non\-root user to connect to an LXD instance \([https\://github\.com/ansible\-collections/community\.general/pull/9659](https\://github\.com/ansible\-collections/community\.general/pull/9659)\)\.
* nmcli \- adds VRF support with new <code>type</code> value <code>vrf</code> and new <code>slave\_type</code> value <code>vrf</code> as well as new <code>table</code> parameter \([https\://github\.com/ansible\-collections/community\.general/pull/9658](https\://github\.com/ansible\-collections/community\.general/pull/9658)\, [https\://github\.com/ansible\-collections/community\.general/issues/8014](https\://github\.com/ansible\-collections/community\.general/issues/8014)\)\.
* proxmox\_kvm \- allow hibernation and suspending of VMs \([https\://github\.com/ansible\-collections/community\.general/issues/9620](https\://github\.com/ansible\-collections/community\.general/issues/9620)\, [https\://github\.com/ansible\-collections/community\.general/pull/9653](https\://github\.com/ansible\-collections/community\.general/pull/9653)\)\.
* redfish\_command \- add <code>PowerFullPowerCycle</code> to power command options \([https\://github\.com/ansible\-collections/community\.general/pull/9729](https\://github\.com/ansible\-collections/community\.general/pull/9729)\)\.
* ssh\_config \- add <code>other\_options</code> option \([https\://github\.com/ansible\-collections/community\.general/issues/8053](https\://github\.com/ansible\-collections/community\.general/issues/8053)\, [https\://github\.com/ansible\-collections/community\.general/pull/9684](https\://github\.com/ansible\-collections/community\.general/pull/9684)\)\.
* xen\_orchestra inventory plugin \- add <code>use\_vm\_uuid</code> and <code>use\_host\_uuid</code> boolean options to allow switching over to using VM/Xen name labels instead of UUIDs as item names \([https\://github\.com/ansible\-collections/community\.general/pull/9787](https\://github\.com/ansible\-collections/community\.general/pull/9787)\)\.
<a id="deprecated-features-3"></a>
### Deprecated Features
* profitbricks \- module is deprecated and will be removed in community\.general 11\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/9733](https\://github\.com/ansible\-collections/community\.general/pull/9733)\)\.
* profitbricks\_datacenter \- module is deprecated and will be removed in community\.general 11\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/9733](https\://github\.com/ansible\-collections/community\.general/pull/9733)\)\.
* profitbricks\_nic \- module is deprecated and will be removed in community\.general 11\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/9733](https\://github\.com/ansible\-collections/community\.general/pull/9733)\)\.
* profitbricks\_volume \- module is deprecated and will be removed in community\.general 11\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/9733](https\://github\.com/ansible\-collections/community\.general/pull/9733)\)\.
* profitbricks\_volume\_attachments \- module is deprecated and will be removed in community\.general 11\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/9733](https\://github\.com/ansible\-collections/community\.general/pull/9733)\)\.
<a id="bugfixes-9"></a>
### Bugfixes
* apache2\_mod\_proxy \- make compatible with Python 3 \([https\://github\.com/ansible\-collections/community\.general/pull/9762](https\://github\.com/ansible\-collections/community\.general/pull/9762)\)\.
* apache2\_mod\_proxy \- passing the cluster\'s page as referer for the member\'s pages\. This makes the module actually work again for halfway modern Apache versions\. According to some comments founds on the net the referer was required since at least 2019 for some versions of Apache 2 \([https\://github\.com/ansible\-collections/community\.general/pull/9762](https\://github\.com/ansible\-collections/community\.general/pull/9762)\)\.
* elasticsearch\_plugin \- fix <code>ERROR\: D is not a recognized option</code> issue when configuring proxy settings \([https\://github\.com/ansible\-collections/community\.general/pull/9774](https\://github\.com/ansible\-collections/community\.general/pull/9774)\, [https\://github\.com/ansible\-collections/community\.general/issues/9773](https\://github\.com/ansible\-collections/community\.general/issues/9773)\)\.
* ipa\_host \- module revoked existing host certificates even if <code>user\_certificate</code> was not given \([https\://github\.com/ansible\-collections/community\.general/pull/9694](https\://github\.com/ansible\-collections/community\.general/pull/9694)\)\.
* keycloak\_client \- in check mode\, detect whether the lists in before client \(for example redirect URI list\) contain items that the lists in the desired client do not contain \([https\://github\.com/ansible\-collections/community\.general/pull/9739](https\://github\.com/ansible\-collections/community\.general/pull/9739)\)\.
* lldp \- fix crash caused by certain lldpctl output where an attribute is defined as branch and leaf \([https\://github\.com/ansible\-collections/community\.general/pull/9657](https\://github\.com/ansible\-collections/community\.general/pull/9657)\)\.
* onepassword\_doc lookup plugin \- ensure that 1Password Connect support also works for this plugin \([https\://github\.com/ansible\-collections/community\.general/pull/9625](https\://github\.com/ansible\-collections/community\.general/pull/9625)\)\.
* passwordstore lookup plugin \- fix subkey creation even when <code>create\=false</code> \([https\://github\.com/ansible\-collections/community\.general/issues/9105](https\://github\.com/ansible\-collections/community\.general/issues/9105)\, [https\://github\.com/ansible\-collections/community\.general/pull/9106](https\://github\.com/ansible\-collections/community\.general/pull/9106)\)\.
* proxmox inventory plugin \- plugin did not update cache correctly after <code>meta\: refresh\_inventory</code> \([https\://github\.com/ansible\-collections/community\.general/issues/9710](https\://github\.com/ansible\-collections/community\.general/issues/9710)\, [https\://github\.com/ansible\-collections/community\.general/pull/9760](https\://github\.com/ansible\-collections/community\.general/pull/9760)\)\.
* redhat\_subscription \- use the \"enable\_content\" option \(when available\) when
registering using D\-Bus\, to ensure that subscription\-manager enables the
content on registration\; this is particular important on EL 10\+ and Fedora
41\+
\([https\://github\.com/ansible\-collections/community\.general/pull/9778](https\://github\.com/ansible\-collections/community\.general/pull/9778)\)\.
* zfs \- fix handling of multi\-line values of user\-defined ZFS properties \([https\://github\.com/ansible\-collections/community\.general/pull/6264](https\://github\.com/ansible\-collections/community\.general/pull/6264)\)\.
* zfs\_facts \- parameter <code>type</code> now accepts multple values as documented \([https\://github\.com/ansible\-collections/community\.general/issues/5909](https\://github\.com/ansible\-collections/community\.general/issues/5909)\, [https\://github\.com/ansible\-collections/community\.general/pull/9697](https\://github\.com/ansible\-collections/community\.general/pull/9697)\)\.
<a id="new-modules-2"></a>
### New Modules
* community\.general\.systemd\_info \- Gather C\(systemd\) unit info\.
<a id="v10-3-1"></a>
## v10\.3\.1
<a id="release-summary-10"></a>
### Release Summary
Bugfix release\.
<a id="minor-changes-5"></a>
### Minor Changes
* onepassword\_ssh\_key \- refactor to move code to lookup class \([https\://github\.com/ansible\-collections/community\.general/pull/9633](https\://github\.com/ansible\-collections/community\.general/pull/9633)\)\.
<a id="bugfixes"></a>
<a id="bugfixes-10"></a>
### Bugfixes
* cloudflare\_dns \- fix crash when deleting a DNS record or when updating a record with <code>solo\=true</code> \([https\://github\.com/ansible\-collections/community\.general/issues/9652](https\://github\.com/ansible\-collections/community\.general/issues/9652)\, [https\://github\.com/ansible\-collections/community\.general/pull/9649](https\://github\.com/ansible\-collections/community\.general/pull/9649)\)\.
@@ -78,12 +499,12 @@ Bugfix release\.
<a id="v10-3-0"></a>
## v10\.3\.0
<a id="release-summary-1"></a>
<a id="release-summary-11"></a>
### Release Summary
Regular bugfix and feature release\.
<a id="minor-changes-1"></a>
<a id="minor-changes-6"></a>
### Minor Changes
* MH module utils \- delegate <code>debug</code> to the underlying <code>AnsibleModule</code> instance or issues a warning if an attribute already exists with that name \([https\://github\.com/ansible\-collections/community\.general/pull/9577](https\://github\.com/ansible\-collections/community\.general/pull/9577)\)\.
@@ -206,18 +627,18 @@ Regular bugfix and feature release\.
* yaml callback plugin \- adjust standard preamble for Python 3 \([https\://github\.com/ansible\-collections/community\.general/pull/9583](https\://github\.com/ansible\-collections/community\.general/pull/9583)\)\.
* zone connection plugin \- adjust standard preamble for Python 3 \([https\://github\.com/ansible\-collections/community\.general/pull/9584](https\://github\.com/ansible\-collections/community\.general/pull/9584)\)\.
<a id="deprecated-features"></a>
<a id="deprecated-features-4"></a>
### Deprecated Features
* MH module utils \- attribute <code>debug</code> definition in subclasses of MH is now deprecated\, as that name will become a delegation to <code>AnsibleModule</code> in community\.general 12\.0\.0\, and any such attribute will be overridden by that delegation in that version \([https\://github\.com/ansible\-collections/community\.general/pull/9577](https\://github\.com/ansible\-collections/community\.general/pull/9577)\)\.
* proxmox \- removes default value <code>false</code> of <code>update</code> parameter\. This will be changed to a default of <code>true</code> in community\.general 11\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/9225](https\://github\.com/ansible\-collections/community\.general/pull/9225)\)\.
<a id="security-fixes"></a>
<a id="security-fixes-1"></a>
### Security Fixes
* keycloak\_client \- Sanitize <code>saml\.encryption\.private\.key</code> so it does not show in the logs \([https\://github\.com/ansible\-collections/community\.general/pull/9621](https\://github\.com/ansible\-collections/community\.general/pull/9621)\)\.
<a id="bugfixes-1"></a>
<a id="bugfixes-11"></a>
### Bugfixes
* homebrew \- fix incorrect handling of homebrew modules when a tap is requested \([https\://github\.com/ansible\-collections/community\.general/pull/9546](https\://github\.com/ansible\-collections/community\.general/pull/9546)\, [https\://github\.com/ansible\-collections/community\.general/issues/9533](https\://github\.com/ansible\-collections/community\.general/issues/9533)\)\.
@@ -233,15 +654,15 @@ Regular bugfix and feature release\.
thus unsubscribing will fail
\([https\://github\.com/ansible\-collections/community\.general/pull/9578](https\://github\.com/ansible\-collections/community\.general/pull/9578)\)\.
<a id="new-plugins"></a>
<a id="new-plugins-2"></a>
### New Plugins
<a id="connection"></a>
<a id="connection-1"></a>
#### Connection
* community\.general\.proxmox\_pct\_remote \- Run tasks in Proxmox LXC container instances using pct CLI via SSH\.
<a id="filter"></a>
<a id="filter-1"></a>
#### Filter
* community\.general\.json\_diff \- Create a JSON patch by comparing two JSON files\.
@@ -253,7 +674,7 @@ Regular bugfix and feature release\.
* community\.general\.onepassword\_ssh\_key \- Fetch SSH keys stored in 1Password\.
<a id="new-modules"></a>
<a id="new-modules-3"></a>
### New Modules
* community\.general\.proxmox\_backup\_info \- Retrieve information on Proxmox scheduled backups\.
@@ -261,12 +682,12 @@ Regular bugfix and feature release\.
<a id="v10-2-0"></a>
## v10\.2\.0
<a id="release-summary-2"></a>
<a id="release-summary-12"></a>
### Release Summary
Regular bugfix and feature release\.
<a id="minor-changes-2"></a>
<a id="minor-changes-7"></a>
### Minor Changes
* bitwarden lookup plugin \- use f\-strings instead of interpolations or <code>format</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9324](https\://github\.com/ansible\-collections/community\.general/pull/9324)\)\.
@@ -397,7 +818,7 @@ Regular bugfix and feature release\.
* zypper \- add <code>quiet</code> option \([https\://github\.com/ansible\-collections/community\.general/pull/9270](https\://github\.com/ansible\-collections/community\.general/pull/9270)\)\.
* zypper \- add <code>simple\_errors</code> option \([https\://github\.com/ansible\-collections/community\.general/pull/9270](https\://github\.com/ansible\-collections/community\.general/pull/9270)\)\.
<a id="deprecated-features-1"></a>
<a id="deprecated-features-5"></a>
### Deprecated Features
* atomic\_container \- module is deprecated and will be removed in community\.general 13\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/9487](https\://github\.com/ansible\-collections/community\.general/pull/9487)\)\.
@@ -415,12 +836,12 @@ Regular bugfix and feature release\.
* slack \- the default value <code>auto</code> of the <code>prepend\_hash</code> option is deprecated and will change to <code>never</code> in community\.general 12\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/9443](https\://github\.com/ansible\-collections/community\.general/pull/9443)\)\.
* yaml callback plugin \- deprecate plugin in favor of <code>result\_format\=yaml</code> in plugin <code>ansible\.bulitin\.default</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9456](https\://github\.com/ansible\-collections/community\.general/pull/9456)\)\.
<a id="security-fixes-1"></a>
<a id="security-fixes-2"></a>
### Security Fixes
* keycloak\_authentication \- API calls did not properly set the <code>priority</code> during update resulting in incorrectly sorted authentication flows\. This apparently only affects Keycloak 25 or newer \([https\://github\.com/ansible\-collections/community\.general/pull/9263](https\://github\.com/ansible\-collections/community\.general/pull/9263)\)\.
<a id="bugfixes-2"></a>
<a id="bugfixes-12"></a>
### Bugfixes
* dig lookup plugin \- correctly handle <code>NoNameserver</code> exception \([https\://github\.com/ansible\-collections/community\.general/pull/9363](https\://github\.com/ansible\-collections/community\.general/pull/9363)\, [https\://github\.com/ansible\-collections/community\.general/issues/9362](https\://github\.com/ansible\-collections/community\.general/issues/9362)\)\.
@@ -432,7 +853,7 @@ Regular bugfix and feature release\.
* qubes connection plugin \- fix the printing of debug information \([https\://github\.com/ansible\-collections/community\.general/pull/9334](https\://github\.com/ansible\-collections/community\.general/pull/9334)\)\.
* redfish\_utils module utils \- Fix <code>VerifyBiosAttributes</code> command on multi system resource nodes \([https\://github\.com/ansible\-collections/community\.general/pull/9234](https\://github\.com/ansible\-collections/community\.general/pull/9234)\)\.
<a id="new-plugins-1"></a>
<a id="new-plugins-3"></a>
### New Plugins
<a id="inventory"></a>
@@ -440,7 +861,7 @@ Regular bugfix and feature release\.
* community\.general\.iocage \- iocage inventory source\.
<a id="new-modules-1"></a>
<a id="new-modules-4"></a>
### New Modules
* community\.general\.android\_sdk \- Manages Android SDK packages\.
@@ -451,12 +872,12 @@ Regular bugfix and feature release\.
<a id="v10-1-0"></a>
## v10\.1\.0
<a id="release-summary-3"></a>
<a id="release-summary-13"></a>
### Release Summary
Regular bugfix and feature release\.
<a id="minor-changes-3"></a>
<a id="minor-changes-8"></a>
### Minor Changes
* alternatives \- add <code>family</code> parameter that allows to utilize the <code>\-\-family</code> option available in RedHat version of update\-alternatives \([https\://github\.com/ansible\-collections/community\.general/issues/5060](https\://github\.com/ansible\-collections/community\.general/issues/5060)\, [https\://github\.com/ansible\-collections/community\.general/pull/9096](https\://github\.com/ansible\-collections/community\.general/pull/9096)\)\.
@@ -477,13 +898,13 @@ Regular bugfix and feature release\.
* scaleway\_lb \- minor simplification in the code \([https\://github\.com/ansible\-collections/community\.general/pull/9189](https\://github\.com/ansible\-collections/community\.general/pull/9189)\)\.
* ssh\_config \- add <code>dynamicforward</code> option \([https\://github\.com/ansible\-collections/community\.general/pull/9192](https\://github\.com/ansible\-collections/community\.general/pull/9192)\)\.
<a id="deprecated-features-2"></a>
<a id="deprecated-features-6"></a>
### Deprecated Features
* opkg \- deprecate value <code>\"\"</code> for parameter <code>force</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9172](https\://github\.com/ansible\-collections/community\.general/pull/9172)\)\.
* redfish\_utils module utils \- deprecate method <code>RedfishUtils\.\_init\_session\(\)</code> \([https\://github\.com/ansible\-collections/community\.general/pull/9190](https\://github\.com/ansible\-collections/community\.general/pull/9190)\)\.
<a id="bugfixes-3"></a>
<a id="bugfixes-13"></a>
### Bugfixes
* dnf\_config\_manager \- fix hanging when prompting to import GPG keys \([https\://github\.com/ansible\-collections/community\.general/pull/9124](https\://github\.com/ansible\-collections/community\.general/pull/9124)\, [https\://github\.com/ansible\-collections/community\.general/issues/8830](https\://github\.com/ansible\-collections/community\.general/issues/8830)\)\.
@@ -495,15 +916,15 @@ Regular bugfix and feature release\.
* keycloak\_clientscope\_type \- sort the default and optional clientscope lists to improve the diff \([https\://github\.com/ansible\-collections/community\.general/pull/9202](https\://github\.com/ansible\-collections/community\.general/pull/9202)\)\.
* slack \- fail if Slack API response is not OK with error message \([https\://github\.com/ansible\-collections/community\.general/pull/9198](https\://github\.com/ansible\-collections/community\.general/pull/9198)\)\.
<a id="new-plugins-2"></a>
<a id="new-plugins-4"></a>
### New Plugins
<a id="filter-1"></a>
<a id="filter-2"></a>
#### Filter
* community\.general\.accumulate \- Produce a list of accumulated sums of the input list contents\.
<a id="new-modules-2"></a>
<a id="new-modules-5"></a>
### New Modules
* community\.general\.decompress \- Decompresses compressed files\.
@@ -512,12 +933,12 @@ Regular bugfix and feature release\.
<a id="v10-0-1"></a>
## v10\.0\.1
<a id="release-summary-4"></a>
<a id="release-summary-14"></a>
### Release Summary
Bugfix release for inclusion in Ansible 11\.0\.0rc1\.
<a id="bugfixes-4"></a>
<a id="bugfixes-14"></a>
### Bugfixes
* keycloak\_client \- fix diff by removing code that turns the attributes dict which contains additional settings into a list \([https\://github\.com/ansible\-collections/community\.general/pull/9077](https\://github\.com/ansible\-collections/community\.general/pull/9077)\)\.
@@ -527,12 +948,12 @@ Bugfix release for inclusion in Ansible 11\.0\.0rc1\.
<a id="v10-0-0"></a>
## v10\.0\.0
<a id="release-summary-5"></a>
<a id="release-summary-15"></a>
### Release Summary
This is release 10\.0\.0 of <code>community\.general</code>\, released on 2024\-11\-04\.
<a id="minor-changes-4"></a>
<a id="minor-changes-9"></a>
### Minor Changes
* CmdRunner module util \- argument formats can be specified as plain functions without calling <code>cmd\_runner\_fmt\.as\_func\(\)</code> \([https\://github\.com/ansible\-collections/community\.general/pull/8479](https\://github\.com/ansible\-collections/community\.general/pull/8479)\)\.
@@ -737,7 +1158,7 @@ This is release 10\.0\.0 of <code>community\.general</code>\, released on 2024\-
* irc \- the defaults of <code>use\_tls</code> and <code>validate\_certs</code> changed from <code>false</code> to <code>true</code> \([https\://github\.com/ansible\-collections/community\.general/pull/8918](https\://github\.com/ansible\-collections/community\.general/pull/8918)\)\.
* rhsm\_repository \- the states <code>present</code> and <code>absent</code> have been removed\. Use <code>enabled</code> and <code>disabled</code> instead \([https\://github\.com/ansible\-collections/community\.general/pull/8918](https\://github\.com/ansible\-collections/community\.general/pull/8918)\)\.
<a id="deprecated-features-3"></a>
<a id="deprecated-features-7"></a>
### Deprecated Features
* CmdRunner module util \- setting the value of the <code>ignore\_none</code> parameter within a <code>CmdRunner</code> context is deprecated and that feature should be removed in community\.general 12\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/8479](https\://github\.com/ansible\-collections/community\.general/pull/8479)\)\.
@@ -762,7 +1183,7 @@ This is release 10\.0\.0 of <code>community\.general</code>\, released on 2024\-
* proxmox\_kvm \- removed the <code>proxmox\_default\_behavior</code> option\. Explicitly specify the old default values if you were using <code>proxmox\_default\_behavior\=compatibility</code>\, otherwise simply remove it \([https\://github\.com/ansible\-collections/community\.general/pull/8918](https\://github\.com/ansible\-collections/community\.general/pull/8918)\)\.
* redhat\_subscriptions \- removed the <code>pool</code> option\. Use <code>pool\_ids</code> instead \([https\://github\.com/ansible\-collections/community\.general/pull/8918](https\://github\.com/ansible\-collections/community\.general/pull/8918)\)\.
<a id="bugfixes-5"></a>
<a id="bugfixes-15"></a>
### Bugfixes
* bitwarden lookup plugin \- fix <code>KeyError</code> in <code>search\_field</code> \([https\://github\.com/ansible\-collections/community\.general/issues/8549](https\://github\.com/ansible\-collections/community\.general/issues/8549)\, [https\://github\.com/ansible\-collections/community\.general/pull/8557](https\://github\.com/ansible\-collections/community\.general/pull/8557)\)\.
@@ -842,15 +1263,15 @@ This is release 10\.0\.0 of <code>community\.general</code>\, released on 2024\-
* snap\_alias \- use new <code>VarDict</code> to prevent deprecation warning \([https\://github\.com/ansible\-collections/community\.general/issues/8410](https\://github\.com/ansible\-collections/community\.general/issues/8410)\, [https\://github\.com/ansible\-collections/community\.general/pull/8411](https\://github\.com/ansible\-collections/community\.general/pull/8411)\)\.
* udm\_user \- the module now tries to use <code>legacycrypt</code> on Python 3\.13\+ \([https\://github\.com/ansible\-collections/community\.general/issues/4690](https\://github\.com/ansible\-collections/community\.general/issues/4690)\, [https\://github\.com/ansible\-collections/community\.general/pull/8987](https\://github\.com/ansible\-collections/community\.general/pull/8987)\)\.
<a id="known-issues"></a>
<a id="known-issues-1"></a>
### Known Issues
* jenkins\_node \- the module is not able to update offline message when node is already offline due to internally using toggleOffline API \([https\://github\.com/ansible\-collections/community\.general/pull/9084](https\://github\.com/ansible\-collections/community\.general/pull/9084)\)\.
<a id="new-plugins-3"></a>
<a id="new-plugins-5"></a>
### New Plugins
<a id="filter-2"></a>
<a id="filter-3"></a>
#### Filter
* community\.general\.keep\_keys \- Keep specific keys from dictionaries in a list\.
@@ -863,7 +1284,7 @@ This is release 10\.0\.0 of <code>community\.general</code>\, released on 2024\-
* community\.general\.ansible\_type \- Validate input type\.
<a id="new-modules-3"></a>
<a id="new-modules-6"></a>
### New Modules
* community\.general\.bootc\_manage \- Bootc Switch and Upgrade\.

View File

@@ -6,6 +6,378 @@ Community General Release Notes
This changelog describes changes after version 9.0.0.
v10.7.6
=======
Release Summary
---------------
Regular bugfix release.
Security Fixes
--------------
- keycloak_user - the parameter ``credentials[].value`` is now marked as ``no_log=true``. Before it was logged by Ansible, unless the task was marked as ``no_log: true``. Since this parameter can be used for passwords, this resulted in credential leaking (https://github.com/ansible-collections/community.general/issues/11000, https://github.com/ansible-collections/community.general/pull/11005).
Bugfixes
--------
- gitlab_runner - fix exception in check mode when a new runner is created (https://github.com/ansible-collections/community.general/issues/8854).
- omapi_host - make return values compatible with ansible-core 2.19 and Python 3 (https://github.com/ansible-collections/community.general/pull/11001).
- onepassword_doc and onepassword_ssh_key lookup plugins - ensure that all connection parameters are passed to CLI class (https://github.com/ansible-collections/community.general/pull/10965).
- pritunl_user - improve resilience when comparing user parameters if remote fields are ``null`` or missing. List parameters (``groups``, ``mac_addresses``) now safely default to empty lists for comparison and avoids ``KeyError`` issues (https://github.com/ansible-collections/community.general/issues/10954, https://github.com/ansible-collections/community.general/pull/10955).
- random_string lookup plugin - replace ``random.SystemRandom()`` with ``secrets.SystemRandom()`` when generating strings. This has no practical effect, as both are the same (https://github.com/ansible-collections/community.general/pull/10893).
- terraform - fix bug when ``null`` values inside complex vars are throwing error instead of being passed to terraform. Now terraform can handle ``null``s in ``complex_vars`` itself (https://github.com/ansible-collections/community.general/pull/10961).
v10.7.5
=======
Release Summary
---------------
Regular bugfix release.
Bugfixes
--------
- Avoid usage of deprecated ``ansible.module_utils.six`` in all code that does not have to support Python 2 (https://github.com/ansible-collections/community.general/pull/10873).
- github_deploy_key - fix bug during error handling if no body was present in the result (https://github.com/ansible-collections/community.general/issues/10853, https://github.com/ansible-collections/community.general/pull/10857).
- keycloak_group - fixes an issue where module ignores realm when searching subgroups by name (https://github.com/ansible-collections/community.general/pull/10840).
- keycloak_role - fixes an issue where the module incorrectly returns ``changed=true`` when using the alias ``clientId`` in composite roles (https://github.com/ansible-collections/community.general/pull/10829).
- rocketchat - fix message delivery in Rocket Chat >= 7.5.3 by forcing ``Content-Type`` header to ``application/json`` instead of the default ``application/x-www-form-urlencoded`` (https://github.com/ansible-collections/community.general/issues/10796, https://github.com/ansible-collections/community.general/pull/10796).
- yaml cache plugin - make compatible with ansible-core 2.19 (https://github.com/ansible-collections/community.general/issues/10849, https://github.com/ansible-collections/community.general/issues/10852).
v10.7.4
=======
Release Summary
---------------
Regular bugfix release.
Bugfixes
--------
- Avoid deprecated functionality in ansible-core 2.20 (https://github.com/ansible-collections/community.general/pull/10687).
- apache2_module - check the ``cgi`` module restrictions only during activation (https://github.com/ansible-collections/community.general/pull/10423).
- kdeconfig - ``kwriteconfig`` executable could not be discovered automatically on systems with only ``kwriteconfig6`` installed. ``kwriteconfig6`` can now be discovered by Ansible (https://github.com/ansible-collections/community.general/issues/10746, https://github.com/ansible-collections/community.general/pull/10751).
- monit - fix crash caused by an unknown status value returned from the monit service (https://github.com/ansible-collections/community.general/issues/10742, https://github.com/ansible-collections/community.general/pull/10743).
- pids - prevent error when an empty string is provided for ``name`` (https://github.com/ansible-collections/community.general/issues/10672, https://github.com/ansible-collections/community.general/pull/10688).
- selective callback plugin - specify ``ansible_loop_var`` instead of the explicit value ``item`` when printing task result (https://github.com/ansible-collections/community.general/pull/10752).
v10.7.3
=======
Release Summary
---------------
Regular bugfix release.
Bugfixes
--------
- apache2_module - avoid ansible-core 2.19 deprecation (https://github.com/ansible-collections/community.general/pull/10459).
- apk - fix check for empty/whitespace-only package names (https://github.com/ansible-collections/community.general/pull/10532).
- apk - handle empty name strings properly (https://github.com/ansible-collections/community.general/issues/10441, https://github.com/ansible-collections/community.general/pull/10442).
- capabilities - using invalid path (symlink/directory/...) returned unrelated and incoherent error messages (https://github.com/ansible-collections/community.general/issues/5649, https://github.com/ansible-collections/community.general/pull/10455).
- cronvar - fix crash on missing ``cron_file`` parent directories (https://github.com/ansible-collections/community.general/issues/10460, https://github.com/ansible-collections/community.general/pull/10461).
- cronvar - handle empty strings on ``value`` properly (https://github.com/ansible-collections/community.general/issues/10439, https://github.com/ansible-collections/community.general/pull/10445).
- doas become plugin - disable pipelining on ansible-core 2.19+. The plugin does not work with pipelining, and since ansible-core 2.19 become plugins can indicate that they do not work with pipelining (https://github.com/ansible-collections/community.general/issues/9977, https://github.com/ansible-collections/community.general/pull/10537).
- htpasswd - avoid ansible-core 2.19 deprecation (https://github.com/ansible-collections/community.general/pull/10459).
- irc - pass hostname to ``wrap_socket()`` if ``use_tls=true`` and ``validate_certs=true`` (https://github.com/ansible-collections/community.general/issues/10472, https://github.com/ansible-collections/community.general/pull/10491).
- json_query filter plugin - make compatible with lazy evaluation list and dictionary types of ansible-core 2.19 (https://github.com/ansible-collections/community.general/pull/10539).
- listen_port_facts - avoid crash when required commands are missing (https://github.com/ansible-collections/community.general/issues/10457, https://github.com/ansible-collections/community.general/pull/10458).
- machinectl become plugin - disable pipelining on ansible-core 2.19+. The plugin does not work with pipelining, and since ansible-core 2.19 become plugins can indicate that they do not work with pipelining (https://github.com/ansible-collections/community.general/pull/10537).
- merge_variables lookup plugin - avoid deprecated functionality from ansible-core 2.19 (https://github.com/ansible-collections/community.general/pull/10566).
- proxmox inventory plugin - avoid using deprecated option when templating options (https://github.com/ansible-collections/community.proxmox/pull/108, https://github.com/ansible-collections/community.general/pull/10553).
- proxmox_pct_remote connection plugin - avoid deprecated ansible-core paramiko import helper, import paramiko directly instead (https://github.com/ansible-collections/community.proxmox/issues/146, https://github.com/ansible-collections/community.proxmox/pull/151, https://github.com/ansible-collections/community.general/pull/10553).
- syspatch - avoid ansible-core 2.19 deprecation (https://github.com/ansible-collections/community.general/pull/10459).
- sysrc - use ``shlex`` to improve parsing of ``sysrc -e -a`` output (https://github.com/ansible-collections/community.general/issues/10394, https://github.com/ansible-collections/community.general/pull/10400).
- sysupgrade - avoid ansible-core 2.19 deprecation (https://github.com/ansible-collections/community.general/pull/10459).
- wsl connection plugin - avoid deprecated ansible-core paramiko import helper, import paramiko directly instead (https://github.com/ansible-collections/community.general/issues/10515, https://github.com/ansible-collections/community.general/pull/10531).
- zypper_repository - avoid ansible-core 2.19 deprecation (https://github.com/ansible-collections/community.general/pull/10459).
v10.7.2
=======
Release Summary
---------------
Regular bugfix release.
Bugfixes
--------
- dependent lookup plugin - avoid deprecated ansible-core 2.19 functionality (https://github.com/ansible-collections/community.general/pull/10359).
- github_release - support multiple types of GitHub tokens; no longer failing when ``ghs_`` token type is provided (https://github.com/ansible-collections/community.general/issues/10338, https://github.com/ansible-collections/community.general/pull/10339).
- icinga2 inventory plugin - avoid using deprecated option when templating options (https://github.com/ansible-collections/community.general/pull/10271).
- incus connection plugin - fix error handling to return more useful Ansible errors to the user (https://github.com/ansible-collections/community.general/issues/10344, https://github.com/ansible-collections/community.general/pull/10349).
- linode inventory plugin - avoid using deprecated option when templating options (https://github.com/ansible-collections/community.general/pull/10271).
- logstash callback plugin - remove reference to Python 2 library (https://github.com/ansible-collections/community.general/pull/10345).
v10.7.1
=======
Release Summary
---------------
Regular bugfix release.
Minor Changes
-------------
- git_config - remove redundant ``required=False`` from ``argument_spec`` (https://github.com/ansible-collections/community.general/pull/10177).
- proxmox_snap - correctly handle proxmox_snap timeout parameter (https://github.com/ansible-collections/community.proxmox/issues/73, https://github.com/ansible-collections/community.proxmox/issues/95, https://github.com/ansible-collections/community.general/pull/10176).
Deprecated Features
-------------------
- yaml callback plugin - the YAML callback plugin was deprecated for removal in community.general 13.0.0. Since it needs to use ansible-core internals since ansible-core 2.19 that are changing a lot, we will remove this plugin already from community.general 12.0.0 to ease the maintenance burden (https://github.com/ansible-collections/community.general/pull/10213).
Bugfixes
--------
- cobbler_system - update minimum version number to avoid wrong comparisons that happen in some cases using LooseVersion class which results in TypeError (https://github.com/ansible-collections/community.general/issues/8506, https://github.com/ansible-collections/community.general/pull/10145, https://github.com/ansible-collections/community.general/pull/10178).
- gitlab_group_access_token, gitlab_project_access_token - fix handling of group and project access tokens for changes in GitLab 17.10 (https://github.com/ansible-collections/community.general/pull/10196).
- keycloak - update more than 10 sub-groups (https://github.com/ansible-collections/community.general/issues/9690, https://github.com/ansible-collections/community.general/pull/9692).
- yaml callback plugin - adjust to latest changes in ansible-core devel (https://github.com/ansible-collections/community.general/pull/10212).
- yaml callback plugin - when using ansible-core 2.19.0b2 or newer, uses a new utility provided by ansible-core. This allows us to remove all hacks and vendored code that was part of the plugin for ansible-core versions with Data Tagging so far (https://github.com/ansible-collections/community.general/pull/10242).
- zypper_repository - make compatible with Python 3.12+ (https://github.com/ansible-collections/community.general/issues/10222, https://github.com/ansible-collections/community.general/pull/10223).
- zypper_repository - use ``metalink`` attribute to identify repositories without ``<url/>`` element (https://github.com/ansible-collections/community.general/issues/10224, https://github.com/ansible-collections/community.general/pull/10225).
v10.7.0
=======
Release Summary
---------------
Bugfix and feature release.
Note that this is the final minor 10.x.0 release.
The next release with new features will be 11.0.0.
From now on, there will only be bugfix 10.7.x releases for the community.general 10 release train.
Minor Changes
-------------
- cobbler inventory plugin - add ``connection_timeout`` option to specify the connection timeout to the cobbler server (https://github.com/ansible-collections/community.general/pull/11063).
- cobbler inventory plugin - add ``facts_level`` option to allow requesting fully rendered variables for Cobbler systems (https://github.com/ansible-collections/community.general/issues/9419, https://github.com/ansible-collections/community.general/pull/9975).
- ini_file - modify an inactive option also when there are spaces in front of the comment symbol (https://github.com/ansible-collections/community.general/pull/10102, https://github.com/ansible-collections/community.general/issues/8539).
- pipx - parameter ``name`` now accepts Python package specifiers (https://github.com/ansible-collections/community.general/issues/7815, https://github.com/ansible-collections/community.general/pull/10031).
- pipx module_utils - filtering application list by name now happens in the modules (https://github.com/ansible-collections/community.general/pull/10031).
- pipx_info - filtering application list by name now happens in the module (https://github.com/ansible-collections/community.general/pull/10031).
Deprecated Features
-------------------
- The proxmox content (modules and plugins) is being moved to the `new collection community.proxmox <https://github.com/ansible-collections/community.proxmox>`__. In community.general 11.0.0, these modules and plugins will be replaced by deprecated redirections to community.proxmox. You need to explicitly install community.proxmox, for example with ``ansible-galaxy collection install community.proxmox``. We suggest to update your roles and playbooks to use the new FQCNs as soon as possible to avoid getting deprecation messages (https://github.com/ansible-collections/community.general/pull/10109).
- pipx module_utils - function ``make_process_list()`` is deprecated and will be removed in community.general 13.0.0 (https://github.com/ansible-collections/community.general/pull/10031).
Bugfixes
--------
- cobbler_system - fix bug with Cobbler >= 3.4.0 caused by giving more than 2 positional arguments to ``CobblerXMLRPCInterface.get_system_handle()`` (https://github.com/ansible-collections/community.general/issues/8506, https://github.com/ansible-collections/community.general/pull/10145).
- kdeconfig - allow option values beginning with a dash (https://github.com/ansible-collections/community.general/issues/10127, https://github.com/ansible-collections/community.general/pull/10128).
- keycloak_user_rolemapping - fix ``--diff`` mode (https://github.com/ansible-collections/community.general/issues/10067, https://github.com/ansible-collections/community.general/pull/10075).
- pickle cache plugin - avoid extra JSON serialization with ansible-core >= 2.19 (https://github.com/ansible-collections/community.general/pull/10136).
- proxmox - fix crash in module when the used on an existing LXC container with ``state=present`` and ``force=true`` (https://github.com/ansible-collections/community.proxmox/pull/91, https://github.com/ansible-collections/community.general/pull/10155).
- rundeck_acl_policy - ensure that project ACLs are sent to the correct endpoint (https://github.com/ansible-collections/community.general/pull/10097).
- sysrc - split the output of ``sysrc -e -a`` on the first ``=`` only (https://github.com/ansible-collections/community.general/issues/10120, https://github.com/ansible-collections/community.general/pull/10121).
New Plugins
-----------
Callback
~~~~~~~~
- community.general.print_task - Prints playbook task snippet to job output.
Filter
~~~~~~
- community.general.to_prettytable - Format a list of dictionaries as an ASCII table.
New Modules
-----------
- community.general.xdg_mime - Set default handler for MIME types, for applications using XDG tools.
v10.6.0
=======
Release Summary
---------------
Regular bugfix and feature release.
Minor Changes
-------------
- apache2_module - added workaround for new PHP module name, from ``php7_module`` to ``php_module`` (https://github.com/ansible-collections/community.general/pull/9951).
- gitlab_project - add option ``build_timeout`` (https://github.com/ansible-collections/community.general/pull/9960).
- gitlab_project_members - extend choices parameter ``access_level`` by missing upstream valid value ``owner`` (https://github.com/ansible-collections/community.general/pull/9953).
- hpilo_boot - add option to get an idempotent behavior while powering on server, resulting in success instead of failure when using ``state: boot_once`` option (https://github.com/ansible-collections/community.general/pull/9646).
- idrac_redfish_command, idrac_redfish_config, idrac_redfish_info - add ``validate_certs``, ``ca_path``, and ``ciphers`` options to configure TLS/SSL (https://github.com/ansible-collections/community.general/issues/3686, https://github.com/ansible-collections/community.general/pull/9964).
- ilo_redfish_command, ilo_redfish_config, ilo_redfish_info - add ``validate_certs``, ``ca_path``, and ``ciphers`` options to configure TLS/SSL (https://github.com/ansible-collections/community.general/issues/3686, https://github.com/ansible-collections/community.general/pull/9964).
- keycloak module_utils - user groups can now be referenced by their name, like ``staff``, or their path, like ``/staff/engineering``. The path syntax allows users to reference subgroups, which is not possible otherwise (https://github.com/ansible-collections/community.general/pull/9898).
- keycloak_user module - user groups can now be referenced by their name, like ``staff``, or their path, like ``/staff/engineering``. The path syntax allows users to reference subgroups, which is not possible otherwise (https://github.com/ansible-collections/community.general/pull/9898).
- nmcli - add support for Infiniband MAC setting when ``type`` is ``infiniband`` (https://github.com/ansible-collections/community.general/pull/9962).
- one_vm - update allowed values for ``updateconf`` to include new parameters as per the latest OpenNebula API documentation.
Added parameters:
* ``OS``: ``FIRMWARE``;
* ``CPU_MODEL``: ``MODEL``, ``FEATURES``;
* ``FEATURES``: ``VIRTIO_BLK_QUEUES``, ``VIRTIO_SCSI_QUEUES``, ``IOTHREADS``;
* ``GRAPHICS``: ``PORT``, ``COMMAND``;
* ``VIDEO``: ``ATS``, ``IOMMU``, ``RESOLUTION``, ``TYPE``, ``VRAM``;
* ``RAW``: ``VALIDATE``;
* ``BACKUP_CONFIG``: ``FS_FREEZE``, ``KEEP_LAST``, ``BACKUP_VOLATILE``, ``MODE``, ``INCREMENT_MODE``.
(https://github.com/ansible-collections/community.general/pull/9959).
- proxmox and proxmox_kvm modules - allow uppercase characters in VM/container tags (https://github.com/ansible-collections/community.general/issues/9895, https://github.com/ansible-collections/community.general/pull/10024).
- puppet - improve parameter formatting, no impact to user (https://github.com/ansible-collections/community.general/pull/10014).
- redfish module utils - add ``REDFISH_COMMON_ARGUMENT_SPEC``, a corresponding ``redfish`` docs fragment, and support for its ``validate_certs``, ``ca_path``, and ``ciphers`` options (https://github.com/ansible-collections/community.general/issues/3686, https://github.com/ansible-collections/community.general/pull/9964).
- redfish_command, redfish_config, redfish_info - add ``validate_certs`` and ``ca_path`` options to configure TLS/SSL (https://github.com/ansible-collections/community.general/issues/3686, https://github.com/ansible-collections/community.general/pull/9964).
- rocketchat - fix duplicate JSON conversion for Rocket.Chat < 7.4.0 (https://github.com/ansible-collections/community.general/pull/9965).
- wdc_redfish_command, wdc_redfish_info - add ``validate_certs``, ``ca_path``, and ``ciphers`` options to configure TLS/SSL (https://github.com/ansible-collections/community.general/issues/3686, https://github.com/ansible-collections/community.general/pull/9964).
- xcc_redfish_command - add ``validate_certs``, ``ca_path``, and ``ciphers`` options to configure TLS/SSL (https://github.com/ansible-collections/community.general/issues/3686, https://github.com/ansible-collections/community.general/pull/9964).
- zypper - adds ``skip_post_errors`` that allows to skip RPM post-install errors (Zypper return code 107) (https://github.com/ansible-collections/community.general/issues/9972).
Deprecated Features
-------------------
- manifold lookup plugin - plugin is deprecated and will be removed in community.general 11.0.0 (https://github.com/ansible-collections/community.general/pull/10028).
- stackpath_compute inventory plugin - plugin is deprecated and will be removed in community.general 11.0.0 (https://github.com/ansible-collections/community.general/pull/10026).
Bugfixes
--------
- dependent look plugin - make compatible with ansible-core's Data Tagging feature (https://github.com/ansible-collections/community.general/pull/9833).
- diy callback plugin - make compatible with ansible-core's Data Tagging feature (https://github.com/ansible-collections/community.general/pull/9833).
- github_deploy_key - check that key really exists on 422 to avoid masking other errors (https://github.com/ansible-collections/community.general/issues/6718, https://github.com/ansible-collections/community.general/pull/10011).
- hashids and unicode_normalize filter plugins - avoid deprecated ``AnsibleFilterTypeError`` on ansible-core 2.19 (https://github.com/ansible-collections/community.general/pull/9992).
- homebrew - emit a useful error message if ``brew info`` reports a package tap is ``null`` (https://github.com/ansible-collections/community.general/pull/10013, https://github.com/ansible-collections/community.general/issues/10012).
- java_cert - the module no longer fails if the optional parameters ``pkcs12_alias`` and ``cert_alias`` are not provided (https://github.com/ansible-collections/community.general/pull/9970).
- keycloak_authentication - fix authentification config duplication for Keycloak < 26.2.0 (https://github.com/ansible-collections/community.general/pull/9987).
- keycloak_client - fix the idempotency regression by normalizing the Keycloak response for ``after_client`` (https://github.com/ansible-collections/community.general/issues/9905, https://github.com/ansible-collections/community.general/pull/9976).
- proxmox inventory plugin - fix ``ansible_host`` staying empty for certain Proxmox nodes (https://github.com/ansible-collections/community.general/issues/5906, https://github.com/ansible-collections/community.general/pull/9952).
- proxmox_disk - fail gracefully if ``storage`` is required but not provided by the user (https://github.com/ansible-collections/community.general/issues/9941, https://github.com/ansible-collections/community.general/pull/9963).
- reveal_ansible_type filter plugin and ansible_type test plugin - make compatible with ansible-core's Data Tagging feature (https://github.com/ansible-collections/community.general/pull/9833).
- sysrc - no longer always reporting ``changed=true`` when ``state=absent``. This fixes the method ``exists()`` (https://github.com/ansible-collections/community.general/issues/10004, https://github.com/ansible-collections/community.general/pull/10005).
- yaml callback plugin - use ansible-core internals to avoid breakage with Data Tagging (https://github.com/ansible-collections/community.general/pull/9833).
Known Issues
------------
- reveal_ansible_type filter plugin and ansible_type test plugin - note that ansible-core's Data Tagging feature implements new aliases, such as ``_AnsibleTaggedStr`` for ``str``, ``_AnsibleTaggedInt`` for ``int``, and ``_AnsibleTaggedFloat`` for ``float`` (https://github.com/ansible-collections/community.general/pull/9833).
New Plugins
-----------
Connection
~~~~~~~~~~
- community.general.wsl - Run tasks in WSL distribution using wsl.exe CLI via SSH.
v10.5.0
=======
Release Summary
---------------
Regular bugfix and feature release.
Minor Changes
-------------
- CmdRunner module utils - the convenience method ``cmd_runner_fmt.as_fixed()`` now accepts multiple arguments as a list (https://github.com/ansible-collections/community.general/pull/9893).
- apache2_mod_proxy - code simplification, no change in functionality (https://github.com/ansible-collections/community.general/pull/9457).
- consul_token - fix idempotency when ``policies`` or ``roles`` are supplied by name (https://github.com/ansible-collections/community.general/issues/9841, https://github.com/ansible-collections/community.general/pull/9845).
- keycloak_realm - remove ID requirement when creating a realm to allow Keycloak generating its own realm ID (https://github.com/ansible-collections/community.general/pull/9768).
- nmap inventory plugin - adds ``dns_servers`` option for specifying DNS servers for name resolution. Accepts hostnames or IP addresses in the same format as the ``exclude`` option (https://github.com/ansible-collections/community.general/pull/9849).
- proxmox_kvm - add missing audio hardware device handling (https://github.com/ansible-collections/community.general/issues/5192, https://github.com/ansible-collections/community.general/pull/9847).
- redfish_config - add command ``SetPowerRestorePolicy`` to set the desired power state of the system when power is restored (https://github.com/ansible-collections/community.general/pull/9837).
- redfish_info - add command ``GetPowerRestorePolicy`` to get the desired power state of the system when power is restored (https://github.com/ansible-collections/community.general/pull/9824).
- rocketchat - option ``is_pre740`` has been added to control the format of the payload. For Rocket.Chat 7.4.0 or newer, it must be set to ``false`` (https://github.com/ansible-collections/community.general/pull/9882).
- slack callback plugin - add ``http_agent`` option to enable the user to set a custom user agent for slack callback plugin (https://github.com/ansible-collections/community.general/issues/9813, https://github.com/ansible-collections/community.general/pull/9836).
- systemd_info - add wildcard expression support in ``unitname`` option (https://github.com/ansible-collections/community.general/pull/9821).
- systemd_info - extend support to timer units (https://github.com/ansible-collections/community.general/pull/9891).
- vmadm - add new options ``flexible_disk_size`` and ``owner_uuid`` (https://github.com/ansible-collections/community.general/pull/9892).
Bugfixes
--------
- cloudlare_dns - handle exhausted response stream in case of HTTP errors to show nice error message to the user (https://github.com/ansible-collections/community.general/issues/9782, https://github.com/ansible-collections/community.general/pull/9818).
- dnf_versionlock - add support for dnf5 (https://github.com/ansible-collections/community.general/issues/9556).
- homebrew - fix crash when package names include tap (https://github.com/ansible-collections/community.general/issues/9777, https://github.com/ansible-collections/community.general/pull/9803).
- homebrew_cask - handle unusual brew version strings (https://github.com/ansible-collections/community.general/issues/8432, https://github.com/ansible-collections/community.general/pull/9881).
- nmcli - enable changing only the order of DNS servers or search suffixes (https://github.com/ansible-collections/community.general/issues/8724, https://github.com/ansible-collections/community.general/pull/9880).
- proxmox - add missing key selection of ``'status'`` key to ``get_lxc_status`` (https://github.com/ansible-collections/community.general/issues/9696, https://github.com/ansible-collections/community.general/pull/9809).
- proxmox_vm_info - the module no longer expects that the key ``template`` exists in a dictionary returned by Proxmox (https://github.com/ansible-collections/community.general/issues/9875, https://github.com/ansible-collections/community.general/pull/9910).
- sudoers - display stdout and stderr raised while failed validation (https://github.com/ansible-collections/community.general/issues/9674, https://github.com/ansible-collections/community.general/pull/9871).
New Modules
-----------
- community.general.pacemaker_resource - Manage pacemaker resources.
v10.4.0
=======
Release Summary
---------------
Regular bugfix and feature release.
Minor Changes
-------------
- bitwarden lookup plugin - add new option ``collection_name`` to filter results by collection name, and new option ``result_count`` to validate number of results (https://github.com/ansible-collections/community.general/pull/9728).
- incus connection plugin - adds ``remote_user`` and ``incus_become_method`` parameters for allowing a non-root user to connect to an Incus instance (https://github.com/ansible-collections/community.general/pull/9743).
- iocage inventory plugin - the new parameter ``hooks_results`` of the plugin is a list of files inside a jail that provide configuration parameters for the inventory. The inventory plugin reads the files from the jails and put the contents into the items of created variable ``iocage_hooks`` (https://github.com/ansible-collections/community.general/issues/9650, https://github.com/ansible-collections/community.general/pull/9651).
- jira - adds ``client_cert`` and ``client_key`` parameters for supporting client certificate authentification when connecting to Jira (https://github.com/ansible-collections/community.general/pull/9753).
- lldp - adds ``multivalues`` parameter to control behavior when lldpctl outputs an attribute multiple times (https://github.com/ansible-collections/community.general/pull/9657).
- lvg - add ``remove_extra_pvs`` parameter to control if ansible should remove physical volumes which are not in the ``pvs`` parameter (https://github.com/ansible-collections/community.general/pull/9698).
- lxd connection plugin - adds ``remote_user`` and ``lxd_become_method`` parameters for allowing a non-root user to connect to an LXD instance (https://github.com/ansible-collections/community.general/pull/9659).
- nmcli - adds VRF support with new ``type`` value ``vrf`` and new ``slave_type`` value ``vrf`` as well as new ``table`` parameter (https://github.com/ansible-collections/community.general/pull/9658, https://github.com/ansible-collections/community.general/issues/8014).
- proxmox_kvm - allow hibernation and suspending of VMs (https://github.com/ansible-collections/community.general/issues/9620, https://github.com/ansible-collections/community.general/pull/9653).
- redfish_command - add ``PowerFullPowerCycle`` to power command options (https://github.com/ansible-collections/community.general/pull/9729).
- ssh_config - add ``other_options`` option (https://github.com/ansible-collections/community.general/issues/8053, https://github.com/ansible-collections/community.general/pull/9684).
- xen_orchestra inventory plugin - add ``use_vm_uuid`` and ``use_host_uuid`` boolean options to allow switching over to using VM/Xen name labels instead of UUIDs as item names (https://github.com/ansible-collections/community.general/pull/9787).
Deprecated Features
-------------------
- profitbricks - module is deprecated and will be removed in community.general 11.0.0 (https://github.com/ansible-collections/community.general/pull/9733).
- profitbricks_datacenter - module is deprecated and will be removed in community.general 11.0.0 (https://github.com/ansible-collections/community.general/pull/9733).
- profitbricks_nic - module is deprecated and will be removed in community.general 11.0.0 (https://github.com/ansible-collections/community.general/pull/9733).
- profitbricks_volume - module is deprecated and will be removed in community.general 11.0.0 (https://github.com/ansible-collections/community.general/pull/9733).
- profitbricks_volume_attachments - module is deprecated and will be removed in community.general 11.0.0 (https://github.com/ansible-collections/community.general/pull/9733).
Bugfixes
--------
- apache2_mod_proxy - make compatible with Python 3 (https://github.com/ansible-collections/community.general/pull/9762).
- apache2_mod_proxy - passing the cluster's page as referer for the member's pages. This makes the module actually work again for halfway modern Apache versions. According to some comments founds on the net the referer was required since at least 2019 for some versions of Apache 2 (https://github.com/ansible-collections/community.general/pull/9762).
- elasticsearch_plugin - fix ``ERROR: D is not a recognized option`` issue when configuring proxy settings (https://github.com/ansible-collections/community.general/pull/9774, https://github.com/ansible-collections/community.general/issues/9773).
- ipa_host - module revoked existing host certificates even if ``user_certificate`` was not given (https://github.com/ansible-collections/community.general/pull/9694).
- keycloak_client - in check mode, detect whether the lists in before client (for example redirect URI list) contain items that the lists in the desired client do not contain (https://github.com/ansible-collections/community.general/pull/9739).
- lldp - fix crash caused by certain lldpctl output where an attribute is defined as branch and leaf (https://github.com/ansible-collections/community.general/pull/9657).
- onepassword_doc lookup plugin - ensure that 1Password Connect support also works for this plugin (https://github.com/ansible-collections/community.general/pull/9625).
- passwordstore lookup plugin - fix subkey creation even when ``create=false`` (https://github.com/ansible-collections/community.general/issues/9105, https://github.com/ansible-collections/community.general/pull/9106).
- proxmox inventory plugin - plugin did not update cache correctly after ``meta: refresh_inventory`` (https://github.com/ansible-collections/community.general/issues/9710, https://github.com/ansible-collections/community.general/pull/9760).
- redhat_subscription - use the "enable_content" option (when available) when
registering using D-Bus, to ensure that subscription-manager enables the
content on registration; this is particular important on EL 10+ and Fedora
41+
(https://github.com/ansible-collections/community.general/pull/9778).
- zfs - fix handling of multi-line values of user-defined ZFS properties (https://github.com/ansible-collections/community.general/pull/6264).
- zfs_facts - parameter ``type`` now accepts multple values as documented (https://github.com/ansible-collections/community.general/issues/5909, https://github.com/ansible-collections/community.general/pull/9697).
New Modules
-----------
- community.general.systemd_info - Gather C(systemd) unit info.
v10.3.1
=======

View File

@@ -44,7 +44,49 @@ If you want to test a PR locally, refer to [our testing guide](https://github.co
If you find any inconsistencies or places in this document which can be improved, feel free to raise an issue or pull request to fix it.
## Run sanity, unit or integration tests locally
## Run sanity or unit locally (with antsibull-nox)
The easiest way to run sanity and unit tests locally is to use [antsibull-nox](https://ansible.readthedocs.io/projects/antsibull-nox/).
(If you have [nox](https://nox.thea.codes/en/stable/) installed, it will automatically install antsibull-nox in a virtual environment for you.)
### Sanity tests
The following commands show how to run ansible-test sanity tests:
```.bash
# Run basic sanity tests for all files in the collection:
nox -Re ansible-test-sanity-devel
# Run basic sanity tests for the given files and directories:
nox -Re ansible-test-sanity-devel -- plugins/modules/system/pids.py tests/integration/targets/pids/
# Run all other sanity tests for all files in the collection:
nox -R
```
If you replace `-Re` with `-e`, respectively. If you leave `-R` away, then the virtual environments will be re-created. The `-R` re-uses them (if they already exist).
### Unit tests
The following commands show how to run unit tests:
```.bash
# Run all unit tests:
nox -Re ansible-test-units-devel
# Run all unit tests for one Python version (a lot faster):
nox -Re ansible-test-units-devel -- --python 3.13
# Run a specific unit test (for the nmcli module) for one Python version:
nox -Re ansible-test-units-devel -- --python 3.13 tests/unit/plugins/modules/net_tools/test_nmcli.py
```
If you replace `-Re` with `-e`, then the virtual environments will be re-created. The `-R` re-uses them (if they already exist).
## Run basic sanity, unit or integration tests locally (with ansible-test)
Instead of using antsibull-nox, you can also run sanity and unit tests with ansible-test directly.
This also allows you to run integration tests.
You have to check out the repository into a specific path structure to be able to run `ansible-test`. The path to the git checkout must end with `.../ansible_collections/community/general`. Please see [our testing guide](https://github.com/ansible/community-docs/blob/main/test_pr_locally_guide.rst) for instructions on how to check out the repository into a correct path structure. The short version of these instructions is:
@@ -56,20 +98,27 @@ cd ~/dev/ansible_collections/community/general
Then you can run `ansible-test` (which is a part of [ansible-core](https://pypi.org/project/ansible-core/)) inside the checkout. The following example commands expect that you have installed Docker or Podman. Note that Podman has only been supported by more recent ansible-core releases. If you are using Docker, the following will work with Ansible 2.9+.
### Sanity tests
### Basic sanity tests
The following commands show how to run sanity tests:
The following commands show how to run basic sanity tests:
```.bash
# Run sanity tests for all files in the collection:
# Run basic sanity tests for all files in the collection:
ansible-test sanity --docker -v
# Run sanity tests for the given files and directories:
# Run basic sanity tests for the given files and directories:
ansible-test sanity --docker -v plugins/modules/system/pids.py tests/integration/targets/pids/
```
### Unit tests
Note that for running unit tests, you need to install required collections in the same folder structure that `community.general` is checked out in.
Right now, you need to install [`community.internal_test_tools`](https://github.com/ansible-collections/community.internal_test_tools).
If you want to use the latest version from GitHub, you can run:
```
git clone https://github.com/ansible-collections/community.internal_test_tools.git ~/dev/ansible_collections/community/internal_test_tools
```
The following commands show how to run unit tests:
```.bash
@@ -85,6 +134,16 @@ ansible-test units --docker -v --python 3.8 tests/unit/plugins/modules/net_tools
### Integration tests
Note that for running integration tests, you need to install required collections in the same folder structure that `community.general` is checked out in.
Right now, depending on the test, you need to install [`ansible.posix`](https://github.com/ansible-collections/ansible.posix), [`community.crypto`](https://github.com/ansible-collections/community.crypto), and [`community.docker`](https://github.com/ansible-collections/community.docker):
If you want to use the latest versions from GitHub, you can run:
```
mkdir -p ~/dev/ansible_collections/ansible
git clone https://github.com/ansible-collections/ansible.posix.git ~/dev/ansible_collections/ansible/posix
git clone https://github.com/ansible-collections/community.crypto.git ~/dev/ansible_collections/community/crypto
git clone https://github.com/ansible-collections/community.docker.git ~/dev/ansible_collections/community/docker
```
The following commands show how to run integration tests:
#### In Docker
@@ -92,8 +151,8 @@ The following commands show how to run integration tests:
Integration tests on Docker have the following parameters:
- `image_name` (required): The name of the Docker image. To get the list of supported Docker images, run
`ansible-test integration --help` and look for _target docker images_.
- `test_name` (optional): The name of the integration test.
For modules, this equals the short name of the module; for example, `pacman` in case of `community.general.pacman`.
- `test_name` (optional): The name of the integration test.
For modules, this equals the short name of the module; for example, `pacman` in case of `community.general.pacman`.
For plugins, the plugin type is added before the plugin's short name, for example `callback_yaml` for the `community.general.yaml` callback.
```.bash
# Test all plugins/modules on fedora40

View File

@@ -9,6 +9,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
[![Documentation](https://img.shields.io/badge/docs-brightgreen.svg)](https://docs.ansible.com/ansible/latest/collections/community/general/)
[![Build Status](https://dev.azure.com/ansible/community.general/_apis/build/status/CI?branchName=stable-10)](https://dev.azure.com/ansible/community.general/_build?definitionId=31)
[![EOL CI](https://github.com/ansible-collections/community.general/actions/workflows/ansible-test.yml/badge.svg?branch=stable-10)](https://github.com/ansible-collections/community.general/actions)
[![Nox CI](https://github.com/ansible-collections/community.general/actions/workflows/nox.yml/badge.svg?branch=stable-10)](https://github.com/ansible-collections/community.general/actions)
[![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.general)](https://codecov.io/gh/ansible-collections/community.general)
[![REUSE status](https://api.reuse.software/badge/github.com/ansible-collections/community.general)](https://api.reuse.software/info/github.com/ansible-collections/community.general)
@@ -38,7 +39,7 @@ For more information about communication, see the [Ansible communication guide](
## Tested with Ansible
Tested with the current ansible-core 2.15, ansible-core 2.16, ansible-core 2.17, ansible-core 2.18 releases and the current development version of ansible-core. Ansible-core versions before 2.15.0 are not supported. This includes all ansible-base 2.10 and Ansible 2.9 releases.
Tested with the current ansible-core 2.15, ansible-core 2.16, ansible-core 2.17, ansible-core 2.18, ansible-core 2.19, and ansible-core 2.20 releases. Ansible-core versions before 2.15.0 are not supported. This includes all ansible-base 2.10 and Ansible 2.9 releases.
## External requirements
@@ -140,4 +141,4 @@ See [LICENSES/GPL-3.0-or-later.txt](https://github.com/ansible-collections/commu
Parts of the collection are licensed under the [BSD 2-Clause license](https://github.com/ansible-collections/community.general/blob/stable-10/LICENSES/BSD-2-Clause.txt), the [MIT license](https://github.com/ansible-collections/community.general/blob/stable-10/LICENSES/MIT.txt), and the [PSF 2.0 license](https://github.com/ansible-collections/community.general/blob/stable-10/LICENSES/PSF-2.0.txt).
All files have a machine readable `SDPX-License-Identifier:` comment denoting its respective license(s) or an equivalent entry in an accompanying `.license` file. Only changelog fragments (which will not be part of a release) are covered by a blanket statement in `.reuse/dep5`. This conforms to the [REUSE specification](https://reuse.software/spec/).
All files have a machine readable `SDPX-License-Identifier:` comment denoting its respective license(s) or an equivalent entry in an accompanying `.license` file. Only changelog fragments (which will not be part of a release) are covered by a blanket statement in `REUSE.toml`. This conforms to the [REUSE specification](https://reuse.software/spec/).

11
REUSE.toml Normal file
View File

@@ -0,0 +1,11 @@
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
version = 1
[[annotations]]
path = "changelogs/fragments/**"
precedence = "aggregate"
SPDX-FileCopyrightText = "Ansible Project"
SPDX-License-Identifier = "GPL-3.0-or-later"

67
antsibull-nox.toml Normal file
View File

@@ -0,0 +1,67 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2025 Felix Fontein <felix@fontein.de>
[collection_sources]
"ansible.posix" = "git+https://github.com/ansible-collections/ansible.posix.git,main"
"community.crypto" = "git+https://github.com/ansible-collections/community.crypto.git,main"
"community.docker" = "git+https://github.com/ansible-collections/community.docker.git,main"
"community.internal_test_tools" = "git+https://github.com/ansible-collections/community.internal_test_tools.git,main"
[collection_sources_per_ansible.'2.15']
# community.crypto's main branch needs ansible-core >= 2.17
"community.crypto" = "git+https://github.com/ansible-collections/community.crypto.git,stable-2"
[collection_sources_per_ansible.'2.16']
# community.crypto's main branch needs ansible-core >= 2.17
"community.crypto" = "git+https://github.com/ansible-collections/community.crypto.git,stable-2"
[vcs]
vcs = "git"
development_branch = "main"
stable_branches = [ "stable-*" ]
[sessions]
[sessions.docs_check]
validate_collection_refs="all"
[sessions.license_check]
[sessions.extra_checks]
run_no_unwanted_files = true
no_unwanted_files_module_extensions = [".py"]
no_unwanted_files_yaml_extensions = [".yml"]
run_action_groups = true
[[sessions.extra_checks.action_groups_config]]
name = "consul"
pattern = "^consul_.*$"
exclusions = [
"consul_acl_bootstrap",
"consul_kv",
]
doc_fragment = "community.general.consul.actiongroup_consul"
[[sessions.extra_checks.action_groups_config]]
name = "keycloak"
pattern = "^keycloak_.*$"
exclusions = [
"keycloak_realm_info",
]
doc_fragment = "community.general.keycloak.actiongroup_keycloak"
[[sessions.extra_checks.action_groups_config]]
name = "proxmox"
pattern = "^proxmox(_.*)?$"
exclusions = []
doc_fragment = "community.general.proxmox.actiongroup_proxmox"
[sessions.build_import_check]
run_galaxy_importer = true
[sessions.ansible_test_sanity]
include_devel = true
[sessions.ansible_test_units]
include_devel = true

View File

@@ -1468,3 +1468,647 @@ releases:
- 9691-keycloak-module-utils-replace-missing-return-in-get_role_composites.yml
- 9695-xml-close-file.yml
release_date: '2025-02-10'
10.4.0:
changes:
bugfixes:
- apache2_mod_proxy - make compatible with Python 3 (https://github.com/ansible-collections/community.general/pull/9762).
- apache2_mod_proxy - passing the cluster's page as referer for the member's
pages. This makes the module actually work again for halfway modern Apache
versions. According to some comments founds on the net the referer was required
since at least 2019 for some versions of Apache 2 (https://github.com/ansible-collections/community.general/pull/9762).
- 'elasticsearch_plugin - fix ``ERROR: D is not a recognized option`` issue
when configuring proxy settings (https://github.com/ansible-collections/community.general/pull/9774,
https://github.com/ansible-collections/community.general/issues/9773).'
- ipa_host - module revoked existing host certificates even if ``user_certificate``
was not given (https://github.com/ansible-collections/community.general/pull/9694).
- keycloak_client - in check mode, detect whether the lists in before client
(for example redirect URI list) contain items that the lists in the desired
client do not contain (https://github.com/ansible-collections/community.general/pull/9739).
- lldp - fix crash caused by certain lldpctl output where an attribute is
defined as branch and leaf (https://github.com/ansible-collections/community.general/pull/9657).
- onepassword_doc lookup plugin - ensure that 1Password Connect support also
works for this plugin (https://github.com/ansible-collections/community.general/pull/9625).
- passwordstore lookup plugin - fix subkey creation even when ``create=false``
(https://github.com/ansible-collections/community.general/issues/9105, https://github.com/ansible-collections/community.general/pull/9106).
- 'proxmox inventory plugin - plugin did not update cache correctly after
``meta: refresh_inventory`` (https://github.com/ansible-collections/community.general/issues/9710,
https://github.com/ansible-collections/community.general/pull/9760).'
- 'redhat_subscription - use the "enable_content" option (when available)
when
registering using D-Bus, to ensure that subscription-manager enables the
content on registration; this is particular important on EL 10+ and Fedora
41+
(https://github.com/ansible-collections/community.general/pull/9778).
'
- zfs - fix handling of multi-line values of user-defined ZFS properties (https://github.com/ansible-collections/community.general/pull/6264).
- zfs_facts - parameter ``type`` now accepts multple values as documented
(https://github.com/ansible-collections/community.general/issues/5909, https://github.com/ansible-collections/community.general/pull/9697).
deprecated_features:
- profitbricks - module is deprecated and will be removed in community.general
11.0.0 (https://github.com/ansible-collections/community.general/pull/9733).
- profitbricks_datacenter - module is deprecated and will be removed in community.general
11.0.0 (https://github.com/ansible-collections/community.general/pull/9733).
- profitbricks_nic - module is deprecated and will be removed in community.general
11.0.0 (https://github.com/ansible-collections/community.general/pull/9733).
- profitbricks_volume - module is deprecated and will be removed in community.general
11.0.0 (https://github.com/ansible-collections/community.general/pull/9733).
- profitbricks_volume_attachments - module is deprecated and will be removed
in community.general 11.0.0 (https://github.com/ansible-collections/community.general/pull/9733).
minor_changes:
- bitwarden lookup plugin - add new option ``collection_name`` to filter results
by collection name, and new option ``result_count`` to validate number of
results (https://github.com/ansible-collections/community.general/pull/9728).
- incus connection plugin - adds ``remote_user`` and ``incus_become_method``
parameters for allowing a non-root user to connect to an Incus instance
(https://github.com/ansible-collections/community.general/pull/9743).
- iocage inventory plugin - the new parameter ``hooks_results`` of the plugin
is a list of files inside a jail that provide configuration parameters for
the inventory. The inventory plugin reads the files from the jails and put
the contents into the items of created variable ``iocage_hooks`` (https://github.com/ansible-collections/community.general/issues/9650,
https://github.com/ansible-collections/community.general/pull/9651).
- jira - adds ``client_cert`` and ``client_key`` parameters for supporting
client certificate authentification when connecting to Jira (https://github.com/ansible-collections/community.general/pull/9753).
- lldp - adds ``multivalues`` parameter to control behavior when lldpctl outputs
an attribute multiple times (https://github.com/ansible-collections/community.general/pull/9657).
- lvg - add ``remove_extra_pvs`` parameter to control if ansible should remove
physical volumes which are not in the ``pvs`` parameter (https://github.com/ansible-collections/community.general/pull/9698).
- lxd connection plugin - adds ``remote_user`` and ``lxd_become_method`` parameters
for allowing a non-root user to connect to an LXD instance (https://github.com/ansible-collections/community.general/pull/9659).
- nmcli - adds VRF support with new ``type`` value ``vrf`` and new ``slave_type``
value ``vrf`` as well as new ``table`` parameter (https://github.com/ansible-collections/community.general/pull/9658,
https://github.com/ansible-collections/community.general/issues/8014).
- proxmox_kvm - allow hibernation and suspending of VMs (https://github.com/ansible-collections/community.general/issues/9620,
https://github.com/ansible-collections/community.general/pull/9653).
- redfish_command - add ``PowerFullPowerCycle`` to power command options (https://github.com/ansible-collections/community.general/pull/9729).
- ssh_config - add ``other_options`` option (https://github.com/ansible-collections/community.general/issues/8053,
https://github.com/ansible-collections/community.general/pull/9684).
- xen_orchestra inventory plugin - add ``use_vm_uuid`` and ``use_host_uuid``
boolean options to allow switching over to using VM/Xen name labels instead
of UUIDs as item names (https://github.com/ansible-collections/community.general/pull/9787).
release_summary: Regular bugfix and feature release.
fragments:
- 10.4.0.yaml
- 6264-zfs-multiline-property-value.yml
- 9106-passwordstore-fix-subkey-creation-even-when-create-==-false.yml
- 9625-onepassword_doc.yml
- 9651-iocage-inventory-hooks.yml
- 9653-proxmox-kvm-allow-vm-hibernation.yml
- 9657-lldp-handling-attributes-defined-multiple-times.yml
- 9658-add-vrf-commands-to-nmcli-module.yml
- 9659-lxd_connection-nonroot-user.yml
- 9694-ipa-host-certificate-revoked.yml
- 9697-zfs-facts-type.yml
- 9698-lvg-remove-extra-pvs-parameter.yml
- 9728-bitwarden-collection-name-filter.yml
- 9729-redfish-fullpowercycle-command.yml
- 9733-profitbrick-deprecation.yml
- 9739-keycloak_client-compare-before-desired-directly.yml
- 9743-incus_connection-nonroot-user.yml
- 9753-jira-add-client-certificate-auth.yml
- 9760-proxmox-inventory.yml
- 9762-apache2_mod_proxy.yml
- 9774-fix-elasticsearch_plugin-proxy-settings.yml
- 9778-redhat_subscription-ensure-to-enable-content.yml
- 9787-xoa_allow_using_names_in_inventory.yml
- ssh_config_add_other_options.yml
modules:
- description: Gather C(systemd) unit info.
name: systemd_info
namespace: ''
release_date: '2025-02-24'
10.5.0:
changes:
bugfixes:
- cloudlare_dns - handle exhausted response stream in case of HTTP errors
to show nice error message to the user (https://github.com/ansible-collections/community.general/issues/9782,
https://github.com/ansible-collections/community.general/pull/9818).
- dnf_versionlock - add support for dnf5 (https://github.com/ansible-collections/community.general/issues/9556).
- homebrew - fix crash when package names include tap (https://github.com/ansible-collections/community.general/issues/9777,
https://github.com/ansible-collections/community.general/pull/9803).
- homebrew_cask - handle unusual brew version strings (https://github.com/ansible-collections/community.general/issues/8432,
https://github.com/ansible-collections/community.general/pull/9881).
- nmcli - enable changing only the order of DNS servers or search suffixes
(https://github.com/ansible-collections/community.general/issues/8724, https://github.com/ansible-collections/community.general/pull/9880).
- proxmox - add missing key selection of ``'status'`` key to ``get_lxc_status``
(https://github.com/ansible-collections/community.general/issues/9696, https://github.com/ansible-collections/community.general/pull/9809).
- proxmox_vm_info - the module no longer expects that the key ``template``
exists in a dictionary returned by Proxmox (https://github.com/ansible-collections/community.general/issues/9875,
https://github.com/ansible-collections/community.general/pull/9910).
- sudoers - display stdout and stderr raised while failed validation (https://github.com/ansible-collections/community.general/issues/9674,
https://github.com/ansible-collections/community.general/pull/9871).
minor_changes:
- CmdRunner module utils - the convenience method ``cmd_runner_fmt.as_fixed()``
now accepts multiple arguments as a list (https://github.com/ansible-collections/community.general/pull/9893).
- apache2_mod_proxy - code simplification, no change in functionality (https://github.com/ansible-collections/community.general/pull/9457).
- consul_token - fix idempotency when ``policies`` or ``roles`` are supplied
by name (https://github.com/ansible-collections/community.general/issues/9841,
https://github.com/ansible-collections/community.general/pull/9845).
- keycloak_realm - remove ID requirement when creating a realm to allow Keycloak
generating its own realm ID (https://github.com/ansible-collections/community.general/pull/9768).
- nmap inventory plugin - adds ``dns_servers`` option for specifying DNS servers
for name resolution. Accepts hostnames or IP addresses in the same format
as the ``exclude`` option (https://github.com/ansible-collections/community.general/pull/9849).
- proxmox_kvm - add missing audio hardware device handling (https://github.com/ansible-collections/community.general/issues/5192,
https://github.com/ansible-collections/community.general/pull/9847).
- redfish_config - add command ``SetPowerRestorePolicy`` to set the desired
power state of the system when power is restored (https://github.com/ansible-collections/community.general/pull/9837).
- redfish_info - add command ``GetPowerRestorePolicy`` to get the desired
power state of the system when power is restored (https://github.com/ansible-collections/community.general/pull/9824).
- rocketchat - option ``is_pre740`` has been added to control the format of
the payload. For Rocket.Chat 7.4.0 or newer, it must be set to ``false``
(https://github.com/ansible-collections/community.general/pull/9882).
- slack callback plugin - add ``http_agent`` option to enable the user to
set a custom user agent for slack callback plugin (https://github.com/ansible-collections/community.general/issues/9813,
https://github.com/ansible-collections/community.general/pull/9836).
- systemd_info - add wildcard expression support in ``unitname`` option (https://github.com/ansible-collections/community.general/pull/9821).
- systemd_info - extend support to timer units (https://github.com/ansible-collections/community.general/pull/9891).
- vmadm - add new options ``flexible_disk_size`` and ``owner_uuid`` (https://github.com/ansible-collections/community.general/pull/9892).
release_summary: Regular bugfix and feature release.
fragments:
- 10.5.0.yml
- 9457-apache2-mod-proxy-revamp.yml
- 9768-keycloak_realm-remove-id-requirement.yaml
- 9777-homebrew-fix-crash-when-packages-include-tap.yml
- 9809-proxmox-fix-status-getter.yml
- 9818-cloudflare-dns-exhausted-response.yml
- 9821-systemd_info-add-wildcards.yml
- 9824-redfish-implement-obtaining-powerrestorepolicy.yml
- 9836-option-for-http-agent-for-user-to-callback-slack.yml
- 9837-redfish-implement-setting-powerrestorepolicy.yml
- 9845-consul_token_idempotency.yml
- 9847-Adding_audio_device-support_to_proxmox_kvm.yml
- 9849-nmap_dns_servers.yml
- 9875-proxmox-dont-expect-key-template-to-exist.yml
- 9880-nmcli-fix-reorder-same-dns-nameservers-search-suffixes.yml
- 9882-fix-payload-to-match-rocketchat-740-requirement.yml
- 9891-systemd_info-add_timer.yml
- 9892-vmadm-add-new-options.yml
- 9893-cmdrunner-as-fixed-args.yml
- dnf_versionlock.yml
- homebrew_cask.yml
- sudoers.yml
modules:
- description: Manage pacemaker resources.
name: pacemaker_resource
namespace: ''
release_date: '2025-03-24'
10.6.0:
changes:
bugfixes:
- dependent look plugin - make compatible with ansible-core's Data Tagging
feature (https://github.com/ansible-collections/community.general/pull/9833).
- diy callback plugin - make compatible with ansible-core's Data Tagging feature
(https://github.com/ansible-collections/community.general/pull/9833).
- "github_deploy_key - check that key really exists on 422\_to avoid masking\
\ other errors (https://github.com/ansible-collections/community.general/issues/6718,\
\ https://github.com/ansible-collections/community.general/pull/10011)."
- hashids and unicode_normalize filter plugins - avoid deprecated ``AnsibleFilterTypeError``
on ansible-core 2.19 (https://github.com/ansible-collections/community.general/pull/9992).
- homebrew - emit a useful error message if ``brew info`` reports a package
tap is ``null`` (https://github.com/ansible-collections/community.general/pull/10013,
https://github.com/ansible-collections/community.general/issues/10012).
- java_cert - the module no longer fails if the optional parameters ``pkcs12_alias``
and ``cert_alias`` are not provided (https://github.com/ansible-collections/community.general/pull/9970).
- keycloak_authentication - fix authentification config duplication for Keycloak
< 26.2.0 (https://github.com/ansible-collections/community.general/pull/9987).
- keycloak_client - fix the idempotency regression by normalizing the Keycloak
response for ``after_client`` (https://github.com/ansible-collections/community.general/issues/9905,
https://github.com/ansible-collections/community.general/pull/9976).
- proxmox inventory plugin - fix ``ansible_host`` staying empty for certain
Proxmox nodes (https://github.com/ansible-collections/community.general/issues/5906,
https://github.com/ansible-collections/community.general/pull/9952).
- proxmox_disk - fail gracefully if ``storage`` is required but not provided
by the user (https://github.com/ansible-collections/community.general/issues/9941,
https://github.com/ansible-collections/community.general/pull/9963).
- reveal_ansible_type filter plugin and ansible_type test plugin - make compatible
with ansible-core's Data Tagging feature (https://github.com/ansible-collections/community.general/pull/9833).
- sysrc - no longer always reporting ``changed=true`` when ``state=absent``.
This fixes the method ``exists()`` (https://github.com/ansible-collections/community.general/issues/10004,
https://github.com/ansible-collections/community.general/pull/10005).
- yaml callback plugin - use ansible-core internals to avoid breakage with
Data Tagging (https://github.com/ansible-collections/community.general/pull/9833).
deprecated_features:
- manifold lookup plugin - plugin is deprecated and will be removed in community.general
11.0.0 (https://github.com/ansible-collections/community.general/pull/10028).
- stackpath_compute inventory plugin - plugin is deprecated and will be removed
in community.general 11.0.0 (https://github.com/ansible-collections/community.general/pull/10026).
known_issues:
- reveal_ansible_type filter plugin and ansible_type test plugin - note that
ansible-core's Data Tagging feature implements new aliases, such as ``_AnsibleTaggedStr``
for ``str``, ``_AnsibleTaggedInt`` for ``int``, and ``_AnsibleTaggedFloat``
for ``float`` (https://github.com/ansible-collections/community.general/pull/9833).
minor_changes:
- apache2_module - added workaround for new PHP module name, from ``php7_module``
to ``php_module`` (https://github.com/ansible-collections/community.general/pull/9951).
- gitlab_project - add option ``build_timeout`` (https://github.com/ansible-collections/community.general/pull/9960).
- gitlab_project_members - extend choices parameter ``access_level`` by missing
upstream valid value ``owner`` (https://github.com/ansible-collections/community.general/pull/9953).
- 'hpilo_boot - add option to get an idempotent behavior while powering on
server, resulting in success instead of failure when using ``state: boot_once``
option (https://github.com/ansible-collections/community.general/pull/9646).'
- idrac_redfish_command, idrac_redfish_config, idrac_redfish_info - add ``validate_certs``,
``ca_path``, and ``ciphers`` options to configure TLS/SSL (https://github.com/ansible-collections/community.general/issues/3686,
https://github.com/ansible-collections/community.general/pull/9964).
- ilo_redfish_command, ilo_redfish_config, ilo_redfish_info - add ``validate_certs``,
``ca_path``, and ``ciphers`` options to configure TLS/SSL (https://github.com/ansible-collections/community.general/issues/3686,
https://github.com/ansible-collections/community.general/pull/9964).
- keycloak module_utils - user groups can now be referenced by their name,
like ``staff``, or their path, like ``/staff/engineering``. The path syntax
allows users to reference subgroups, which is not possible otherwise (https://github.com/ansible-collections/community.general/pull/9898).
- keycloak_user module - user groups can now be referenced by their name,
like ``staff``, or their path, like ``/staff/engineering``. The path syntax
allows users to reference subgroups, which is not possible otherwise (https://github.com/ansible-collections/community.general/pull/9898).
- nmcli - add support for Infiniband MAC setting when ``type`` is ``infiniband``
(https://github.com/ansible-collections/community.general/pull/9962).
- 'one_vm - update allowed values for ``updateconf`` to include new parameters
as per the latest OpenNebula API documentation.
Added parameters:
* ``OS``: ``FIRMWARE``;
* ``CPU_MODEL``: ``MODEL``, ``FEATURES``;
* ``FEATURES``: ``VIRTIO_BLK_QUEUES``, ``VIRTIO_SCSI_QUEUES``, ``IOTHREADS``;
* ``GRAPHICS``: ``PORT``, ``COMMAND``;
* ``VIDEO``: ``ATS``, ``IOMMU``, ``RESOLUTION``, ``TYPE``, ``VRAM``;
* ``RAW``: ``VALIDATE``;
* ``BACKUP_CONFIG``: ``FS_FREEZE``, ``KEEP_LAST``, ``BACKUP_VOLATILE``,
``MODE``, ``INCREMENT_MODE``.
(https://github.com/ansible-collections/community.general/pull/9959).'
- proxmox and proxmox_kvm modules - allow uppercase characters in VM/container
tags (https://github.com/ansible-collections/community.general/issues/9895,
https://github.com/ansible-collections/community.general/pull/10024).
- puppet - improve parameter formatting, no impact to user (https://github.com/ansible-collections/community.general/pull/10014).
- redfish module utils - add ``REDFISH_COMMON_ARGUMENT_SPEC``, a corresponding
``redfish`` docs fragment, and support for its ``validate_certs``, ``ca_path``,
and ``ciphers`` options (https://github.com/ansible-collections/community.general/issues/3686,
https://github.com/ansible-collections/community.general/pull/9964).
- redfish_command, redfish_config, redfish_info - add ``validate_certs`` and
``ca_path`` options to configure TLS/SSL (https://github.com/ansible-collections/community.general/issues/3686,
https://github.com/ansible-collections/community.general/pull/9964).
- rocketchat - fix duplicate JSON conversion for Rocket.Chat < 7.4.0 (https://github.com/ansible-collections/community.general/pull/9965).
- wdc_redfish_command, wdc_redfish_info - add ``validate_certs``, ``ca_path``,
and ``ciphers`` options to configure TLS/SSL (https://github.com/ansible-collections/community.general/issues/3686,
https://github.com/ansible-collections/community.general/pull/9964).
- xcc_redfish_command - add ``validate_certs``, ``ca_path``, and ``ciphers``
options to configure TLS/SSL (https://github.com/ansible-collections/community.general/issues/3686,
https://github.com/ansible-collections/community.general/pull/9964).
- zypper - adds ``skip_post_errors`` that allows to skip RPM post-install
errors (Zypper return code 107) (https://github.com/ansible-collections/community.general/issues/9972).
release_summary: Regular bugfix and feature release.
fragments:
- 10.6.0.yml
- 10005-fix-method-exists-in-sysrc.yml
- 10011-github_deploy_key-check-key-present.yml
- 10012-improve-error-handling-homebrew-missing-tap.yml
- 10014-puppet-improve-param.yml
- 10026-stackpath-compute-deprecation.yml
- 10028-manifold-deprecation.yml
- 9646-hpilo-fix-idempotency.yml
- 9833-data-tagging.yml
- 9895-proxmox_tags_with_uppercase_chars.yml
- 9898-keycloak_user-supports-subgroups.yaml
- 9951-mod-php-identifier.yml
- 9952-proxmox-inventory-plugin-improve-ansible_host.yml
- 9953-gitlab-project-members-support-owner-level.yml
- 9959-update-opennebula-onevm-updateconf-params.yml
- 9960-gitlab_project-add-build_timeout-option.yml
- 9962-nmcli-add-infiniband-mac-support.yml
- 9963-proxmox_disk-storage.yml
- 9964-redfish-tls.yml
- 9965-fix-duplicate-jsonify-payload-for-rocketchat-pre740.yml
- 9970-pkcs12_alias_cert_alias_optional.yml
- 9972-zypper-skip-post-errors.yml
- 9976-keycloak_client-fix-idempotency-regression.yml
- 9987-keycloak-auth-flow-fix-config.yaml
- 9992-filtertypeerror.yml
plugins:
connection:
- description: Run tasks in WSL distribution using wsl.exe CLI via SSH.
name: wsl
namespace: null
release_date: '2025-04-21'
10.7.0:
changes:
bugfixes:
- cobbler_system - fix bug with Cobbler >= 3.4.0 caused by giving more than
2 positional arguments to ``CobblerXMLRPCInterface.get_system_handle()``
(https://github.com/ansible-collections/community.general/issues/8506, https://github.com/ansible-collections/community.general/pull/10145).
- kdeconfig - allow option values beginning with a dash (https://github.com/ansible-collections/community.general/issues/10127,
https://github.com/ansible-collections/community.general/pull/10128).
- keycloak_user_rolemapping - fix ``--diff`` mode (https://github.com/ansible-collections/community.general/issues/10067,
https://github.com/ansible-collections/community.general/pull/10075).
- pickle cache plugin - avoid extra JSON serialization with ansible-core >=
2.19 (https://github.com/ansible-collections/community.general/pull/10136).
- proxmox - fix crash in module when the used on an existing LXC container
with ``state=present`` and ``force=true`` (https://github.com/ansible-collections/community.proxmox/pull/91,
https://github.com/ansible-collections/community.general/pull/10155).
- rundeck_acl_policy - ensure that project ACLs are sent to the correct endpoint
(https://github.com/ansible-collections/community.general/pull/10097).
- sysrc - split the output of ``sysrc -e -a`` on the first ``=`` only (https://github.com/ansible-collections/community.general/issues/10120,
https://github.com/ansible-collections/community.general/pull/10121).
deprecated_features:
- The proxmox content (modules and plugins) is being moved to the `new collection
community.proxmox <https://github.com/ansible-collections/community.proxmox>`__.
In community.general 11.0.0, these modules and plugins will be replaced
by deprecated redirections to community.proxmox. You need to explicitly
install community.proxmox, for example with ``ansible-galaxy collection
install community.proxmox``. We suggest to update your roles and playbooks
to use the new FQCNs as soon as possible to avoid getting deprecation messages
(https://github.com/ansible-collections/community.general/pull/10109).
- pipx module_utils - function ``make_process_list()`` is deprecated and will
be removed in community.general 13.0.0 (https://github.com/ansible-collections/community.general/pull/10031).
minor_changes:
- cobbler inventory plugin - add ``connection_timeout`` option to specify
the connection timeout to the cobbler server (https://github.com/ansible-collections/community.general/pull/11063).
- cobbler inventory plugin - add ``facts_level`` option to allow requesting
fully rendered variables for Cobbler systems (https://github.com/ansible-collections/community.general/issues/9419,
https://github.com/ansible-collections/community.general/pull/9975).
- ini_file - modify an inactive option also when there are spaces in front
of the comment symbol (https://github.com/ansible-collections/community.general/pull/10102,
https://github.com/ansible-collections/community.general/issues/8539).
- 'pipx - parameter ``name`` now accepts Python package specifiers (https://github.com/ansible-collections/community.general/issues/7815,
https://github.com/ansible-collections/community.general/pull/10031).
'
- pipx module_utils - filtering application list by name now happens in the
modules (https://github.com/ansible-collections/community.general/pull/10031).
- pipx_info - filtering application list by name now happens in the module (https://github.com/ansible-collections/community.general/pull/10031).
release_summary: 'Bugfix and feature release.
Note that this is the final minor 10.x.0 release.
The next release with new features will be 11.0.0.
From now on, there will only be bugfix 10.7.x releases for the community.general
10 release train.
'
fragments:
- 10.7.0.yml
- 10031-pipx-python-version.yml
- 10063-cobbler-add-connection-timeout.yml
- 10075-keycloak_user_rolemapping-diff.yml
- 10097-fix-rundeck_acl_policy-project-endpoint.yml
- 10102-ini_file-fix-unmatched-whitespace-before-comment.yml
- 10121-sysrc-fix-split-first-separator.yml
- 10128-mark-end-of-options.yml
- 10136-cache-pickle-json.yml
- 10145-fix-typeerror-cobbler-xmlrpc.yml
- 10155-proxmox-bugfix.yml
- 9975-inventory-cobbler-as-rendered.yml
- proxmox-deprecation.yml
modules:
- description: Set default handler for MIME types, for applications using XDG
tools.
name: xdg_mime
namespace: ''
plugins:
callback:
- description: Prints playbook task snippet to job output.
name: print_task
namespace: null
filter:
- description: Format a list of dictionaries as an ASCII table.
name: to_prettytable
namespace: null
release_date: '2025-05-19'
10.7.1:
changes:
bugfixes:
- cobbler_system - update minimum version number to avoid wrong comparisons
that happen in some cases using LooseVersion class which results in TypeError
(https://github.com/ansible-collections/community.general/issues/8506, https://github.com/ansible-collections/community.general/pull/10145,
https://github.com/ansible-collections/community.general/pull/10178).
- gitlab_group_access_token, gitlab_project_access_token - fix handling of
group and project access tokens for changes in GitLab 17.10 (https://github.com/ansible-collections/community.general/pull/10196).
- keycloak - update more than 10 sub-groups (https://github.com/ansible-collections/community.general/issues/9690,
https://github.com/ansible-collections/community.general/pull/9692).
- yaml callback plugin - adjust to latest changes in ansible-core devel (https://github.com/ansible-collections/community.general/pull/10212).
- yaml callback plugin - when using ansible-core 2.19.0b2 or newer, uses a
new utility provided by ansible-core. This allows us to remove all hacks
and vendored code that was part of the plugin for ansible-core versions
with Data Tagging so far (https://github.com/ansible-collections/community.general/pull/10242).
- zypper_repository - make compatible with Python 3.12+ (https://github.com/ansible-collections/community.general/issues/10222,
https://github.com/ansible-collections/community.general/pull/10223).
- zypper_repository - use ``metalink`` attribute to identify repositories
without ``<url/>`` element (https://github.com/ansible-collections/community.general/issues/10224,
https://github.com/ansible-collections/community.general/pull/10225).
deprecated_features:
- yaml callback plugin - the YAML callback plugin was deprecated for removal
in community.general 13.0.0. Since it needs to use ansible-core internals
since ansible-core 2.19 that are changing a lot, we will remove this plugin
already from community.general 12.0.0 to ease the maintenance burden (https://github.com/ansible-collections/community.general/pull/10213).
minor_changes:
- git_config - remove redundant ``required=False`` from ``argument_spec``
(https://github.com/ansible-collections/community.general/pull/10177).
- proxmox_snap - correctly handle proxmox_snap timeout parameter (https://github.com/ansible-collections/community.proxmox/issues/73,
https://github.com/ansible-collections/community.proxmox/issues/95, https://github.com/ansible-collections/community.general/pull/10176).
release_summary: Regular bugfix release.
fragments:
- 10.7.1.yml
- 10176-fix-proxmox_snap_timeout.yml
- 10177-git-config-required.yml
- 10178-update-minimum-version-number-to-avoid-wrong-comparisons-cobbler-xmlrpc.yml
- 10196-fix-gitlab-access-tokens.yml
- 10212-yaml.yml
- 10213-yaml-deprecation.yml
- 10222-zypper_repository-readfp.yml
- 10224-zypper_repository-metalink.yml
- 10242-yaml.yml
- 9692-update-more-than-10-keycloak-sub-groups.yml
release_date: '2025-06-16'
10.7.2:
changes:
bugfixes:
- dependent lookup plugin - avoid deprecated ansible-core 2.19 functionality
(https://github.com/ansible-collections/community.general/pull/10359).
- github_release - support multiple types of GitHub tokens; no longer failing
when ``ghs_`` token type is provided (https://github.com/ansible-collections/community.general/issues/10338,
https://github.com/ansible-collections/community.general/pull/10339).
- icinga2 inventory plugin - avoid using deprecated option when templating
options (https://github.com/ansible-collections/community.general/pull/10271).
- incus connection plugin - fix error handling to return more useful Ansible
errors to the user (https://github.com/ansible-collections/community.general/issues/10344,
https://github.com/ansible-collections/community.general/pull/10349).
- linode inventory plugin - avoid using deprecated option when templating
options (https://github.com/ansible-collections/community.general/pull/10271).
- logstash callback plugin - remove reference to Python 2 library (https://github.com/ansible-collections/community.general/pull/10345).
release_summary: Regular bugfix release.
fragments:
- 10.7.2.yml
- 10271--disable_lookups.yml
- 10339-github_app_access_token.yml
- 10349-incus_connection-error-handling.yml
- 10359-dependent.yml
- logstash.yml
release_date: '2025-07-14'
10.7.3:
changes:
bugfixes:
- apache2_module - avoid ansible-core 2.19 deprecation (https://github.com/ansible-collections/community.general/pull/10459).
- apk - fix check for empty/whitespace-only package names (https://github.com/ansible-collections/community.general/pull/10532).
- apk - handle empty name strings properly (https://github.com/ansible-collections/community.general/issues/10441,
https://github.com/ansible-collections/community.general/pull/10442).
- capabilities - using invalid path (symlink/directory/...) returned unrelated
and incoherent error messages (https://github.com/ansible-collections/community.general/issues/5649,
https://github.com/ansible-collections/community.general/pull/10455).
- cronvar - fix crash on missing ``cron_file`` parent directories (https://github.com/ansible-collections/community.general/issues/10460,
https://github.com/ansible-collections/community.general/pull/10461).
- cronvar - handle empty strings on ``value`` properly (https://github.com/ansible-collections/community.general/issues/10439,
https://github.com/ansible-collections/community.general/pull/10445).
- doas become plugin - disable pipelining on ansible-core 2.19+. The plugin
does not work with pipelining, and since ansible-core 2.19 become plugins
can indicate that they do not work with pipelining (https://github.com/ansible-collections/community.general/issues/9977,
https://github.com/ansible-collections/community.general/pull/10537).
- htpasswd - avoid ansible-core 2.19 deprecation (https://github.com/ansible-collections/community.general/pull/10459).
- irc - pass hostname to ``wrap_socket()`` if ``use_tls=true`` and ``validate_certs=true``
(https://github.com/ansible-collections/community.general/issues/10472,
https://github.com/ansible-collections/community.general/pull/10491).
- json_query filter plugin - make compatible with lazy evaluation list and
dictionary types of ansible-core 2.19 (https://github.com/ansible-collections/community.general/pull/10539).
- listen_port_facts - avoid crash when required commands are missing (https://github.com/ansible-collections/community.general/issues/10457,
https://github.com/ansible-collections/community.general/pull/10458).
- machinectl become plugin - disable pipelining on ansible-core 2.19+. The
plugin does not work with pipelining, and since ansible-core 2.19 become
plugins can indicate that they do not work with pipelining (https://github.com/ansible-collections/community.general/pull/10537).
- merge_variables lookup plugin - avoid deprecated functionality from ansible-core
2.19 (https://github.com/ansible-collections/community.general/pull/10566).
- proxmox inventory plugin - avoid using deprecated option when templating
options (https://github.com/ansible-collections/community.proxmox/pull/108,
https://github.com/ansible-collections/community.general/pull/10553).
- proxmox_pct_remote connection plugin - avoid deprecated ansible-core paramiko
import helper, import paramiko directly instead (https://github.com/ansible-collections/community.proxmox/issues/146,
https://github.com/ansible-collections/community.proxmox/pull/151, https://github.com/ansible-collections/community.general/pull/10553).
- syspatch - avoid ansible-core 2.19 deprecation (https://github.com/ansible-collections/community.general/pull/10459).
- sysrc - use ``shlex`` to improve parsing of ``sysrc -e -a`` output (https://github.com/ansible-collections/community.general/issues/10394,
https://github.com/ansible-collections/community.general/pull/10400).
- sysupgrade - avoid ansible-core 2.19 deprecation (https://github.com/ansible-collections/community.general/pull/10459).
- wsl connection plugin - avoid deprecated ansible-core paramiko import helper,
import paramiko directly instead (https://github.com/ansible-collections/community.general/issues/10515,
https://github.com/ansible-collections/community.general/pull/10531).
- zypper_repository - avoid ansible-core 2.19 deprecation (https://github.com/ansible-collections/community.general/pull/10459).
release_summary: Regular bugfix release.
fragments:
- 10.7.3.yml
- 10400-sysrc.yml
- 10442-apk-fix-empty-names.yml
- 10445-cronvar-reject-empty-values.yml
- 10455-capabilities-improve-error-detection.yml
- 10458-listen_port_facts-prevent-type-error.yml
- 10459-deprecations.yml
- 10461-cronvar-non-existent-dir-crash-fix.yml
- 10491-irc.yml
- 10531-wsl-paramiko.yml
- 10532-apk.yml
- 10539-json_query.yml
- 10566-merge_variables.yml
- 108--disable_lookups.yml
- 151-connection-paramiko.yml
- become-pipelining.yml
release_date: '2025-08-11'
10.7.4:
changes:
bugfixes:
- Avoid deprecated functionality in ansible-core 2.20 (https://github.com/ansible-collections/community.general/pull/10687).
- apache2_module - check the ``cgi`` module restrictions only during activation
(https://github.com/ansible-collections/community.general/pull/10423).
- kdeconfig - ``kwriteconfig`` executable could not be discovered automatically
on systems with only ``kwriteconfig6`` installed. ``kwriteconfig6`` can
now be discovered by Ansible (https://github.com/ansible-collections/community.general/issues/10746,
https://github.com/ansible-collections/community.general/pull/10751).
- monit - fix crash caused by an unknown status value returned from the monit
service (https://github.com/ansible-collections/community.general/issues/10742,
https://github.com/ansible-collections/community.general/pull/10743).
- pids - prevent error when an empty string is provided for ``name`` (https://github.com/ansible-collections/community.general/issues/10672,
https://github.com/ansible-collections/community.general/pull/10688).
- selective callback plugin - specify ``ansible_loop_var`` instead of the
explicit value ``item`` when printing task result (https://github.com/ansible-collections/community.general/pull/10752).
release_summary: Regular bugfix release.
fragments:
- 10.7.4.yml
- 10423-apache_module-condition.yml
- 10687-deprecations.yml
- 10688-pids.yml
- 10743-monit-handle-unknown-status.yml
- 10751-kdeconfig-support-kwriteconfig6.yml
- 10752-selective-hardcoded-loop-var.yml
release_date: '2025-09-08'
10.7.5:
changes:
bugfixes:
- Avoid usage of deprecated ``ansible.module_utils.six`` in all code that
does not have to support Python 2 (https://github.com/ansible-collections/community.general/pull/10873).
- github_deploy_key - fix bug during error handling if no body was present
in the result (https://github.com/ansible-collections/community.general/issues/10853,
https://github.com/ansible-collections/community.general/pull/10857).
- keycloak_group - fixes an issue where module ignores realm when searching
subgroups by name (https://github.com/ansible-collections/community.general/pull/10840).
- keycloak_role - fixes an issue where the module incorrectly returns ``changed=true``
when using the alias ``clientId`` in composite roles (https://github.com/ansible-collections/community.general/pull/10829).
- rocketchat - fix message delivery in Rocket Chat >= 7.5.3 by forcing ``Content-Type``
header to ``application/json`` instead of the default ``application/x-www-form-urlencoded``
(https://github.com/ansible-collections/community.general/issues/10796,
https://github.com/ansible-collections/community.general/pull/10796).
- yaml cache plugin - make compatible with ansible-core 2.19 (https://github.com/ansible-collections/community.general/issues/10849,
https://github.com/ansible-collections/community.general/issues/10852).
release_summary: Regular bugfix release.
fragments:
- 10.7.5.yml
- 10796-rocketchat-force-content-type.yml
- 10829-fix-keycloak-role-changed-status.yml
- 10840-fix-keycloak-subgroup-search-realm.yml
- 10852-yaml.yml
- 10857-github_deploy_key-err.yml
- 10873-six.yml
release_date: '2025-10-06'
10.7.6:
changes:
bugfixes:
- gitlab_runner - fix exception in check mode when a new runner is created
(https://github.com/ansible-collections/community.general/issues/8854).
- omapi_host - make return values compatible with ansible-core 2.19 and Python
3 (https://github.com/ansible-collections/community.general/pull/11001).
- onepassword_doc and onepassword_ssh_key lookup plugins - ensure that all
connection parameters are passed to CLI class (https://github.com/ansible-collections/community.general/pull/10965).
- pritunl_user - improve resilience when comparing user parameters if remote
fields are ``null`` or missing. List parameters (``groups``, ``mac_addresses``)
now safely default to empty lists for comparison and avoids ``KeyError``
issues (https://github.com/ansible-collections/community.general/issues/10954,
https://github.com/ansible-collections/community.general/pull/10955).
- random_string lookup plugin - replace ``random.SystemRandom()`` with ``secrets.SystemRandom()``
when generating strings. This has no practical effect, as both are the same
(https://github.com/ansible-collections/community.general/pull/10893).
- terraform - fix bug when ``null`` values inside complex vars are throwing
error instead of being passed to terraform. Now terraform can handle ``null``s
in ``complex_vars`` itself (https://github.com/ansible-collections/community.general/pull/10961).
release_summary: Regular bugfix release.
security_fixes:
- 'keycloak_user - the parameter ``credentials[].value`` is now marked as
``no_log=true``. Before it was logged by Ansible, unless the task was marked
as ``no_log: true``. Since this parameter can be used for passwords, this
resulted in credential leaking (https://github.com/ansible-collections/community.general/issues/11000,
https://github.com/ansible-collections/community.general/pull/11005).'
fragments:
- 10.7.6.yml
- 10918-gitlab-runner-fix-check-mode.yml
- 10955-pritunl_user-null-missing-params.yaml
- 10961-terraform-complexvars-null-bugfix.yaml
- 10965-onepassword-bugfix.yml
- 11001-omapi.yml
- 11005-keycloak_user.yml
- replace-random-with-secrets.yml
release_date: '2025-11-02'

View File

@@ -7,9 +7,9 @@ changelog_filename_template: ../CHANGELOG.rst
changelog_filename_version_depth: 0
changes_file: changelog.yaml
changes_format: combined
ignore_other_fragment_extensions: true
keep_fragments: false
mention_ancestor: true
flatmap: true
new_plugins_after_name: removed_features
notesdir: fragments
output_formats:
@@ -40,3 +40,4 @@ use_fqcn: true
add_plugin_period: true
changelog_nice_yaml: true
changelog_sort: version
vcs: auto

View File

@@ -20,3 +20,4 @@ sections:
- guide_vardict
- guide_cmdrunner
- guide_modulehelper
- guide_uthelper

View File

@@ -8,7 +8,7 @@
community.general Filter Guide
==============================
The :ref:`community.general collection <plugins_in_community.general>` offers several useful filter plugins.
The :anscollection:`community.general collection <community.general#collection>` offers several useful filter plugins.
.. toctree::
:maxdepth: 2

View File

@@ -26,8 +26,8 @@ You can use the :ansplugin:`community.general.dict_kv filter <community.general.
type: host
database: all
myservers:
- server1
- server2
- server1
- server2
This produces:

View File

@@ -17,50 +17,50 @@ Consider this data structure:
.. code-block:: yaml+jinja
{
"domain_definition": {
"domain": {
"cluster": [
{
"name": "cluster1"
},
{
"name": "cluster2"
}
],
"server": [
{
"name": "server11",
"cluster": "cluster1",
"port": "8080"
},
{
"name": "server12",
"cluster": "cluster1",
"port": "8090"
},
{
"name": "server21",
"cluster": "cluster2",
"port": "9080"
},
{
"name": "server22",
"cluster": "cluster2",
"port": "9090"
}
],
"library": [
{
"name": "lib1",
"target": "cluster1"
},
{
"name": "lib2",
"target": "cluster2"
}
]
"domain_definition": {
"domain": {
"cluster": [
{
"name": "cluster1"
},
{
"name": "cluster2"
}
],
"server": [
{
"name": "server11",
"cluster": "cluster1",
"port": "8080"
},
{
"name": "server12",
"cluster": "cluster1",
"port": "8090"
},
{
"name": "server21",
"cluster": "cluster2",
"port": "9080"
},
{
"name": "server22",
"cluster": "cluster2",
"port": "9090"
}
],
"library": [
{
"name": "lib1",
"target": "cluster1"
},
{
"name": "lib2",
"target": "cluster2"
}
]
}
}
}
To extract all clusters from this structure, you can use the following query:
@@ -124,7 +124,7 @@ To get a hash map with all ports and names of a cluster:
var: item
loop: "{{ domain_definition | community.general.json_query(server_name_cluster1_query) }}"
vars:
server_name_cluster1_query: "domain.server[?cluster=='cluster2'].{name: name, port: port}"
server_name_cluster1_query: "domain.server[?cluster=='cluster1'].{name: name, port: port}"
To extract ports from all clusters with name starting with 'server1':

View File

@@ -78,17 +78,17 @@ If you do not specify a ``count_tag``, the task creates the number of instances
tasks:
- name: Create a set of instances
community.general.ali_instance:
instance_type: ecs.n4.small
image_id: "{{ ami_id }}"
instance_name: "My-new-instance"
instance_tags:
Name: NewECS
Version: 0.0.1
count: 5
count_tag:
Name: NewECS
allocate_public_ip: true
max_bandwidth_out: 50
instance_type: ecs.n4.small
image_id: "{{ ami_id }}"
instance_name: "My-new-instance"
instance_tags:
Name: NewECS
Version: 0.0.1
count: 5
count_tag:
Name: NewECS
allocate_public_ip: true
max_bandwidth_out: 50
register: create_instance
In the example playbook above, data about the instances created by this playbook is saved in the variable defined by the ``register`` keyword in the task.

View File

@@ -267,24 +267,54 @@ In these descriptions ``value`` refers to the single parameter passed to the for
+------------+-------------------------+
- ``cmd_runner_fmt.as_fixed()``
This method receives one parameter ``arg``, the function expects no ``value`` - if one
is provided then it is ignored.
The function returns ``arg`` as-is.
This method defines one or more fixed arguments that are returned by the generated function
regardless whether ``value`` is passed to it or not.
- Creation:
``cmd_runner_fmt.as_fixed("--version")``
This method accepts these arguments in one of three forms:
* one scalar parameter ``arg``, which will be returned as ``[arg]`` by the function, or
* one sequence parameter, such as a list, ``arg``, which will be returned by the function as ``arg[0]``, or
* multiple parameters ``args``, which will be returned as ``args`` directly by the function.
See the examples below for each one of those forms. And, stressing that the generated function expects no ``value`` - if one
is provided then it is ignored.
- Creation (one scalar argument):
* ``cmd_runner_fmt.as_fixed("--version")``
- Examples:
+---------+-----------------------+
| Value | Outcome |
+=========+=======================+
| | ``["--version"]`` |
+---------+-----------------------+
| 57 | ``["--version"]`` |
+---------+-----------------------+
+---------+--------------------------------------+
| Value | Outcome |
+=========+======================================+
| | * ``["--version"]`` |
+---------+--------------------------------------+
| 57 | * ``["--version"]`` |
+---------+--------------------------------------+
- Creation (one sequence argument):
* ``cmd_runner_fmt.as_fixed(["--list", "--json"])``
- Examples:
+---------+--------------------------------------+
| Value | Outcome |
+=========+======================================+
| | * ``["--list", "--json"]`` |
+---------+--------------------------------------+
| True | * ``["--list", "--json"]`` |
+---------+--------------------------------------+
- Creation (multiple arguments):
* ``cmd_runner_fmt.as_fixed("--one", "--two", "--three")``
- Examples:
+---------+--------------------------------------+
| Value | Outcome |
+=========+======================================+
| | * ``["--one", "--two", "--three"]`` |
+---------+--------------------------------------+
| False | * ``["--one", "--two", "--three"]`` |
+---------+--------------------------------------+
- Note:
This is the only special case in which a value can be missing for the formatting function.
The example also comes from the code in `Quickstart`_.
The first example here comes from the code in `Quickstart`_.
In that case, the module has code to determine the command's version so that it can assert compatibility.
There is no *value* to be passed for that CLI argument.

View File

@@ -22,6 +22,7 @@ The same example from the Developer Guide would become:
from ansible_collections.community.general.plugins.module_utils import deps
with deps.declare("foo"):
import foo

View File

@@ -75,14 +75,20 @@ section above, but there are more elements that will take part in it.
from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper
class MyTest(ModuleHelper):
# behavior for module paramaters ONLY, see below for further information
output_params = ()
change_params = ()
diff_params = ()
facts_name = None
facts_params = ()
facts_name = None # used if generating facts, from parameters or otherwise
# transitional variables for the new VarDict implementation, see information below
use_old_vardict = True
mute_vardict_deprecation = False
module = dict(
argument_spec=dict(...),
# ...
@@ -211,9 +217,10 @@ One of the attributes in that metadata marks the variable for output, and MH mak
There are two ways to prevent that from happening:
#. Set ``mute_vardict_deprecation = True`` and the deprecation will be silenced. If the module still uses the old ``VarDict``,
it will not be able to update to community.general 11.0.0 (Spring 2026) upon its release.
#. Set ``use_old_vardict = False`` to make the MH module use the new ``VarDict`` immediatelly.
The new ``VarDict`` and its use is documented and this is the recommended way to handle this.
it will not be able to update to community.general 11.0.0 (Spring 2025) upon its release.
#. Set ``use_old_vardict = False`` to make the MH module use the new ``VarDict`` immediately.
We strongly recommend you use the new ``VarDict``, for that you make sure to consult its documentation at
:ref:`ansible_collections.community.general.docsite.guide_vardict`.
.. code-block:: python
@@ -233,6 +240,11 @@ If you want to include some module parameters in the output, list them in the ``
output_params = ('state', 'name')
...
.. important::
The variable names listed in ``output_params`` **must be module parameters**, as in parameters listed in the module's ``argument_spec``.
Names not found in ``argument_spec`` are silently ignored.
Another neat feature provided by MH by using ``VarDict`` is the automatic tracking of changes when setting the metadata ``change=True``.
Again, to enable this feature for module parameters, you must list them in the ``change_params`` class variable.
@@ -243,6 +255,11 @@ Again, to enable this feature for module parameters, you must list them in the `
change_params = ('value', )
...
.. important::
The variable names listed in ``change_params`` **must be module parameters**, as in parameters listed in the module's ``argument_spec``.
Names not found in ``argument_spec`` are silently ignored.
.. seealso::
See more about this in
@@ -256,9 +273,14 @@ With that, MH will automatically generate the diff output for variables that hav
class MyTest(ModuleHelper):
diff_params = ('value', )
def __run__(self):
# example from community.general.gio_mime
self.vars.set_meta("handler", initial_value=gio_mime_get(self.runner, self.vars.mime_type), diff=True, change=True)
def __run__(self):
# example from community.general.gio_mime
self.vars.set_meta("handler", initial_value=gio_mime_get(self.runner, self.vars.mime_type), diff=True, change=True)
.. important::
The variable names listed in ``diff_params`` **must be module parameters**, as in parameters listed in the module's ``argument_spec``.
Names not found in ``argument_spec`` are silently ignored.
Moreover, if a module is set to return *facts* instead of return values, then again use the metadata ``fact=True`` and ``fact_params`` for module parameters.
Additionally, you must specify ``facts_name``, as in:
@@ -283,6 +305,11 @@ That generates an Ansible fact like:
debug:
msg: Volume fact is {{ ansible_facts.volume_facts.volume }}
.. important::
The variable names listed in ``fact_params`` **must be module parameters**, as in parameters listed in the module's ``argument_spec``.
Names not found in ``argument_spec`` are silently ignored.
.. important::
If ``facts_name`` is not set, the module does not generate any facts.

View File

@@ -67,16 +67,16 @@ The following code block is a simple playbook that creates one `Type 0 <https://
hosts: localhost
tasks:
- community.general.packet_sshkey:
key_file: ./id_rsa.pub
label: tutorial key
- community.general.packet_sshkey:
key_file: ./id_rsa.pub
label: tutorial key
- community.general.packet_device:
project_id: <your_project_id>
hostnames: myserver
operating_system: ubuntu_16_04
plan: baremetal_0
facility: sjc1
- community.general.packet_device:
project_id: <your_project_id>
hostnames: myserver
operating_system: ubuntu_16_04
plan: baremetal_0
facility: sjc1
After running ``ansible-playbook playbook_create.yml``, you should have a server provisioned on Packet. You can verify through a CLI or in the `Packet portal <https://app.packet.net/portal#/projects/list/table>`__.
@@ -110,10 +110,10 @@ If your playbook acts on existing Packet devices, you can only pass the ``hostna
hosts: localhost
tasks:
- community.general.packet_device:
project_id: <your_project_id>
hostnames: myserver
state: rebooted
- community.general.packet_device:
project_id: <your_project_id>
hostnames: myserver
state: rebooted
You can also identify specific Packet devices with the ``device_ids`` parameter. The device's UUID can be found in the `Packet Portal <https://app.packet.net/portal>`_ or by using a `CLI <https://www.packet.net/developers/integrations/>`_. The following playbook removes a Packet device using the ``device_ids`` field:
@@ -125,10 +125,10 @@ You can also identify specific Packet devices with the ``device_ids`` parameter.
hosts: localhost
tasks:
- community.general.packet_device:
project_id: <your_project_id>
device_ids: <myserver_device_id>
state: absent
- community.general.packet_device:
project_id: <your_project_id>
device_ids: <myserver_device_id>
state: absent
More Complex Playbooks
@@ -153,43 +153,43 @@ The following playbook will create an SSH key, 3 Packet servers, and then wait u
hosts: localhost
tasks:
- community.general.packet_sshkey:
key_file: ./id_rsa.pub
label: new
- community.general.packet_sshkey:
key_file: ./id_rsa.pub
label: new
- community.general.packet_device:
hostnames: [coreos-one, coreos-two, coreos-three]
operating_system: coreos_beta
plan: baremetal_0
facility: ewr1
project_id: <your_project_id>
wait_for_public_IPv: 4
user_data: |
#cloud-config
coreos:
etcd2:
discovery: https://discovery.etcd.io/<token>
advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
initial-advertise-peer-urls: http://$private_ipv4:2380
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
listen-peer-urls: http://$private_ipv4:2380
fleet:
public-ip: $private_ipv4
units:
- name: etcd2.service
command: start
- name: fleet.service
command: start
register: newhosts
- community.general.packet_device:
hostnames: [coreos-one, coreos-two, coreos-three]
operating_system: coreos_beta
plan: baremetal_0
facility: ewr1
project_id: <your_project_id>
wait_for_public_IPv: 4
user_data: |
# cloud-config
coreos:
etcd2:
discovery: https://discovery.etcd.io/<token>
advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
initial-advertise-peer-urls: http://$private_ipv4:2380
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
listen-peer-urls: http://$private_ipv4:2380
fleet:
public-ip: $private_ipv4
units:
- name: etcd2.service
command: start
- name: fleet.service
command: start
register: newhosts
- name: wait for ssh
ansible.builtin.wait_for:
delay: 1
host: "{{ item.public_ipv4 }}"
port: 22
state: started
timeout: 500
loop: "{{ newhosts.results[0].devices }}"
- name: wait for ssh
ansible.builtin.wait_for:
delay: 1
host: "{{ item.public_ipv4 }}"
port: 22
state: started
timeout: 500
loop: "{{ newhosts.results[0].devices }}"
As with most Ansible modules, the default states of the Packet modules are idempotent, meaning the resources in your project will remain the same after re-runs of a playbook. Thus, we can keep the ``packet_sshkey`` module call in our playbook. If the public key is already in your Packet account, the call will have no effect.

View File

@@ -0,0 +1,394 @@
..
Copyright (c) Ansible Project
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
SPDX-License-Identifier: GPL-3.0-or-later
.. _ansible_collections.community.general.docsite.guide_uthelper:
UTHelper Guide
==============
Introduction
^^^^^^^^^^^^
``UTHelper`` was written to reduce the boilerplate code used in unit tests for modules.
It was originally written to handle tests of modules that run external commands using ``AnsibleModule.run_command()``.
At the time of writing (Feb 2025) that remains the only type of tests you can use
``UTHelper`` for, but it aims to provide support for other types of interactions.
Until now, there are many different ways to implement unit tests that validate a module based on the execution of external commands. See some examples:
* `test_apk.py <https://github.com/ansible-collections/community.general/blob/10.3.0/tests/unit/plugins/modules/test_apk.py>`_ - A very simple one
* `test_bootc_manage.py <https://github.com/ansible-collections/community.general/blob/10.3.0/tests/unit/plugins/modules/test_bootc_manage.py>`_ -
This one has more test cases, but do notice how the code is repeated amongst them.
* `test_modprobe.py <https://github.com/ansible-collections/community.general/blob/10.3.0/tests/unit/plugins/modules/test_modprobe.py>`_ -
This one has 15 tests in it, but to achieve that it declares 8 classes repeating quite a lot of code.
As you can notice, there is no consistency in the way these tests are executed -
they all do the same thing eventually, but each one is written in a very distinct way.
``UTHelper`` aims to:
* provide a consistent idiom to define unit tests
* reduce the code to a bare minimal, and
* define tests as data instead
* allow the test cases definition to be expressed not only as a Python data structure but also as YAML content
Quickstart
""""""""""
To use UTHelper, your test module will need only a bare minimal of code:
.. code-block:: python
# tests/unit/plugin/modules/test_ansible_module.py
from ansible_collections.community.general.plugins.modules import ansible_module
from .uthelper import UTHelper, RunCommandMock
UTHelper.from_module(ansible_module, __name__, mocks=[RunCommandMock])
Then, in the test specification file, you have:
.. code-block:: yaml
# tests/unit/plugin/modules/test_ansible_module.yaml
test_cases:
- id: test_ansible_module
flags:
diff: true
input:
state: present
name: Roger the Shrubber
output:
shrubbery:
looks: nice
price: not too expensive
changed: true
diff:
before:
shrubbery: null
after:
shrubbery:
looks: nice
price: not too expensive
mocks:
run_command:
- command: [/testbin/shrubber, --version]
rc: 0
out: "2.80.0\n"
err: ''
- command: [/testbin/shrubber, --make-shrubbery]
rc: 0
out: 'Shrubbery created'
err: ''
.. note::
If you prefer to pick a different YAML file for the test cases, or if you prefer to define them in plain Python,
you can use the convenience methods ``UTHelper.from_file()`` and ``UTHelper.from_spec()``, respectively.
See more details below.
Using ``UTHelper``
^^^^^^^^^^^^^^^^^^
Test Module
"""""""""""
``UTHelper`` is **strictly for unit tests**. To use it, you import the ``.uthelper.UTHelper`` class.
As mentioned in different parts of this guide, there are three different mechanisms to load the test cases.
.. seealso::
See the UTHelper class reference below for API details on the three different mechanisms.
The easies and most recommended way of using ``UTHelper`` is literally the example shown.
See a real world example at
`test_gconftool2.py <https://github.com/ansible-collections/community.general/blob/10.3.0/tests/unit/plugins/modules/test_gconftool2.py>`_.
The ``from_module()`` method will pick the filename of the test module up (in the example above, ``tests/unit/plugins/modules/test_gconftool2.py``)
and it will search for ``tests/unit/plugins/modules/test_gconftool2.yaml`` (or ``.yml`` if that is not found).
In that file it will expect to find the test specification expressed in YAML format, conforming to the structure described below LINK LINK LINK.
If you prefer to read the test specifications a different file path, use ``from_file()`` passing the file handle for the YAML file.
And, if for any reason you prefer or need to pass the data structure rather than dealing with YAML files, use the ``from_spec()`` method.
A real world example for that can be found at
`test_snap.py <https://github.com/ansible-collections/community.general/blob/main/tests/unit/plugins/modules/test_snap.py>`_.
Test Specification
""""""""""""""""""
The structure of the test specification data is described below.
Top level
---------
At the top level there are two accepted keys:
- ``anchors: dict``
Optional. Placeholder for you to define YAML anchors that can be repeated in the test cases.
Its contents are never accessed directly by test Helper.
- ``test_cases: list``
Mandatory. List of test cases, see below for definition.
Test cases
----------
You write the test cases with five elements:
- ``id: str``
Mandatory. Used to identify the test case.
- ``flags: dict``
Optional. Flags controling the behavior of the test case. All flags are optional. Accepted flags:
* ``check: bool``: set to ``true`` if the module is to be executed in **check mode**.
* ``diff: bool``: set to ``true`` if the module is to be executed in **diff mode**.
* ``skip: str``: set the test case to be skipped, providing the message for ``pytest.skip()``.
* ``xfail: str``: set the test case to expect failure, providing the message for ``pytest.xfail()``.
- ``input: dict``
Optional. Parameters for the Ansible module, it can be empty.
- ``output: dict``
Optional. Expected return values from the Ansible module.
All RV names are used here are expected to be found in the module output, but not all RVs in the output must be here.
It can include special RVs such as ``changed`` and ``diff``.
It can be empty.
- ``mocks: dict``
Optional. Mocked interactions, ``run_command`` being the only one supported for now.
Each key in this dictionary refers to one subclass of ``TestCaseMock`` and its
structure is dictated by the ``TestCaseMock`` subclass implementation.
All keys are expected to be named using snake case, as in ``run_command``.
The ``TestCaseMock`` subclass is responsible for defining the name used in the test specification.
The structure for that specification is dependent on the implementing class.
See more details below for the implementation of ``RunCommandMock``
Example using YAML
------------------
We recommend you use ``UTHelper`` reading the test specifications from a YAML file.
See an example below of how one actually looks like (excerpt from ``test_opkg.yaml``):
.. code-block:: yaml
---
anchors:
environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: false}
test_cases:
- id: install_zlibdev
input:
name: zlib-dev
state: present
output:
msg: installed 1 package(s)
mocks:
run_command:
- command: [/testbin/opkg, --version]
environ: *env-def
rc: 0
out: ''
err: ''
- command: [/testbin/opkg, list-installed, zlib-dev]
environ: *env-def
rc: 0
out: ''
err: ''
- command: [/testbin/opkg, install, zlib-dev]
environ: *env-def
rc: 0
out: |
Installing zlib-dev (1.2.11-6) to root...
Downloading https://downloads.openwrt.org/releases/22.03.0/packages/mips_24kc/base/zlib-dev_1.2.11-6_mips_24kc.ipk
Installing zlib (1.2.11-6) to root...
Downloading https://downloads.openwrt.org/releases/22.03.0/packages/mips_24kc/base/zlib_1.2.11-6_mips_24kc.ipk
Configuring zlib.
Configuring zlib-dev.
err: ''
- command: [/testbin/opkg, list-installed, zlib-dev]
environ: *env-def
rc: 0
out: |
zlib-dev - 1.2.11-6
err: ''
- id: install_zlibdev_present
input:
name: zlib-dev
state: present
output:
msg: package(s) already present
mocks:
run_command:
- command: [/testbin/opkg, --version]
environ: *env-def
rc: 0
out: ''
err: ''
- command: [/testbin/opkg, list-installed, zlib-dev]
environ: *env-def
rc: 0
out: |
zlib-dev - 1.2.11-6
err: ''
TestCaseMocks Specifications
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``TestCaseMock`` subclass is free to define the expected data structure.
RunCommandMock Specification
""""""""""""""""""""""""""""
``RunCommandMock`` mocks can be specified with the key ``run_command`` and it expects a ``list`` in which elements follow the structure:
- ``command: Union[list, str]``
Mandatory. The command that is expected to be executed by the module. It corresponds to the parameter ``args`` of the ``AnsibleModule.run_command()`` call.
It can be either a list or a string, though the list form is generally recommended.
- ``environ: dict``
Mandatory. All other parameters passed to the ``AnsibleModule.run_command()`` call.
Most commonly used are ``environ_update`` and ``check_rc``.
Must include all parameters the Ansible module uses in the ``AnsibleModule.run_command()`` call, otherwise the test will fail.
- ``rc: int``
Mandatory. The return code for the command execution.
As per usual in bash scripting, a value of ``0`` means success, whereas any other number is an error code.
- ``out: str``
Mandatory. The *stdout* result of the command execution, as one single string containing zero or more lines.
- ``err: str``
Mandatory. The *stderr* result of the command execution, as one single string containing zero or more lines.
``UTHelper`` Reference
^^^^^^^^^^^^^^^^^^^^^^
.. py:module:: .uthelper
.. py:class:: UTHelper
A class to encapsulate unit tests.
.. py:staticmethod:: from_spec(ansible_module, test_module, test_spec, mocks=None)
Creates an ``UTHelper`` instance from a given test specification.
:param ansible_module: The Ansible module to be tested.
:type ansible_module: module
:param test_module: The test module.
:type test_module: module
:param test_spec: The test specification.
:type test_spec: dict
:param mocks: List of ``TestCaseMocks`` to be used during testing. Currently only ``RunCommandMock`` exists.
:type mocks: list or None
:return: An ``UTHelper`` instance.
:rtype: UTHelper
Example usage of ``from_spec()``:
.. code-block:: python
import sys
from ansible_collections.community.general.plugins.modules import ansible_module
from .uthelper import UTHelper, RunCommandMock
TEST_SPEC = dict(
test_cases=[
...
]
)
helper = UTHelper.from_spec(ansible_module, sys.modules[__name__], TEST_SPEC, mocks=[RunCommandMock])
.. py:staticmethod:: from_file(ansible_module, test_module, test_spec_filehandle, mocks=None)
Creates an ``UTHelper`` instance from a test specification file.
:param ansible_module: The Ansible module to be tested.
:type ansible_module: module
:param test_module: The test module.
:type test_module: module
:param test_spec_filehandle: A file handle to an file stream handle providing the test specification in YAML format.
:type test_spec_filehandle: file
:param mocks: List of ``TestCaseMocks`` to be used during testing. Currently only ``RunCommandMock`` exists.
:type mocks: list or None
:return: An ``UTHelper`` instance.
:rtype: UTHelper
Example usage of ``from_file()``:
.. code-block:: python
import sys
from ansible_collections.community.general.plugins.modules import ansible_module
from .uthelper import UTHelper, RunCommandMock
with open("test_spec.yaml", "r") as test_spec_filehandle:
helper = UTHelper.from_file(ansible_module, sys.modules[__name__], test_spec_filehandle, mocks=[RunCommandMock])
.. py:staticmethod:: from_module(ansible_module, test_module_name, mocks=None)
Creates an ``UTHelper`` instance from a given Ansible module and test module.
:param ansible_module: The Ansible module to be tested.
:type ansible_module: module
:param test_module_name: The name of the test module. It works if passed ``__name__``.
:type test_module_name: str
:param mocks: List of ``TestCaseMocks`` to be used during testing. Currently only ``RunCommandMock`` exists.
:type mocks: list or None
:return: An ``UTHelper`` instance.
:rtype: UTHelper
Example usage of ``from_module()``:
.. code-block:: python
from ansible_collections.community.general.plugins.modules import ansible_module
from .uthelper import UTHelper, RunCommandMock
# Example usage
helper = UTHelper.from_module(ansible_module, __name__, mocks=[RunCommandMock])
Creating TestCaseMocks
^^^^^^^^^^^^^^^^^^^^^^
To create a new ``TestCaseMock`` you must extend that class and implement the relevant parts:
.. code-block:: python
class ShrubberyMock(TestCaseMock):
# this name is mandatory, it is the name used in the test specification
name = "shrubbery"
def setup(self, mocker):
# perform setup, commonly using mocker to patch some other piece of code
...
def check(self, test_case, results):
# verify the tst execution met the expectations of the test case
# for example the function was called as many times as it should
...
def fixtures(self):
# returns a dict mapping names to pytest fixtures that should be used for the test case
# for example, in RunCommandMock it creates a fixture that patches AnsibleModule.get_bin_path
...
Caveats
^^^^^^^
Known issues/opportunities for improvement:
* Only one ``UTHelper`` per test module: UTHelper injects a test function with a fixed name into the module's namespace,
so placing a second ``UTHelper`` instance is going to overwrite the function created by the first one.
* Order of elements in module's namespace is not consistent across executions in Python 3.5, so if adding more tests to the test module
might make Test Helper add its function before or after the other test functions.
In the community.general collection the CI processes uses ``pytest-xdist`` to paralellize and distribute the tests,
and it requires the order of the tests to be consistent.
.. versionadded:: 7.5.0

View File

@@ -51,7 +51,7 @@ And by the time the module is about to exit:
That makes the return value of the module:
.. code-block:: javascript
.. code-block:: json
{
"abc": 123,

View File

@@ -8,7 +8,7 @@
community.general Test (Plugin) Guide
=====================================
The :ref:`community.general collection <plugins_in_community.general>` offers currently one test plugin.
The :anscollection:`community.general collection <community.general#collection>` offers currently one test plugin.
.. contents:: Topics

View File

@@ -5,7 +5,7 @@
namespace: community
name: general
version: 10.3.1
version: 10.7.6
readme: README.md
authors:
- Ansible (https://github.com/ansible)

View File

@@ -17,7 +17,7 @@ action_groups:
proxmox:
- proxmox
- proxmox_backup
- proxmox_backup_info
- proxmox_backup_info
- proxmox_disk
- proxmox_domain_info
- proxmox_group_info
@@ -86,8 +86,9 @@ plugin_routing:
= yes' option.
yaml:
deprecation:
removal_version: 13.0.0
warning_text: The plugin has been superseded by the the option `result_format=yaml` in callback plugin ansible.builtin.default from ansible-core 2.13 onwards.
removal_version: 12.0.0
warning_text: >-
The plugin has been superseded by the option `result_format=yaml` in callback plugin ansible.builtin.default from ansible-core 2.13 onwards.
connection:
docker:
redirect: community.docker.docker
@@ -98,6 +99,10 @@ plugin_routing:
redirect: community.google.gcp_storage_file
hashi_vault:
redirect: community.hashi_vault.hashi_vault
manifold:
deprecation:
removal_version: 11.0.0
warning_text: Company was acquired in 2021 and service was ceased afterwards.
nios:
redirect: infoblox.nios_modules.nios_lookup
nios_next_ip:
@@ -112,17 +117,53 @@ plugin_routing:
atomic_container:
deprecation:
removal_version: 13.0.0
warning_text: Poject Atomic was sunset by the end of 2019.
warning_text: Project Atomic was sunset by the end of 2019.
atomic_host:
deprecation:
removal_version: 13.0.0
warning_text: Poject Atomic was sunset by the end of 2019.
warning_text: Project Atomic was sunset by the end of 2019.
atomic_image:
deprecation:
removal_version: 13.0.0
warning_text: Poject Atomic was sunset by the end of 2019.
warning_text: Project Atomic was sunset by the end of 2019.
cisco_spark:
redirect: community.general.cisco_webex
clc_alert_policy:
deprecation:
removal_version: 11.0.0
warning_text: CenturyLink Cloud services went EOL in September 2023.
clc_blueprint_package:
deprecation:
removal_version: 11.0.0
warning_text: CenturyLink Cloud services went EOL in September 2023.
clc_firewall_policy:
deprecation:
removal_version: 11.0.0
warning_text: CenturyLink Cloud services went EOL in September 2023.
clc_group:
deprecation:
removal_version: 11.0.0
warning_text: CenturyLink Cloud services went EOL in September 2023.
clc_loadbalancer:
deprecation:
removal_version: 11.0.0
warning_text: CenturyLink Cloud services went EOL in September 2023.
clc_modify_server:
deprecation:
removal_version: 11.0.0
warning_text: CenturyLink Cloud services went EOL in September 2023.
clc_publicip:
deprecation:
removal_version: 11.0.0
warning_text: CenturyLink Cloud services went EOL in September 2023.
clc_server:
deprecation:
removal_version: 11.0.0
warning_text: CenturyLink Cloud services went EOL in September 2023.
clc_server_snapshot:
deprecation:
removal_version: 11.0.0
warning_text: CenturyLink Cloud services went EOL in September 2023.
consul_acl:
tombstone:
removal_version: 10.0.0
@@ -603,6 +644,26 @@ plugin_routing:
redirect: community.postgresql.postgresql_user
postgresql_user_obj_stat_info:
redirect: community.postgresql.postgresql_user_obj_stat_info
profitbricks:
deprecation:
removal_version: 11.0.0
warning_text: Supporting library is unsupported since 2021.
profitbricks_datacenter:
deprecation:
removal_version: 11.0.0
warning_text: Supporting library is unsupported since 2021.
profitbricks_nic:
deprecation:
removal_version: 11.0.0
warning_text: Supporting library is unsupported since 2021.
profitbricks_volume:
deprecation:
removal_version: 11.0.0
warning_text: Supporting library is unsupported since 2021.
profitbricks_volume_attachments:
deprecation:
removal_version: 11.0.0
warning_text: Supporting library is unsupported since 2021.
purefa_facts:
tombstone:
removal_version: 3.0.0
@@ -908,6 +969,10 @@ plugin_routing:
redirect: community.docker.docker_swarm
kubevirt:
redirect: community.kubevirt.kubevirt
stackpath_compute:
deprecation:
removal_version: 11.0.0
warning_text: The company and the service were sunset in June 2024.
filter:
path_join:
# The ansible.builtin.path_join filter has been added in ansible-base 2.10.

38
noxfile.py Normal file
View File

@@ -0,0 +1,38 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2025 Felix Fontein <felix@fontein.de>
# /// script
# dependencies = ["nox>=2025.02.09", "antsibull-nox"]
# ///
import sys
import nox
try:
import antsibull_nox
except ImportError:
print("You need to install antsibull-nox in the same Python environment as nox.")
sys.exit(1)
antsibull_nox.load_antsibull_nox_toml()
@nox.session(name="aliases", python=False, default=True)
def aliases(session: nox.Session) -> None:
session.run("python", "tests/sanity/extra/aliases.py")
@nox.session(name="botmeta", default=True)
def botmeta(session: nox.Session) -> None:
session.install("PyYAML", "voluptuous")
session.run("python", "tests/sanity/extra/botmeta.py")
# Allow to run the noxfile with `python noxfile.py`, `pipx run noxfile.py`, or similar.
# Requires nox >= 2025.02.09
if __name__ == "__main__":
nox.main()

View File

@@ -83,6 +83,9 @@ options:
- name: ansible_doas_prompt_l10n
env:
- name: ANSIBLE_DOAS_PROMPT_L10N
notes:
- This become plugin does not work when connection pipelining is enabled. With ansible-core 2.19+, using it automatically
disables pipelining. On ansible-core 2.18 and before, pipelining must explicitly be disabled by the user.
"""
import re
@@ -99,6 +102,10 @@ class BecomeModule(BecomeBase):
fail = ('Permission denied',)
missing = ('Authorization required',)
# See https://github.com/ansible-collections/community.general/issues/9977,
# https://github.com/ansible/ansible/pull/78111
pipelining = False
def check_password_prompt(self, b_output):
''' checks if the expected password prompt exists in b_output '''

View File

@@ -75,6 +75,8 @@ notes:
of machinectl. This rule must alter the prompt behaviour to ask directly for the user credentials, if the user is allowed
to perform the action (take a look at the examples section). If such a rule is not present the plugin only work if it
is used in context with the root user, because then no further prompt will be shown by machinectl.
- This become plugin does not work when connection pipelining is enabled. With ansible-core 2.19+, using it automatically
disables pipelining. On ansible-core 2.18 and before, pipelining must explicitly be disabled by the user.
"""
EXAMPLES = r"""
@@ -92,7 +94,7 @@ EXAMPLES = r"""
from re import compile as re_compile
from ansible.plugins.become import BecomeBase
from ansible.module_utils._text import to_bytes
from ansible.module_utils.common.text.converters import to_bytes
ansi_color_codes = re_compile(to_bytes(r'\x1B\[[0-9;]+m'))
@@ -107,6 +109,10 @@ class BecomeModule(BecomeBase):
success = ('==== AUTHENTICATION COMPLETE ====',)
require_tty = True # see https://github.com/ansible-collections/community.general/issues/6932
# See https://github.com/ansible/ansible/issues/81254,
# https://github.com/ansible/ansible/pull/78111
pipelining = False
@staticmethod
def remove_ansi_codes(line):
return ansi_color_codes.sub(b"", line)

View File

@@ -59,8 +59,8 @@ notes:
- This plugin ignores the C(become_user) supplied and uses C(pmrun)'s own configuration to select the user.
"""
from shlex import quote as shlex_quote
from ansible.plugins.become import BecomeBase
from ansible.module_utils.six.moves import shlex_quote
class BecomeModule(BecomeBase):

View File

@@ -80,7 +80,7 @@ EXAMPLES = r"""
from re import compile as re_compile
from ansible.plugins.become import BecomeBase
from ansible.module_utils._text import to_bytes
from ansible.module_utils.common.text.converters import to_bytes
ansi_color_codes = re_compile(to_bytes(r"\x1B\[[0-9;]+m"))

View File

@@ -54,7 +54,7 @@ from multiprocessing import Lock
from itertools import chain
from ansible.errors import AnsibleError
from ansible.module_utils.common._collections_compat import MutableSet
from collections.abc import MutableSet
from ansible.plugins.cache import BaseCacheModule
from ansible.utils.display import Display

View File

@@ -48,7 +48,6 @@ try:
except ImportError:
import pickle
from ansible.module_utils.six import PY3
from ansible.plugins.cache import BaseFileCacheModule
@@ -56,14 +55,12 @@ class CacheModule(BaseFileCacheModule):
"""
A caching module backed by pickle files.
"""
_persistent = False # prevent unnecessary JSON serialization and key munging
def _load(self, filepath):
# Pickle is a binary format
with open(filepath, 'rb') as f:
if PY3:
return pickle.load(f, encoding='bytes')
else:
return pickle.load(f)
return pickle.load(f, encoding='bytes')
def _dump(self, value, filepath):
with open(filepath, 'wb') as f:

View File

@@ -44,8 +44,7 @@ options:
# TODO: determine whether it is OK to change to: type: float
"""
import codecs
import os
import yaml
@@ -60,9 +59,9 @@ class CacheModule(BaseFileCacheModule):
"""
def _load(self, filepath):
with codecs.open(filepath, 'r', encoding='utf-8') as f:
with open(os.path.abspath(filepath), 'r', encoding='utf-8') as f:
return AnsibleLoader(f).get_single_data()
def _dump(self, value, filepath):
with codecs.open(filepath, 'w', encoding='utf-8') as f:
with open(os.path.abspath(filepath), 'w', encoding='utf-8') as f:
yaml.dump(value, f, Dumper=AnsibleDumper, default_flow_style=False)

View File

@@ -27,8 +27,7 @@ try:
except ImportError:
pass
from ansible.module_utils.six import binary_type, text_type
from ansible.module_utils.common._collections_compat import MutableMapping, MutableSequence
from collections.abc import MutableMapping, MutableSequence
from ansible.plugins.callback.default import CallbackModule as CallbackModule_default
from ansible.utils.color import colorize, hostcolor
from ansible.utils.display import Display
@@ -236,7 +235,7 @@ class CallbackModule(CallbackModule_default):
# Remove empty attributes (list, dict, str)
for attr in result.copy():
if isinstance(result[attr], (MutableSequence, MutableMapping, binary_type, text_type)):
if isinstance(result[attr], (MutableSequence, MutableMapping, bytes, str)):
if not result[attr]:
del result[attr]

View File

@@ -785,6 +785,12 @@ from ansible.vars.manager import VariableManager
from ansible.plugins.callback.default import CallbackModule as Default
from ansible.module_utils.common.text.converters import to_text
try:
from ansible.template import trust_as_template # noqa: F401, pylint: disable=unused-import
SUPPORTS_DATA_TAGGING = True
except ImportError:
SUPPORTS_DATA_TAGGING = False
class DummyStdout(object):
def flush(self):
@@ -838,7 +844,10 @@ class CallbackModule(Default):
return _ret
def _using_diy(self, spec):
return (spec['msg'] is not None) and (spec['msg'] != spec['vars']['omit'])
sentinel = object()
omit = spec['vars'].get('omit', sentinel)
# With Data Tagging, omit is sentinel
return (spec['msg'] is not None) and (spec['msg'] != omit or omit is sentinel)
def _parent_has_callback(self):
return hasattr(super(CallbackModule, self), sys._getframe(1).f_code.co_name)
@@ -894,7 +903,7 @@ class CallbackModule(Default):
)
_ret.update(_all)
_ret.update(_ret.get(self.DIY_NS, {self.DIY_NS: CallbackDIYDict()}))
_ret.update(_ret.get(self.DIY_NS, {self.DIY_NS: {} if SUPPORTS_DATA_TAGGING else CallbackDIYDict()}))
_ret[self.DIY_NS].update({'playbook': {}})
_playbook_attributes = ['entries', 'file_name', 'basedir']

View File

@@ -87,7 +87,6 @@ from contextlib import closing
from os.path import basename
from ansible.errors import AnsibleError, AnsibleRuntimeError
from ansible.module_utils.six import raise_from
from ansible.plugins.callback import CallbackBase
try:
@@ -312,9 +311,7 @@ class CallbackModule(CallbackBase):
self.disabled = False
if ELASTIC_LIBRARY_IMPORT_ERROR:
raise_from(
AnsibleError('The `elastic-apm` must be installed to use this plugin'),
ELASTIC_LIBRARY_IMPORT_ERROR)
raise AnsibleError('The `elastic-apm` must be installed to use this plugin') from ELASTIC_LIBRARY_IMPORT_ERROR
self.tasks_data = OrderedDict()

View File

@@ -34,7 +34,7 @@ import json
from ansible.utils.path import makedirs_safe
from ansible.module_utils.common.text.converters import to_bytes
from ansible.module_utils.common._collections_compat import MutableMapping
from collections.abc import MutableMapping
from ansible.parsing.ajson import AnsibleJSONEncoder
from ansible.plugins.callback import CallbackBase

View File

@@ -127,9 +127,7 @@ class CallbackModule(CallbackBase):
if not HAS_LOGSTASH:
self.disabled = True
self._display.warning("The required python-logstash/python3-logstash is not installed. "
"pip install python-logstash for Python 2"
"pip install python3-logstash for Python 3")
self._display.warning("The required python3-logstash is not installed.")
self.start_time = now()

View File

@@ -66,7 +66,8 @@ options:
type: string
"""
from ansible.module_utils.six.moves.urllib.parse import urlencode
from urllib.parse import urlencode
from ansible.module_utils.common.text.converters import to_bytes
from ansible.module_utils.urls import open_url
from ansible.plugins.callback import CallbackBase

View File

@@ -97,7 +97,7 @@ options:
otel_exporter_otlp_traces_protocol:
type: str
description:
- E(OTEL_EXPORTER_OTLP_TRACES_PROTOCOL) represents the the transport protocol for spans.
- E(OTEL_EXPORTER_OTLP_TRACES_PROTOCOL) represents the transport protocol for spans.
- See
U(https://opentelemetry-python.readthedocs.io/en/latest/sdk/environment_variables.html#envvar-OTEL_EXPORTER_OTLP_TRACES_PROTOCOL).
default: grpc
@@ -137,14 +137,12 @@ import json
import os
import socket
import uuid
from time import time_ns
from collections import OrderedDict
from os.path import basename
from time import time_ns
from urllib.parse import urlparse
from ansible.errors import AnsibleError
from ansible.module_utils.six import raise_from
from ansible.module_utils.six.moves.urllib.parse import urlparse
from ansible.plugins.callback import CallbackBase
try:
@@ -499,9 +497,9 @@ class CallbackModule(CallbackBase):
self.otel_exporter_otlp_traces_protocol = None
if OTEL_LIBRARY_IMPORT_ERROR:
raise_from(
AnsibleError('The `opentelemetry-api`, `opentelemetry-exporter-otlp` or `opentelemetry-sdk` must be installed to use this plugin'),
OTEL_LIBRARY_IMPORT_ERROR)
raise AnsibleError(
'The `opentelemetry-api`, `opentelemetry-exporter-otlp` or `opentelemetry-sdk` must be installed to use this plugin'
) from OTEL_LIBRARY_IMPORT_ERROR
self.tasks_data = OrderedDict()

View File

@@ -0,0 +1,64 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2025, Max Mitschke <maxmitschke@fastmail.com>
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = r'''
name: print_task
type: aggregate
short_description: Prints playbook task snippet to job output
description:
- This plugin prints the currently executing playbook task to the job output.
version_added: 10.7.0
requirements:
- enable in configuration
'''
EXAMPLES = r'''
ansible.cfg: >
# Enable plugin
[defaults]
callbacks_enabled=community.general.print_task
'''
from yaml import load, dump
try:
from yaml import CSafeDumper as SafeDumper
from yaml import CSafeLoader as SafeLoader
except ImportError:
from yaml import SafeDumper, SafeLoader
from ansible.plugins.callback import CallbackBase
class CallbackModule(CallbackBase):
"""
This callback module tells you how long your plays ran for.
"""
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'aggregate'
CALLBACK_NAME = 'community.general.print_task'
CALLBACK_NEEDS_ENABLED = True
def __init__(self):
super(CallbackModule, self).__init__()
self._printed_message = False
def _print_task(self, task):
if hasattr(task, '_ds'):
task_snippet = load(str([task._ds.copy()]), Loader=SafeLoader)
task_yaml = dump(task_snippet, sort_keys=False, Dumper=SafeDumper)
self._display.display(f"\n{task_yaml}\n")
self._printed_message = True
def v2_playbook_on_task_start(self, task, is_conditional):
self._printed_message = False
def v2_runner_on_start(self, host, task):
if not self._printed_message:
self._print_task(task)

View File

@@ -208,7 +208,7 @@ class CallbackModule(CallbackBase):
stderr = [r.get('exception', None), r.get('module_stderr', None)]
stderr = "\n".join([e for e in stderr if e]).strip()
self._print_host_or_item(r['item'],
self._print_host_or_item(r[r['ansible_loop_var']],
r.get('changed', False),
to_text(r.get('msg', '')),
r.get('diff', None),

View File

@@ -18,6 +18,11 @@ short_description: Sends play events to a Slack channel
description:
- This is an ansible callback plugin that sends status updates to a Slack channel during playbook execution.
options:
http_agent:
description:
- HTTP user agent to use for requests to Slack.
type: string
version_added: "10.5.0"
webhook_url:
required: true
description: Slack Webhook URL.
@@ -106,7 +111,7 @@ class CallbackModule(CallbackBase):
self.username = self.get_option('username')
self.show_invocation = (self._display.verbosity > 1)
self.validate_certs = self.get_option('validate_certs')
self.http_agent = self.get_option('http_agent')
if self.webhook_url is None:
self.disabled = True
self._display.warning('Slack Webhook URL was not provided. The '
@@ -132,8 +137,13 @@ class CallbackModule(CallbackBase):
self._display.debug(data)
self._display.debug(self.webhook_url)
try:
response = open_url(self.webhook_url, data=data, validate_certs=self.validate_certs,
headers=headers)
response = open_url(
self.webhook_url,
data=data,
validate_certs=self.validate_certs,
headers=headers,
http_agent=self.http_agent,
)
return response.read()
except Exception as e:
self._display.warning(f'Could not submit message to Slack: {e}')

View File

@@ -12,7 +12,7 @@ name: yaml
type: stdout
short_description: YAML-ized Ansible screen output
deprecated:
removed_in: 13.0.0
removed_in: 12.0.0
why: Starting in ansible-core 2.13, the P(ansible.builtin.default#callback) callback has support for printing output in
YAML format.
alternative: Use O(ansible.builtin.default#callback:result_format=yaml).
@@ -37,9 +37,9 @@ import yaml
import json
import re
import string
from collections.abc import Mapping, Sequence
from ansible.module_utils.common.text.converters import to_text
from ansible.parsing.yaml.dumper import AnsibleDumper
from ansible.plugins.callback import strip_internal_keys, module_response_deepcopy
from ansible.plugins.callback.default import CallbackModule as Default
@@ -53,29 +53,77 @@ def should_use_block(value):
return False
class MyDumper(AnsibleDumper):
def represent_scalar(self, tag, value, style=None):
"""Uses block style for multi-line strings"""
if style is None:
if should_use_block(value):
style = '|'
# we care more about readable than accuracy, so...
# ...no trailing space
value = value.rstrip()
# ...and non-printable characters
value = ''.join(x for x in value if x in string.printable or ord(x) >= 0xA0)
# ...tabs prevent blocks from expanding
value = value.expandtabs()
# ...and odd bits of whitespace
value = re.sub(r'[\x0b\x0c\r]', '', value)
# ...as does trailing space
value = re.sub(r' +\n', '\n', value)
else:
style = self.default_style
node = yaml.representer.ScalarNode(tag, value, style=style)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
return node
def adjust_str_value_for_block(value):
# we care more about readable than accuracy, so...
# ...no trailing space
value = value.rstrip()
# ...and non-printable characters
value = ''.join(x for x in value if x in string.printable or ord(x) >= 0xA0)
# ...tabs prevent blocks from expanding
value = value.expandtabs()
# ...and odd bits of whitespace
value = re.sub(r'[\x0b\x0c\r]', '', value)
# ...as does trailing space
value = re.sub(r' +\n', '\n', value)
return value
def create_string_node(tag, value, style, default_style):
if style is None:
if should_use_block(value):
style = '|'
value = adjust_str_value_for_block(value)
else:
style = default_style
return yaml.representer.ScalarNode(tag, value, style=style)
try:
from ansible.module_utils.common.yaml import HAS_LIBYAML
# import below was added in https://github.com/ansible/ansible/pull/85039,
# first contained in ansible-core 2.19.0b2:
from ansible.utils.vars import transform_to_native_types
if HAS_LIBYAML:
from yaml.cyaml import CSafeDumper as SafeDumper
else:
from yaml import SafeDumper
class MyDumper(SafeDumper):
def represent_scalar(self, tag, value, style=None):
"""Uses block style for multi-line strings"""
node = create_string_node(tag, value, style, self.default_style)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
return node
except ImportError:
# In case transform_to_native_types cannot be imported, we either have ansible-core 2.19.0b1
# (or some random commit from the devel or stable-2.19 branch after merging the DT changes
# and before transform_to_native_types was added), or we have a version without the DT changes.
# Here we simply assume we have a version without the DT changes, and thus can continue as
# with ansible-core 2.18 and before.
transform_to_native_types = None
from ansible.parsing.yaml.dumper import AnsibleDumper
class MyDumper(AnsibleDumper): # pylint: disable=inherit-non-class
def represent_scalar(self, tag, value, style=None):
"""Uses block style for multi-line strings"""
node = create_string_node(tag, value, style, self.default_style)
if self.alias_key is not None:
self.represented_objects[self.alias_key] = node
return node
def transform_recursively(value, transform):
if isinstance(value, Mapping):
return {transform(k): transform(v) for k, v in value.items()}
if isinstance(value, Sequence) and not isinstance(value, (str, bytes)):
return [transform(e) for e in value]
return transform(value)
class CallbackModule(Default):
@@ -132,6 +180,8 @@ class CallbackModule(Default):
if abridged_result:
dumped += '\n'
if transform_to_native_types is not None:
abridged_result = transform_recursively(abridged_result, lambda v: transform_to_native_types(v, redact=False))
dumped += to_text(yaml.dump(abridged_result, allow_unicode=True, width=1000, Dumper=MyDumper, default_flow_style=False))
# indent by a couple of spaces

View File

@@ -75,11 +75,11 @@ import os
import os.path
import subprocess
import traceback
from shlex import quote as shlex_quote
from ansible.errors import AnsibleError
from ansible.module_utils.basic import is_executable
from ansible.module_utils.common.process import get_bin_path
from ansible.module_utils.six.moves import shlex_quote
from ansible.module_utils.common.text.converters import to_bytes
from ansible.plugins.connection import ConnectionBase, BUFSIZE
from ansible.utils.display import Display

View File

@@ -32,6 +32,15 @@ options:
vars:
- name: ansible_executable
- name: ansible_incus_executable
incus_become_method:
description:
- Become command used to switch to a non-root user.
- Is only used when O(remote_user) is not V(root).
type: str
default: /bin/su
vars:
- name: incus_become_method
version_added: 10.4.0
remote:
description:
- The name of the Incus remote to use (per C(incus remote list)).
@@ -40,6 +49,22 @@ options:
default: local
vars:
- name: ansible_incus_remote
remote_user:
description:
- User to login/authenticate as.
- Can be set from the CLI via the C(--user) or C(-u) options.
type: string
default: root
vars:
- name: ansible_user
env:
- name: ANSIBLE_REMOTE_USER
ini:
- section: defaults
key: remote_user
keyword:
- name: remote_user
version_added: 10.4.0
project:
description:
- The name of the Incus project to use (per C(incus project list)).
@@ -55,7 +80,7 @@ from subprocess import call, Popen, PIPE
from ansible.errors import AnsibleError, AnsibleConnectionFailure, AnsibleFileNotFound
from ansible.module_utils.common.process import get_bin_path
from ansible.module_utils._text import to_bytes, to_text
from ansible.module_utils.common.text.converters import to_bytes, to_text
from ansible.plugins.connection import ConnectionBase
@@ -64,7 +89,6 @@ class Connection(ConnectionBase):
transport = "incus"
has_pipelining = True
default_user = 'root'
def __init__(self, play_context, new_stdin, *args, **kwargs):
super(Connection, self).__init__(play_context, new_stdin, *args, **kwargs)
@@ -79,10 +103,34 @@ class Connection(ConnectionBase):
super(Connection, self)._connect()
if not self._connected:
self._display.vvv("ESTABLISH Incus CONNECTION FOR USER: root",
self._display.vvv(f"ESTABLISH Incus CONNECTION FOR USER: {self.get_option('remote_user')}",
host=self._instance())
self._connected = True
def _build_command(self, cmd) -> str:
"""build the command to execute on the incus host"""
exec_cmd = [
self._incus_cmd,
"--project", self.get_option("project"),
"exec",
f"{self.get_option('remote')}:{self._instance()}",
"--"]
if self.get_option("remote_user") != "root":
self._display.vvv(
f"INFO: Running as non-root user: {self.get_option('remote_user')}, \
trying to run 'incus exec' with become method: {self.get_option('incus_become_method')}",
host=self._instance(),
)
exec_cmd.extend(
[self.get_option("incus_become_method"), self.get_option("remote_user"), "-c"]
)
exec_cmd.extend([self.get_option("executable"), "-c", cmd])
return exec_cmd
def _instance(self):
# Return only the leading part of the FQDN as the instance name
# as Incus instance names cannot be a FQDN.
@@ -95,13 +143,8 @@ class Connection(ConnectionBase):
self._display.vvv(f"EXEC {cmd}",
host=self._instance())
local_cmd = [
self._incus_cmd,
"--project", self.get_option("project"),
"exec",
f"{self.get_option('remote')}:{self._instance()}",
"--",
self._play_context.executable, "-c", cmd]
local_cmd = self._build_command(cmd)
self._display.vvvvv(f"EXEC {local_cmd}", host=self._instance())
local_cmd = [to_bytes(i, errors='surrogate_or_strict') for i in local_cmd]
in_data = to_bytes(in_data, errors='surrogate_or_strict', nonstring='passthru')
@@ -112,14 +155,57 @@ class Connection(ConnectionBase):
stdout = to_text(stdout)
stderr = to_text(stderr)
if stderr == "Error: Instance is not running.\n":
raise AnsibleConnectionFailure(f"instance not running: {self._instance()}")
if stderr.startswith("Error: ") and stderr.rstrip().endswith(
": Instance is not running"
):
raise AnsibleConnectionFailure(
f"instance not running: {self._instance()} (remote={self.get_option('remote')}, project={self.get_option('project')})"
)
if stderr == "Error: Instance not found\n":
raise AnsibleConnectionFailure(f"instance not found: {self._instance()}")
if stderr.startswith("Error: ") and stderr.rstrip().endswith(
": Instance not found"
):
raise AnsibleConnectionFailure(
f"instance not found: {self._instance()} (remote={self.get_option('remote')}, project={self.get_option('project')})"
)
if (
stderr.startswith("Error: ")
and ": User does not have permission " in stderr
):
raise AnsibleConnectionFailure(
f"instance access denied: {self._instance()} (remote={self.get_option('remote')}, project={self.get_option('project')})"
)
if (
stderr.startswith("Error: ")
and ": User does not have entitlement " in stderr
):
raise AnsibleConnectionFailure(
f"instance access denied: {self._instance()} (remote={self.get_option('remote')}, project={self.get_option('project')})"
)
return process.returncode, stdout, stderr
def _get_remote_uid_gid(self) -> tuple[int, int]:
"""Get the user and group ID of 'remote_user' from the instance."""
rc, uid_out, err = self.exec_command("/bin/id -u")
if rc != 0:
raise AnsibleError(
f"Failed to get remote uid for user {self.get_option('remote_user')}: {err}"
)
uid = uid_out.strip()
rc, gid_out, err = self.exec_command("/bin/id -g")
if rc != 0:
raise AnsibleError(
f"Failed to get remote gid for user {self.get_option('remote_user')}: {err}"
)
gid = gid_out.strip()
return int(uid), int(gid)
def put_file(self, in_path, out_path):
""" put a file from local to Incus """
super(Connection, self).put_file(in_path, out_path)
@@ -130,12 +216,35 @@ class Connection(ConnectionBase):
if not os.path.isfile(to_bytes(in_path, errors='surrogate_or_strict')):
raise AnsibleFileNotFound(f"input path is not a file: {in_path}")
local_cmd = [
self._incus_cmd,
"--project", self.get_option("project"),
"file", "push", "--quiet",
in_path,
f"{self.get_option('remote')}:{self._instance()}/{out_path}"]
if self.get_option("remote_user") != "root":
uid, gid = self._get_remote_uid_gid()
local_cmd = [
self._incus_cmd,
"--project",
self.get_option("project"),
"file",
"push",
"--uid",
str(uid),
"--gid",
str(gid),
"--quiet",
in_path,
f"{self.get_option('remote')}:{self._instance()}/{out_path}",
]
else:
local_cmd = [
self._incus_cmd,
"--project",
self.get_option("project"),
"file",
"push",
"--quiet",
in_path,
f"{self.get_option('remote')}:{self._instance()}/{out_path}",
]
self._display.vvvvv(f"PUT {local_cmd}", host=self._instance())
local_cmd = [to_bytes(i, errors='surrogate_or_strict') for i in local_cmd]

View File

@@ -38,9 +38,9 @@ import os
import os.path
import subprocess
import traceback
from shlex import quote as shlex_quote
from ansible.errors import AnsibleError
from ansible.module_utils.six.moves import shlex_quote
from ansible.module_utils.common.process import get_bin_path
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
from ansible.plugins.connection import ConnectionBase, BUFSIZE

View File

@@ -32,6 +32,15 @@ options:
vars:
- name: ansible_executable
- name: ansible_lxd_executable
lxd_become_method:
description:
- Become command used to switch to a non-root user.
- Is only used when O(remote_user) is not V(root).
type: str
default: /bin/su
vars:
- name: lxd_become_method
version_added: 10.4.0
remote:
description:
- Name of the LXD remote to use.
@@ -40,6 +49,22 @@ options:
vars:
- name: ansible_lxd_remote
version_added: 2.0.0
remote_user:
description:
- User to login/authenticate as.
- Can be set from the CLI via the C(--user) or C(-u) options.
type: string
default: root
vars:
- name: ansible_user
env:
- name: ANSIBLE_REMOTE_USER
ini:
- section: defaults
key: remote_user
keyword:
- name: remote_user
version_added: 10.4.0
project:
description:
- Name of the LXD project to use.
@@ -63,7 +88,6 @@ class Connection(ConnectionBase):
transport = 'community.general.lxd'
has_pipelining = True
default_user = 'root'
def __init__(self, play_context, new_stdin, *args, **kwargs):
super(Connection, self).__init__(play_context, new_stdin, *args, **kwargs)
@@ -73,9 +97,6 @@ class Connection(ConnectionBase):
except ValueError:
raise AnsibleError("lxc command not found in PATH")
if self._play_context.remote_user is not None and self._play_context.remote_user != 'root':
self._display.warning('lxd does not support remote_user, using default: root')
def _host(self):
""" translate remote_addr to lxd (short) hostname """
return self.get_option("remote_addr").split(".", 1)[0]
@@ -85,25 +106,40 @@ class Connection(ConnectionBase):
super(Connection, self)._connect()
if not self._connected:
self._display.vvv("ESTABLISH LXD CONNECTION FOR USER: root", host=self._host())
self._display.vvv(f"ESTABLISH LXD CONNECTION FOR USER: {self.get_option('remote_user')}", host=self._host())
self._connected = True
def _build_command(self, cmd) -> str:
"""build the command to execute on the lxd host"""
exec_cmd = [self._lxc_cmd]
if self.get_option("project"):
exec_cmd.extend(["--project", self.get_option("project")])
exec_cmd.extend(["exec", f"{self.get_option('remote')}:{self._host()}", "--"])
if self.get_option("remote_user") != "root":
self._display.vvv(
f"INFO: Running as non-root user: {self.get_option('remote_user')}, \
trying to run 'lxc exec' with become method: {self.get_option('lxd_become_method')}",
host=self._host(),
)
exec_cmd.extend(
[self.get_option("lxd_become_method"), self.get_option("remote_user"), "-c"]
)
exec_cmd.extend([self.get_option("executable"), "-c", cmd])
return exec_cmd
def exec_command(self, cmd, in_data=None, sudoable=True):
""" execute a command on the lxd host """
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
self._display.vvv(f"EXEC {cmd}", host=self._host())
local_cmd = [self._lxc_cmd]
if self.get_option("project"):
local_cmd.extend(["--project", self.get_option("project")])
local_cmd.extend([
"exec",
f"{self.get_option('remote')}:{self._host()}",
"--",
self.get_option("executable"), "-c", cmd
])
local_cmd = self._build_command(cmd)
self._display.vvvvv(f"EXEC {local_cmd}", host=self._host())
local_cmd = [to_bytes(i, errors='surrogate_or_strict') for i in local_cmd]
@@ -125,6 +161,25 @@ class Connection(ConnectionBase):
return process.returncode, stdout, stderr
def _get_remote_uid_gid(self) -> tuple[int, int]:
"""Get the user and group ID of 'remote_user' from the instance."""
rc, uid_out, err = self.exec_command("/bin/id -u")
if rc != 0:
raise AnsibleError(
f"Failed to get remote uid for user {self.get_option('remote_user')}: {err}"
)
uid = uid_out.strip()
rc, gid_out, err = self.exec_command("/bin/id -g")
if rc != 0:
raise AnsibleError(
f"Failed to get remote gid for user {self.get_option('remote_user')}: {err}"
)
gid = gid_out.strip()
return int(uid), int(gid)
def put_file(self, in_path, out_path):
""" put a file from local to lxd """
super(Connection, self).put_file(in_path, out_path)
@@ -137,11 +192,32 @@ class Connection(ConnectionBase):
local_cmd = [self._lxc_cmd]
if self.get_option("project"):
local_cmd.extend(["--project", self.get_option("project")])
local_cmd.extend([
"file", "push",
in_path,
f"{self.get_option('remote')}:{self._host()}/{out_path}"
])
if self.get_option("remote_user") != "root":
uid, gid = self._get_remote_uid_gid()
local_cmd.extend(
[
"file",
"push",
"--uid",
str(uid),
"--gid",
str(gid),
in_path,
f"{self.get_option('remote')}:{self._host()}/{out_path}",
]
)
else:
local_cmd.extend(
[
"file",
"push",
in_path,
f"{self.get_option('remote')}:{self._host()}/{out_path}",
]
)
self._display.vvvvv(f"PUT {local_cmd}", host=self._host())
local_cmd = [to_bytes(i, errors='surrogate_or_strict') for i in local_cmd]

View File

@@ -398,6 +398,7 @@ import os
import pathlib
import socket
import tempfile
import traceback
import typing as t
from ansible.errors import (
@@ -406,14 +407,20 @@ from ansible.errors import (
AnsibleError,
)
from ansible_collections.community.general.plugins.module_utils._filelock import FileLock, LockTimeout
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
from ansible.module_utils.compat.paramiko import PARAMIKO_IMPORT_ERR, paramiko
from ansible.module_utils.compat.version import LooseVersion
from ansible.plugins.connection import ConnectionBase
from ansible.utils.display import Display
from ansible.utils.path import makedirs_safe
from binascii import hexlify
try:
import paramiko
PARAMIKO_IMPORT_ERR = None
except ImportError:
paramiko = None
PARAMIKO_IMPORT_ERR = traceback.format_exc()
display = Display()
@@ -513,7 +520,7 @@ class Connection(ConnectionBase):
def _connect(self) -> Connection:
""" activates the connection object """
if paramiko is None:
if PARAMIKO_IMPORT_ERR is not None:
raise AnsibleError(f'paramiko is not installed: {to_native(PARAMIKO_IMPORT_ERR)}')
port = self.get_option('port')

793
plugins/connection/wsl.py Normal file
View File

@@ -0,0 +1,793 @@
# -*- coding: utf-8 -*-
# Derived from ansible/plugins/connection/proxmox_pct_remote.py (c) 2024 Nils Stein (@mietzen) <github.nstein@mailbox.org>
# Derived from ansible/plugins/connection/paramiko_ssh.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# Copyright (c) 2025 Rui Lopes (@rgl) <ruilopes.com>
# Copyright (c) 2025 Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import annotations
DOCUMENTATION = r"""
author: Rui Lopes (@rgl) <ruilopes.com>
name: wsl
short_description: Run tasks in WSL distribution using wsl.exe CLI via SSH
requirements:
- paramiko
description:
- Run commands or put/fetch files to an existing WSL distribution using wsl.exe CLI via SSH.
- Uses the Python SSH implementation (Paramiko) to connect to the WSL host.
version_added: "10.6.0"
options:
remote_addr:
description:
- Address of the remote target.
default: inventory_hostname
type: string
vars:
- name: inventory_hostname
- name: ansible_host
- name: ansible_ssh_host
- name: ansible_paramiko_host
port:
description: Remote port to connect to.
type: int
default: 22
ini:
- section: defaults
key: remote_port
- section: paramiko_connection
key: remote_port
env:
- name: ANSIBLE_REMOTE_PORT
- name: ANSIBLE_REMOTE_PARAMIKO_PORT
vars:
- name: ansible_port
- name: ansible_ssh_port
- name: ansible_paramiko_port
keyword:
- name: port
remote_user:
description:
- User to login/authenticate as.
- Can be set from the CLI via the C(--user) or C(-u) options.
type: string
vars:
- name: ansible_user
- name: ansible_ssh_user
- name: ansible_paramiko_user
env:
- name: ANSIBLE_REMOTE_USER
- name: ANSIBLE_PARAMIKO_REMOTE_USER
ini:
- section: defaults
key: remote_user
- section: paramiko_connection
key: remote_user
keyword:
- name: remote_user
password:
description:
- Secret used to either login the SSH server or as a passphrase for SSH keys that require it.
- Can be set from the CLI via the C(--ask-pass) option.
type: string
vars:
- name: ansible_password
- name: ansible_ssh_pass
- name: ansible_ssh_password
- name: ansible_paramiko_pass
- name: ansible_paramiko_password
use_rsa_sha2_algorithms:
description:
- Whether or not to enable RSA SHA2 algorithms for pubkeys and hostkeys.
- On paramiko versions older than 2.9, this only affects hostkeys.
- For behavior matching paramiko<2.9 set this to V(false).
vars:
- name: ansible_paramiko_use_rsa_sha2_algorithms
ini:
- {key: use_rsa_sha2_algorithms, section: paramiko_connection}
env:
- {name: ANSIBLE_PARAMIKO_USE_RSA_SHA2_ALGORITHMS}
default: true
type: boolean
host_key_auto_add:
description: "Automatically add host keys to C(~/.ssh/known_hosts)."
env:
- name: ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD
ini:
- key: host_key_auto_add
section: paramiko_connection
type: boolean
look_for_keys:
default: true
description: "Set to V(false) to disable searching for private key files in C(~/.ssh/)."
env:
- name: ANSIBLE_PARAMIKO_LOOK_FOR_KEYS
ini:
- {key: look_for_keys, section: paramiko_connection}
type: boolean
proxy_command:
default: ""
description:
- Proxy information for running the connection via a jumphost.
- This option is supported by paramiko version 1.9.0 or newer.
type: string
env:
- name: ANSIBLE_PARAMIKO_PROXY_COMMAND
ini:
- {key: proxy_command, section: paramiko_connection}
vars:
- name: ansible_paramiko_proxy_command
record_host_keys:
default: true
description: "Save the host keys to a file."
env:
- name: ANSIBLE_PARAMIKO_RECORD_HOST_KEYS
ini:
- section: paramiko_connection
key: record_host_keys
type: boolean
host_key_checking:
description: "Set this to V(false) if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host."
type: boolean
default: true
env:
- name: ANSIBLE_HOST_KEY_CHECKING
- name: ANSIBLE_SSH_HOST_KEY_CHECKING
- name: ANSIBLE_PARAMIKO_HOST_KEY_CHECKING
ini:
- section: defaults
key: host_key_checking
- section: paramiko_connection
key: host_key_checking
vars:
- name: ansible_host_key_checking
- name: ansible_ssh_host_key_checking
- name: ansible_paramiko_host_key_checking
use_persistent_connections:
description: "Toggles the use of persistence for connections."
type: boolean
default: false
env:
- name: ANSIBLE_USE_PERSISTENT_CONNECTIONS
ini:
- section: defaults
key: use_persistent_connections
banner_timeout:
type: float
default: 30
description:
- Configures, in seconds, the amount of time to wait for the SSH
banner to be presented.
- This option is supported by paramiko version 1.15.0 or newer.
ini:
- section: paramiko_connection
key: banner_timeout
env:
- name: ANSIBLE_PARAMIKO_BANNER_TIMEOUT
timeout:
type: int
default: 10
description:
- Number of seconds until the plugin gives up on failing to establish a TCP connection.
- This option is supported by paramiko version 2.2.0 or newer.
ini:
- section: defaults
key: timeout
- section: ssh_connection
key: timeout
- section: paramiko_connection
key: timeout
env:
- name: ANSIBLE_TIMEOUT
- name: ANSIBLE_SSH_TIMEOUT
- name: ANSIBLE_PARAMIKO_TIMEOUT
vars:
- name: ansible_ssh_timeout
- name: ansible_paramiko_timeout
cli:
- name: timeout
lock_file_timeout:
type: int
default: 60
description: Number of seconds until the plugin gives up on trying to write a lock file when writing SSH known host keys.
vars:
- name: ansible_lock_file_timeout
env:
- name: ANSIBLE_LOCK_FILE_TIMEOUT
private_key_file:
description:
- Path to private key file to use for authentication.
type: path
ini:
- section: defaults
key: private_key_file
- section: paramiko_connection
key: private_key_file
env:
- name: ANSIBLE_PRIVATE_KEY_FILE
- name: ANSIBLE_PARAMIKO_PRIVATE_KEY_FILE
vars:
- name: ansible_private_key_file
- name: ansible_ssh_private_key_file
- name: ansible_paramiko_private_key_file
cli:
- name: private_key_file
option: "--private-key"
user_known_hosts_file:
description:
- Path to the user known hosts file.
- Used to verify the ssh hosts keys.
type: path
default: ~/.ssh/known_hosts
ini:
- section: paramiko_connection
key: user_known_hosts_file
vars:
- name: ansible_paramiko_user_known_hosts_file
wsl_distribution:
description:
- WSL distribution name
type: string
required: true
vars:
- name: wsl_distribution
wsl_user:
description:
- WSL distribution user
type: string
vars:
- name: wsl_user
become_user:
description:
- WSL distribution user
type: string
default: root
vars:
- name: become_user
- name: ansible_become_user
become:
description:
- whether to use the user defined by ansible_become_user.
type: bool
default: false
vars:
- name: become
- name: ansible_become
"""
EXAMPLES = r"""
# ------------------------
# Inventory: inventory.yml
# ------------------------
---
all:
children:
wsl:
hosts:
example-wsl-ubuntu:
ansible_host: 10.0.0.10
wsl_distribution: ubuntu
wsl_user: ubuntu
vars:
ansible_connection: community.general.wsl
ansible_user: vagrant
# ----------------------
# Playbook: playbook.yml
# ----------------------
---
- name: WSL Example
hosts: wsl
gather_facts: true
become: true
tasks:
- name: Ping
ansible.builtin.ping:
- name: Id (with become false)
become: false
changed_when: false
args:
executable: /bin/bash
ansible.builtin.shell: |
exec 2>&1
set -x
echo "$0"
pwd
id
- name: Id (with become true)
changed_when: false
args:
executable: /bin/bash
ansible.builtin.shell: |
exec 2>&1
set -x
echo "$0"
pwd
id
- name: Reboot
ansible.builtin.reboot:
boot_time_command: systemctl show -p ActiveEnterTimestamp init.scope
"""
import io
import os
import pathlib
import shlex
import socket
import tempfile
import traceback
import typing as t
from ansible.errors import (
AnsibleAuthenticationFailure,
AnsibleConnectionFailure,
AnsibleError,
)
from ansible_collections.community.general.plugins.module_utils._filelock import FileLock, LockTimeout
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
from ansible.playbook.play_context import PlayContext
from ansible.plugins.connection import ConnectionBase
from ansible.utils.display import Display
from ansible.utils.path import makedirs_safe
from binascii import hexlify
from subprocess import list2cmdline
try:
import paramiko
PARAMIKO_IMPORT_ERR = None
except ImportError:
paramiko = None
PARAMIKO_IMPORT_ERR = traceback.format_exc()
if t.TYPE_CHECKING and PARAMIKO_IMPORT_ERR is None:
from paramiko import MissingHostKeyPolicy
from paramiko.client import SSHClient
from paramiko.pkey import PKey
else:
MissingHostKeyPolicy: type = object
SSHClient: type = object
PKey: type = object
display = Display()
def authenticity_msg(hostname: str, ktype: str, fingerprint: str) -> str:
msg = f"""
paramiko: The authenticity of host '{hostname}' can't be established.
The {ktype} key fingerprint is {fingerprint}.
Are you sure you want to continue connecting (yes/no)?
"""
return msg
class MyAddPolicy(MissingHostKeyPolicy):
"""
Based on AutoAddPolicy in paramiko so we can determine when keys are added
and also prompt for input.
Policy for automatically adding the hostname and new host key to the
local L{HostKeys} object, and saving it. This is used by L{SSHClient}.
"""
def __init__(self, connection: Connection) -> None:
self.connection = connection
self._options = connection._options
def missing_host_key(self, client: SSHClient, hostname: str, key: PKey) -> None:
if all((self.connection.get_option('host_key_checking'), not self.connection.get_option('host_key_auto_add'))):
fingerprint = hexlify(key.get_fingerprint())
ktype = key.get_name()
if self.connection.get_option('use_persistent_connections') or self.connection.force_persistence:
# don't print the prompt string since the user cannot respond
# to the question anyway
raise AnsibleError(authenticity_msg(hostname, ktype, fingerprint)[1:92])
inp = to_text(
display.prompt_until(authenticity_msg(hostname, ktype, fingerprint), private=False),
errors='surrogate_or_strict'
)
if inp.lower() not in ['yes', 'y', '']:
raise AnsibleError('host connection rejected by user')
key._added_by_ansible_this_time = True
# existing implementation below:
client._host_keys.add(hostname, key.get_name(), key)
# host keys are actually saved in close() function below
# in order to control ordering.
class Connection(ConnectionBase):
""" SSH based connections (paramiko) to WSL """
transport = 'community.general.wsl'
_log_channel: str | None = None
def __init__(self, play_context: PlayContext, new_stdin: io.TextIOWrapper | None = None, *args: t.Any, **kwargs: t.Any):
super(Connection, self).__init__(play_context, new_stdin, *args, **kwargs)
def _set_log_channel(self, name: str) -> None:
""" Mimic paramiko.SSHClient.set_log_channel """
self._log_channel = name
def _parse_proxy_command(self, port: int = 22) -> dict[str, t.Any]:
proxy_command = self.get_option('proxy_command') or None
sock_kwarg = {}
if proxy_command:
replacers: t.Dict[str, str] = {
'%h': self.get_option('remote_addr'),
'%p': str(port),
'%r': self.get_option('remote_user')
}
for find, replace in replacers.items():
proxy_command = proxy_command.replace(find, replace)
try:
sock_kwarg = {'sock': paramiko.ProxyCommand(proxy_command)}
display.vvv(f'CONFIGURE PROXY COMMAND FOR CONNECTION: {proxy_command}', host=self.get_option('remote_addr'))
except AttributeError:
display.warning('Paramiko ProxyCommand support unavailable. '
'Please upgrade to Paramiko 1.9.0 or newer. '
'Not using configured ProxyCommand')
return sock_kwarg
def _connect(self) -> Connection:
""" activates the connection object """
if PARAMIKO_IMPORT_ERR is not None:
raise AnsibleError(f'paramiko is not installed: {to_native(PARAMIKO_IMPORT_ERR)}')
port = self.get_option('port')
display.vvv(f'ESTABLISH PARAMIKO SSH CONNECTION FOR USER: {self.get_option("remote_user")} on PORT {to_text(port)} TO {self.get_option("remote_addr")}',
host=self.get_option('remote_addr'))
ssh = paramiko.SSHClient()
# Set pubkey and hostkey algorithms to disable, the only manipulation allowed currently
# is keeping or omitting rsa-sha2 algorithms
# default_keys: t.Tuple[str] = ()
paramiko_preferred_pubkeys = getattr(paramiko.Transport, '_preferred_pubkeys', ())
paramiko_preferred_hostkeys = getattr(paramiko.Transport, '_preferred_keys', ())
use_rsa_sha2_algorithms = self.get_option('use_rsa_sha2_algorithms')
disabled_algorithms: t.Dict[str, t.Iterable[str]] = {}
if not use_rsa_sha2_algorithms:
if paramiko_preferred_pubkeys:
disabled_algorithms['pubkeys'] = tuple(a for a in paramiko_preferred_pubkeys if 'rsa-sha2' in a)
if paramiko_preferred_hostkeys:
disabled_algorithms['keys'] = tuple(a for a in paramiko_preferred_hostkeys if 'rsa-sha2' in a)
# override paramiko's default logger name
if self._log_channel is not None:
ssh.set_log_channel(self._log_channel)
self.keyfile = os.path.expanduser(self.get_option('user_known_hosts_file'))
if self.get_option('host_key_checking'):
for ssh_known_hosts in ('/etc/ssh/ssh_known_hosts', '/etc/openssh/ssh_known_hosts', self.keyfile):
try:
ssh.load_system_host_keys(ssh_known_hosts)
break
except IOError:
pass # file was not found, but not required to function
except paramiko.hostkeys.InvalidHostKey as e:
raise AnsibleConnectionFailure(f'Invalid host key: {to_text(e.line)}')
try:
ssh.load_system_host_keys()
except paramiko.hostkeys.InvalidHostKey as e:
raise AnsibleConnectionFailure(f'Invalid host key: {to_text(e.line)}')
ssh_connect_kwargs = self._parse_proxy_command(port)
ssh.set_missing_host_key_policy(MyAddPolicy(self))
conn_password = self.get_option('password')
allow_agent = True
if conn_password is not None:
allow_agent = False
try:
key_filename = None
if self.get_option('private_key_file'):
key_filename = os.path.expanduser(self.get_option('private_key_file'))
# paramiko 2.2 introduced auth_timeout parameter
if LooseVersion(paramiko.__version__) >= LooseVersion('2.2.0'):
ssh_connect_kwargs['auth_timeout'] = self.get_option('timeout')
# paramiko 1.15 introduced banner timeout parameter
if LooseVersion(paramiko.__version__) >= LooseVersion('1.15.0'):
ssh_connect_kwargs['banner_timeout'] = self.get_option('banner_timeout')
ssh.connect(
self.get_option('remote_addr').lower(),
username=self.get_option('remote_user'),
allow_agent=allow_agent,
look_for_keys=self.get_option('look_for_keys'),
key_filename=key_filename,
password=conn_password,
timeout=self.get_option('timeout'),
port=port,
disabled_algorithms=disabled_algorithms,
**ssh_connect_kwargs,
)
except paramiko.ssh_exception.BadHostKeyException as e:
raise AnsibleConnectionFailure(f'host key mismatch for {to_text(e.hostname)}')
except paramiko.ssh_exception.AuthenticationException as e:
msg = f'Failed to authenticate: {e}'
raise AnsibleAuthenticationFailure(msg)
except Exception as e:
msg = to_text(e)
if u'PID check failed' in msg:
raise AnsibleError('paramiko version issue, please upgrade paramiko on the machine running ansible')
elif u'Private key file is encrypted' in msg:
msg = f'ssh {self.get_option("remote_user")}@{self.get_options("remote_addr")}:{port} : ' + \
f'{msg}\nTo connect as a different user, use -u <username>.'
raise AnsibleConnectionFailure(msg)
else:
raise AnsibleConnectionFailure(msg)
self.ssh = ssh
self._connected = True
return self
def _any_keys_added(self) -> bool:
for hostname, keys in self.ssh._host_keys.items():
for keytype, key in keys.items():
added_this_time = getattr(key, '_added_by_ansible_this_time', False)
if added_this_time:
return True
return False
def _save_ssh_host_keys(self, filename: str) -> None:
"""
not using the paramiko save_ssh_host_keys function as we want to add new SSH keys at the bottom so folks
don't complain about it :)
"""
if not self._any_keys_added():
return
path = os.path.expanduser('~/.ssh')
makedirs_safe(path)
with open(filename, 'w') as f:
for hostname, keys in self.ssh._host_keys.items():
for keytype, key in keys.items():
# was f.write
added_this_time = getattr(key, '_added_by_ansible_this_time', False)
if not added_this_time:
f.write(f'{hostname} {keytype} {key.get_base64()}\n')
for hostname, keys in self.ssh._host_keys.items():
for keytype, key in keys.items():
added_this_time = getattr(key, '_added_by_ansible_this_time', False)
if added_this_time:
f.write(f'{hostname} {keytype} {key.get_base64()}\n')
def _build_wsl_command(self, cmd: str) -> str:
wsl_distribution = self.get_option('wsl_distribution')
become = self.get_option('become')
become_user = self.get_option('become_user')
if become and become_user:
wsl_user = become_user
else:
wsl_user = self.get_option('wsl_user')
args = ['wsl.exe', '--distribution', wsl_distribution]
if wsl_user:
args.extend(['--user', wsl_user])
args.extend(['--'])
args.extend(shlex.split(cmd))
if os.getenv('_ANSIBLE_TEST_WSL_CONNECTION_PLUGIN_Waeri5tepheeSha2fae8'):
return shlex.join(args)
return list2cmdline(args) # see https://github.com/python/cpython/blob/3.11/Lib/subprocess.py#L576
def exec_command(self, cmd: str, in_data: bytes | None = None, sudoable: bool = True) -> tuple[int, bytes, bytes]:
""" run a command on inside a WSL distribution """
cmd = self._build_wsl_command(cmd)
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
bufsize = 4096
try:
self.ssh.get_transport().set_keepalive(5)
chan = self.ssh.get_transport().open_session()
except Exception as e:
text_e = to_text(e)
msg = 'Failed to open session'
if text_e:
msg += f': {text_e}'
raise AnsibleConnectionFailure(to_native(msg))
display.vvv(f'EXEC {cmd}', host=self.get_option('remote_addr'))
cmd = to_bytes(cmd, errors='surrogate_or_strict')
no_prompt_out = b''
no_prompt_err = b''
become_output = b''
try:
chan.exec_command(cmd)
if self.become and self.become.expect_prompt():
password_prompt = False
become_success = False
while not (become_success or password_prompt):
display.debug('Waiting for Privilege Escalation input')
chunk = chan.recv(bufsize)
display.debug(f'chunk is: {to_text(chunk)}')
if not chunk:
if b'unknown user' in become_output:
n_become_user = to_native(self.become.get_option('become_user'))
raise AnsibleError(f'user {n_become_user} does not exist')
else:
break
# raise AnsibleError('ssh connection closed waiting for password prompt')
become_output += chunk
# need to check every line because we might get lectured
# and we might get the middle of a line in a chunk
for line in become_output.splitlines(True):
if self.become.check_success(line):
become_success = True
break
elif self.become.check_password_prompt(line):
password_prompt = True
break
if password_prompt:
if self.become:
become_pass = self.become.get_option('become_pass')
chan.sendall(to_bytes(become_pass + '\n', errors='surrogate_or_strict'))
else:
raise AnsibleError('A password is required but none was supplied')
else:
no_prompt_out += become_output
no_prompt_err += become_output
if in_data:
for i in range(0, len(in_data), bufsize):
chan.send(in_data[i:i + bufsize])
chan.shutdown_write()
elif in_data == b'':
chan.shutdown_write()
except socket.timeout:
raise AnsibleError('ssh timed out waiting for privilege escalation.\n' + to_text(become_output))
stdout = b''.join(chan.makefile('rb', bufsize))
stderr = b''.join(chan.makefile_stderr('rb', bufsize))
returncode = chan.recv_exit_status()
# NB the full english error message is:
# 'wsl.exe' is not recognized as an internal or external command,
# operable program or batch file.
if "'wsl.exe' is not recognized" in stderr.decode('utf-8'):
raise AnsibleError(
f'wsl.exe not found in path of host: {to_text(self.get_option("remote_addr"))}')
return (returncode, no_prompt_out + stdout, no_prompt_out + stderr)
def put_file(self, in_path: str, out_path: str) -> None:
""" transfer a file from local to remote """
display.vvv(f'PUT {in_path} TO {out_path}', host=self.get_option('remote_addr'))
try:
with open(in_path, 'rb') as f:
data = f.read()
returncode, stdout, stderr = self.exec_command(
' '.join([
self._shell.executable, '-c',
self._shell.quote(f'cat > {out_path}')]),
in_data=data,
sudoable=False)
if returncode != 0:
if 'cat: not found' in stderr.decode('utf-8'):
raise AnsibleError(
f'cat not found in path of WSL distribution: {to_text(self.get_option("wsl_distribution"))}')
raise AnsibleError(
f'{to_text(stdout)}\n{to_text(stderr)}')
except Exception as e:
raise AnsibleError(
f'error occurred while putting file from {in_path} to {out_path}!\n{to_text(e)}')
def fetch_file(self, in_path: str, out_path: str) -> None:
""" save a remote file to the specified path """
display.vvv(f'FETCH {in_path} TO {out_path}', host=self.get_option('remote_addr'))
try:
returncode, stdout, stderr = self.exec_command(
' '.join([
self._shell.executable, '-c',
self._shell.quote(f'cat {in_path}')]),
sudoable=False)
if returncode != 0:
if 'cat: not found' in stderr.decode('utf-8'):
raise AnsibleError(
f'cat not found in path of WSL distribution: {to_text(self.get_option("wsl_distribution"))}')
raise AnsibleError(
f'{to_text(stdout)}\n{to_text(stderr)}')
with open(out_path, 'wb') as f:
f.write(stdout)
except Exception as e:
raise AnsibleError(
f'error occurred while fetching file from {in_path} to {out_path}!\n{to_text(e)}')
def reset(self) -> None:
""" reset the connection """
if not self._connected:
return
self.close()
self._connect()
def close(self) -> None:
""" terminate the connection """
if self.get_option('host_key_checking') and self.get_option('record_host_keys') and self._any_keys_added():
# add any new SSH host keys -- warning -- this could be slow
# (This doesn't acquire the connection lock because it needs
# to exclude only other known_hosts writers, not connections
# that are starting up.)
lockfile = os.path.basename(self.keyfile)
dirname = os.path.dirname(self.keyfile)
makedirs_safe(dirname)
tmp_keyfile_name = None
try:
with FileLock().lock_file(lockfile, dirname, self.get_option('lock_file_timeout')):
# just in case any were added recently
self.ssh.load_system_host_keys()
self.ssh._host_keys.update(self.ssh._system_host_keys)
# gather information about the current key file, so
# we can ensure the new file has the correct mode/owner
key_dir = os.path.dirname(self.keyfile)
if os.path.exists(self.keyfile):
key_stat = os.stat(self.keyfile)
mode = key_stat.st_mode & 0o777
uid = key_stat.st_uid
gid = key_stat.st_gid
else:
mode = 0o644
uid = os.getuid()
gid = os.getgid()
# Save the new keys to a temporary file and move it into place
# rather than rewriting the file. We set delete=False because
# the file will be moved into place rather than cleaned up.
with tempfile.NamedTemporaryFile(dir=key_dir, delete=False) as tmp_keyfile:
tmp_keyfile_name = tmp_keyfile.name
os.chmod(tmp_keyfile_name, mode)
os.chown(tmp_keyfile_name, uid, gid)
self._save_ssh_host_keys(tmp_keyfile_name)
os.rename(tmp_keyfile_name, self.keyfile)
except LockTimeout:
raise AnsibleError(
f'writing lock file for {self.keyfile} ran in to the timeout of {self.get_option("lock_file_timeout")}s')
except paramiko.hostkeys.InvalidHostKey as e:
raise AnsibleConnectionFailure(f'Invalid host key: {e.line}')
except Exception as e:
# unable to save keys, including scenario when key was invalid
# and caught earlier
raise AnsibleError(
f'error occurred while writing SSH host keys!\n{to_text(e)}')
finally:
if tmp_keyfile_name is not None:
pathlib.Path(tmp_keyfile_name).unlink(missing_ok=True)
self.ssh.close()
self._connected = False

View File

@@ -31,9 +31,9 @@ import os
import os.path
import subprocess
import traceback
from shlex import quote as shlex_quote
from ansible.errors import AnsibleError
from ansible.module_utils.six.moves import shlex_quote
from ansible.module_utils.common.process import get_bin_path
from ansible.module_utils.common.text.converters import to_bytes
from ansible.plugins.connection import ConnectionBase, BUFSIZE

View File

@@ -32,14 +32,14 @@ attributes:
INFO_MODULE = r'''
options: {}
attributes:
check_mode:
support: full
details:
- This action does not modify state.
diff_mode:
support: N/A
details:
- This action does not modify state.
check_mode:
support: full
details:
- This action does not modify state.
diff_mode:
support: N/A
details:
- This action does not modify state.
'''
CONN = r"""
@@ -64,16 +64,16 @@ attributes:
FACTS_MODULE = r'''
options: {}
attributes:
check_mode:
support: full
details:
- This action does not modify state.
diff_mode:
support: N/A
details:
- This action does not modify state.
facts:
support: full
check_mode:
support: full
details:
- This action does not modify state.
diff_mode:
support: N/A
details:
- This action does not modify state.
facts:
support: full
'''
FILES = r"""

View File

@@ -12,7 +12,7 @@ class ModuleDocFragment(object):
options:
venv:
description:
- Use the the Python interpreter from this virtual environment.
- Use the Python interpreter from this virtual environment.
- Pass the path to the root of the virtualenv, not the C(bin/) directory nor the C(python) executable.
type: path
settings:

View File

@@ -13,21 +13,21 @@ class ModuleDocFragment(object):
# Documentation fragment for VNX (emc_vnx)
EMC_VNX = r'''
options:
sp_address:
description:
- Address of the SP of target/secondary storage.
type: str
required: true
sp_user:
description:
- Username for accessing SP.
type: str
default: sysadmin
sp_password:
description:
- password for accessing SP.
type: str
default: sysadmin
sp_address:
description:
- Address of the SP of target/secondary storage.
type: str
required: true
sp_user:
description:
- Username for accessing SP.
type: str
default: sysadmin
sp_password:
description:
- password for accessing SP.
type: str
default: sysadmin
requirements:
- An EMC VNX Storage device.
- storops (0.5.10 or greater). Install using C(pip install storops).

View File

@@ -74,3 +74,12 @@ options:
type: int
default: 10
"""
CONNECTION_NOTES = r"""
options: {}
notes:
- This module uses JSON-RPC over HTTP(S) to communicate with the FreeIPA server.
If you need to enroll the managed node into FreeIPA realm, you might want to consider using the collection
L(freeipa.ansible_freeipa, https://galaxy.ansible.com/ui/repo/published/freeipa/ansible_freeipa/), but shell access to one
node from the realm is required to manage the deployment.
"""

View File

@@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2025 Ansible community
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
class ModuleDocFragment(object):
# Use together with the community.general.redfish module utils' REDFISH_COMMON_ARGUMENT_SPEC
DOCUMENTATION = r"""
options:
validate_certs:
description:
- If V(false), TLS/SSL certificates will not be validated.
- Set this to V(true) to enable certificate checking. Should be used together with O(ca_path).
type: bool
default: false
ca_path:
description:
- PEM formatted file that contains a CA certificate to be used for validation.
- Only used if O(validate_certs=true).
type: path
ciphers:
required: false
description:
- TLS/SSL Ciphers to use for the request.
- When a list is provided, all ciphers are joined in order with V(:).
- See the L(OpenSSL Cipher List Format,https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html#CIPHER-LIST-FORMAT)
for more details.
- The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions.
type: list
elements: str
"""

View File

@@ -36,7 +36,7 @@ _value:
"""
from ansible.errors import AnsibleFilterError
from ansible.module_utils.common._collections_compat import Sequence
from collections.abc import Sequence
from collections import Counter

View File

@@ -45,10 +45,10 @@ _value:
"""
from io import StringIO
from configparser import ConfigParser
from ansible.errors import AnsibleFilterError
from ansible.module_utils.six import string_types
from ansible.module_utils.six.moves import StringIO
from ansible.module_utils.six.moves.configparser import ConfigParser
class IniParser(ConfigParser):
@@ -73,7 +73,7 @@ class IniParser(ConfigParser):
def from_ini(obj):
''' Read the given string as INI file and return a dict '''
if not isinstance(obj, string_types):
if not isinstance(obj, str):
raise AnsibleFilterError(f'from_ini requires a str, got {type(obj)}')
parser = IniParser()

View File

@@ -54,7 +54,7 @@ _value:
"""
from ansible.errors import AnsibleFilterError
from ansible.module_utils.common._collections_compat import Mapping, Sequence
from collections.abc import Mapping, Sequence
def groupby_as_dict(sequence, attribute):

View File

@@ -9,12 +9,16 @@ from __future__ import annotations
from ansible.errors import (
AnsibleError,
AnsibleFilterError,
AnsibleFilterTypeError,
)
from ansible.module_utils.common.text.converters import to_native
from ansible.module_utils.common.collections import is_sequence
try:
from ansible.errors import AnsibleTypeError
except ImportError:
from ansible.errors import AnsibleFilterTypeError as AnsibleTypeError
try:
from hashids import Hashids
HAS_HASHIDS = True
@@ -63,7 +67,7 @@ def hashids_encode(nums, salt=None, alphabet=None, min_length=None):
try:
hashid = hashids.encode(*nums)
except TypeError as e:
raise AnsibleFilterTypeError(
raise AnsibleTypeError(
"Data to encode must by a tuple or list of ints: %s" % to_native(e)
)

View File

@@ -64,7 +64,7 @@ EXAMPLES: |
ansible.builtin.debug:
msg: "{{ input | community.general.json_patch('add', '/1', {'baz': 'qux'}) }}"
vars:
input: ["foo": { "one": 1 }, "bar": { "two": 2 }]
input: ["foo": { "one": 1 }, "bar": { "two": 2 }]
# => [{"foo": {"one": 1}}, {"baz": "qux"}, {"bar": {"two": 2}}]
- name: Insert a new key into a dictionary
@@ -94,7 +94,7 @@ EXAMPLES: |
vars:
input: {}
# => {"~/": "qux"}
- name: Add at the end of the array
ansible.builtin.debug:
msg: "{{ input | community.general.json_patch('add', '/-', 4) }}"
@@ -136,7 +136,7 @@ EXAMPLES: |
vars:
input: { "foo": { "one": 1 }, "bar": { "two": 2 } }
# => OK
- name: Unuccessful test
ansible.builtin.debug:
msg: "{{ input | community.general.json_patch('test', '/bar/two', 9) | ternary('OK', 'Failed') }}"

View File

@@ -124,10 +124,17 @@ def json_query(data, expr):
'json_query filter')
# Hack to handle Ansible Unsafe text, AnsibleMapping and AnsibleSequence
# See issue: https://github.com/ansible-collections/community.general/issues/320
jmespath.functions.REVERSE_TYPES_MAP['string'] = jmespath.functions.REVERSE_TYPES_MAP['string'] + ('AnsibleUnicode', 'AnsibleUnsafeText', )
jmespath.functions.REVERSE_TYPES_MAP['array'] = jmespath.functions.REVERSE_TYPES_MAP['array'] + ('AnsibleSequence', )
jmespath.functions.REVERSE_TYPES_MAP['object'] = jmespath.functions.REVERSE_TYPES_MAP['object'] + ('AnsibleMapping', )
# See issues https://github.com/ansible-collections/community.general/issues/320
# and https://github.com/ansible/ansible/issues/85600.
jmespath.functions.REVERSE_TYPES_MAP['string'] = jmespath.functions.REVERSE_TYPES_MAP['string'] + (
'AnsibleUnicode', 'AnsibleUnsafeText', '_AnsibleTaggedStr',
)
jmespath.functions.REVERSE_TYPES_MAP['array'] = jmespath.functions.REVERSE_TYPES_MAP['array'] + (
'AnsibleSequence', '_AnsibleLazyTemplateList',
)
jmespath.functions.REVERSE_TYPES_MAP['object'] = jmespath.functions.REVERSE_TYPES_MAP['object'] + (
'AnsibleMapping', '_AnsibleLazyTemplateDict',
)
try:
return jmespath.search(expr, data)
except jmespath.exceptions.JMESPathError as e:

View File

@@ -31,7 +31,7 @@ EXAMPLES: |
list1: [1, 2, 5, 3, 4, 10]
list2: [1, 2, 3, 4, 5, 11, 99]
# => [10]
- name: Return the difference of list1, list2 and list3.
ansible.builtin.debug:
msg: "{{ [list1, list2, list3] | community.general.lists_difference(flatten=true) }}"

View File

@@ -31,7 +31,7 @@ EXAMPLES: |
list1: [1, 2, 5, 3, 4, 10]
list2: [1, 2, 3, 4, 5, 11, 99]
# => [1, 2, 5, 3, 4]
- name: Return the intersection of list1, list2 and list3.
ansible.builtin.debug:
msg: "{{ [list1, list2, list3] | community.general.lists_intersect(flatten=true) }}"

View File

@@ -196,8 +196,7 @@ _value:
"""
from ansible.errors import AnsibleFilterError
from ansible.module_utils.six import string_types
from ansible.module_utils.common._collections_compat import Mapping, Sequence
from collections.abc import Mapping, Sequence
from ansible.utils.vars import merge_hash
from collections import defaultdict
@@ -257,7 +256,7 @@ def lists_mergeby(*terms, **kwargs):
index = terms[-1]
if not isinstance(index, string_types):
if not isinstance(index, str):
msg = ("First argument after the lists for community.general.lists_mergeby must be string. "
"%s is %s")
raise AnsibleFilterError(msg % (index, type(index)))

View File

@@ -31,7 +31,7 @@ EXAMPLES: |
list1: [1, 2, 5, 3, 4, 10]
list2: [1, 2, 3, 4, 5, 11, 99]
# => [10, 11, 99]
- name: Return the symmetric difference of list1, list2 and list3.
ansible.builtin.debug:
msg: "{{ [list1, list2, list3] | community.general.lists_symmetric_difference(flatten=true) }}"

View File

@@ -32,7 +32,7 @@ EXAMPLES: |
list2: [1, 2, 3, 4, 5, 11, 99]
list3: [1, 2, 3, 4, 5, 10, 99, 101]
# => [1, 2, 5, 3, 4, 10, 11, 99, 101]
- name: Return the union of list1 and list2.
ansible.builtin.debug:
msg: "{{ [list1, list2] | community.general.lists_union(flatten=true) }}"

View File

@@ -45,14 +45,13 @@ import re
from random import Random, SystemRandom
from ansible.errors import AnsibleFilterError
from ansible.module_utils.six import string_types
def random_mac(value, seed=None):
''' takes string prefix, and return it completed with random bytes
to get a complete 6 bytes MAC address '''
if not isinstance(value, string_types):
if not isinstance(value, str):
raise AnsibleFilterError('Invalid value type (%s) for random_mac (%s)' %
(type(value), value))

View File

@@ -23,29 +23,29 @@ options:
"""
EXAMPLES = r"""
# Substitution converts str to AnsibleUnicode
# -------------------------------------------
# Substitution converts str to AnsibleUnicode or _AnsibleTaggedStr
# ----------------------------------------------------------------
# String. AnsibleUnicode.
# String. AnsibleUnicode or _AnsibleTaggedStr.
- data: "abc"
result: '{{ data | community.general.reveal_ansible_type }}'
# result => AnsibleUnicode
# result => AnsibleUnicode (or _AnsibleTaggedStr)
# String. AnsibleUnicode alias str.
- alias: {"AnsibleUnicode": "str"}
# String. AnsibleUnicode/_AnsibleTaggedStr alias str.
- alias: {"AnsibleUnicode": "str", "_AnsibleTaggedStr": "str"}
data: "abc"
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
# result => str
# List. All items are AnsibleUnicode.
# List. All items are AnsibleUnicode/_AnsibleTaggedStr.
- data: ["a", "b", "c"]
result: '{{ data | community.general.reveal_ansible_type }}'
# result => list[AnsibleUnicode]
# result => list[AnsibleUnicode] or list[_AnsibleTaggedStr]
# Dictionary. All keys are AnsibleUnicode. All values are AnsibleUnicode.
# Dictionary. All keys and values are AnsibleUnicode/_AnsibleTaggedStr.
- data: {"a": "foo", "b": "bar", "c": "baz"}
result: '{{ data | community.general.reveal_ansible_type }}'
# result => dict[AnsibleUnicode, AnsibleUnicode]
# result => dict[AnsibleUnicode, AnsibleUnicode] or dict[_AnsibleTaggedStr, _AnsibleTaggedStr]
# No substitution and no alias. Type of strings is str
# ----------------------------------------------------
@@ -82,29 +82,43 @@ EXAMPLES = r"""
- result: '{{ {"a": 1, "b": 2} | community.general.reveal_ansible_type }}'
# result => dict[str, int]
# Type of strings is AnsibleUnicode or str
# ----------------------------------------
# Type of strings is AnsibleUnicode, _AnsibleTaggedStr, or str
# ------------------------------------------------------------
# Dictionary. The keys are integers or strings. All values are strings.
- alias: {"AnsibleUnicode": "str"}
- alias:
AnsibleUnicode: str
_AnsibleTaggedStr: str
_AnsibleTaggedInt: int
data: {1: 'a', 'b': 'b'}
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
# result => dict[int|str, str]
# Dictionary. All keys are integers. All values are keys.
- alias: {"AnsibleUnicode": "str"}
- alias:
AnsibleUnicode: str
_AnsibleTaggedStr: str
_AnsibleTaggedInt: int
data: {1: 'a', 2: 'b'}
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
# result => dict[int, str]
# Dictionary. All keys are strings. Multiple types values.
- alias: {"AnsibleUnicode": "str"}
- alias:
AnsibleUnicode: str
_AnsibleTaggedStr: str
_AnsibleTaggedInt: int
_AnsibleTaggedFloat: float
data: {'a': 1, 'b': 1.1, 'c': 'abc', 'd': true, 'e': ['x', 'y', 'z'], 'f': {'x': 1, 'y': 2}}
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
# result => dict[str, bool|dict|float|int|list|str]
# List. Multiple types items.
- alias: {"AnsibleUnicode": "str"}
- alias:
AnsibleUnicode: str
_AnsibleTaggedStr: str
_AnsibleTaggedInt: int
_AnsibleTaggedFloat: float
data: [1, 2, 1.1, 'abc', true, ['x', 'y', 'z'], {'x': 1, 'y': 2}]
result: '{{ data | community.general.reveal_ansible_type(alias) }}'
# result => list[bool|dict|float|int|list|str]
@@ -122,6 +136,7 @@ from ansible_collections.community.general.plugins.plugin_utils.ansible_type imp
def reveal_ansible_type(data, alias=None):
"""Returns data type"""
# TODO: expose use_native_type parameter
return _ansible_type(data, alias)

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_days
short_description: Converte a duration string to days
short_description: Converts a duration string to days
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to days.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_hours
short_description: Converte a duration string to hours
short_description: Converts a duration string to hours
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to hours.

View File

@@ -49,11 +49,10 @@ _value:
type: string
"""
from collections.abc import Mapping
from configparser import ConfigParser
from io import StringIO
from ansible.errors import AnsibleFilterError
from ansible.module_utils.common._collections_compat import Mapping
from ansible.module_utils.six.moves import StringIO
from ansible.module_utils.six.moves.configparser import ConfigParser
class IniParser(ConfigParser):

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_milliseconds
short_description: Converte a duration string to milliseconds
short_description: Converts a duration string to milliseconds
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to milliseconds.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_minutes
short_description: Converte a duration string to minutes
short_description: Converts a duration string to minutes
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to minutes.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_months
short_description: Converte a duration string to months
short_description: Convert a duration string to months
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to months.

View File

@@ -0,0 +1,413 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2025, Timur Gadiev <tgadiev@gmail.com>
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import (absolute_import, division, print_function)
DOCUMENTATION = r"""
name: to_prettytable
short_description: Format a list of dictionaries as an ASCII table
version_added: "10.7.0"
author: Timur Gadiev (@tgadiev)
description:
- This filter takes a list of dictionaries and formats it as an ASCII table using the I(prettytable) Python library.
requirements:
- prettytable
options:
_input:
description: A list of dictionaries to format.
type: list
elements: dictionary
required: true
column_order:
description: List of column names to specify the order of columns in the table.
type: list
elements: string
header_names:
description: List of custom header names to use instead of dictionary keys.
type: list
elements: string
column_alignments:
description:
- >-
Dictionary where keys are column names and values are alignment settings.
Valid alignment values are C(left), C(center), C(right), C(l), C(c), or C(r).
- >-
For example, V({'name': 'left', 'id': 'right'}) will align the C(name) column to the left
and the C(id) column to the right.
type: dictionary
"""
EXAMPLES = r"""
---
- name: Set a list of users
ansible.builtin.set_fact:
users:
- name: Alice
age: 25
role: admin
- name: Bob
age: 30
role: user
- name: Display a list of users as a table
ansible.builtin.debug:
msg: >-
{{
users | community.general.to_prettytable
}}
- name: Display a table with custom column ordering
ansible.builtin.debug:
msg: >-
{{
users | community.general.to_prettytable(
column_order=['role', 'name', 'age']
)
}}
- name: Display a table with selective column output (only show name and role fields)
ansible.builtin.debug:
msg: >-
{{
users | community.general.to_prettytable(
column_order=['name', 'role']
)
}}
- name: Display a table with custom headers
ansible.builtin.debug:
msg: >-
{{
users | community.general.to_prettytable(
header_names=['User Name', 'User Age', 'User Role']
)
}}
- name: Display a table with custom alignments
ansible.builtin.debug:
msg: >-
{{
users | community.general.to_prettytable(
column_alignments={'name': 'center', 'age': 'right', 'role': 'left'}
)
}}
- name: Combine multiple options
ansible.builtin.debug:
msg: >-
{{
users | community.general.to_prettytable(
column_order=['role', 'name', 'age'],
header_names=['Position', 'Full Name', 'Years'],
column_alignments={'name': 'center', 'age': 'right', 'role': 'left'}
)
}}
"""
RETURN = r"""
_value:
description: The formatted ASCII table.
type: string
"""
try:
import prettytable
HAS_PRETTYTABLE = True
except ImportError:
HAS_PRETTYTABLE = False
from ansible.errors import AnsibleFilterError
from ansible.module_utils.common.text.converters import to_text
class TypeValidationError(AnsibleFilterError):
"""Custom exception for type validation errors.
Args:
obj: The object with incorrect type
expected: Description of expected type
"""
def __init__(self, obj, expected):
type_name = "string" if isinstance(obj, str) else type(obj).__name__
super().__init__(f"Expected {expected}, got a {type_name}")
def _validate_list_param(param, param_name, ensure_strings=True):
"""Validate a parameter is a list and optionally ensure all elements are strings.
Args:
param: The parameter to validate
param_name: The name of the parameter for error messages
ensure_strings: Whether to check that all elements are strings
Raises:
AnsibleFilterError: If validation fails
"""
# Map parameter names to their original error message format
error_messages = {
"column_order": "a list of column names",
"header_names": "a list of header names"
}
# Use the specific error message if available, otherwise use a generic one
error_msg = error_messages.get(param_name, f"a list for {param_name}")
if not isinstance(param, list):
raise TypeValidationError(param, error_msg)
if ensure_strings:
for item in param:
if not isinstance(item, str):
# Maintain original error message format
if param_name == "column_order":
error_msg = "a string for column name"
elif param_name == "header_names":
error_msg = "a string for header name"
else:
error_msg = f"a string for {param_name} element"
raise TypeValidationError(item, error_msg)
def _match_key(item_dict, lookup_key):
"""Find a matching key in a dictionary, handling type conversion.
Args:
item_dict: Dictionary to search in
lookup_key: Key to look for, possibly needing type conversion
Returns:
The matching key or None if no match found
"""
# Direct key match
if lookup_key in item_dict:
return lookup_key
# Try boolean conversion for 'true'/'false' strings
if isinstance(lookup_key, str):
if lookup_key.lower() == 'true' and True in item_dict:
return True
if lookup_key.lower() == 'false' and False in item_dict:
return False
# Try numeric conversion for string numbers
if lookup_key.isdigit() and int(lookup_key) in item_dict:
return int(lookup_key)
# No match found
return None
def _build_key_maps(data):
"""Build mappings between string keys and original keys.
Args:
data: List of dictionaries with keys to map
Returns:
Tuple of (key_map, reverse_key_map)
"""
key_map = {}
reverse_key_map = {}
# Check if the data list is not empty
if not data:
return key_map, reverse_key_map
first_dict = data[0]
for orig_key in first_dict.keys():
# Store string version of the key
str_key = to_text(orig_key)
key_map[str_key] = orig_key
# Also store lowercase version for case-insensitive lookups
reverse_key_map[str_key.lower()] = orig_key
return key_map, reverse_key_map
def _configure_alignments(table, field_names, column_alignments):
"""Configure column alignments for the table.
Args:
table: The PrettyTable instance to configure
field_names: List of field names to align
column_alignments: Dict of column alignments
"""
valid_alignments = {"left", "center", "right", "l", "c", "r"}
if not isinstance(column_alignments, dict):
return
for col_name, alignment in column_alignments.items():
if col_name in field_names:
# We already validated alignment is a string and a valid value in the main function
# Just apply it here
alignment = alignment.lower()
table.align[col_name] = alignment[0]
def to_prettytable(data, *args, **kwargs):
"""Convert a list of dictionaries to an ASCII table.
Args:
data: List of dictionaries to format
*args: Optional list of column names to specify column order
**kwargs: Optional keyword arguments:
- column_order: List of column names to specify the order
- header_names: List of custom header names
- column_alignments: Dict of column alignments (left, center, right)
Returns:
String containing the ASCII table
"""
if not HAS_PRETTYTABLE:
raise AnsibleFilterError(
'You need to install "prettytable" Python module to use this filter'
)
# === Input validation ===
# Validate list type
if not isinstance(data, list):
raise TypeValidationError(data, "a list of dictionaries")
# Validate dictionary items if list is not empty
if data and not all(isinstance(item, dict) for item in data):
invalid_item = next((item for item in data if not isinstance(item, dict)), None)
raise TypeValidationError(invalid_item, "all items in the list to be dictionaries")
# Get sample dictionary to determine fields - empty if no data
sample_dict = data[0] if data else {}
max_fields = len(sample_dict)
# === Process column order ===
# Handle both positional and keyword column_order
column_order = kwargs.pop('column_order', None)
# Check for conflict between args and column_order
if args and column_order is not None:
raise AnsibleFilterError("Cannot use both positional arguments and the 'column_order' keyword argument")
# Use positional args if provided
if args:
column_order = list(args)
# Validate column_order
if column_order is not None:
_validate_list_param(column_order, "column_order")
# Validate column_order doesn't exceed the number of fields (skip if data is empty)
if data and len(column_order) > max_fields:
raise AnsibleFilterError(
f"'column_order' has more elements ({len(column_order)}) than available fields in data ({max_fields})")
# === Process headers ===
# Determine field names and ensure they are strings
if column_order:
field_names = column_order
else:
# Use field names from first dictionary, ensuring all are strings
field_names = [to_text(k) for k in sample_dict]
# Process custom headers
header_names = kwargs.pop('header_names', None)
if header_names is not None:
_validate_list_param(header_names, "header_names")
# Validate header_names doesn't exceed the number of fields (skip if data is empty)
if data and len(header_names) > max_fields:
raise AnsibleFilterError(
f"'header_names' has more elements ({len(header_names)}) than available fields in data ({max_fields})")
# Validate that column_order and header_names have the same size if both provided
if column_order is not None and len(column_order) != len(header_names):
raise AnsibleFilterError(
f"'column_order' and 'header_names' must have the same number of elements. "
f"Got {len(column_order)} columns and {len(header_names)} headers.")
# === Process alignments ===
# Get column alignments and validate
column_alignments = kwargs.pop('column_alignments', {})
valid_alignments = {"left", "center", "right", "l", "c", "r"}
# Validate column_alignments is a dictionary
if not isinstance(column_alignments, dict):
raise TypeValidationError(column_alignments, "a dictionary for column_alignments")
# Validate column_alignments keys and values
for key, value in column_alignments.items():
# Check that keys are strings
if not isinstance(key, str):
raise TypeValidationError(key, "a string for column_alignments key")
# Check that values are strings
if not isinstance(value, str):
raise TypeValidationError(value, "a string for column_alignments value")
# Check that values are valid alignments
if value.lower() not in valid_alignments:
raise AnsibleFilterError(
f"Invalid alignment '{value}' in 'column_alignments'. "
f"Valid alignments are: {', '.join(sorted(valid_alignments))}")
# Validate column_alignments doesn't have more keys than fields (skip if data is empty)
if data and len(column_alignments) > max_fields:
raise AnsibleFilterError(
f"'column_alignments' has more elements ({len(column_alignments)}) than available fields in data ({max_fields})")
# Check for unknown parameters
if kwargs:
raise AnsibleFilterError(f"Unknown parameter(s) for to_prettytable filter: {', '.join(sorted(kwargs))}")
# === Build the table ===
table = prettytable.PrettyTable()
# Set the field names for display
display_names = header_names if header_names is not None else field_names
table.field_names = [to_text(name) for name in display_names]
# Configure alignments after setting field_names
_configure_alignments(table, display_names, column_alignments)
# Build key maps only if not using explicit column_order and we have data
key_map = {}
reverse_key_map = {}
if not column_order and data: # Only needed when using original dictionary keys and we have data
key_map, reverse_key_map = _build_key_maps(data)
# If we have an empty list with no custom parameters, return a simple empty table
if not data and not column_order and not header_names and not column_alignments:
return "++\n++"
# Process each row if we have data
for item in data:
row = []
for col in field_names:
# Try direct mapping first
if col in key_map:
row.append(item.get(key_map[col], ""))
else:
# Try to find a matching key in the item
matched_key = _match_key(item, col)
if matched_key is not None:
row.append(item.get(matched_key, ""))
else:
# Try case-insensitive lookup as last resort
lower_col = col.lower() if isinstance(col, str) else str(col).lower()
if lower_col in reverse_key_map:
row.append(item.get(reverse_key_map[lower_col], ""))
else:
# No match found
row.append("")
table.add_row(row)
return to_text(table)
class FilterModule(object):
"""Ansible core jinja2 filters."""
def filters(self):
return {
'to_prettytable': to_prettytable
}

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_seconds
short_description: Converte a duration string to seconds
short_description: Converts a duration string to seconds
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to seconds.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_time_unit
short_description: Converte a duration string to the given time unit
short_description: Converts a duration string to the given time unit
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to the given time unit.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_weeks
short_description: Converte a duration string to weeks
short_description: Converts a duration string to weeks
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to weeks.

View File

@@ -5,7 +5,7 @@
DOCUMENTATION:
name: to_years
short_description: Converte a duration string to years
short_description: Converts a duration string to years
version_added: 0.2.0
description:
- Parse a human readable time duration string and convert to years.

View File

@@ -48,8 +48,12 @@ _value:
from unicodedata import normalize
from ansible.errors import AnsibleFilterError, AnsibleFilterTypeError
from ansible.module_utils.six import text_type
from ansible.errors import AnsibleFilterError
try:
from ansible.errors import AnsibleTypeError
except ImportError:
from ansible.errors import AnsibleFilterTypeError as AnsibleTypeError
def unicode_normalize(data, form='NFC'):
@@ -64,8 +68,8 @@ def unicode_normalize(data, form='NFC'):
A normalized unicode string of the specified 'form'.
"""
if not isinstance(data, text_type):
raise AnsibleFilterTypeError("%s is not a valid input type" % type(data))
if not isinstance(data, str):
raise AnsibleTypeError("%s is not a valid input type" % type(data))
if form not in ('NFC', 'NFD', 'NFKC', 'NFKD'):
raise AnsibleFilterError("%s is not a valid form" % form)

View File

@@ -5,120 +5,132 @@
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import annotations
DOCUMENTATION = '''
author: Orion Poplawski (@opoplawski)
name: cobbler
short_description: Cobbler inventory source
version_added: 1.0.0
DOCUMENTATION = r"""
author: Orion Poplawski (@opoplawski)
name: cobbler
short_description: Cobbler inventory source
version_added: 1.0.0
description:
- Get inventory hosts from the cobbler service.
- "Uses a configuration file as an inventory source, it must end in C(.cobbler.yml) or C(.cobbler.yaml) and have a C(plugin: cobbler) entry."
- Adds the primary IP addresses to C(cobbler_ipv4_address) and C(cobbler_ipv6_address) host variables if defined in Cobbler. The primary IP address is
defined as the management interface if defined, or the interface who's DNS name matches the hostname of the system, or else the first interface found.
extends_documentation_fragment:
- inventory_cache
options:
plugin:
description: The name of this plugin, it should always be set to V(community.general.cobbler) for this plugin to recognize it as its own.
type: string
required: true
choices: ['cobbler', 'community.general.cobbler']
url:
description: URL to cobbler.
type: string
default: 'http://cobbler/cobbler_api'
env:
- name: COBBLER_SERVER
user:
description: Cobbler authentication user.
type: string
required: false
env:
- name: COBBLER_USER
password:
description: Cobbler authentication password.
type: string
required: false
env:
- name: COBBLER_PASSWORD
cache_fallback:
description: Fallback to cached results if connection to cobbler fails.
type: boolean
default: false
connection_timeout:
description: Timeout to connect to cobbler server.
type: int
required: false
version_added: 10.7.0
exclude_mgmt_classes:
description: Management classes to exclude from inventory.
type: list
default: []
elements: str
version_added: 7.4.0
exclude_profiles:
description:
- Get inventory hosts from the cobbler service.
- "Uses a configuration file as an inventory source, it must end in C(.cobbler.yml) or C(.cobbler.yaml) and have a C(plugin: cobbler) entry."
- Adds the primary IP addresses to C(cobbler_ipv4_address) and C(cobbler_ipv6_address) host variables if defined in Cobbler. The primary IP address is
defined as the management interface if defined, or the interface who's DNS name matches the hostname of the system, or else the first interface found.
extends_documentation_fragment:
- inventory_cache
options:
plugin:
description: The name of this plugin, it should always be set to V(community.general.cobbler) for this plugin to recognize it as its own.
type: string
required: true
choices: [ 'cobbler', 'community.general.cobbler' ]
url:
description: URL to cobbler.
type: string
default: 'http://cobbler/cobbler_api'
env:
- name: COBBLER_SERVER
user:
description: Cobbler authentication user.
type: string
required: false
env:
- name: COBBLER_USER
password:
description: Cobbler authentication password.
type: string
required: false
env:
- name: COBBLER_PASSWORD
cache_fallback:
description: Fallback to cached results if connection to cobbler fails.
type: boolean
default: false
exclude_mgmt_classes:
description: Management classes to exclude from inventory.
type: list
default: []
elements: str
version_added: 7.4.0
exclude_profiles:
description:
- Profiles to exclude from inventory.
- Ignored if O(include_profiles) is specified.
type: list
default: []
elements: str
include_mgmt_classes:
description: Management classes to include from inventory.
type: list
default: []
elements: str
version_added: 7.4.0
include_profiles:
description:
- Profiles to include from inventory.
- If specified, all other profiles will be excluded.
- O(exclude_profiles) is ignored if O(include_profiles) is specified.
type: list
default: []
elements: str
version_added: 4.4.0
inventory_hostname:
description:
- What to use for the ansible inventory hostname.
- By default the networking hostname is used if defined, otherwise the DNS name of the management or first non-static interface.
- If set to V(system), the cobbler system name is used.
type: str
choices: [ 'hostname', 'system' ]
default: hostname
version_added: 7.1.0
group_by:
description: Keys to group hosts by.
type: list
elements: string
default: [ 'mgmt_classes', 'owners', 'status' ]
group:
description: Group to place all hosts into.
default: cobbler
group_prefix:
description: Prefix to apply to cobbler groups.
default: cobbler_
want_facts:
description: Toggle, if V(true) the plugin will retrieve host facts from the server.
type: boolean
default: true
want_ip_addresses:
description:
- Toggle, if V(true) the plugin will add a C(cobbler_ipv4_addresses) and C(cobbleer_ipv6_addresses) dictionary to the defined O(group) mapping
interface DNS names to IP addresses.
type: boolean
default: true
version_added: 7.1.0
'''
- Profiles to exclude from inventory.
- Ignored if O(include_profiles) is specified.
type: list
default: []
elements: str
include_mgmt_classes:
description: Management classes to include from inventory.
type: list
default: []
elements: str
version_added: 7.4.0
include_profiles:
description:
- Profiles to include from inventory.
- If specified, all other profiles will be excluded.
- O(exclude_profiles) is ignored if O(include_profiles) is specified.
type: list
default: []
elements: str
version_added: 4.4.0
inventory_hostname:
description:
- What to use for the ansible inventory hostname.
- By default the networking hostname is used if defined, otherwise the DNS name of the management or first non-static interface.
- If set to V(system), the cobbler system name is used.
type: str
choices: ['hostname', 'system']
default: hostname
version_added: 7.1.0
group_by:
description: Keys to group hosts by.
type: list
elements: string
default: ['mgmt_classes', 'owners', 'status']
group:
description: Group to place all hosts into.
default: cobbler
group_prefix:
description: Prefix to apply to cobbler groups.
default: cobbler_
want_facts:
description: Toggle, if V(true) the plugin will retrieve all host facts from the server.
type: boolean
default: true
want_ip_addresses:
description:
- Toggle, if V(true) the plugin will add a C(cobbler_ipv4_addresses) and C(cobbler_ipv6_addresses) dictionary to the defined O(group) mapping
interface DNS names to IP addresses.
type: boolean
default: true
version_added: 7.1.0
facts_level:
description:
- "Set to V(normal) to gather only system-level variables."
- "Set to V(as_rendered) to gather all variables as rolled up by Cobbler."
type: string
choices: ['normal', 'as_rendered']
default: normal
version_added: 10.7.0
"""
EXAMPLES = '''
EXAMPLES = r"""
# my.cobbler.yml
plugin: community.general.cobbler
url: http://cobbler/cobbler_api
user: ansible-tester
password: secure
'''
"""
import socket
from ansible.errors import AnsibleError
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, to_safe_group_name
from ansible.module_utils.six import text_type
from ansible_collections.community.general.plugins.plugin_utils.unsafe import make_unsafe
@@ -134,6 +146,18 @@ except ImportError:
HAS_XMLRPC_CLIENT = False
class TimeoutTransport (xmlrpc_client.SafeTransport):
def __init__(self, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
super(TimeoutTransport, self).__init__()
self._timeout = timeout
self.context = None
def make_connection(self, host):
conn = xmlrpc_client.SafeTransport.make_connection(self, host)
conn.timeout = self._timeout
return conn
class InventoryModule(BaseInventoryPlugin, Cacheable):
''' Host inventory parser for ansible using cobbler as source. '''
@@ -142,7 +166,9 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
def __init__(self):
super(InventoryModule, self).__init__()
self.cache_key = None
self.connection = None
if not HAS_XMLRPC_CLIENT:
raise AnsibleError('Could not import xmlrpc client library')
def verify_file(self, path):
valid = False
@@ -153,18 +179,6 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
self.display.vvv('Skipping due to inventory source not ending in "cobbler.yaml" nor "cobbler.yml"')
return valid
def _get_connection(self):
if not HAS_XMLRPC_CLIENT:
raise AnsibleError('Could not import xmlrpc client library')
if self.connection is None:
self.display.vvvv(f'Connecting to {self.cobbler_url}\n')
self.connection = xmlrpc_client.Server(self.cobbler_url, allow_none=True)
self.token = None
if self.get_option('user') is not None:
self.token = self.connection.login(text_type(self.get_option('user')), text_type(self.get_option('password')))
return self.connection
def _init_cache(self):
if self.cache_key not in self._cache:
self._cache[self.cache_key] = {}
@@ -178,12 +192,11 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
def _get_profiles(self):
if not self.use_cache or 'profiles' not in self._cache.get(self.cache_key, {}):
c = self._get_connection()
try:
if self.token is not None:
data = c.get_profiles(self.token)
data = self.cobbler.get_profiles(self.token)
else:
data = c.get_profiles()
data = self.cobbler.get_profiles()
except (socket.gaierror, socket.error, xmlrpc_client.ProtocolError):
self._reload_cache()
else:
@@ -194,12 +207,20 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
def _get_systems(self):
if not self.use_cache or 'systems' not in self._cache.get(self.cache_key, {}):
c = self._get_connection()
try:
if self.token is not None:
data = c.get_systems(self.token)
data = self.cobbler.get_systems(self.token)
else:
data = c.get_systems()
data = self.cobbler.get_systems()
# If more facts are requested, gather them all from Cobbler
if self.facts_level == "as_rendered":
for i, host in enumerate(data):
self.display.vvvv(f"Gathering all facts for {host['name']}\n")
if self.token is not None:
data[i] = self.cobbler.get_system_as_rendered(host['name'], self.token)
else:
data[i] = self.cobbler.get_system_as_rendered(host['name'])
except (socket.gaierror, socket.error, xmlrpc_client.ProtocolError):
self._reload_cache()
else:
@@ -229,6 +250,17 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
# get connection host
self.cobbler_url = self.get_option('url')
self.display.vvvv(f'Connecting to {self.cobbler_url}\n')
if 'connection_timeout' in self._options:
self.cobbler = xmlrpc_client.Server(self.cobbler_url, allow_none=True,
transport=TimeoutTransport(timeout=self.get_option('connection_timeout')))
else:
self.cobbler = xmlrpc_client.Server(self.cobbler_url, allow_none=True)
self.token = None
if self.get_option('user') is not None:
self.token = self.cobbler.login(str(self.get_option('user')), str(self.get_option('password')))
self.cache_key = self.get_cache_key(path)
self.use_cache = cache and self.get_option('cache')
@@ -238,6 +270,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
self.include_profiles = self.get_option('include_profiles')
self.group_by = self.get_option('group_by')
self.inventory_hostname = self.get_option('inventory_hostname')
self.facts_level = self.get_option('facts_level')
for profile in self._get_profiles():
if profile['parent']:
@@ -319,7 +352,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
# Add host to groups specified by group_by fields
for group_by in self.group_by:
if host[group_by] == '<<inherit>>':
if host[group_by] == '<<inherit>>' or host[group_by] == '':
groups = []
else:
groups = [host[group_by]] if isinstance(host[group_by], str) else host[group_by]

View File

@@ -7,56 +7,56 @@
from __future__ import annotations
DOCUMENTATION = '''
name: gitlab_runners
author:
- Stefan Heitmüller (@morph027) <stefan.heitmueller@gmx.com>
short_description: Ansible dynamic inventory plugin for GitLab runners.
requirements:
- python-gitlab > 1.8.0
extends_documentation_fragment:
- constructed
description:
- Reads inventories from the GitLab API.
- Uses a YAML configuration file gitlab_runners.[yml|yaml].
options:
plugin:
description: The name of this plugin, it should always be set to 'gitlab_runners' for this plugin to recognize it as its own.
type: str
required: true
choices:
- gitlab_runners
- community.general.gitlab_runners
server_url:
description: The URL of the GitLab server, with protocol (i.e. http or https).
env:
- name: GITLAB_SERVER_URL
version_added: 1.0.0
type: str
required: true
api_token:
description: GitLab token for logging in.
env:
- name: GITLAB_API_TOKEN
version_added: 1.0.0
type: str
aliases:
- private_token
- access_token
filter:
description: filter runners from GitLab API
env:
- name: GITLAB_FILTER
version_added: 1.0.0
type: str
choices: ['active', 'paused', 'online', 'specific', 'shared']
verbose_output:
description: Toggle to (not) include all available nodes metadata
type: bool
default: true
'''
DOCUMENTATION = r"""
name: gitlab_runners
author:
- Stefan Heitmüller (@morph027) <stefan.heitmueller@gmx.com>
short_description: Ansible dynamic inventory plugin for GitLab runners.
requirements:
- python-gitlab > 1.8.0
extends_documentation_fragment:
- constructed
description:
- Reads inventories from the GitLab API.
- Uses a YAML configuration file gitlab_runners.[yml|yaml].
options:
plugin:
description: The name of this plugin, it should always be set to 'gitlab_runners' for this plugin to recognize it as its own.
type: str
required: true
choices:
- gitlab_runners
- community.general.gitlab_runners
server_url:
description: The URL of the GitLab server, with protocol (i.e. http or https).
env:
- name: GITLAB_SERVER_URL
version_added: 1.0.0
type: str
required: true
api_token:
description: GitLab token for logging in.
env:
- name: GITLAB_API_TOKEN
version_added: 1.0.0
type: str
aliases:
- private_token
- access_token
filter:
description: filter runners from GitLab API
env:
- name: GITLAB_FILTER
version_added: 1.0.0
type: str
choices: ['active', 'paused', 'online', 'specific', 'shared']
verbose_output:
description: Toggle to (not) include all available nodes metadata
type: bool
default: true
"""
EXAMPLES = '''
EXAMPLES = r"""
---
# gitlab_runners.yml
plugin: community.general.gitlab_runners
@@ -79,7 +79,7 @@ keyed_groups:
# hint: labels containing special characters will be converted to safe names
- key: 'tag_list'
prefix: tag
'''
"""
from ansible.errors import AnsibleError, AnsibleParserError
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable

View File

@@ -6,71 +6,71 @@
from __future__ import annotations
DOCUMENTATION = '''
name: icinga2
short_description: Icinga2 inventory source
version_added: 3.7.0
author:
- Cliff Hults (@BongoEADGC6) <cliff.hults@gmail.com>
DOCUMENTATION = r"""
name: icinga2
short_description: Icinga2 inventory source
version_added: 3.7.0
author:
- Cliff Hults (@BongoEADGC6) <cliff.hults@gmail.com>
description:
- Get inventory hosts from the Icinga2 API.
- "Uses a configuration file as an inventory source, it must end in
C(.icinga2.yml) or C(.icinga2.yaml)."
extends_documentation_fragment:
- constructed
options:
strict:
version_added: 4.4.0
compose:
version_added: 4.4.0
groups:
version_added: 4.4.0
keyed_groups:
version_added: 4.4.0
plugin:
description: Name of the plugin.
required: true
type: string
choices: ['community.general.icinga2']
url:
description: Root URL of Icinga2 API.
type: string
required: true
user:
description: Username to query the API.
type: string
required: true
password:
description: Password to query the API.
type: string
required: true
host_filter:
description:
- Get inventory hosts from the Icinga2 API.
- "Uses a configuration file as an inventory source, it must end in
C(.icinga2.yml) or C(.icinga2.yaml)."
extends_documentation_fragment:
- constructed
options:
strict:
version_added: 4.4.0
compose:
version_added: 4.4.0
groups:
version_added: 4.4.0
keyed_groups:
version_added: 4.4.0
plugin:
description: Name of the plugin.
required: true
type: string
choices: ['community.general.icinga2']
url:
description: Root URL of Icinga2 API.
type: string
required: true
user:
description: Username to query the API.
type: string
required: true
password:
description: Password to query the API.
type: string
required: true
host_filter:
description:
- An Icinga2 API valid host filter. Leave blank for no filtering
type: string
required: false
validate_certs:
description: Enables or disables SSL certificate verification.
type: boolean
default: true
inventory_attr:
description:
- Allows the override of the inventory name based on different attributes.
- This allows for changing the way limits are used.
- The current default, V(address), is sometimes not unique or present. We recommend to use V(name) instead.
type: string
default: address
choices: ['name', 'display_name', 'address']
version_added: 4.2.0
group_by_hostgroups:
description:
- Uses Icinga2 hostgroups as groups.
type: boolean
default: true
version_added: 8.4.0
'''
- An Icinga2 API valid host filter. Leave blank for no filtering
type: string
required: false
validate_certs:
description: Enables or disables SSL certificate verification.
type: boolean
default: true
inventory_attr:
description:
- Allows the override of the inventory name based on different attributes.
- This allows for changing the way limits are used.
- The current default, V(address), is sometimes not unique or present. We recommend to use V(name) instead.
type: string
default: address
choices: ['name', 'display_name', 'address']
version_added: 4.2.0
group_by_hostgroups:
description:
- Uses Icinga2 hostgroups as groups.
type: boolean
default: true
version_added: 8.4.0
"""
EXAMPLES = r'''
EXAMPLES = r"""
# my.icinga2.yml
plugin: community.general.icinga2
url: http://localhost:5665
@@ -93,14 +93,14 @@ compose:
# set 'ansible_user' and 'ansible_port' from icinga2 host vars
ansible_user: icinga2_attributes.vars.ansible_user
ansible_port: icinga2_attributes.vars.ansible_port | default(22)
'''
"""
import json
from urllib.error import HTTPError
from ansible.errors import AnsibleParserError
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
from ansible.module_utils.urls import open_url
from ansible.module_utils.six.moves.urllib.error import HTTPError
from ansible_collections.community.general.plugins.plugin_utils.unsafe import make_unsafe
@@ -291,11 +291,11 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
self.group_by_hostgroups = self.get_option('group_by_hostgroups')
if self.templar.is_template(self.icinga2_url):
self.icinga2_url = self.templar.template(variable=self.icinga2_url, disable_lookups=False)
self.icinga2_url = self.templar.template(variable=self.icinga2_url)
if self.templar.is_template(self.icinga2_user):
self.icinga2_user = self.templar.template(variable=self.icinga2_user, disable_lookups=False)
self.icinga2_user = self.templar.template(variable=self.icinga2_user)
if self.templar.is_template(self.icinga2_password):
self.icinga2_password = self.templar.template(variable=self.icinga2_password, disable_lookups=False)
self.icinga2_password = self.templar.template(variable=self.icinga2_password)
self.icinga2_url = f"{self.icinga2_url.rstrip('/')}/v1"

View File

@@ -6,85 +6,99 @@
from __future__ import annotations
DOCUMENTATION = '''
name: iocage
short_description: iocage inventory source
version_added: 10.2.0
author:
- Vladimir Botka (@vbotka)
requirements:
- iocage >= 1.8
DOCUMENTATION = r"""
name: iocage
short_description: iocage inventory source
version_added: 10.2.0
author:
- Vladimir Botka (@vbotka)
requirements:
- iocage >= 1.8
description:
- Get inventory hosts from the iocage jail manager running on O(host).
- By default, O(host) is V(localhost). If O(host) is not V(localhost) it
is expected that the user running Ansible on the controller can
connect to the O(host) account O(user) with SSH non-interactively and
execute the command C(iocage list).
- Uses a configuration file as an inventory source, it must end
in C(.iocage.yml) or C(.iocage.yaml).
extends_documentation_fragment:
- ansible.builtin.constructed
- ansible.builtin.inventory_cache
options:
plugin:
description:
- Get inventory hosts from the iocage jail manager running on O(host).
- By default, O(host) is V(localhost). If O(host) is not V(localhost) it
is expected that the user running Ansible on the controller can
connect to the O(host) account O(user) with SSH non-interactively and
execute the command C(iocage list).
- Uses a configuration file as an inventory source, it must end
in C(.iocage.yml) or C(.iocage.yaml).
extends_documentation_fragment:
- ansible.builtin.constructed
- ansible.builtin.inventory_cache
options:
plugin:
description:
- The name of this plugin, it should always be set to
V(community.general.iocage) for this plugin to recognize
it as its own.
required: true
choices: ['community.general.iocage']
type: str
host:
description: The IP/hostname of the C(iocage) host.
type: str
default: localhost
user:
description:
- C(iocage) user.
It is expected that the O(user) is able to connect to the
O(host) with SSH and execute the command C(iocage list).
This option is not required if O(host) is V(localhost).
type: str
sudo:
description:
- Enable execution as root.
- This requires passwordless sudo of the command C(iocage list*).
type: bool
default: false
version_added: 10.3.0
sudo_preserve_env:
description:
- Preserve environment if O(sudo) is enabled.
- This requires C(SETENV) sudoers tag.
type: bool
default: false
version_added: 10.3.0
get_properties:
description:
- Get jails' properties.
Creates dictionary C(iocage_properties) for each added host.
type: bool
default: false
env:
description:
- O(user)'s environment on O(host).
- Enable O(sudo_preserve_env) if O(sudo) is enabled.
type: dict
default: {}
notes:
- You might want to test the command C(ssh user@host iocage list -l) on
the controller before using this inventory plugin with O(user) specified
and with O(host) other than V(localhost).
- If you run this inventory plugin on V(localhost) C(ssh) is not used.
In this case, test the command C(iocage list -l).
- This inventory plugin creates variables C(iocage_*) for each added host.
- The values of these variables are collected from the output of the
command C(iocage list -l).
- The names of these variables correspond to the output columns.
- The column C(NAME) is used to name the added host.
'''
- The name of this plugin, it should always be set to
V(community.general.iocage) for this plugin to recognize
it as its own.
required: true
choices: ['community.general.iocage']
type: str
host:
description: The IP/hostname of the C(iocage) host.
type: str
default: localhost
user:
description:
- C(iocage) user.
It is expected that the O(user) is able to connect to the
O(host) with SSH and execute the command C(iocage list).
This option is not required if O(host) is V(localhost).
type: str
sudo:
description:
- Enable execution as root.
- This requires passwordless sudo of the command C(iocage list*).
type: bool
default: false
version_added: 10.3.0
sudo_preserve_env:
description:
- Preserve environment if O(sudo) is enabled.
- This requires C(SETENV) sudoers tag.
type: bool
default: false
version_added: 10.3.0
get_properties:
description:
- Get jails' properties.
Creates dictionary C(iocage_properties) for each added host.
type: bool
default: false
env:
description:
- O(user)'s environment on O(host).
- Enable O(sudo_preserve_env) if O(sudo) is enabled.
type: dict
default: {}
hooks_results:
description:
- List of paths to the files in a jail.
- Content of the files is stored in the items of the list C(iocage_hooks).
- If a file is not available the item keeps the dash character C(-).
- The variable C(iocage_hooks) is not created if O(hooks_results) is empty.
type: list
elements: path
version_added: 10.4.0
notes:
- You might want to test the command C(ssh user@host iocage list -l) on
the controller before using this inventory plugin with O(user) specified
and with O(host) other than V(localhost).
- If you run this inventory plugin on V(localhost) C(ssh) is not used.
In this case, test the command C(iocage list -l).
- This inventory plugin creates variables C(iocage_*) for each added host.
- The values of these variables are collected from the output of the
command C(iocage list -l).
- The names of these variables correspond to the output columns.
- The column C(NAME) is used to name the added host.
- The option O(hooks_results) expects the C(poolname) of a jail is mounted to
C(/poolname). For example, if you activate the pool C(iocage) this plugin
expects to find the O(hooks_results) items in the path
C(/iocage/iocage/jails/<name>/root). If you mount the C(poolname) to a
different path the easiest remedy is to create a symlink.
"""
EXAMPLES = '''
EXAMPLES = r"""
---
# file name must end with iocage.yaml or iocage.yml
plugin: community.general.iocage
@@ -142,7 +156,19 @@ keyed_groups:
key: iocage_release
- prefix: state
key: iocage_state
'''
---
# Read the file /var/db/dhclient-hook.address.epair0b in the jails and use it as ansible_host
plugin: community.general.iocage
host: 10.1.0.73
user: admin
hooks_results:
- /var/db/dhclient-hook.address.epair0b
compose:
ansible_host: iocage_hooks.0
groups:
test: inventory_hostname.startswith('test')
"""
import re
import os
@@ -226,6 +252,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
sudo_preserve_env = self.get_option('sudo_preserve_env')
env = self.get_option('env')
get_properties = self.get_option('get_properties')
hooks_results = self.get_option('hooks_results')
cmd = []
my_env = os.environ.copy()
@@ -286,6 +313,50 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
self.get_properties(t_stdout, results, hostname)
if hooks_results:
cmd_get_pool = cmd.copy()
cmd_get_pool.append(self.IOCAGE)
cmd_get_pool.append('get')
cmd_get_pool.append('--pool')
try:
p = Popen(cmd_get_pool, stdout=PIPE, stderr=PIPE, env=my_env)
stdout, stderr = p.communicate()
if p.returncode != 0:
raise AnsibleError(
f'Failed to run cmd={cmd_get_pool}, rc={p.returncode}, stderr={to_native(stderr)}')
try:
iocage_pool = to_text(stdout, errors='surrogate_or_strict').strip()
except UnicodeError as e:
raise AnsibleError(f'Invalid (non unicode) input returned: {e}') from e
except Exception as e:
raise AnsibleError(f'Failed to get pool: {e}') from e
for hostname, host_vars in results['_meta']['hostvars'].items():
iocage_hooks = []
for hook in hooks_results:
path = "/" + iocage_pool + "/iocage/jails/" + hostname + "/root" + hook
cmd_cat_hook = cmd.copy()
cmd_cat_hook.append('cat')
cmd_cat_hook.append(path)
try:
p = Popen(cmd_cat_hook, stdout=PIPE, stderr=PIPE, env=my_env)
stdout, stderr = p.communicate()
if p.returncode != 0:
iocage_hooks.append('-')
continue
try:
iocage_hook = to_text(stdout, errors='surrogate_or_strict').strip()
except UnicodeError as e:
raise AnsibleError(f'Invalid (non unicode) input returned: {e}') from e
except Exception:
iocage_hooks.append('-')
else:
iocage_hooks.append(iocage_hook)
results['_meta']['hostvars'][hostname]['iocage_hooks'] = iocage_hooks
return results
def get_jails(self, t_stdout, results):

View File

@@ -5,79 +5,79 @@
from __future__ import annotations
DOCUMENTATION = r'''
name: linode
author:
- Luke Murphy (@decentral1se)
short_description: Ansible dynamic inventory plugin for Linode.
requirements:
- linode_api4 >= 2.0.0
description:
- Reads inventories from the Linode API v4.
- Uses a YAML configuration file that ends with linode.(yml|yaml).
- Linode labels are used by default as the hostnames.
- The default inventory groups are built from groups (deprecated by
Linode) and not tags.
extends_documentation_fragment:
- constructed
- inventory_cache
options:
cache:
version_added: 4.5.0
cache_plugin:
version_added: 4.5.0
cache_timeout:
version_added: 4.5.0
cache_connection:
version_added: 4.5.0
cache_prefix:
version_added: 4.5.0
plugin:
description: Marks this as an instance of the 'linode' plugin.
type: string
required: true
choices: ['linode', 'community.general.linode']
ip_style:
description: Populate hostvars with all information available from the Linode APIv4.
type: string
default: plain
choices:
- plain
- api
version_added: 3.6.0
access_token:
description: The Linode account personal access token.
type: string
required: true
env:
- name: LINODE_ACCESS_TOKEN
regions:
description: Populate inventory with instances in this region.
default: []
type: list
elements: string
tags:
description: Populate inventory only with instances which have at least one of the tags listed here.
default: []
type: list
elements: string
version_added: 2.0.0
types:
description: Populate inventory with instances with this type.
default: []
type: list
elements: string
strict:
version_added: 2.0.0
compose:
version_added: 2.0.0
groups:
version_added: 2.0.0
keyed_groups:
version_added: 2.0.0
'''
DOCUMENTATION = r"""
name: linode
author:
- Luke Murphy (@decentral1se)
short_description: Ansible dynamic inventory plugin for Linode.
requirements:
- linode_api4 >= 2.0.0
description:
- Reads inventories from the Linode API v4.
- Uses a YAML configuration file that ends with linode.(yml|yaml).
- Linode labels are used by default as the hostnames.
- The default inventory groups are built from groups (deprecated by
Linode) and not tags.
extends_documentation_fragment:
- constructed
- inventory_cache
options:
cache:
version_added: 4.5.0
cache_plugin:
version_added: 4.5.0
cache_timeout:
version_added: 4.5.0
cache_connection:
version_added: 4.5.0
cache_prefix:
version_added: 4.5.0
plugin:
description: Marks this as an instance of the 'linode' plugin.
type: string
required: true
choices: ['linode', 'community.general.linode']
ip_style:
description: Populate hostvars with all information available from the Linode APIv4.
type: string
default: plain
choices:
- plain
- api
version_added: 3.6.0
access_token:
description: The Linode account personal access token.
type: string
required: true
env:
- name: LINODE_ACCESS_TOKEN
regions:
description: Populate inventory with instances in this region.
default: []
type: list
elements: string
tags:
description: Populate inventory only with instances which have at least one of the tags listed here.
default: []
type: list
elements: string
version_added: 2.0.0
types:
description: Populate inventory with instances with this type.
default: []
type: list
elements: string
strict:
version_added: 2.0.0
compose:
version_added: 2.0.0
groups:
version_added: 2.0.0
keyed_groups:
version_added: 2.0.0
"""
EXAMPLES = r'''
EXAMPLES = r"""
---
# Minimal example. `LINODE_ACCESS_TOKEN` is exposed in environment.
plugin: community.general.linode
@@ -124,7 +124,7 @@ access_token: foobar
ip_style: api
compose:
ansible_host: "ipv4 | community.general.json_query('[?public==`false`].address') | first"
'''
"""
from ansible.errors import AnsibleError
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
@@ -150,7 +150,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
access_token = self.get_option('access_token')
if self.templar.is_template(access_token):
access_token = self.templar.template(variable=access_token, disable_lookups=False)
access_token = self.templar.template(variable=access_token)
if access_token is None:
raise AnsibleError((

Some files were not shown because too many files have changed in this diff Show More